| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452 |
- var __defProp = Object.defineProperty;
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
- var __publicField = (obj, key, value) => {
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
- return value;
- };
- 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 icons$1 = {
- "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";
- const ON_LOAD = "onLoad";
- const ON_UNLOAD = "onUnload";
- 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 onLoad = /* @__PURE__ */ createHook(ON_LOAD);
- const onUnload = /* @__PURE__ */ createHook(ON_UNLOAD);
- 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$2 = {
- // 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,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABLKADAAQAAAABAAABLAAAAADYYILnAABAAElEQVR4Ae29CZhkV3kefNeq6m2W7tn3nl0aCbHIAgmQPGB+sLCNzSID9g9PYrAf57d/+4+DiW0cy8QBJ06c2In/PLFDHJ78+MGCGNsYgyxwIwktwEijAc1ohtmnZ+2Z7p5eq6vu9r/vuXWrq25VdVV1V3dXVX9Hmj73nv285963vvOd75yraeIEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQaD8E9PbrkvRopSMwMBBYRs+5O/yJS68cPnzYXel4tFP/jXbqjPRFEAiCQNe6Bw/6gdFn9Oy9Q90LLG2DgBBW2wyldIQIPPPCte2a5q3jtR+4ff/4wuBuXotrDwSEsNpjHKUXQODppy+udYJMEUEZgbd94DvnNwlA7YGAEFZ7jOOK78Xp06eTTkq7sxwQhmXuf/754VXl4iSstRAQwmqt8ZLWlkHg0UcD49qYfUjXfLtMtOZ7npExJu4iqZWLl7DWQUAIq3XGSlpaAYHD77q8xwuCOSUoXw8Sl0eMux977DGzQjES3AIICGG1wCBJEysj8PXnz230XXdr5RQFMYbRvWnv6w8UhMhliyGwYghr4Pjg3oEXL34ey9zyC9tiD2ml5h47dr1LN7S6CMjz/A3PvHh1Z6UyJby5EVgRhKUe7Kz/JU0LfvrJo5f+Y3MPibSuFgQGBgasYSd9l6GDsup0WS/T/9RTp9fXmU2SNwECdQ92E7S57iaMeJnPQLK6ixkDLfjlb7546RfrLkQyNBcC3dsP6oHWMd9G+V3JgwPHh7rnm1/yLQ8CbU9Y33zp0j+nZFUMb/DHmB7+SHGY3LUKAk8cObtD00xlHDrfNge+Z2ozU3c9dvx4Yr5lSL6lR6CtCWvg6OAPw9z538ZhhZRl6XrwhW8du1KX/iNejtwvPQIDR8+vSRqJ/obU7GupjdNdh2gW0ZDypJBFR6BtB2rg2OVtuub9JcmpHIpBoK1xfffLzx4f7C0XL2HNiYDp6bs9z23Ypn1fC1Y/9PCFDc3ZW2lVHIG2JKzTp4Ok7nv/G6Q054MIvda+bNb74pEgKGtwGAdL7pcfAa8vOKEZ2kyjWuLr7uDh+/qvN6o8KWdxEWhLwroyeek/g4zuqwU6kNrhyZcu/UktaSXN8iNwuL9/RuvVXtJ9PbPQ1vhmcP6t9+47u9ByJP/SIdB2hDVw9MJHQFYfrQdCph84evFX68kjaZcPAZJWwjMXRFpJ2zr91tfuvrh8vZCa54NA2xGWrunvmg8QWCJ/N4ir7fCYDxatkOeBB7an501agXbygVdvv9IK/ZQ2FiPQdi9osGbH+zRNf7y4m9Xu9Me7N9nv0HXdr5ZS4psHgXpJC9P/wDRTx0Vn1TxjWG9LGrbaUm/Fi5meSvcrkxf/Cg/ow9XqAUk91v3qHT97r6471dJKfHMi8Oyzgx1Z03t1YAQVT2MwgsC3u+yXHzi0faQ5eyGtqgWBtpOw2Ol9+/TM+sTOn8L08MtzgQCy+tOHXr3jA0JWc6HU/HF5Scssr4jXcYqfP6V/T8iq+ceyWgvbUsKKOn38eJAYyl56TAuCEr2WYei//9Crd/5GlFb81kdASVopSFrerKRlaoZj9HR+700H10+0fg+lB21NWBxe2lhNHsUpDZr27mi4dV379R9+za4/iO7Fbx8ECknLCPTsTDJ17O33bJpqnx6u7J60PWFxeAcCbMV56dJfQKf1bkMLfuGh1+76zMoe9vbuPUnLsb2DtmOe5HSxvXsrvWtLBEhaTx29+Ma27Jx0ShAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQaEsEVoQdVluO3BJ06ptHL34b1XRjp4Ch6Rq24+kmjG4Nwwg+9uA9u/73EjRBqhAEihAoe3xwUQq5WTYEzp0b3ZnV/Ncf6O/9AvY9wlh/6dy3X7ncN512Zw9BVLXjuAP4np44vnQtkZoEgVkEhLBmsWiKqwsXpjbPBOn3gRfenwnc+7GBe+zsjclvonFDS9nA9Iy/u3x9+vAP3735VPk4CRUEFhcBIazFxbfm0k9fHD7k+v4nQFaPQIrx8Gmyx/GJ0J/t7ez7mw0b9MmaC2pQQgh0/ZSm4g5TwueWWtqLt0HuVy4CQljLPPYnB0depTn+b3t+8B4t0AdBUv93h2H9xc6da0aXs2m+r1WQsLRnl7NdUvfKRkAIa5nG//r1oGtsZvjTgev/kqYHF/TA+AXoqv4npJemOEiQU1Eo2l+G0movBK1UBBPU7s9E1+ILAkuNgKwSLjXiqO/khVtvARH8dxDBRkMzPrF/V+9/BlG5y9CUqlXinHv9mRPXtvuus88L9H3JPv2zD2yXExCqAicJBIFWRwAvv3Xqwq0/Pnn+lv/K+ZvfPH3p9p5W75O0fxaBp793ce3AwIDMWmYhafiVgNtwSMsXeHp4eNXJC8Nf0PAdRCiuf/XgrnWUqsqotcvnl9DmRkCdweX4b9N7+m/ih+mbMraLM14yJVwcXItKpT1VRve+ArC3Qqn+3gM7132jKEGZm6tXg86J7OhDfuA/iHwPUpfUZSfu2L59tXxEoQxeyxkEgjKeOnLxHb4RqC+NY5H3+2953d4XlrNN7Vq3ENYij+yZwbG9jpt9GkBPQ5H9zgP9607OVeWp87cOQtn9zwJf+xDMNFfj+jryPqXpxj8c2Nn7P+SXey70lidu4IXzb0DNB4tr9751+HV7zxSHyd1CERDCWiiCc+QPjUCnsaqmZ62O5IN7N/VUNP48ee7mAZDTf4Tt049iUG4Guv4ZfNLos9UIbo7qJWoJEHjy+bP7fNsoOcnW0A0/aacef8PdG28sQTNWTBVCWIs01OfPj66BpfqTmq732UnjgT1bei+Vq4pTv7HM8Ceg2/o1qLQug7T+FaaM3IqTLZdewpoHgYEjV9fphvOj+OShWa5V+CxvZtpzv/LwG/aNl4uXsPoRwI+4uEYjAJ2GmdG8L0FK2mYa+tsrkdXZy+P7x2ZuHdW14P+BLdank9q6Qwd3rf+ckFWjR6Tx5Q2cP58K9Jm3VCIr1ogt48lO237r3//96YofeG18y9q7RFklXITxPXV+5DchKb3ZDMy37Nu5tuxG4R9cHH6b42QfAzlds+3EPXu2rfrBIjRFilwkBIIR7SHoJDurFU89ZOd680Gke6JaWomvjoBIWNUxqivFD87fej0e0n8Fwvr0/t1rnyqX+QfnRz7g+8FX8Rv8vL3auF/IqhxKzR2WCPxXqKeq3krDTdj2ierpJEUtCIgOqxaUakwzNBR0D09yiqePHOjveyOkpxLr9VMXb73V97S/h3nDXx7Y2fdPkAYbncW1IgIDxy5vM7LZt/hgrnLtxyaBrJNxv/72N+6tuNhSLp+EVUZACKsyNnXHvHL+1qcgNf2KbSXu2bt9dcmS9qlzo/fARgcmCtpzB3b1/Vg5QiuslLowENyDWDn8cSjl98PgdBviu03N+rl9/WufLEwr18uDwLdevLTF1YK3xnVZ2HI1bUxrT7z5zTuXdRP78qCyeLUKYTUI25OXbm4JPO00TBj+6I7+db8ZL3ZwMOiYdG4dA1lN9HWte2iuI2NAVPapC8O/CGPR34Ip/AZIbIMo7yX8G9QMbcS09P+2b1vf5XgdrXaPfiYns9oeLLEd8D1/B7Dp0E1jGP042pXQj7RKf546cmGzp+tv1TRf6YQD35/QO3seP3xow5IfC9QqmM23naJ0ny9ysXwgq98BWc0kVhv/Nhalbqe8kd/Fr8MOSEr3zEVWrwyO3I29hl+E9LUHGf+nAXI6sGPdd8uV2YphIKnE5IyL6bLxk7cn3bdkHHefrpvJAExMZ1uBZmqeNzXtfzUzk/m/ens7LjV7Px+8d9e1579/44l0duZtge+Np5zEEw8c2pBu9na3YvtEwmrAqNE8IZvNHsep5//yjl3r/0O8yFOXbv0QCO05gP0JGIL+fjw+uj91YeRh/Dp/PtCDM7Zpfmjvjt6Xo7hW9ycmJjaYduf7Hdf/8HTGfa3rG9rYxLSWnsloPg7fijZV8oFM2Ja2a9t6EJd7bCztvHP7us4rrdD/r3/7ct9I99jEI4cOiQ3dIg2YEFYDgOUJDFj1e8TqX7cT4kImXuQr5279A4DeBEX8ayvprU4N3rovcALot/TH13T0fXDTJn0qXk4r3k9OTm4y7a6PzjjORzOOvn1kbEqbnEprPhRzwAKzwFLHk05hv6Yd6N+o3R6beG50aPSdr3qV6IJKkVp5ITIlXOCYn4Yexr0w/DO6YXymHFlR0e5r7tsM3fxgJbI6fW1ivTeT+SsYmr54cFff+5Cu5X+hb94Merp6/J/PusGvTE6724eGJ7RpSFOkKPCUZvBPBccoHBet3Rwe13rX9tw/PjXzZ5hKvr8SfhWKkeA2REAIa4GD6p0feRdWBnvxjv2PckVhVfBf4A29uG/X2i+Ui2eYn8n8NryuDr3jPfWSFV5k44UT137eshIP2K7/64cObbheqZ6lCp+Ydt8TBO7vTM5od1+/NR4SFVhoLpKKt410lnE8LTMzo3V2dLznxLkhYgQ9obiVjEDln7mVjEodfYcpw+MAsftg/7qSDbAnb97sCSb0Yei2fqOcbovVqKNnNO8HmAE9Cv3Wp+uoWjt27HpXNqH9WTKR+kBHKqEFbvo5y3N/avfu4g23R45f3WGa1k9ZicTd0zPTf/f6O7f8dT311Jp2fHzmgJlI/N70jPPe4bEZ6Kg4qw0lqlrLiNKBiLWerpTW25PUbkPXZViW62ecHz+4d8PXojTirzwEyhq8rTwYFtRjvpX/rlwJ+iSXugPbMuyKBOHo3geRJtuT7PujcmVUCuPJlhnL/9NUqvMD2eyM5sxMaIlE4n7XML907tyNjcxHQjty4sZv66Z1xEok/xNW5n4uZSf+8sT5m++vVO58wkEu5sR09pd9w/rWyET2vReujiqygrSopn/zKZN5qMeirotKeTyolm7p/+X06Wvr51ue5Gt9BISwFjiGsLl6N6SrvylXDNTK70D4mX071pwtF88w6Jd/DG/1E1u26NOV0pQL71y3/8PJVOcHMzPTWkcCH2YGOaTTaS2RTN6f1fQvvvDK1bdnbO2JZCr1SeRfn05Pa1PTU0gXJBKW+ecnzlxvCGndhFQ1NRP8bcY1/vjS9bF1V26MwHwsVKiXa3etYVw1TNhYJ3TDjQCO42jJVMcez7J+t9YyJF37ISCEtahjGjxkGDr2DJZ31D8h5vUQJL5RPkXlUMM07u3qSGidICvkzzuSlmlZb0olrK9hD9v9JCrPC196JoPMAolFg6CV+PPj54YeyWecx8Vk2v1Q0rSfhFT18LnBmzBRyNalp5qrSuq7kiAsh4SFa7oZ9M0wzI+cPHOjZPo9V1kS1z4ICGEt4lhiCvZrSa2jol7qzPXJPk6nIGbVbWfUvcr7hO9MP97ZVXpggOu6ajplYStj7l1XvbRMXbPAbp6HzSSBlkraNknrvfVCcPt2sHYi7f3pTDb47KUbYxuvKqkKpYBXKBnV869c3WgbDEixAck0FGFFfEzJzbIsO9C1TyrcymWWsLZGIHoW2rqTzdo5dXyykz0NC8l779i5vu4zwM+eHVntGP5jqVTq/6AkVc5NZ3wNH2lVxNWZNIukMSjiNd9z0+CHp5DXAdX4SAg203w8GB5IATtODHzdK8C15kEjhXvNS9rWA11dnfcMDY9prscss48RySakrOLWqODCoIKAgkuVgsS0urtD60haeV1YYVbbtjUn6/74HXvW/11huFy3PwKzT1r797Upe3jq4sib9u9Y+wxe+vh7W1N7jx49v6ZzbffnQD4/Cj1Pfjx54XiBls6GVuTUc9mQsOIO9mPQFdkIRlz4fy5JLm2ZMOqTcJaXIqpcqnixVe+rdbZ3dbc2OT0D0wZIibHSksmklslknvx+//q3PiKnXcTQae/b+LPQ3r1t0969cOL6G7o6E09qgZegdMJBpVQ1DbKCpyUt6oPKz/4NEJalCAuZFIuEVBJd+jgLh4rvAiFqUVGkhJZMWFp3Z0obGSu/d5gSnWmavuO6h+/cvYHSobgVgoAYjrb4QPMUiGtj1/79jBMkLBwiTlMASlYzTkhWCJyTrGAyMOFkst/BoYMmuIIyGJYcMXMMdNwHPhYN1qWS1t6ZLGaKZL8yzFXTr15BooLLMugHMBRNKgW+It8y9TEcJGt4rvcRFCCEVQbFdg0Swmrxkb0+cf2XOzq73kgdFieEXF2jdEUJKQH6SVWQrNjtZDKlpTPp38U58iUbthk/Ph7sN6zg/xudSGvD4xkq6otcnnjyF0XRRTflkyC0IIJE1JG0QbqGNpMNp5xFhRTcZDNoj66988SFm5vv3LX+WkGUXLYxAuXnCW3c4XbqGs9hwjv+a9lsuN+ahOJSCoLjNDAFvVUll0p1aNPp6adTweSflEszPO48oFn+4yOTmR+6enOshKyYhzWpf/jDuuf6x2aV/qNRaPG/1d0gUXWCA0uu7GhMmkqmerEc8KOVU0lMuyFQ+Ylut562YX9Sncmf7Ojo3BDZWbGLtMkiUVXSWTFNuMqWuYG530f7+/tnGFboxsfdd9mm8XdDo9O7rg6NFq0CFqZr5DWlK9qV0fZqGvZchSuPlevB2VmG/hOV4yWm3RAQwmrhEcW64qu4ykfJho52Vp3J8quBYQooqWDKADftBd6HD+5efyoKj/zR8ew/hWXY56/cnFh7a3RCTTGjuMX0SVB9qzu1qfQM+jO3dBW1g6uVSHv/qVNX10Vh4rc3AkJYLTy+WA/8ou9kJjo7bOh+DLVFZ64TEbCyBktxI5PJZj56R//Gx+NdH5vM4vuI+p8NXh9LjU1iw3EZhXc8TyPuuV9wDaaCfBjTM06N0hVWQmHBDzvSDZ5tvqYR7ZAymh8BIazmH6OKLbzv0KZvJEz3ZzEFnEolaEtV2XEaCLKadrIz//TQnk1/EU85NuH8th8Yf4j9gMZUOrNkZEVZCnsbtTU9KW18GqcKFyjh420sd2+j33pg3F8uTsLaDwEhrBYf04O7N/2t7/o/C2FoGnsIy/YGlvAwSfCvZzLOe+8oR1ZT3u/5uvHJC9dGtJlMrfqjslXVHwjpat2aLi2rjFFLjUSrFUjlO0juddXSSXx7ICCE1QbjiHO0/hofbPgwpnDTOR2V6hWNQqGUx34890noet5yaO+Gko3Y45PO7/uB/lvnrwxrWdha1absbgxo1FWtwplXqYSJY5Nn5lU3bLHQmGA/yko0plVSSjMjIITVzKNTR9sO7dv8RSeb/T9BWmMkKv4D+YzBXuljV7yxd+zfte6VeHGKrHTz4+cv38JWmyUmKzSGG5z7VndoE7kz3uPtq+Welvhwm39weVjOyaoFsBZPI4TV4gNY2Pw79mz8KyebeRIH+VEZTaX0sf27+v794TKmCxNTzr/2NOPj5wZBVjjdYSklq6jN69dyKuhqmWztivYob+RTSkPbe/xMdlMUJn77IiCE1W5jq+s4dYEO6mzsYAmvi/+CrH7LDYxPcBq4HGTFVcG1ULLT5orS1ULIkoSFI2cMHKG8obiXcteOCAhhtdmo6gaOh4EWWlkyYU9gvHswXfgV19d/7+LVkSWfBrItJJhObL/p7elQR8fUZnEV70XxPc01sM+xrzhU7toRgZIHuh07uZL6xA3LBaYB+Ar8rBsfz34YX1j+D5eu317QNGy2xPquSE4mDuXb2IujY2AgytNE67RiKFshzuwCR5s9ZSMlsK0QEMJqq+GkBKOF5yFzRoidK5BoFCeMjM/8mG+a//Xy0Li55KYLBRiTrGjwOQ1br4VMBQuKVJeQKVPxMLlvPwSEsNpsTEECmBLSgbHUpwD1YGwse59l2p+9fmuig4fiNZIowrqq/6Xeqm9Vh9JbjcOKvqFtACX7gV8kTVZvkaRoRQSEsFpx1OZoM2iKxxuHLtDcsZlgLzYZfv7m7XSv+r7fIm234XSP/8o5ktWqzqSyZr89PoXPYDTYkZvziw0NLluKayoEyq4iNVULpTF1IaDjHHZmoAW4aep9geN8fiLt998cGYdtVp7K6iqzXGJFUCAi7jdkuapsBJKcPBwgyP8YRyV7B04Q3dDbpY3jg6gupoMNla5U41BbUN9n0sr1ScKaHwEhrOYfo7paCAW0WiWknihhW/0Tabf/6tDtxpIVSIhGnz1dSXUkDL8fSHKi4/lWPId9Kp3Vxqegp8J/m9f14D6DQ/nmb281FwgkZ1Dj7bnSSFx7ICCE1R7jmO8FJJr8jCvjeNrIxFjDJBpKVaSlXhwDw384MyucBoLAGEfHI5ptO6n1YAq4FjorH9IWjUOnFlF3pj62aui3whbI33ZGQAir/UY3XCVEvzgdw/8NcSyGUhSlpVWQrFg2p39xp0JYLyIohaXxdZ2FGofG6yi85/QS32F0Asu8URgu1+2JgCjd22xcsVElPC85169Gaa1YTkRWJKpSqooBiQQzONvq9sRULKKxtzzAEJw1api2EFZjoW3K0oSwmnJY5tcoSD09HanEDztubnfO/IopyUWC6sUmZUpW5aSqkgwgK04DxxaZrFivacCaIdAuH9zaM1rSDgloOwSEsNpoSMenvU93dXb+EE5taFivKElRqd67qrNmsqIF+yjMF/i56MV2JqadYKxXMDXM6+4Wu04pf/kQEMJaPuwbWvPticwj4Il/NnTrdl7JrqaDC5wTUle1GmdWWVCw1+JotjA6PgnThsIdQrXknF8arkJi/+R355dbcrUaArU9ha3WqxXW3tHR9C5dN//T9eEJ3aGdUwP7T0V7F86Mr0VW4mF6o2NTS/ilaB2HDmb8wA2+08AuS1FNjIAQVhMPTi1NgwRkGKbxRxMz3uaJSRzVUkumOtLwo6Zc7aOkVdEhynN9NQ1cyuNqeEqD67mX9TXGyxXbJhFthYAQVosP58S0909czfqJqzdGODVqaG/IUbCWr2p0yukfp4FUtDfeir1yl8IPUGjPHFy/fqJyKolpJwSEsFp4NEfT6Z3YBvOp8MvMc0hAi9hHNQ1cBrJil5TUZxhfXsTuSdFNhoAQVpMNSD3NMTzzU1PZYAM/ProYkg3UV5rHT8lXmA7SwnwEq4FLLVkRI04HM+n0LdvzvlEPZpK2tREQwmrR8ZucCd7hePr7rw2N5PfxLUZXON1zHKz4kb0KnIttP6Njk8tyaimbwXPrsW/yq3v3bhoqaJZctjkCQlgtOMCYCnU4GedTI+NpQ32XbxH7QOmKG5nzdIWZJz8HNkKygqI9TmSL2JSiovGVn0A39c8WBcpN2yMghNWCQ4zPc0HRbr6GEs6chJFnmfl3knZO4/hmII1B6fiFG9br0s6qAeXPp2WUrhzHeXH/jr6n5pNf8rQuAkJYLTZ2kK7Wul7w6zeGx9DyUsZovOodOizosTg1TM9k1Wogpa7lIisOF+w48E/7E5B1Y/cgtdizsBKbK6c1tNioT6X9n3MDcyePOo7OoJqrC6S0+ZIYV+GSOHxvc18PJCxXG4ed13I727axqTp9yk9rX1jutkj9S4+ASFhLj/m8axwdDdbgELxfGsLpoZyqVXPVU1QugVJUV0dC27p+FaaBWWxknq6ceAljTNMiAf/BoUMbJpewWqmqSRAQCatJBqKWZpgJ731Zx9pJM4aK0hXe5vlKVFEbKFlxs3PvqpSSqpbzKztRm+gnEkktnU6/2GFMfa4wXK5XDgJCWC0y1iAR6/Z49iOjY7C5qkG6mk+3SFQGlEP8FFdnygrNFqBsn1OxP5+K5pGHbcBhqhT8fqu/v39mHkVIljZAQAirRQYx7Wj3Zj3tddQjVVJ4l50CMjHe8mqOTJCCvmoTyIrENXx7Uinbm4Gs2PZUqkObnp76i0N7N36tWl8kvn0RaGnCGhgILKPn3B3+xKVXDh8+nPseX3sOlpt13+P4uonv71WeDqLr1ampFB8S1JrulNaHc9rTMxltcpofOeWns0rTLkeIZUHRnpm5YibMf7kc9UudzYNAyyrd8ZLpWvfgQT8w+oyevXeo++bBtaEtQd9s1/ffRsV3I6eDJCp+nourgH04UZQnhIYfWm1o8xdUGCU8/E/bil89sH3dlQUVJplbHoGWJaxnXri2HTvd1nEEcCBS3z++MLi75UejQgcmJjL92ax/gNJPo6QekhVXAbdvXI3D+XQ1Bcxiu02zTAEjKFIdHTQS/S8Hd2/4YhQm/spFoCUJ6+mnL651gkwRQRmBt33gO+c3teNQYin/oG6aKX5rcKEukqqoWN+Ij5vy81v8UATDG0WGC21jlJ96K6wKPpWd8H8jChN/ZSPQcoR1+vTppJPS7iw3bIZl7n/++eFV5eJaOczX9Z2YvM1LPxWpocBHKv8qHHdMqSphGUqqahaThfj40ITBcbLnsDj6oXvu2bS4n96JVy73TYtASxHWo48GxrUx+5Cu+XY5RH3PMzLGxF0ktXLxrRoGNVPPfNtOolIrgElLGYH2wbZqcipdIFVFlDbfGhqfj9bskCaHHS/7gTt3r73Y+BqkxFZFoKUI6/C7Lu/Bl1jmlKB8PUhcHjHufuyxx/g5lbZw+BL7bX4EoiZqyS0T0uM0j1+82QSl+ua+bhxj7GjD2LicwWkLzaarigbKsmDJ7gcTmezMBw/t3ixntUfAiK8QaBmzhq8/f26j77pbaxo3w+jetPf1B5D2RE3pmzyR4/nH+Mti4Wx1dUrCHO0lSVGqskFUnakkpn6mhu086jgYHkWTW3Wbo4Tli6L5gqYHE47vfeDufVv+YflaIjU3KwItIWEdO3a9Szc0ElDNDqcLbHjmxas7a87QxAnX9ljfxcr+Mzs29ykpi1O8iJjoR/cm5o7dnUl89LRLW93dyWmVIip+Kp7pmlWqIvQ8Mga9Gslm3Efu3LX+K008HNK0ZUSgplnGMrZPGxgYsIKeXa/TA61jPu0w0+7xBx/cd3M+eZspD0wbDgWm+RXP13cODY/jWGKuGAb48jG+agNpilbqlKZoWDqDY2AyjtNUlupzYZlKpXgaxIVMNv0zd+/d+uxcaSVuZSPQ/IT13TN34QRvZW81n6HSDdMLUqmjh9tgd//Fi8OHEl3JL3Z2dh3MzGA7XU664llVWRz/QhLjNYmsmaWp/DjCjqIDdlaZTOZZ1/A+fGj7hjP5OLkQBMog0NSE9cSRszuswNhdpt31BRnazM3U9IuPHDrUuG+419eChqU+cvzqjp7u5P9KJpMPpqc51Zv9QntLkFQBEqZluVCw/7nhaP9i376+8YIouRQEyiLQtIQ1cPT8GjOw7vE8tyFtxBrb2MBXdh579FF99g0vC0nzB548ebNHT2l/aFmJj1BPBYyav9EFLaQ+jdPAVNL8/pZ13a8qiJLLOhAAjvrTRy/d0enbF+69d0tzHFhWR/vnk7Rple6mp+9uFFkRGF8LVj/08IUN8wGp2fIcPLh+4sCu9R+F3ucj0MLf4vaVVnChqYWmdaQS2jpY2vd0djh86Vqh7c3Yxm8dudTPxaW0lrn7yJEjZW0Tm7HdC2lT0xKW1xecgHE3FDWNcb7uDh6+r/96Y0prjlIO7ur7TOD5b3ayzt9ylY0Gl83qKFXZsCXrXdOlrV3djf2LBr556JOshLDmMWhPPXV6vav5O5jVxYLUhNl3iIbV8yiqpbI0bQcP85C2Xu0l3dczC0XUN4Pzb71339mFltOM+Q/0rzu5f2fvu1zH+QDOt3uZ0pbVRMRFouJK5qqeTkhVqyBdtdUmhGV5JI4cudrpd5kHiyp3tTU/8s6r+4rC2vCmaQmLWJO0Ep65INJK2tbpt75298U2HLuiLh3oX/95L+0/kHUyvwTieiUJHVEimVzy1UKeWMqv2pCoKEVFRNXT1aHawnBx80eAZj7TwcxdAc5Gi5fiaNnNT37nCk4xaV/X1IRF2B94YHt63qQVaCcfePX2K+07fMU9U7qtHev+xE/7r3cc70O+6w1gxuV0dHZiusgvJS/O7IskRXLs6KCxqj+B26t9a3uUREWi4plbQlTFYzXvu+7tB3EIUGel/L6e3TNw5NS8zYAqldss4YvzBC9C7559drAja3qvDoyg6pwCP+KBZaVOPPjazS1vMLpQKE9fuPnawDB+EqehPwzWuAuSl8LPg90WVxhJJPWQCUmPBAWTBEz1TFUGpqO3wYYvIPgr2az35a2b1/50V6f1e1NTlVcvEzB0xRekj67usu5FmS2/crvQcaol/zeeObfTSOj91dIq28PxiaOHDx9quy8LtQxhcZBqIS0Dhkl2l/3yA4e2j1Qb2JUUD1Iyz1waOQib0vsxKXsAFvH3wMB0JySwtZC+DBPTN5BOCEnhrI1BuKe9l6tIzsVCiD6E0DOabrwI2elZ09aP7N3aNxjheXvK+a1OENa0EFYEyYL9rz072Ju03ZpNQKj7Xd899cKhNrA9LASvZTY/s9GcHoK0XsrakLS8UklLxyl+/rj+/Qfu2367sJNyTS7SuZfneO7ffweBGScu3NwAqWgrTvTc5jjBZmw87tMCfRXYKQWOgula4OiBOQUZ7DZuhrAGdQXxV0zPuCaGnkv3VPGHOpPw7+QPR62OM5HhdNddGOeX2kmCbSnC4mDlSStVTFr4eLljdHV+702vWz9R66Cu5HS5h5hmHvz3QiOxwJTRo2BGgY06dm7OVhewYGAY6s75oD+ZDs4JPY9JyqSCQ7ABqftd5VFM3/j2Ja4mtsWpJQSq6ZXu5UZTKeJnsHpohiYPRqBn04nkS2+CQWW59BK2dAjwS0Y4IHDz2ERWG8Gnwm7iK9W3sFmbvrqGPzw6gW8eTmvTM07XmTPX28KYd7EQ3rjnvv1QFHbPt3zT9DcMPHd+13zzN1s+/hC2rKOo7NjeQdsxT5LEWrYjbdLw05eHtwWe9jl0542u62HZHZIVpalY/yIlP5X3MHYddLLZfy4fmYiBhNuB509vw+rG3tKY+kOwGHLi7W/cS91jS7v4s9TSnZHGLx8CICH9lXNDX+zpWfXuycnaBV2e3e567nAm4973qv0bzy1fD5qr5oEB7KXt0u7B3Loh7yhWVfypbOalh9+wr6U3mbfklLC5Hi1pDRE4ef7Wj+EEiZ+amqpvJT2bzWjJRLIPR3n9riA5i4DZg720DSIrlsrvHXSZ9p7ZGlrzSgirNcetqVp9/vz5FJTqj6JRejTdq6eBMzNpHP9s//QrF4bvrydfO6f1JrCX1mvcXlo98Kembjotr3wXwmrnp36J+pYNeh5JdqRem83O77gxkpxtW3bgOZ/g1HKJmt3U1Rw+3D+zrc89aunagnWzpq6PdxujLz388L4F78tdbtCEsJZ7BFq8/sHBoMPX/I9hyrGgnuDUUZzrnnz7yQu3HlxQQW2Ued++fZmJ1e5LoPB5k5ZpWCPXz+08du+99zrtAI0QVjuM4jL2YcIZeh+2+9wF49MFtYJSlgmHE0g/JlLWLJQPg7RmhtyXsJ18eja0tivsXhj6xy9ve/mRR5TRcG2ZmjyViN9NPkDN3Dz1FW5z9XM4i+s1ME1YcFNpUIrVLHzJzHnwjl0bn1twgW1UwPHjxxPXpztejR0HFTc+F3YXRwxdfdM9W08D0zrs4wtLaM5rkbCac1xaolWOvurhZIPIih0OdVm2haNTfqUlAFjCRnJP4HBn+iUqz6tVa2nGpTe/etsP2o2s2G8hrGqjL/FlEQC5GHghfplSUSMdvwaEA/9+4vjpa3c2stx2KIsfUek2dr+EuXNF2xEjSJx98w/tbFt7NiGsdniSl6EPp84O3W/Z1oPzXRms1GRKWdCJdeCIlJ+vlGYlh997r+70+EPH8NHJEtLCauCph+7bmj81ox1xEsJqx1Fdij4Zxi9AT2KSYBrtslgxhOD2gWOyz7AstFzx6zFHj1mGobYUYAgC9cHge3ddK5uhjQKFsNpoMJeqK6+8cm0X6noXiWUxHA8WxAdWNyQM45HFKL8dyiRpueM7jllmMGpnjO+1w9fNaxmXxiogaqlR0jQdAkeOBPjczrnOiQ6jw88ESSOA6KT7iQzOHEvavu1pZsLQg4QPP/DdZG9Xx/vWrOr+mfR03SvtNffdxleAQIgvTzjBT0w409Mpu2faufZy+vDhw5WPMa25dEnYqggIYbXqyNXY7i/jCyvdfmaVb5hdVsLp9LJGp43j1/1A7/RdvdMwPRzEboRnLVHe9vEvL3eXBOB4ZMta22H+TiqV2LJQ26u5u6Bju44Z3J7O/Lvp6cwPmBanOwQ4uNHRTWMK21bSvh1Mm642nTWCtKkH07rnTE72aOO0XZq7bIltVQSEsFp15HLthg5J/+aJE12m3tVjOPYq1/dW4cTjHnwMYhXOce8xDd3y/PJW6OpMdsTRVy4iK/rKMR/jwvz825VIHFzT3fkx13UW/dnhRy3GJyeeHEs7n1XNibUPFvY6vtGDw5vV9w0Vofn81qGhZfDhi3HX8SfQ/3HPMse9CWcCX0gel2OIFJIt+2fRH7qWRaYJG85NxldGzV4tGayFSLQ24+q9ULyu9gJfMU5ELTn6wUISTl03NHz1KzyiJLqmX657OLLdSJgoXTO7cBxyN172blier4YCvBsFdSNXV2dC35tKJrbzfPfFdjwvC/qs9MSMxxNRsSqmT6LhUDQHE+jUBE7UnATXTuLsrRn01K2l/x6+qItiR3TNG8V59KNB0DGSfNXGUXwJY2Gm+osNhpSvEBDCasIHgVLTt75/aQ0MnXpBNb2QgNYEntfr4wu/nBYpKQLtxtdwAh0SBX3VDe7nM/Ha5vf1Fb/CURS2bCTAWWuxR229qRsbQQQbUed61LfW14JVKKsTJ5sk8WUcHbtlNANyTOhgcmAGKH7p3m1FWpqtuZCu+LByVdKHVMjpKEQrBwIW9tnpXOIH+QTDSH/D9f0bmCLewDn1I4HmwtAypPDZ/oe9oXKf/aMPsWxSs/RR13FHrURiZE1gDR86tKHEdCDMKX+XCwEhrOVCvqBeHNaW6ui11/mWDtLQ1kEiWodXE4rwYgepAPssTPCMOjIdAk94TZ8pMZjch8HjDorGFUTUAwlkh64be0A9/ZCatiDZWtOyE7ClQmIdJICJFYhA+TRV4Fo5/QIHiUvrTEbkVRCxiJfsSBbfYk87OTExXxdazY5yUgiRKfpHQ1YSkONmAZY+gV4NIeVFfCXoLNA5h/Plb5LzWAyzF+IVXdNnvO/6GcsyhjC1vmWZ7s2pO3fdOqzriy9asnJxZREoerDLppDAhiIAEtCfO3F5rW0a6z1PX4/nf53nG5RqqrpieSnULEVh8cx4E7ugH78H8tG9eP/24oVezY+pkpA8b/abhPF8le75BqdsXUtaFeaTlTI2IByEoU1l8oq1mkokcZHElIRoWmpejMMCMyCvQXyy7JjjuUcgOl4tLCzCMpTHgFpcgkViX/dH/ax2Szf8m2Yqc/MN+1r7BM/C/rfCtRDWEozSkbMjq7NTY5t13dqE6dhG3wsSqlp+C9DDi0ifLrqmT1f6BgUaPjiHN0lJAGAfvpWcI4XjiHIMF6ocO/EjmMa9HeelQ1LT1PRpoce/sJwOTCQtc+kfGQp6Uxl+9JWtmL+jNEaJ0gKBgbsygR58B4sHfwV5aliVWg3vCHv6ymHcdG868IzrVsK6pnd71+/dsmXxbD3m3/W2ybn0T1/bQFe5I8euX+9ybuqbXMPbDA7ZCKV4uMOecyz+9OfmWvj9x9zEw6JW+JuOX298WhE6qtwLEV3TL1tb/AWj7sqwfqaro/sdmcyM+vBp2XzzDEzaBiQsNH+e+eeTjQ+ohwqnG0BYhfVzNYKrkOmpyauYYH8KvD8G6RPBszrC6Jq+ystl0ghzXEZjR5+O4+iZwTh+eG7Yqa5rq/3hGzzTSkXKn4YgIITVABjBP+ZzP7i8ydasrZCetuCHvIvFRs92SEdlpnCYE2LOQi12OA7RNf1yjrphHIyE9yOXPnfNMDg70DpdTf8DWDKs5rRvMVwChAWrUgh21HzllD0NrigqlxKVC7bKQuOOWeGiuI7OTkhb6T8C/Xw3xkel9cXxj6eIxiY3Hhx3X9dHsWJwDaa3l1+zd9Mt/F4tUk/ijWnP+/DBb8++LWqvnh0c7NDGta0pO7kl6zpb8AJzEUr91kYEFdeBRCt69Nm4+AsSl6jwjVGckY6VwPwUpLhLURx9xliWvxFHi/w+zB0SWCnLsVpxnoXesSI2ngp4zmRJXPgf/0IleGH51R6uwjeX5MR76qtITh7+8N9Cp4GF7Sm8Zl1s35pVXVomm/5c1vG+Wm284njHJeJq44/FjixUAld8w7uijW6+xo3MhW2S6+oIVHumqpewglJ87+LFtcFUcqur+1vxwPcZJqYPMOyhXw6GKI4+4/GwQpjCBhe+6XDIpFb06PM+np5hhS5eXzw9bLJ2pBLGv4Fe36BU4kA6IQGw8MUY6MJywVeqDs54Z69zrWdY7jI3G1ZtUiSV6zzDI3IqLLew/wu9jspl+yywrA1pEed5QceXPT3jBb/DLrA5ua5UHZ/4eMTbFx+fwvE3DJO8fANrjlctL7giJhRx9MrfR89R+VgJ1Y6currONuwd0FNsxwtV02mPlWGLy1TxlPHf6Hh8PH9xesvw9yRM+5PIRT2ZIgVKKZxWUY/PT8aTFPji0i3m4Ed1hDWV/7uY9bNGtiGqAyorJRWSqCgdkrQiR5KddrwPlsq8xfhG6efvx8dvtiQczDdmmPaldDBxSVYeZ3GJXxUMWzxq5d4fPz7Ym7X1HTAL2A7NqtJHEQ3qtCPjw3LoxB/v+OMZ5VVzR5aHWRuErYA+y4uu6fM+Xl9J/lh7bFvbY+vmv0bWos9tsXAWSLIiaSnyApHxJz6SbFSFuXTw8i86r5vVRW1m+6IHmUREAuI0lcREP5q2ztWPrO9/YK54xsXHI56+cePvj3qBfimZNS+J5FWMcrjptThsRd4dPX9+DcwEd5iQphwozfkCwJKaLv9ewHYKeicfSudwShcnJDBBOD3MTwGRO0cqLIj73jQTaejDBYaPHTBgJ/i5+HyYijd95sFhRzkzB7yL2IrCtGwezj9nOQVTUlfPwiicifnu5J0qHHd8mXHIG6ZD7JQqIk9kJK6QwAokMWRUhMaSeJ0vcfaiXNhs7PyuwpYV51Vh+EM/Pu2M9GckpyiOuZm2Wvtom+Y4me8xPbvIIujzPu6Wbvyt1ejL3U7Sv/v754ZHsORwaX3KGdwiJhO5pzY+Mivk/urVq52jTnIXlEc78LKu8qAMx/G8kHhyOicosz0ovM3IrIDKb15HSvDoOoqv+hMLYCOWI8ash0vmufryZVcqLz4u8fym3ov1xT/EVp4UDUTn4/iS0xW+sZTMojASmLqGp64iH4FRXJQ2TKj+lv7JVRTVxwQkm9APyaboGnGMzSVR6VR87ipsVT645ovOzi5tamb6zzB1/nqzjz+s9YetwLioZW5C8jq08K9+1IxS8yQsfF6ap1WL2BK8VOaJc6NbPcPrx7wJ++hmHQUPvOaQgMJ3ETtVlERDP0wVsQ19uPgcLQyt/Dc+p4jlL6k/1xa2qVyh5ApEzEoErm/DsPOTXV3de6anq36roFyRdYWVbVSshHJEMt98saIXfIu9koplYZL6m/hUz7kS/Jt0/PE8+Jj6X/Y6k+fv2tA1BKIvB/OC8WnGAmp5dpqx3XW36fjgYK/upXbhFd+BrRlqn16MfkrspkoC4hnirYjbUVWzs4rHx8uL3cerjwt0TA4RcBcsuX8Rn97q54okVsCKJJ9YkSvy1gJR4aOtnAr6OJP+L13d+BKBKMEzHhAfgDh6yzD+vqHjTDDvYpAxLqwEfVdbE9bpIEi6V27tdLP+LnzPrWS/XrRTnz5d4e79+LNY7r4kP+Z7Jv7z1LyPL0B4Tb+ci9cXLy+eJ54e8Rw//rqqcUR+HOrgYVprJbBl5E2w63oI64J7k8mUDZLGhmAXs19ucVkxP8gKQu4ptCxbMy2TW3KAGI4u1P207ztH3CDx/7bL+Cdse8h1Zy5ev7Dp8uHD7blJuy0J69TV8XW6l92Dl3cbLG6g98idbhDgdANcY1ZY9o2N4mpNr96GRf1Da3Wui0RW69F1bWslvp81LD2xDTOGu9DhQzBc7AcYfYlkAqo6A6ozqHNBYJTESGitTGShsp0qQSxT4AcoPJQw0LBlEPhBFakHDjoLvY+XgVIyg7WK77tG8n9pvpHXBbXL+OMBd7FN6KLu+uf27esbX9RHdIkLbxvCGhgYsDb3v2a7obt7YHakpKmYiqgE2ioqJbzIOszXcSov/DAzRRNehyJKvPx4+igv/ZLKEaCkoZxUFMYXE1I8f7Xyq/UHp9CkAlfbCF3NdlhS7IQguA0N2wiJYy1ktC5IISb1Okr5jSYruy2SGlYkIkKLSC3yy/WrUWGzSnjaTUX/QEhYQuNewLCdwBFKRkpOuAfr4sBnwwfDg6B0MHagORhBHNqHw5WxTwYav6lAt/42MBLfrYZXHO9w3Ftr/B0Hp0pY+tkD29ddAz5ln8NGjddSlNPyhHV8aKjbzAS7Dd3egRcvgRHJWyrHASw9Pyp+vlSxEluH0jWAGQF9VVZMpxHVRZ/xSKQU4PR5Xy0+/sLQZCFS9DN/XKtSeh5WrL2x+sMyZv+W67+vwz5eC7oDx12rm9pakNg639B68XL3Qh+2Bm94DySxHhg0daBHSQhiCbyyyMS9SDi8RhEHyYP1qD9qak0S4VGn5VYrSTRKEkKHWYYiHuQmCYb/YKYLqS+3H5LYckxJmz6qhSYJ5yNgzgtuclESpncBfN8Fj3lgJdCSGpHcGECoxrouMoHjzO+4evLLMB1VKxJV8Wyj8Q80Ix043jnTu32hlTdkh08Yn7UWcnio9Qs3pzZm0lN7LCOxIdIZxbuQ1+lAVFFxJB7aMeUIiPkiPRPjo2v6dPF4FVjHnxi/oQK0Az/bymf5uI7ayGLj6eM63nrbF5VNXzV7nv3HViQL3JAEaSV1z0iBNJIgJBCYkSKJYbdjEiSHw7a0BI5s6QBBbINUswMUsQ6E11UojZGccA9dcZDBdQY+TgyFTgkiEKYyIBvstAQzIRk8cBJ+A2j4gZFDFWAqjAp3V5IhQYYwwUJ57ByS0QINzMYK8FyrRxt3KNbXb2qG/UVNT5wDyCt6/A0boGbdqzPA4tD21SPquWihPy1FWHjQzYs3xnZkM95ePIZd8RccBx1xez/UPowp46I4+uVcLD9/8Plq0Gfy6Jp+uez5uqPyY+UtNN5DuVQc06drpv4bIDXsjtsMpdkOSC79QK4Xog3PzwF4IBNCBiIhpBSpoE8jioqWaM2KCRuOqwLXgIQItKIe0lCYD/lZjoqgGIo0+J++SsmMKA8eqQ21qHuUh2PfzQHN6vgG6vVK8GfmQhcbr3Yff+AEi3rtdCtNF8u/eIWD2ATXx4Mg0XH1Vr/hm7sDQw8PvyvTrriKWocEE0C6oM/kJRJHrAykgj6WGlq+JUifu6YfS6pu4/UVa6AgQcXKi78ApekhcWFBwMstEkTX9MvVHw+Lt2ex+4+Pg62CxgsHEwZbAdgWIJfA+ICkfDRYtyAwWWB7Ay8F8VT/KB0bOJ4Gx/CQfUKSwZGrJJs8iZHYgB0zMB+zk8hopQ8hEcEog2ERASIBAOL5fIrVIKLxXKtzKPZLgZUckvGf+/nH5HsK0+Uz3316zeAjj3D23Lwu90w0ZwNpiZ72UnvwfO/AXIFnXfLBxLOsHn6yiLqmr3oQ04LHX9hq6TFHI6txrlYWkHj98UT1lh8vryR/rIKq6aO204drdP8hRWF3itmLUw42QnW1CSTSA2IAIXkWOBYKLWw8wjVqNkEaFqjFwLQNJhWI4ZiFoiq6QX0SbsEo6HMoWVFCYprwjw6FP65BXCSoXJwiOwpnFK9A6yiWkQhRDwA9XAfpwLS/AqnqSKP7jwapquiznXFXMn6x8Yg/X/HySvLHKqiaPlZfvf0H6BloAM/v3tpzHkJwUx59Uxb4GE5Lfnt2ZGS16SX3+F5mq4llfegtwnaSR6J5EC8hPUV6IDaS6aDnoZ5DpYe6AtdgOr4pyhXLNPH0KKCo/DDP7N+S+mI6qHzbQr7AbdgW+iylWn0l5cf6E29ftfSN6L9lGl04x30tOtMHklmLhxpClW9BL4S1T+i2uNPRp+0FflD0AN9A9LHnmHGBBfJCE3QL9ALiguoJqiu+64gDzWGIIAlhzhaSDsMV/yjJi3BxyY9khP9BXBSzEMY/AFORGMmM1yyKZfmm+ZKuJf4uMHV1THEj+o+S864E7zYd/8Dliqp2MamvPbt9uw4dY/M4DnXTuMuXx/scK9iHLcbryzfKwvOJBSGNPl10Tb8WV0xYyMFymDdXXv46Kq+ueChJQI4WlSUqf8StOf5CNdXqr9afxe8/Gm6AoLAqGKyCGLSG350ACFzKM2FvaeOseEhFOsjItdQ2S6wYYmkOdl2+CfLBvmpIV55vYY2Qn6uAxAWC40zbhxSmWArcQj0TSIiSU37mx0kgVesgLereOSz8E5EWJa6Qzyh1hZEcO7xY4Ct9WLfNvwa+5xA2h6uGP6vMPxMsZ8WNf0Gf+cOCw9usq51a5+kNG9Sn1IjJsjoO0LI7EpVra/vxhPdFs7JyjYriohlbTAKGxO1C6oJEljseOLqmTxfPX66OucJK66OUNzuDjK7p05UIbGwX25I/vrj4BYrnD0uZ/Rtvfzz9fPsPIkgkbL0DZNMFRVEHFEY2ZCBTcwMLdfCsCCVN4SwpE9YG+ARNgD24IDHYSYB1yNCYDkLRFoC8oOUG40AKQx5IYyAmlQ6SF7dDoSof0hbJiApzqLs43aPc5UG+AvVQ/4T7nGQFQiJ5kdbAkmgH2Sz0FaWB4gLrad22v4nmuvPt/yzCc1+V4t0e4z93r8PYwDCvNANxLSthkai0jmCf5+jq6y6Y4SkjTfoKprgWufj9Dg3AozBmiK7pl3H8WDH3u0YfLY6u6c/HVS2vSvsxoygyTF2q/qNenEyjJ5NJPYGPRidME1M1/JYqwyoNq32Ihu4J0z5M+WA2DoqwEI9wfmEaEhQJzPNsKNOh0jJwrfRVJqbnNOrC6IGwQFzgHiKrpCuq2kE+FizrMXWE7IWCEKemg7hSiimOQchNIC3EchqpHlBO95TshQThkwF5TL9k+Mm/MZLGzVo3AlQdLzagDle1vCYd/wU9/5Z5ZcyZPnNow/J8ZHZZCGtsbKw3rdn7nIzTx42o0WfP1cPKuYJ6XPFs5q7p8zmKx5v8cdcxDeMPOR1fj+gh4X10TV/dukiC+nJPeLy8eH1hrtm/UVvpKxcrP2oL/dlcs1eQ9PCeo73wGcp+R2Xyvlp74vH19B9EkoA2CYKUlcQqJCQj6vkoyBjh/IurcJiy4Zxy2FMptRBO7sK3kClR0UYUZAX+wMqfC1ICiYHMYBsKSQsSFKaAUEqZLoiK00ASFsgpN0UEUWE6yOkiiArE6NmUb91OWwAAEuNJREFUszCNxA0c/uBoF04W86YOarWQAYjGmHBBEIkUiXEqib025hNmInWknv6zKo77Sh3/RvcfSx5Xl4O4yr5Y7NxiuEEQFT4uvs8yrF5VvosX28LLS185vsiRHkc9YPiJtrCbJIzHyx3gJdfpl80flZWPR6qIxJghus7xjSqj4E9UNn2VvN76Csqq6XIR+48OYEeGlcAaXhLfQwxNQcgQEI9IErOOxBUuCuDLz9Arm5iyOTaYy7Jty8hAb2VCm43ZmwnwQTbgFpAWyA4SGEKhaMdgYNpngKAcpeMCAfFjYGE4yAqco3RZ0LorUqOkxVkf6AgzvFBPFbISSsOUD+WRrWijpcwbmI4Gomj4yxAIv4bPVU+q9sfxk/EP36UlfP49N3vNWr/m9CZdX/zzjDDofAoW3XHVr9NPHdB8p2+uORl/mjFLUktMbBTtkSJbpLCRxYyD5OpJps/4+DJuvq5IIgoLqfi3pLzcRuloM7QSzKImsBSWG80LVKkxkSvOkFHaCjL5QvrPN9rwvaSVtEg2ICmQCNRQkGjwnlOpNktMxdds+GxcRFrIyCmhTQMEUJjl4qwtzPbAOVC8o0DUZroGiMmBpEUfRBZ4DvRUJC4/1GOpij1ML9XU0PJdFxIZGsOpJkkOQ0YdFh5CPodKl0WfRqQkVUhTIEf1iN4GkdJU4Rx/xsJfHkpfMv4cd+IAUJb1+YdkfSU7NXp6+/bti7qquKiEdfVq0Gl2TO2DonYzAcUTCv0slCB8FuGia/q8j7iAPl30aNIPHVKq55w+00MvjFLo05WmV8H5P9XLzydVF/H0xbGl9UGfjm226B98po2u6fO+0f3H9M7SbT1h+FoS00ybSmm+5/RZHxzbwWvVHtSvNuLRR4BKl0vPtHRhWh1SESUsNBkH0qjvNiAx4MA1JDBc4yBmTPmwJArJCFM+dA1SE5XsmFIqRTzKUrZYkMio78IUkauFoW6Mcbin1GWrOR8nqOEUEUQFmuK3ZdEw6NFg92s9j3XLp0CIsAuS8VdPkcKhCZ9/KAc81x/c3NdzFjy6KHZc0YPNh7VhDg9jYnh4co9n2dvx1nLalys7Rimx2xLGigfEJBQ0Xr149FkBVb04BQiTlPAFbTiDxRGKM1pJf5AgarPKG0sQu413N07hkCANO5m0fSebtCwziW5DqMISHTRMJCDF23inYbmsauNCHq+Vn1ta5dErzKN8psP/RiIXVpAegKJQ30Y06AQSEXdAIpdL0wbTNsLpoSIeCwRJHZYBpTusIFAIlPC0iqL5AxoCcmLPQkkLdITRCc0dSFqQD1A51g4pLOXmhZCwDMO2BpH9q6ZtDoU4oKQIy5yEynFnv+mzw+0+/q3Sf5yT4aYs89zq1alLIK7wYeQANcCpgW5AOaqIARzxcudrXrMTz+cuFAxBI1Rw06eLKz3xsnDikt+Mmr9mWBlXrbySeJAlTt8MXJImXHRNv0zx2GpWZ3r0KKqzXHlRHH26+fQf+mkbg56ADjppUuihMJl7BEhGtmnj+4Phj1lEUAzjaQcgJkzcqPPmlI/yjdJV8Trf/+hbeYyP0uMS0zSVF8SEaSELxkhR6a7IC1IVHkNMBWEkCljxYQ7YXgWKrDCHw2ohJDDKSkr5Tst3TANBp7DdgkTFKSOpxYMtV2i3hXQoJjwbBo3L4oibAajdXmSbCl01PEvi6x3PetMvwfi3cv+xHpPRk8GZvo6Oq5y5FvZlvtfqQZ5v5igfH7iRdHqrn/H24McyEb6ejCUxkCwqEATi8JDNKtWRIxI6wrLj+aOyQgIqLT/KTZ+OLYnCFGHE60PdSgzIgVmcfrbt5evjYkB97VeNyv8plx/UYoChElhYgB7KtD3PAUWRpejIVNzNAjNzyDuYRqnrMF5dIx4CkTrlAJQRps2FhZIX5lqYwfFLOygTBeSmkUhDEgNvIC7MR5ML6JhozoCpn+858G1utbH4j7BRT0Z9VlZzbTyOKJCKeCjkqYbkFBJh+DXCPVcKuXKIFURlm8WBoZSFOBCYmk6i33ioT+Kw1CegEMspcFfe+M8+rRySNum/YUwm9I7TPT04NWOBDg/nwtz16xMbEp3mPswIOuI6G7wBSlynz1pQWZEIP0smIcEEWN3QsfJDn+nj9FFSPh73wilgdE2f+eOumo4pPqWI2kI/LKu4RVXLq7H/kJopRUFhnkj4joNT9KC/BlZgAIVD1I+cwASVUBgCIsF1KEQxJLpGPKHGP5LYrAs5ikREnmJ61KF4K5cG1+REVS6HC1JauGroYYcOrLWUEp6MSF0UpoZgK5hV2dgEzeNLYbMBnRQZEUPnOwGMT6GOp57Kg/0WTCMYjnsQHpDmlJFTR5IcNt/alvV1PdF5NsKcLSpGG03L6QcjnWDpeIXqgFYb//A9wGi1+fMPDeqY7nae6uvT530KKp+JebkhHJyX6Fqz33X83tCgRr1d6gXBH+XnFtEwDmEVMBfAtbK7UvHxVTb1gGLQokbFVBZMDtUJHmT+dsPxmqSRU2nkrxkWxhfbOfEVwLov4sIaonSRr1qZy6vy8xliPbn+qPjYHxSm6mJwdB357DfaVtJ/BMLeW0/ayVQSR6TA5AB7h8kwmFeRrFBUSFYkJk7GsM+F5SuiCQmFBEriCskHYcxfEM9ozBjBS/yaKD//rBzndjD3BHswAcmqwFdhOWGugCw5owwpEt9sxMlVGWQEK4GlcAOi1XAcL6eLICfdcMFmNDnH7xdO/YTCHTkxM2B6EiSPbuXmHrZO5eJy4Iu6lfo2Gu8orFfA+PM9UMjnHpBIx9v+/Q9Wm8nMfcMTE1d7u7vP4Ec6fzy1wqOGP3xI63JHjgT2/rsy/boTbMP0pe78dVUWS5wjK0VUjIqNN3kA62ZYeIcfxofXDFNFUZBTT4W6m71mWBlXrb4yWSoEYWh0jVIUdJEmzA6o18mRDN7dCplCEkK8IiP4WRAU9OO8j5wimZB3SAhKYlJEphLkJCaSEP7PEdxsfVG5UWFxP6qPPngTlvBED6IWLN8dTPmg8ocFPPRXWBdlFWqqCEmLlhAgLRtKdLaAkpQNfRUM6DUQGOUiTimNEaT7FvRVw/F6K91XG4/mHf9KPaovvJ36jzfSS1mpc6mUdhnvhZL4a0GjZsKBKK+n0+kt0AHvztCAsIzjeeAeUKVPF1l101cBWCICxcGmcPalUeHRnyguIsJYej79fFnpKxdjrKhu+spVK69Ke+OW6SXlh7Xk/8b7D5umJKY6nUiQAEmp5ZKoD5Ay8kTFzcAsJIrL+ZREYCWAaU4ubXRNP8wfpuSuGubHMwCJhSuGPCiYJIMw5GV6xkfY0Wd+WoPiBAlEhvnzNluw3SKZYTkQHIQ5J1RQDg7Lw/QQGUIdFp4wcC9KgQ/7KkxjucEHROVmc3ZaCFfEjMxUvlPvBZ0WhT1Q1zG06hQKyGPA9qEh4bPRJuO/0p//WvoPyXpa77BPr9L1mn64QiJRT0vlP3jg1oyn0/th1dnN6VOkQyh8wVRuPpLUH9GHi+sckD4vLaj43NSHLwfv8cKjbGxdgc97JUpFpIRbpovKYHTUltkpHYkyEqNYf1gWfZU+Vn+JiMZERS4qKyTAMv1hmwoItLT/aL6OL9cn8A4mknhDkR5CUuh43ExhAXjnIQVxRQ9UwnU1JM73meHISINzlY/1Ir3jwNQBtui5IpU3K2mFZbEUEhgJiHlZhkqI8rws7hPFxBHlZ5romu1CGRSv2HyQEQiLPkwefJcSk2o0mU+F8Z46KswbKd8qvRUWiq7BsuoYlF/q+Jd839p4/KNnFHhw+Fbc819r/y3dHO7qsk9D2lLPBvEq59SLXC6CYSCq1OTk5F48g+FxLyQSvvyzhFK8taaYL1ACiYdkkSOg/HVO4irmAySLlR8+yHy5wnaWysTF7YmnRxdyecMXFDcxx3KjNCUEGUtb2r4Iixwh5qebxEG58v2Hkh0ERqlLp5kClNLkngLSyF8XExrZi089SYbFm9DRg1FCbEKyoxQE8sqFkTOgTwrDVIPCP/k8qpRcGrxMEXmxnpwjUeXbhjpgA2bBNsp0HPQWOiwNOnddw5YcNIdSFyzTlUKehEbrLDxDNn7osjCXPw5FO22qgPfKHn/pf8XxxxetvSvYlX8BxBVKCdGDmPPDhz0W+Oijjxof//jHt+Hh2oko/qKqFx4l0BJQmQIwS3RNn/fxZXqGFbq4nQzimI9tKFs+S1S1KJ9XoQkEfUQwtKg98fSzefMMwmx5F28/IqK2RLjM2b54/gX0H0v6+IiDZSVgHJogfYWNzDMUpCtsUkKg4pKIUJAsnNTlkjNWzfBCPMOhi8JAiCSqPBmyMFVQ1OdctQwLywNZ5cPCpDl80D6IhjzBASQF0sUeREpSJCyE4ceSpJXbEO2612AHepaTSRn/YrtEAD3n8xV/ntv4+S96nyGRO9gccQZmEPiBK3bRi5kPHcG+v2T32n2+53bxNY8oQyWIB0SR9OmqxMeTh5lm/8azx8srEbCQNSqTpUTX+eagwCiPqiWeQAXO/olHV2tPaYUFjWCxsQJjt7MV564K6iOB2Xj1adNGa3PqDMFl4XwSSnAQCUIibqFPlwtTwbiOkoSR+JvLx3KYv9BXaSrlLyifSegQBNMFTAWhiIeFArRZnoX+8Y2EzKhbnuNlYO9wFpZXkwoH5Kmj/6qOFTz+0n8+Y4Y/2pVIcJqY35+YJ6wjEN33ZzL9kPY3hWjx6Sv+RcByLIQAZZYQJSn2C944FRF/QkvjQ31XZDcV04GVPOGl+WdJEhVGbaNPV3d7Va7ZP83U/1ACgzTjkg4gjUFvHhGWkrPAPnnBLNeFSEKKfAbzOu9yBAUdVj6cZURpZuU3XOUILioD93x2IEnxxFGc9c6M+M93cHSNZVzHquBQDeMn4x898wQ2us7pgGvAbyU8/z5e5EupVEqtJirCgp4KHxVI7sbrQIYKHyKF3+yvIvEEX8FsQNk9qXwgBpgQwNo7p9OKrukzfdzF08+WTmYrV35YF+tU8bEpYImInGtLVH+8PkzZ8iQcVpjrawXCLOHH5uo/9JmWjbXHJMQcNhVW8bOklbsumnJw7Q+cgtVK2mJxAUNNKKncp54KHuzAwnjCE01B1UIHA1A80ik/IkdIfTj6mE8MXh2sSKZhdHUd+IcDykwFLj4eMv7Fv+il75c8/xEmeHaojD+jZ4LgbsPVVvO5iutg4oSAFCCiAqVp/jrUKRU8mzVexsube05ff3tiD0Q1wkP/ojrYgeiaftiheHsjLKL4GrudTxYvb0H9h94bpzeAwCD4cAqJf5SmlBjFH5D8ChVC1Q8KyIkrjtgbE64y4lqtINJHel5Hq4q4ZdsYzsWBWaU+rkFWtFzQbiNNnWciNbT/qD4+Hitq/FdE/3mWzmvQU+W4hZZPenQuRHRNfylcvfVjpUqz0Tj6dNE1/fm4euufTx1z5am3/hr6z6lj9A9ElneKwPJ3IYEVEpqKys0YFeUhoDBP4TV/+bjVIkfqKuu8/ixC/+tqR73111V4DYnrrb+G8a+h1tkk9dY/m7MxV7XUzwdP3ApBgCYG6Co+L6/+kcB4X0g0ERFFzwXjojBc5q8ZhqOKtWEoROmLEwSWBIHowVySyqSS5kIABEYhisRFEov8SgRWGD6K9OMgq8IwBIkTBBYXASGsxcW3pUoHgfF5iIiLPv9x+03kuLxMqaqsUj1KJL4gsFgICGEtFrJtUG6OwDhtJHHhqLOl+dBAG0AnXRAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBIGVhMD/D0fV/fpMMM+gAAAAAElFTkSuQmCC"
- }
- };
- 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$G = {
- ...ActionSheet,
- ...Album,
- ...Alert,
- ...Avatar,
- ...AvatarGroup,
- ...Backtop,
- ...Badge,
- ...Button,
- ...Calendar$2,
- ...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$F = {
- props: {
- // 图标类名
- name: {
- type: String,
- default: props$G.icon.name
- },
- // 图标颜色,可接受主题色
- color: {
- type: String,
- default: props$G.icon.color
- },
- // 字体大小,单位px
- size: {
- type: [String, Number],
- default: props$G.icon.size
- },
- // 是否显示粗体
- bold: {
- type: Boolean,
- default: props$G.icon.bold
- },
- // 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
- index: {
- type: [String, Number],
- default: props$G.icon.index
- },
- // 触摸图标时的类名
- hoverClass: {
- type: String,
- default: props$G.icon.hoverClass
- },
- // 自定义扩展前缀,方便用户扩展自己的图标库
- customPrefix: {
- type: String,
- default: props$G.icon.customPrefix
- },
- // 图标右边或者下面的文字
- label: {
- type: [String, Number],
- default: props$G.icon.label
- },
- // label的位置,只能右边或者下边
- labelPos: {
- type: String,
- default: props$G.icon.labelPos
- },
- // label的大小
- labelSize: {
- type: [String, Number],
- default: props$G.icon.labelSize
- },
- // label的颜色
- labelColor: {
- type: String,
- default: props$G.icon.labelColor
- },
- // label与图标的距离
- space: {
- type: [String, Number],
- default: props$G.icon.space
- },
- // 图片的mode
- imgMode: {
- type: String,
- default: props$G.icon.imgMode
- },
- // 用于显示图片小图标时,图片的宽度
- width: {
- type: [String, Number],
- default: props$G.icon.width
- },
- // 用于显示图片小图标时,图片的高度
- height: {
- type: [String, Number],
- default: props$G.icon.height
- },
- // 用于解决某些情况下,让图标垂直居中的用途
- top: {
- type: [String, Number],
- default: props$G.icon.top
- },
- // 是否阻止事件传播
- stop: {
- type: Boolean,
- default: props$G.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 _export_sfc = (sfc, props2) => {
- const target = sfc.__vccOpts || sfc;
- for (const [key, val] of props2) {
- target[key] = val;
- }
- return target;
- };
- const _sfc_main$28 = {
- name: "u-icon",
- data() {
- return {};
- },
- emits: ["click"],
- mixins: [mpMixin, mixin, props$F],
- 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$1["uicon-" + this.name] || this.name;
- }
- },
- methods: {
- clickHandler(e) {
- this.$emit("click", this.index);
- this.stop && this.preventEvent(e);
- }
- }
- };
- function _sfc_render$27(_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$f = /* @__PURE__ */ _export_sfc(_sfc_main$28, [["render", _sfc_render$27], ["__scopeId", "data-v-ac70166d"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-icon/u-icon.vue"]]);
- const props$E = {
- props: {
- // 绑定的值
- modelValue: {
- type: [String, Number],
- default: props$G.input.value
- },
- // number-数字输入键盘,app-vue下可以输入浮点数,app-nvue和小程序平台下只能输入整数
- // idcard-身份证输入键盘,微信、支付宝、百度、QQ小程序
- // digit-带小数点的数字键盘,App的nvue页面、微信、支付宝、百度、头条、QQ小程序
- // text-文本输入键盘
- type: {
- type: String,
- default: props$G.input.type
- },
- // 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true,
- // 兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序
- fixed: {
- type: Boolean,
- default: props$G.input.fixed
- },
- // 是否禁用输入框
- disabled: {
- type: Boolean,
- default: props$G.input.disabled
- },
- // 禁用状态时的背景色
- disabledColor: {
- type: String,
- default: props$G.input.disabledColor
- },
- // 是否显示清除控件
- clearable: {
- type: Boolean,
- default: props$G.input.clearable
- },
- // 是否密码类型
- password: {
- type: Boolean,
- default: props$G.input.password
- },
- // 最大输入长度,设置为 -1 的时候不限制最大长度
- maxlength: {
- type: [String, Number],
- default: props$G.input.maxlength
- },
- // 输入框为空时的占位符
- placeholder: {
- type: String,
- default: props$G.input.placeholder
- },
- // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
- placeholderClass: {
- type: String,
- default: props$G.input.placeholderClass
- },
- // 指定placeholder的样式
- placeholderStyle: {
- type: [String, Object],
- default: props$G.input.placeholderStyle
- },
- // 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效
- showWordLimit: {
- type: Boolean,
- default: props$G.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$G.input.confirmType
- },
- // 点击键盘右下角按钮时是否保持键盘不收起,H5无效
- confirmHold: {
- type: Boolean,
- default: props$G.input.confirmHold
- },
- // focus时,点击页面的时候不收起键盘,微信小程序有效
- holdKeyboard: {
- type: Boolean,
- default: props$G.input.holdKeyboard
- },
- // 自动获取焦点
- // 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点
- focus: {
- type: Boolean,
- default: props$G.input.focus
- },
- // 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效
- autoBlur: {
- type: Boolean,
- default: props$G.input.autoBlur
- },
- // 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效
- disableDefaultPadding: {
- type: Boolean,
- default: props$G.input.disableDefaultPadding
- },
- // 指定focus时光标的位置
- cursor: {
- type: [String, Number],
- default: props$G.input.cursor
- },
- // 输入框聚焦时底部与键盘的距离
- cursorSpacing: {
- type: [String, Number],
- default: props$G.input.cursorSpacing
- },
- // 光标起始位置,自动聚集时有效,需与selection-end搭配使用
- selectionStart: {
- type: [String, Number],
- default: props$G.input.selectionStart
- },
- // 光标结束位置,自动聚集时有效,需与selection-start搭配使用
- selectionEnd: {
- type: [String, Number],
- default: props$G.input.selectionEnd
- },
- // 键盘弹起时,是否自动上推页面
- adjustPosition: {
- type: Boolean,
- default: props$G.input.adjustPosition
- },
- // 输入框内容对齐方式,可选值为:left|center|right
- inputAlign: {
- type: String,
- default: props$G.input.inputAlign
- },
- // 输入框字体的大小
- fontSize: {
- type: [String, Number],
- default: "34rpx"
- },
- // 输入框字体颜色
- color: {
- type: String,
- default: props$G.input.color
- },
- // 输入框前置图标
- prefixIcon: {
- type: String,
- default: props$G.input.prefixIcon
- },
- // 前置图标样式,对象或字符串
- prefixIconStyle: {
- type: [String, Object],
- default: props$G.input.prefixIconStyle
- },
- // 输入框后置图标
- suffixIcon: {
- type: String,
- default: props$G.input.suffixIcon
- },
- // 后置图标样式,对象或字符串
- suffixIconStyle: {
- type: [String, Object],
- default: props$G.input.suffixIconStyle
- },
- // 边框类型,surround-四周边框,bottom-底部边框,none-无边框
- border: {
- type: String,
- default: props$G.input.border
- },
- // 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会
- readonly: {
- type: Boolean,
- default: props$G.input.readonly
- },
- // 输入框形状,circle-圆形,square-方形
- shape: {
- type: String,
- default: props$G.input.shape
- },
- // 用于处理或者过滤输入框内容的方法
- formatter: {
- type: [Function, null],
- default: props$G.input.formatter
- },
- // 是否忽略组件内对文本合成系统事件的处理
- ignoreCompositionEvent: {
- type: Boolean,
- default: true
- }
- }
- };
- const _sfc_main$27 = {
- name: "u-input",
- mixins: [mpMixin, mixin, props$E],
- 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$26(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- 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均失效,此时\n 为了防止type=number时,又存在password属性,type无效,此时需要设置password为undefined\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_0$e = /* @__PURE__ */ _export_sfc(_sfc_main$27, [["render", _sfc_render$26], ["__scopeId", "data-v-df79975b"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-input/u-input.vue"]]);
- const props$D = {
- props: {
- color: {
- type: String,
- default: props$G.line.color
- },
- // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
- length: {
- type: [String, Number],
- default: props$G.line.length
- },
- // 线条方向,col-竖向,row-横向
- direction: {
- type: String,
- default: props$G.line.direction
- },
- // 是否显示细边框
- hairline: {
- type: Boolean,
- default: props$G.line.hairline
- },
- // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
- margin: {
- type: [String, Number],
- default: props$G.line.margin
- },
- // 是否虚线,true-虚线,false-实线
- dashed: {
- type: Boolean,
- default: props$G.line.dashed
- }
- }
- };
- const _sfc_main$26 = {
- name: "u-line",
- mixins: [mpMixin, mixin, props$D],
- 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$25(_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_1$c = /* @__PURE__ */ _export_sfc(_sfc_main$26, [["render", _sfc_render$25], ["__scopeId", "data-v-72791e59"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-line/u-line.vue"]]);
- const props$C = {
- props: {
- // input的label提示语
- label: {
- type: String,
- default: props$G.formItem.label
- },
- // 绑定的值
- prop: {
- type: String,
- default: props$G.formItem.prop
- },
- // 是否显示表单域的下划线边框
- borderBottom: {
- type: [String, Boolean],
- default: props$G.formItem.borderBottom
- },
- // label的宽度,单位px
- labelWidth: {
- type: [String, Number],
- default: props$G.formItem.labelWidth
- },
- // 右侧图标
- rightIcon: {
- type: String,
- default: props$G.formItem.rightIcon
- },
- // 左侧图标
- leftIcon: {
- type: String,
- default: props$G.formItem.leftIcon
- },
- // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置
- required: {
- type: Boolean,
- default: props$G.formItem.required
- },
- leftIconStyle: {
- type: [String, Object],
- default: props$G.formItem.leftIconStyle
- }
- }
- };
- const _sfc_main$25 = {
- name: "u-form-item",
- mixins: [mpMixin, mixin, props$C],
- 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$24(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$c);
- 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_1$b = /* @__PURE__ */ _export_sfc(_sfc_main$25, [["render", _sfc_render$24], ["__scopeId", "data-v-42bac3de"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-form-item/u-form-item.vue"]]);
- const props$B = {
- props: {
- // 是否显示组件
- show: {
- type: Boolean,
- default: props$G.loadingIcon.show
- },
- // 颜色
- color: {
- type: String,
- default: props$G.loadingIcon.color
- },
- // 提示文字颜色
- textColor: {
- type: String,
- default: props$G.loadingIcon.textColor
- },
- // 文字和图标是否垂直排列
- vertical: {
- type: Boolean,
- default: props$G.loadingIcon.vertical
- },
- // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形
- mode: {
- type: String,
- default: props$G.loadingIcon.mode
- },
- // 图标大小,单位默认px
- size: {
- type: [String, Number],
- default: props$G.loadingIcon.size
- },
- // 文字大小
- textSize: {
- type: [String, Number],
- default: props$G.loadingIcon.textSize
- },
- // 文字内容
- text: {
- type: [String, Number],
- default: props$G.loadingIcon.text
- },
- // 动画模式
- timingFunction: {
- type: String,
- default: props$G.loadingIcon.timingFunction
- },
- // 动画执行周期时间
- duration: {
- type: [String, Number],
- default: props$G.loadingIcon.duration
- },
- // mode=circle时的暗边颜色
- inactiveColor: {
- type: String,
- default: props$G.loadingIcon.inactiveColor
- }
- }
- };
- const _sfc_main$24 = {
- name: "u-loading-icon",
- mixins: [mpMixin, mixin, props$B],
- 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$23(_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$d = /* @__PURE__ */ _export_sfc(_sfc_main$24, [["render", _sfc_render$23], ["__scopeId", "data-v-2af81691"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.vue"]]);
- const button = {
- props: {
- lang: String,
- sessionFrom: String,
- sendMessageTitle: String,
- sendMessagePath: String,
- sendMessageImg: String,
- showMessageCard: Boolean,
- appParameter: String,
- formType: String,
- openType: String
- }
- };
- const openType = {
- props: {
- openType: String
- },
- methods: {
- onGetUserInfo(event) {
- this.$emit("getuserinfo", event.detail);
- },
- onContact(event) {
- this.$emit("contact", event.detail);
- },
- onGetPhoneNumber(event) {
- this.$emit("getphonenumber", event.detail);
- },
- onError(event) {
- this.$emit("error", event.detail);
- },
- onLaunchApp(event) {
- this.$emit("launchapp", event.detail);
- },
- onOpenSetting(event) {
- this.$emit("opensetting", event.detail);
- }
- }
- };
- const props$A = {
- props: {
- // 是否细边框
- hairline: {
- type: Boolean,
- default: props$G.button.hairline
- },
- // 按钮的预置样式,info,primary,error,warning,success
- type: {
- type: String,
- default: props$G.button.type
- },
- // 按钮尺寸,large,normal,small,mini
- size: {
- type: String,
- default: props$G.button.size
- },
- // 按钮形状,circle(两边为半圆),square(带圆角)
- shape: {
- type: String,
- default: props$G.button.shape
- },
- // 按钮是否镂空
- plain: {
- type: Boolean,
- default: props$G.button.plain
- },
- // 是否禁止状态
- disabled: {
- type: Boolean,
- default: props$G.button.disabled
- },
- // 是否加载中
- loading: {
- type: Boolean,
- default: props$G.button.loading
- },
- // 加载中提示文字
- loadingText: {
- type: [String, Number],
- default: props$G.button.loadingText
- },
- // 加载状态图标类型
- loadingMode: {
- type: String,
- default: props$G.button.loadingMode
- },
- // 加载图标大小
- loadingSize: {
- type: [String, Number],
- default: props$G.button.loadingSize
- },
- // 开放能力,具体请看uniapp稳定关于button组件部分说明
- // https://uniapp.dcloud.io/component/button
- openType: {
- type: String,
- default: props$G.button.openType
- },
- // 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
- // 取值为submit(提交表单),reset(重置表单)
- formType: {
- type: String,
- default: props$G.button.formType
- },
- // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
- // 只微信小程序、QQ小程序有效
- appParameter: {
- type: String,
- default: props$G.button.appParameter
- },
- // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
- hoverStopPropagation: {
- type: Boolean,
- default: props$G.button.hoverStopPropagation
- },
- // 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
- lang: {
- type: String,
- default: props$G.button.lang
- },
- // 会话来源,open-type="contact"时有效。只微信小程序有效
- sessionFrom: {
- type: String,
- default: props$G.button.sessionFrom
- },
- // 会话内消息卡片标题,open-type="contact"时有效
- // 默认当前标题,只微信小程序有效
- sendMessageTitle: {
- type: String,
- default: props$G.button.sendMessageTitle
- },
- // 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
- // 默认当前分享路径,只微信小程序有效
- sendMessagePath: {
- type: String,
- default: props$G.button.sendMessagePath
- },
- // 会话内消息卡片图片,open-type="contact"时有效
- // 默认当前页面截图,只微信小程序有效
- sendMessageImg: {
- type: String,
- default: props$G.button.sendMessageImg
- },
- // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
- // 用户点击后可以快速发送小程序消息,open-type="contact"时有效
- showMessageCard: {
- type: Boolean,
- default: props$G.button.showMessageCard
- },
- // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
- dataName: {
- type: String,
- default: props$G.button.dataName
- },
- // 节流,一定时间内只能触发一次
- throttleTime: {
- type: [String, Number],
- default: props$G.button.throttleTime
- },
- // 按住后多久出现点击态,单位毫秒
- hoverStartTime: {
- type: [String, Number],
- default: props$G.button.hoverStartTime
- },
- // 手指松开后点击态保留时间,单位毫秒
- hoverStayTime: {
- type: [String, Number],
- default: props$G.button.hoverStayTime
- },
- // 按钮文字,之所以通过props传入,是因为slot传入的话
- // nvue中无法控制文字的样式
- text: {
- type: [String, Number],
- default: props$G.button.text
- },
- // 按钮图标
- icon: {
- type: String,
- default: props$G.button.icon
- },
- // 按钮图标
- iconColor: {
- type: String,
- default: props$G.button.icon
- },
- // 按钮颜色,支持传入linear-gradient渐变色
- color: {
- type: String,
- default: props$G.button.color
- }
- }
- };
- const _sfc_main$23 = {
- name: "u-button",
- mixins: [mpMixin, mixin, props$A],
- 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 = 16, { size } = this;
- if (size === "large")
- fontSize = 20;
- if (size === "normal")
- fontSize = 16;
- if (size === "small")
- fontSize = 14;
- if (size === "mini")
- fontSize = 12;
- 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(res2) {
- this.$emit("getphonenumber", res2);
- },
- getuserinfo(res2) {
- this.$emit("getuserinfo", res2);
- },
- error(res2) {
- this.$emit("error", res2);
- },
- opensetting(res2) {
- this.$emit("opensetting", res2);
- },
- launchapp(res2) {
- this.$emit("launchapp", res2);
- }
- }
- };
- function _sfc_render$22(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- 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_3$6 = /* @__PURE__ */ _export_sfc(_sfc_main$23, [["render", _sfc_render$22], ["__scopeId", "data-v-5ce41ee6"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-button/u-button.vue"]]);
- const props$z = {
- props: {
- // 当前form的需要验证字段的集合
- model: {
- type: Object,
- default: props$G.form.model
- },
- // 验证规则
- rules: {
- type: [Object, Function, Array],
- default: props$G.form.rules
- },
- // 有错误时的提示方式,message-提示信息,toast-进行toast提示
- // border-bottom-下边框呈现红色,none-无提示
- errorType: {
- type: String,
- default: props$G.form.errorType
- },
- // 是否显示表单域的下划线边框
- borderBottom: {
- type: Boolean,
- default: props$G.form.borderBottom
- },
- // label的位置,left-左边,top-上边
- labelPosition: {
- type: String,
- default: props$G.form.labelPosition
- },
- // label的宽度,单位px
- labelWidth: {
- type: [String, Number],
- default: props$G.form.labelWidth
- },
- // lable字体的对齐方式
- labelAlign: {
- type: String,
- default: props$G.form.labelAlign
- },
- // lable的样式,对象形式
- labelStyle: {
- type: Object,
- default: props$G.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 res2;
- if (rule.asyncValidator) {
- res2 = rule.asyncValidator(rule, data.value, cb, data.source, options);
- } else if (rule.validator) {
- res2 = rule.validator(rule, data.value, cb, data.source, options);
- if (res2 === true) {
- cb();
- } else if (res2 === false) {
- cb(rule.message || `${rule.field} fails`);
- } else if (res2 instanceof Array) {
- cb(res2);
- } else if (res2 instanceof Error) {
- cb(res2.message);
- }
- }
- if (res2 && res2.then) {
- res2.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$22 = {
- name: "u-form",
- mixins: [mpMixin, mixin, props$z],
- 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$21(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "u-form" }, [
- vue.renderSlot(_ctx.$slots, "default")
- ]);
- }
- const __easycom_2$6 = /* @__PURE__ */ _export_sfc(_sfc_main$22, [["render", _sfc_render$21], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-form/u-form.vue"]]);
- const _sfc_main$21 = {
- name: "u--form",
- mixins: [mpMixin, props$z, mixin],
- components: {
- uvForm: __easycom_2$6
- },
- created() {
- this.children = [];
- },
- methods: {
- // 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则
- setRules(rules2) {
- this.$refs.uForm.setRules(rules2);
- },
- validate() {
- return this.$refs.uForm.validate();
- },
- validateField(value2, callback) {
- return this.$refs.uForm.validateField(value2, callback);
- },
- resetFields() {
- return this.$refs.uForm.resetFields();
- },
- clearValidate(props2) {
- return this.$refs.uForm.clearValidate(props2);
- },
- setMpData() {
- this.$refs.uForm.children = this.children;
- }
- }
- };
- function _sfc_render$20(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_uvForm = vue.resolveComponent("uvForm");
- return vue.openBlock(), vue.createBlock(_component_uvForm, {
- ref: "uForm",
- model: _ctx.model,
- rules: _ctx.rules,
- errorType: _ctx.errorType,
- borderBottom: _ctx.borderBottom,
- labelPosition: _ctx.labelPosition,
- labelWidth: _ctx.labelWidth,
- labelAlign: _ctx.labelAlign,
- labelStyle: _ctx.labelStyle,
- customStyle: _ctx.customStyle
- }, {
- default: vue.withCtx(() => [
- vue.renderSlot(_ctx.$slots, "default")
- ]),
- _: 3
- /* FORWARDED */
- }, 8, ["model", "rules", "errorType", "borderBottom", "labelPosition", "labelWidth", "labelAlign", "labelStyle", "customStyle"]);
- }
- const __easycom_2$5 = /* @__PURE__ */ _export_sfc(_sfc_main$21, [["render", _sfc_render$20], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u--form/u--form.vue"]]);
- const _imports_0$3 = "/static/img/logo.png";
- const prefixIconStyle = "font-size:50rpx";
- const placeholderStyle$4 = "font-size:32rpx";
- const _sfc_main$20 = {
- __name: "login",
- setup(__props, { expose: __expose }) {
- __expose();
- const customStyle = vue.reactive({
- "font-size": "40rpx",
- height: "90rpx"
- });
- let { proxy } = vue.getCurrentInstance();
- const formData = vue.reactive({
- username: "",
- password: "",
- code: ""
- });
- const uForm = vue.ref(null);
- const isCountingDown = vue.ref(false);
- const countdown = vue.ref(60);
- const countDownText = vue.ref("获取验证码");
- const startCountDown = () => {
- isCountingDown.value = true;
- countdown.value = 60;
- countDownText.value = `${countdown.value}秒重发`;
- const timer = setInterval(() => {
- countdown.value--;
- countDownText.value = `${countdown.value}秒重发`;
- if (countdown.value <= 0) {
- clearInterval(timer);
- isCountingDown.value = false;
- countDownText.value = "重新发送";
- }
- }, 1e3);
- };
- const getVerifyCode = () => {
- if (isCountingDown.value)
- return;
- if (!formData.username)
- return uni.$u.toast("请输入用户名");
- if (!formData.password)
- return uni.$u.toast("请输入密码");
- let data = {
- username: formData.username,
- password: formData.password
- };
- uni.showLoading({
- mask: true,
- title: "发送中..."
- });
- uni.$u.http.post("/app/appUser/sendMobileCode", data).then((res2) => {
- if (res2.code == 200) {
- uni.showToast({
- title: "验证码发送成功,请注意查收",
- icon: "none"
- });
- startCountDown();
- } else {
- uni.$u.toast(res2.msg);
- }
- }).finally(() => uni.hideLoading());
- };
- const handleLogin = () => {
- if (!formData.username)
- return uni.$u.toast("请输入用户名");
- if (!formData.password)
- return uni.$u.toast("请输入密码");
- uni.showLoading({
- mask: true,
- title: "登录中..."
- });
- uni.$u.http.post("/app/appUser/login", formData).then((res2) => {
- if (res2.code == 200) {
- uni.setStorageSync("token", res2.data);
- setTimeout(() => {
- getUserInfo();
- uni.$u.http.get("/app/appUser/getRouters").then((resp) => {
- if (resp.code == 200) {
- uni.setStorageSync("menuList", resp.data);
- uni.$u.toast("登录成功");
- uni.switchTab({
- url: "/pages/index/index"
- });
- uni.$u.ttsModule.speak("书嗨,不辜负每一个爱书的人");
- } else {
- uni.$u.toast(resp.msg);
- }
- });
- }, 50);
- } else {
- uni.$u.toast(res2.msg);
- }
- }).catch((error2) => {
- uni.showModal({
- title: "登录失败",
- content: JSON.stringify(error2),
- showCancel: false
- });
- }).finally(() => uni.hideLoading());
- };
- function getUserInfo() {
- uni.$u.http.get("/app/appUser/getUserInfoById").then((res2) => {
- if (res2.code == 200) {
- uni.setStorageSync("userInfo", res2.data);
- }
- });
- }
- function checkToken() {
- uni.showLoading({
- title: "检测登录状态..."
- });
- uni.$u.http.get("/app/appUser/checkToken").then((res2) => {
- if (res2.code == 200) {
- uni.$u.toast("登录成功");
- uni.switchTab({
- url: "/pages/index/index"
- });
- } else {
- uni.$u.toast("请先登录");
- }
- }).finally(() => uni.hideLoading());
- }
- onLoad(() => {
- let token = uni.getStorageSync("token");
- if (token) {
- checkToken();
- }
- });
- const __returned__ = { prefixIconStyle, placeholderStyle: placeholderStyle$4, customStyle, get proxy() {
- return proxy;
- }, set proxy(v) {
- proxy = v;
- }, formData, uForm, isCountingDown, countdown, countDownText, startCountDown, getVerifyCode, handleLogin, getUserInfo, checkToken, ref: vue.ref, reactive: vue.reactive, getCurrentInstance: vue.getCurrentInstance, get onLoad() {
- return onLoad;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1$(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
- const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- const _component_u__form = resolveEasycom(vue.resolveDynamicComponent("u--form"), __easycom_2$5);
- return vue.openBlock(), vue.createElementBlock("view", { class: "login-container" }, [
- vue.createCommentVNode(" Logo和标题区域 "),
- vue.createElementVNode("view", { class: "logo-section" }, [
- vue.createElementVNode("image", {
- class: "logo",
- src: _imports_0$3,
- mode: "aspectFit"
- })
- ]),
- vue.createCommentVNode(" 表单区域 "),
- vue.createElementVNode("view", { class: "form-section" }, [
- vue.createVNode(_component_u__form, {
- model: $setup.formData,
- ref: "uForm"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_form_item, null, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- prefixIconStyle: $setup.prefixIconStyle,
- "placeholder-style": $setup.placeholderStyle,
- "custom-style": $setup.customStyle,
- modelValue: $setup.formData.username,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.username = $event),
- placeholder: "请输入用户名",
- prefixIcon: "account"
- }, null, 8, ["custom-style", "modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, null, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- prefixIconStyle: $setup.prefixIconStyle,
- "placeholder-style": $setup.placeholderStyle,
- "custom-style": $setup.customStyle,
- modelValue: $setup.formData.password,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.password = $event),
- type: "password",
- placeholder: "请输入密码",
- prefixIcon: "lock"
- }, null, 8, ["custom-style", "modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, null, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- prefixIconStyle: $setup.prefixIconStyle,
- "placeholder-style": $setup.placeholderStyle,
- "custom-style": $setup.customStyle,
- modelValue: $setup.formData.code,
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.code = $event),
- placeholder: "请输入验证码",
- prefixIcon: "chat"
- }, {
- suffix: vue.withCtx(() => [
- vue.createVNode(_component_u_button, {
- "custom-style": "width:200rpx",
- color: "#22ac38",
- size: "small",
- onClick: $setup.getVerifyCode,
- disabled: $setup.isCountingDown
- }, {
- default: vue.withCtx(() => [
- vue.createTextVNode(
- vue.toDisplayString($setup.countDownText),
- 1
- /* TEXT */
- )
- ]),
- _: 1
- /* STABLE */
- }, 8, ["disabled"])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["custom-style", "modelValue"])
- ]),
- _: 1
- /* STABLE */
- })
- ]),
- _: 1
- /* STABLE */
- }, 8, ["model"]),
- vue.createVNode(_component_u_button, {
- "custom-style": "margin-top:5%",
- type: "primary",
- block: "",
- onClick: $setup.handleLogin,
- color: "#22ac38",
- shape: "circle"
- }, {
- default: vue.withCtx(() => [
- vue.createTextVNode("登录")
- ]),
- _: 1
- /* STABLE */
- })
- ])
- ]);
- }
- const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$20, [["render", _sfc_render$1$], ["__scopeId", "data-v-e4e4508d"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/login/login.vue"]]);
- const _sfc_main$1$ = {
- __name: "index",
- setup(__props, { expose: __expose }) {
- __expose();
- function playGlobalSound() {
- uni.$u.playClickSound();
- }
- const menuData = vue.ref([]);
- let menuPromise = null;
- async function getMenuList() {
- if (menuData.value && menuData.value.length > 0) {
- return menuData.value;
- }
- if (menuPromise) {
- return menuPromise;
- }
- menuPromise = uni.$u.http.get("/app/appUser/getRouters").then((res2) => {
- const data = res2.data;
- menuData.value = data.map((item) => {
- item.children = item.children.map((child) => {
- child.query = child.query ? JSON.parse(child.query) : {};
- return child;
- });
- return item;
- });
- return data;
- }).catch((err) => {
- formatAppLog("error", "at pages/index/index.vue:64", "获取菜单数据失败", err);
- return [];
- }).finally(() => {
- menuPromise = null;
- });
- return menuPromise;
- }
- function getButtonList() {
- uni.$u.http.get("/app/appUser/getInfo").then((res2) => {
- if (res2.code == 200) {
- uni.setStorageSync("buttonList", res2.permissions);
- }
- });
- }
- function getAudioConfig() {
- uni.$u.http.get("/app/appConf/getAudioConfig").then((res2) => {
- if (res2.code == 200) {
- uni.setStorageSync("audioConfig", res2.data);
- }
- });
- }
- onLoad(() => {
- uni.showLoading({
- title: "加载中...",
- mask: true
- });
- Promise.all([getMenuList(), getButtonList()]).finally(() => {
- uni.hideLoading();
- });
- getAudioConfig();
- });
- const formatName = (name) => {
- if (!name)
- return "";
- let result = name;
- if (result.includes("\\n\\r")) {
- result = result.replace(/\\n\\r/g, "\n");
- }
- return result;
- };
- const expressOperations = vue.ref([
- {
- name: "中转\n\r签收",
- path: "/pages/index/express/transfer-sign",
- type: "primary"
- },
- {
- name: "到仓\n\r签收",
- path: "/pages/index/express/warehouse-sign",
- type: "warning"
- },
- {
- name: "重量\n\r修改",
- path: "/pages/index/express/weight-modify",
- type: "primary"
- },
- {
- name: "快递\n\r验收",
- path: "/pages/index/express/quick-check",
- type: "warning"
- },
- {
- name: "路由签收\n\r异常",
- path: "/pages/index/express/route-exception",
- type: "primary"
- },
- {
- name: "快递\n\r拆包",
- path: "/pages/index/express/quick-unpack",
- type: "warning"
- }
- ]);
- const auditOperations = vue.ref([
- {
- name: "确认\n\r收货",
- path: "/pages/index/audit/confirm-receipt",
- type: "primary"
- },
- {
- name: "扫书\n\r查单",
- path: "/pages/index/audit/scan-order",
- type: "warning"
- },
- {
- name: "根据快递单\n\r或订单",
- path: "/pages/index/audit/express-order",
- type: "warning"
- },
- {
- name: "根据\n\r发件人",
- path: "/pages/index/audit/sender",
- type: "primary"
- }
- ]);
- const wmsOperations = vue.ref([
- {
- name: "中等\n\r入库",
- path: "/pages/index/wms/medium-in",
- type: "primary"
- },
- {
- name: "良品\n\r入库",
- path: "/pages/index/wms/good-in",
- type: "warning"
- },
- {
- name: "次品\n\r入库",
- path: "/pages/index/wms/secondary-in",
- type: "primary"
- },
- {
- name: "不良\n\r入库",
- path: "/pages/index/wms/bad-in",
- type: "warning"
- },
- {
- name: "不良\n\r出库",
- path: "/pages/index/wms/bad-out",
- type: "primary"
- },
- {
- name: "不良\n\r下架",
- path: "/pages/index/wms/bad-off",
- type: "warning"
- },
- {
- name: "订单\n\r查询",
- path: "/pages/index/wms/order-query",
- type: "primary"
- },
- {
- name: "库位\n\r订单",
- 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/statistic/audit",
- type: "warning",
- span: 24
- },
- {
- name: "售后\n\r统计",
- path: "/pages/index/statistic/after-sale",
- type: "primary"
- },
- {
- name: "打包\n\r统计",
- path: "/pages/index/statistic/package",
- type: "warning"
- }
- ]);
- const offlineOperations = vue.ref([
- {
- name: "线下\n\r核单",
- path: "/pages/index/offline/check-order",
- type: "primary"
- },
- {
- name: "核单\n\r记录",
- path: "/pages/index/offline/check-record",
- type: "warning"
- }
- ]);
- const entryOperations = vue.ref([
- {
- name: "扫码\n\r查书",
- path: "/pages/index/entry/scan-book",
- type: "primary"
- },
- {
- name: "录入\n\r书籍重量",
- path: "/pages/index/entry/book-weight",
- type: "warning"
- },
- {
- name: "商品档案推送",
- path: "/pages/index/entry/commodity-scan",
- type: "primary",
- span: 24
- }
- ]);
- const handleNavigation = (path) => {
- uni.redirectTo({
- url: path,
- fail: () => {
- uni.showToast({
- title: "页面跳转失败",
- icon: "none"
- });
- }
- });
- };
- const __returned__ = { playGlobalSound, menuData, get menuPromise() {
- return menuPromise;
- }, set menuPromise(v) {
- menuPromise = v;
- }, getMenuList, getButtonList, getAudioConfig, formatName, expressOperations, auditOperations, wmsOperations, statisticsOperations, offlineOperations, entryOperations, handleNavigation, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, get onLoad() {
- return onLoad;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1_(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "operation-container",
- onClick: $setup.playGlobalSound
- }, [
- vue.createCommentVNode(" 直接循环 "),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.menuData, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "section",
- key: item.path
- }, [
- vue.createElementVNode(
- "view",
- { class: "section-title" },
- vue.toDisplayString(item.meta.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "grid-container" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item.children, (child) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: vue.normalizeClass(["grid-item", child.query.type]),
- style: vue.normalizeStyle({ gridColumn: child.query.span ? "span 2" : "span 1" }),
- key: child.path,
- onClick: ($event) => $setup.handleNavigation(child.path)
- }, vue.toDisplayString($setup.formatName(child.meta.title)), 15, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]);
- }
- const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1$, [["render", _sfc_render$1_], ["__scopeId", "data-v-1cf27b2a"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/index.vue"]]);
- const props$y = {
- props: {
- // 文字颜色
- color: {
- type: String,
- default: props$G.link.color
- },
- // 字体大小,单位px
- fontSize: {
- type: [String, Number],
- default: props$G.link.fontSize
- },
- // 是否显示下划线
- underLine: {
- type: Boolean,
- default: props$G.link.underLine
- },
- // 要跳转的链接
- href: {
- type: String,
- default: props$G.link.href
- },
- // 小程序中复制到粘贴板的提示语
- mpTips: {
- type: String,
- default: props$G.link.mpTips
- },
- // 下划线颜色
- lineColor: {
- type: String,
- default: props$G.link.lineColor
- },
- // 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
- text: {
- type: String,
- default: props$G.link.text
- }
- }
- };
- const _sfc_main$1_ = {
- name: "u-link",
- mixins: [mpMixin, mixin, props$y],
- 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$1Z(_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$a = /* @__PURE__ */ _export_sfc(_sfc_main$1_, [["render", _sfc_render$1Z], ["__scopeId", "data-v-12f6646d"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/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$x = {
- props: {
- // 主题颜色
- type: {
- type: String,
- default: props$G.text.type
- },
- // 是否显示
- show: {
- type: Boolean,
- default: props$G.text.show
- },
- // 显示的值
- text: {
- type: [String, Number],
- default: props$G.text.text
- },
- // 前置图标
- prefixIcon: {
- type: String,
- default: props$G.text.prefixIcon
- },
- // 后置图标
- suffixIcon: {
- type: String,
- default: props$G.text.suffixIcon
- },
- // 文本处理的匹配模式
- // text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
- mode: {
- type: String,
- default: props$G.text.mode
- },
- // mode=link下,配置的链接
- href: {
- type: String,
- default: props$G.text.href
- },
- // 格式化规则
- format: {
- type: [String, Function],
- default: props$G.text.format
- },
- // mode=phone时,点击文本是否拨打电话
- call: {
- type: Boolean,
- default: props$G.text.call
- },
- // 小程序的打开方式
- openType: {
- type: String,
- default: props$G.text.openType
- },
- // 是否粗体,默认normal
- bold: {
- type: Boolean,
- default: props$G.text.bold
- },
- // 是否块状
- block: {
- type: Boolean,
- default: props$G.text.block
- },
- // 文本显示的行数,如果设置,超出此行数,将会显示省略号
- lines: {
- type: [String, Number],
- default: props$G.text.lines
- },
- // 文本颜色
- color: {
- type: String,
- default: props$G.text.color
- },
- // 字体大小
- size: {
- type: [String, Number],
- default: props$G.text.size
- },
- // 图标的样式
- iconStyle: {
- type: [Object, String],
- default: props$G.text.iconStyle
- },
- // 文字装饰,下划线,中划线等,可选值 none|underline|line-through
- decoration: {
- tepe: String,
- default: props$G.text.decoration
- },
- // 外边距,对象、字符串,数值形式均可
- margin: {
- type: [Object, String, Number],
- default: props$G.text.margin
- },
- // 文本行高
- lineHeight: {
- type: [String, Number],
- default: props$G.text.lineHeight
- },
- // 文本对齐方式,可选值left|center|right
- align: {
- type: String,
- default: props$G.text.align
- },
- // 文字换行,可选值break-word|normal|anywhere
- wordWrap: {
- type: String,
- default: props$G.text.wordWrap
- }
- }
- };
- const _sfc_main$1Z = {
- name: "u--text",
- mixins: [mpMixin, mixin, value, props$x],
- 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$1Y(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- const _component_u_link = resolveEasycom(vue.resolveDynamicComponent("u-link"), __easycom_1$a);
- 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 __easycom_1$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1Z, [["render", _sfc_render$1Y], ["__scopeId", "data-v-0a574502"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-text/u-text.vue"]]);
- const _sfc_main$1Y = {
- name: "u--text",
- mixins: [mpMixin, mixin, props$x],
- components: {
- uvText: __easycom_1$9
- }
- };
- function _sfc_render$1X(_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$1Y, [["render", _sfc_render$1X], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u--text/u--text.vue"]]);
- const props$w = {
- props: {
- // 头像图片路径(不能为相对路径)
- src: {
- type: String,
- default: props$G.avatar.src
- },
- // 头像形状,circle-圆形,square-方形
- shape: {
- type: String,
- default: props$G.avatar.shape
- },
- // 头像尺寸
- size: {
- type: [String, Number],
- default: props$G.avatar.size
- },
- // 裁剪模式
- mode: {
- type: String,
- default: props$G.avatar.mode
- },
- // 显示的文字
- text: {
- type: String,
- default: props$G.avatar.text
- },
- // 背景色
- bgColor: {
- type: String,
- default: props$G.avatar.bgColor
- },
- // 文字颜色
- color: {
- type: String,
- default: props$G.avatar.color
- },
- // 文字大小
- fontSize: {
- type: [String, Number],
- default: props$G.avatar.fontSize
- },
- // 显示的图标
- icon: {
- type: String,
- default: props$G.avatar.icon
- },
- // 显示小程序头像,只对百度,微信,QQ小程序有效
- mpAvatar: {
- type: Boolean,
- default: props$G.avatar.mpAvatar
- },
- // 是否使用随机背景色
- randomBgColor: {
- type: Boolean,
- default: props$G.avatar.randomBgColor
- },
- // 加载失败的默认头像(组件有内置默认图片)
- defaultUrl: {
- type: String,
- default: props$G.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$G.avatar.colorIndex
- },
- // 组件标识符
- name: {
- type: String,
- default: props$G.avatar.name
- }
- }
- };
- const base64Avatar = "data:image/jpg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/4QMraHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjMtYzAxMSA2Ni4xNDU2NjEsIDIwMTIvMDIvMDYtMTQ6NTY6MjcgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDUzYgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjREMEQwRkY0RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjREMEQwRkY1RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NEQwRDBGRjJGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NEQwRDBGRjNGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7/7gAOQWRvYmUAZMAAAAAB/9sAhAAGBAQEBQQGBQUGCQYFBgkLCAYGCAsMCgoLCgoMEAwMDAwMDBAMDg8QDw4MExMUFBMTHBsbGxwfHx8fHx8fHx8fAQcHBw0MDRgQEBgaFREVGh8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx//wAARCADIAMgDAREAAhEBAxEB/8QAcQABAQEAAwEBAAAAAAAAAAAAAAUEAQMGAgcBAQAAAAAAAAAAAAAAAAAAAAAQAAIBAwICBgkDBQAAAAAAAAABAhEDBCEFMVFBYXGREiKBscHRMkJSEyOh4XLxYjNDFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8A/fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHbHFyZ/Dam+yLA+Z2L0Pjtyj2poD4AAAAAAAAAAAAAAAAAAAAAAAAKWFs9y6lcvvwQeqj8z9wFaziY1n/HbUX9XF97A7QAGXI23EvJ1goyfzR0YEfN269jeZ+a03pNe0DIAAAAAAAAAAAAAAAAAAAACvtO3RcVkXlWutuL9YFYAAAAAOJRjKLjJVi9GmB5/csH/mu1h/in8PU+QGMAAAAAAAAAAAAAAAAAAaMDG/6MmMH8C80+xAelSSVFolwQAAAAAAAHVlWI37ErUulaPk+hgeYnCUJuElSUXRrrQHAAAAAAAAAAAAAAAAABa2Oz4bM7r4zdF2ICmAAAAAAAAAg7zZ8GX41wuJP0rRgYAAAAAAAAAAAAAAAAAD0m2R8ODaXU33tsDSAAAAAAAAAlb9HyWZcnJd9PcBHAAAAAAAAAAAAAAAAAPS7e64Vn+KA0AAAAAAAAAJm+v8Ftf3ewCKAAAAAAAAAAAAAAAAAX9muqeGo9NttP06+0DcAAAAAAAAAjb7dTu2ra+VOT9P8AQCWAAAAAAAAAAAAAAAAAUNmyPt5Ltv4bui/kuAF0AAAAAAADiUlGLlJ0SVW+oDzOXfd/Ind6JPRdS0QHSAAAAAAAAAAAAAAAAAE2nVaNcGB6Lbs6OTao9LsF51z60BrAAAAAABJ3jOVHjW3r/sa9QEgAAAAAAAAAAAAAAAAAAAPu1duWriuW34ZR4MC9hbnZyEoy8l36XwfYBsAAADaSq9EuLAlZ+7xSdrGdW9Hc5dgEdtt1erfFgAAAAAAAAAAAAAAAAADVjbblX6NR8MH80tEBRs7HYivyzlN8lovaBPzduvY0m6eK10TXtAyAarO55lpJK54orolr+4GqO/Xaea1FvqbXvA+Z77kNeW3GPbV+4DJfzcm/pcm3H6Vou5AdAFLC2ed2Pjv1txa8sV8T6wOL+yZEKu1JXFy4MDBOE4ScZxcZLinoB8gAAAAAAAAAAAB242LeyJ+C3GvN9C7QLmJtePYpKS+5c+p8F2IDYAANJqj1T4oCfk7Nj3G5Wn9qXJax7gJ93Z82D8sVNc4v30A6Xg5i42Z+iLfqARwcyT0sz9MWvWBps7LlTf5Grce9/oBTxdtxseklHxT+uWr9AGoAB138ezfj4bsFJdD6V2MCPm7RdtJzs1uW1xXzL3gTgAAAAAAAAADRhYc8q74I6RWs5ckB6GxYtWLat21SK731sDsAAAAAAAAAAAAAAAASt021NO/YjrxuQXT1oCOAAAAAAABzGLlJRSq26JAelwsWONYjbXxcZvmwO8AAAAAAAAAAAAAAAAAAef3TEWPkVivx3NY9T6UBiAAAAAABo2+VmGXblddIJ8eivRUD0oAAAAAAAAAAAAAAAAAAAYt4tKeFKVNYNSXfRgefAAAAAAAAr7VuSSWPedKaW5v1MCsAAAAAAAAAAAAAAAAAAIe6bj96Ts2n+JPzSXzP3ATgAAAAAAAAFbbt1UUrOQ9FpC4/UwK6aaqtU+DAAAAAAAAAAAAAAA4lKMIuUmoxWrb4ARNx3R3q2rLpa4Sl0y/YCcAAAAAAAAAAANmFud7G8r89r6X0dgFvGzLGRGtuWvTF6NAdwAAAAAAAAAAAy5W442PVN+K59EePp5ARMvOv5MvO6QXCC4AZwAAAAAAAAAAAAAcxlKLUotprg1owN+PvORborq+7Hnwl3gUbO74VzRydt8pKn68ANcJwmqwkpLmnUDkAAAAfNy9atqtyagut0AxXt5xIV8Fbj6lRd7Am5G65V6qUvtwfyx94GMAAAAAAAAAAAAAAAAAAAOU2nVOj5gdsc3LiqRvTpyqwOxbnnrhdfpSfrQB7pnv/AGvuS9gHXPMy5/Fem1yq0v0A6W29XqwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf//Z";
- const _sfc_main$1X = {
- name: "u-avatar",
- mixins: [mpMixin, mixin, props$w],
- 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$1W(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- 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$c = /* @__PURE__ */ _export_sfc(_sfc_main$1X, [["render", _sfc_render$1W], ["__scopeId", "data-v-34d954f9"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-avatar/u-avatar.vue"]]);
- const props$v = {
- props: {
- // 标题
- title: {
- type: [String, Number],
- default: props$G.cell.title
- },
- // 标题下方的描述信息
- label: {
- type: [String, Number],
- default: props$G.cell.label
- },
- // 右侧的内容
- value: {
- type: [String, Number],
- default: props$G.cell.value
- },
- // 左侧图标名称,或者图片链接(本地文件建议使用绝对地址)
- icon: {
- type: String,
- default: props$G.cell.icon
- },
- // 是否禁用cell
- disabled: {
- type: Boolean,
- default: props$G.cell.disabled
- },
- // 是否显示下边框
- border: {
- type: Boolean,
- default: props$G.cell.border
- },
- // 内容是否垂直居中(主要是针对右侧的value部分)
- center: {
- type: Boolean,
- default: props$G.cell.center
- },
- // 点击后跳转的URL地址
- url: {
- type: String,
- default: props$G.cell.url
- },
- // 链接跳转的方式,内部使用的是uView封装的route方法,可能会进行拦截操作
- linkType: {
- type: String,
- default: props$G.cell.linkType
- },
- // 是否开启点击反馈(表现为点击时加上灰色背景)
- clickable: {
- type: Boolean,
- default: props$G.cell.clickable
- },
- // 是否展示右侧箭头并开启点击反馈
- isLink: {
- type: Boolean,
- default: props$G.cell.isLink
- },
- // 是否显示表单状态下的必填星号(此组件可能会内嵌入input组件)
- required: {
- type: Boolean,
- default: props$G.cell.required
- },
- // 右侧的图标箭头
- rightIcon: {
- type: String,
- default: props$G.cell.rightIcon
- },
- // 右侧箭头的方向,可选值为:left,up,down
- arrowDirection: {
- type: String,
- default: props$G.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$G.cell.size
- },
- // 点击cell是否阻止事件传播
- stop: {
- type: Boolean,
- default: props$G.cell.stop
- },
- // 标识符,cell被点击时返回
- name: {
- type: [Number, String],
- default: props$G.cell.name
- }
- }
- };
- const _sfc_main$1W = {
- name: "u-cell",
- data() {
- return {};
- },
- mixins: [mpMixin, mixin, props$v],
- 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$1V(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$c);
- 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$1W, [["render", _sfc_render$1V], ["__scopeId", "data-v-3fd6feca"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-cell/u-cell.vue"]]);
- const props$u = {
- props: {
- // 分组标题
- title: {
- type: String,
- default: props$G.cellGroup.title
- },
- // 是否显示外边框
- border: {
- type: Boolean,
- default: props$G.cellGroup.border
- }
- }
- };
- const _sfc_main$1V = {
- name: "u-cell-group",
- mixins: [mpMixin, mixin, props$u]
- };
- function _sfc_render$1U(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$c);
- 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$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1V, [["render", _sfc_render$1U], ["__scopeId", "data-v-014d39dc"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-cell-group/u-cell-group.vue"]]);
- const _sfc_main$1U = {
- __name: "my",
- setup(__props, { expose: __expose }) {
- __expose();
- function playGlobalSound() {
- uni.$u.playClickSound();
- }
- let defaultAvatar = "https://img20.360buyimg.com/da/jfs/t1/141592/25/8861/261559/5f68d8c1E33ed78ab/698ad655bfcfbaed.png";
- const settingsList = vue.ref([
- {
- title: "用户信息",
- path: "/pages/my/page/user-info"
- },
- {
- title: "默认仓库",
- path: "/pages/my/page/warehouse"
- },
- {
- title: "学校设置",
- path: "/pages/my/page/school"
- },
- {
- title: "审核未完成",
- path: "/pages/my/page/audit-unfinished"
- },
- {
- title: "版本设置",
- path: "/pages/my/page/version",
- icon: "tags"
- },
- {
- title: "音频设置",
- path: "/pages/my/page/volume"
- },
- {
- title: "图书显示设置",
- path: "/pages/my/page/book-display"
- },
- {
- title: "修改密码",
- icon: "lock",
- path: "/pages/my/page/password"
- },
- {
- title: "退出账号",
- path: "/pages/my/page/logout",
- type: "logout"
- }
- ]);
- const greeting = vue.ref("");
- const updateGreeting = () => {
- const hour = (/* @__PURE__ */ new Date()).getHours();
- if (hour >= 5 && hour < 12) {
- greeting.value = "早上好";
- } else if (hour >= 12 && hour < 14) {
- greeting.value = "中午好";
- } else if (hour >= 14 && hour < 18) {
- greeting.value = "下午好";
- } else if (hour >= 18 && hour < 22) {
- greeting.value = "晚上好";
- } else {
- greeting.value = "夜深了";
- }
- };
- const userName = vue.ref("-");
- const avatar = vue.ref("");
- function getUserInfo() {
- uni.$u.http.get("/app/appUser/getUserInfoById").then((res2) => {
- if (res2.code == 200) {
- userName.value = res2.data.userName;
- avatar.value = res2.data.avatar;
- }
- });
- }
- onLoad(() => {
- updateGreeting();
- setInterval(updateGreeting, 60 * 60 * 1e3);
- getUserInfo();
- });
- const handleClick = (item) => {
- if (item.type === "logout") {
- uni.showModal({
- title: "提示",
- content: "确定要退出登录吗?",
- success: (res2) => {
- if (res2.confirm) {
- uni.clearStorageSync();
- uni.reLaunch({
- url: "/pages/login/login"
- });
- }
- }
- });
- return;
- }
- uni.redirectTo({
- url: item.path
- });
- };
- const __returned__ = { playGlobalSound, get defaultAvatar() {
- return defaultAvatar;
- }, set defaultAvatar(v) {
- defaultAvatar = v;
- }, settingsList, greeting, updateGreeting, userName, avatar, getUserInfo, handleClick, ref: vue.ref, onMounted: vue.onMounted, get onLoad() {
- return onLoad;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1T(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$c);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- 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$4);
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "settings-page",
- onClick: $setup.playGlobalSound
- }, [
- vue.createCommentVNode(" 顶部用户信息 "),
- vue.createElementVNode("view", { class: "user-header" }, [
- vue.createElementVNode("view", { class: "user-info" }, [
- vue.createVNode(_component_u_avatar, {
- size: 60,
- src: $setup.avatar || $setup.defaultAvatar
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "greeting" }, [
- vue.createElementVNode(
- "text",
- { class: "time" },
- vue.toDisplayString($setup.greeting) + "!",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "name" },
- vue.toDisplayString($setup.userName),
- 1
- /* TEXT */
- )
- ])
- ])
- ]),
- 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: "22",
- color: "#333"
- }, null, 8, ["name"])
- ])
- ]),
- _: 2
- /* DYNAMIC */
- }, 1032, ["title", "onClick", "border"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- _: 1
- /* STABLE */
- })
- ])
- ]);
- }
- const PagesMyMy = /* @__PURE__ */ _export_sfc(_sfc_main$1U, [["render", _sfc_render$1T], ["__scopeId", "data-v-2f1ef635"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/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$2 = "/assets/no-result.6af066e5.png";
- const _sfc_main$1T = {
- 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$1S(_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$2,
- 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$b = /* @__PURE__ */ _export_sfc(_sfc_main$1T, [["render", _sfc_render$1S], ["__scopeId", "data-v-7cefd855"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/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, t2) {
- this.myScrollTo && this.myScrollTo(y, t2);
- };
- 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, t2, rate) {
- let diff = end - star;
- if (t2 === 0 || diff === 0) {
- callback && callback(end);
- return;
- }
- t2 = t2 || 300;
- rate = rate || 30;
- let count = t2 / 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$1S = {
- 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$1R(_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$1S, [["render", _sfc_render$1R], ["__scopeId", "data-v-49fff3a8"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/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$1 = (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$1R = {
- 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, t2) => {
- vm.scrollAnim = t2 !== 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 (t2 === 0 || t2 === 300) {
- vm.scrollTop = curY;
- vm.$nextTick(function() {
- vm.scrollTop = y;
- });
- } else {
- vm.mescroll.getStep(curY, y, (step) => {
- vm.scrollTop = step;
- }, t2);
- }
- });
- 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$1Q(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_mescroll_empty = resolveEasycom(vue.resolveDynamicComponent("mescroll-empty"), __easycom_0$b);
- 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$1 === "function")
- block0$1(_sfc_main$1R);
- if (typeof block1 === "function")
- block1(_sfc_main$1R);
- const __easycom_0$a = /* @__PURE__ */ _export_sfc(_sfc_main$1R, [["render", _sfc_render$1Q], ["__scopeId", "data-v-97b1664c"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/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", 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$1Q = {
- __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
- },
- method: {
- type: String,
- default: "get"
- },
- isUpAutoLoad: {
- type: Boolean,
- default: true
- }
- },
- 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 emit2 = __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
- };
- let methods = props2.method == "post" ? uni.$u.http.post(props2.requestStr, params) : uni.$u.http.get(props2.requestStr, {
- params
- });
- methods.then((res2) => {
- emit2("update:total", res2.total);
- resolve(res2);
- });
- });
- };
- const upCallback = (mescroll) => {
- formatAppLog("log", "at components/pageScroll/index.vue:99", mescroll, "mescroll");
- if (!props2.requestStr)
- return;
- getList(mescroll).then((res2) => {
- const curPageData = res2.rows || res2.data || [];
- if (mescroll.num == 1)
- list.value = [];
- list.value = list.value.concat(curPageData);
- emit2("updateList", list.value, mescroll.num);
- mescroll.endBySize(curPageData.length, res2.total);
- }).catch(() => {
- mescroll.endErr();
- });
- };
- const resetUpScroll = () => {
- setTimeout(() => {
- getMescroll().resetUpScroll();
- }, 100);
- };
- const scroll = (e) => {
- emit2("scroll", e);
- };
- __expose({
- resetUpScroll
- });
- const __returned__ = { mescrollInit, downCallback, getMescroll, windowHeight, emit: emit2, props: props2, list, getList, upCallback, resetUpScroll, scroll, computed: vue.computed, onMounted: vue.onMounted, ref: vue.ref, watch: vue.watch, reactive: vue.reactive, get onShow() {
- return onShow;
- }, get useMescroll() {
- return useMescroll;
- }, get store() {
- return store;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1P(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_mescroll_uni = resolveEasycom(vue.resolveDynamicComponent("mescroll-uni"), __easycom_0$a);
- 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: "-- 没有更多了 --", auto: $props.isUpAutoLoad },
- down: { auto: $props.isUpAutoLoad }
- }, {
- default: vue.withCtx(() => [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ]),
- _: 3
- /* FORWARDED */
- }, 8, ["onInit", "onDown", "height", "up", "down"]);
- }
- const pageScroll = /* @__PURE__ */ _export_sfc(_sfc_main$1Q, [["render", _sfc_render$1P], ["__scopeId", "data-v-30bc23e1"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/components/pageScroll/index.vue"]]);
- const _sfc_main$1P = {
- __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.redirectTo({
- url: path
- });
- };
- const __returned__ = { statusList, navigateToDetail, PageScroll: pageScroll, ref: vue.ref };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1O(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- 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$4);
- 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$1P, [["render", _sfc_render$1O], ["__scopeId", "data-v-17a44f9d"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/order/index.vue"]]);
- const props$t = {
- props: {
- // 搜索框形状,round-圆形,square-方形
- shape: {
- type: String,
- default: props$G.search.shape
- },
- // 搜索框背景色,默认值#f2f2f2
- bgColor: {
- type: String,
- default: props$G.search.bgColor
- },
- // 占位提示文字
- placeholder: {
- type: String,
- default: props$G.search.placeholder
- },
- // 是否启用清除控件
- clearabled: {
- type: Boolean,
- default: props$G.search.clearabled
- },
- // 是否自动聚焦
- focus: {
- type: Boolean,
- default: props$G.search.focus
- },
- // 是否在搜索框右侧显示取消按钮
- showAction: {
- type: Boolean,
- default: props$G.search.showAction
- },
- // 右边控件的样式
- actionStyle: {
- type: Object,
- default: props$G.search.actionStyle
- },
- // 取消按钮文字
- actionText: {
- type: String,
- default: props$G.search.actionText
- },
- // 输入框内容对齐方式,可选值为 left|center|right
- inputAlign: {
- type: String,
- default: props$G.search.inputAlign
- },
- // input输入框的样式,可以定义文字颜色,大小等,对象形式
- inputStyle: {
- type: Object,
- default: props$G.search.inputStyle
- },
- // 是否启用输入框
- disabled: {
- type: Boolean,
- default: props$G.search.disabled
- },
- // 边框颜色
- borderColor: {
- type: String,
- default: props$G.search.borderColor
- },
- // 搜索图标的颜色,默认同输入框字体颜色
- searchIconColor: {
- type: String,
- default: props$G.search.searchIconColor
- },
- // 输入框字体颜色
- color: {
- type: String,
- default: props$G.search.color
- },
- // placeholder的颜色
- placeholderColor: {
- type: String,
- default: props$G.search.placeholderColor
- },
- // 左边输入框的图标,可以为uView图标名称或图片路径
- searchIcon: {
- type: String,
- default: props$G.search.searchIcon
- },
- searchIconSize: {
- type: [Number, String],
- default: props$G.search.searchIconSize
- },
- // 组件与其他上下左右元素之间的距离,带单位的字符串形式,如"30px"、"30px 20px"等写法
- margin: {
- type: String,
- default: props$G.search.margin
- },
- // 开启showAction时,是否在input获取焦点时才显示
- animation: {
- type: Boolean,
- default: props$G.search.animation
- },
- // 输入框的初始化内容
- modelValue: {
- type: String,
- default: props$G.search.value
- },
- value: {
- type: String,
- default: props$G.search.value
- },
- // 输入框最大能输入的长度,-1为不限制长度(来自uniapp文档)
- maxlength: {
- type: [String, Number],
- default: props$G.search.maxlength
- },
- // 搜索框高度,单位px
- height: {
- type: [String, Number],
- default: props$G.search.height
- },
- // 搜索框左侧文本
- label: {
- type: [String, Number, null],
- default: props$G.search.label
- }
- }
- };
- const _sfc_main$1O = {
- name: "u-search",
- mixins: [mpMixin, mixin, props$t],
- 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$1N(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- 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_4$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1O, [["render", _sfc_render$1N], ["__scopeId", "data-v-e082a34a"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-search/u-search.vue"]]);
- const props$s = {
- props: {
- // 是否展示组件
- show: {
- type: Boolean,
- default: props$G.transition.show
- },
- // 使用的动画模式
- mode: {
- type: String,
- default: props$G.transition.mode
- },
- // 动画的执行时间,单位ms
- duration: {
- type: [String, Number],
- default: props$G.transition.duration
- },
- // 使用的动画过渡函数
- timingFunction: {
- type: String,
- default: props$G.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$1N = {
- 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$s],
- watch: {
- show: {
- handler(newVal) {
- newVal ? this.vueEnter() : this.vueLeave();
- },
- // 表示同时监听初始化时的props的show的意思
- immediate: true
- }
- }
- };
- function _sfc_render$1M(_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$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1N, [["render", _sfc_render$1M], ["__scopeId", "data-v-5cec8177"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-transition/u-transition.vue"]]);
- const props$r = {
- props: {
- // 是否显示遮罩
- show: {
- type: Boolean,
- default: props$G.overlay.show
- },
- // 层级z-index
- zIndex: {
- type: [String, Number],
- default: props$G.overlay.zIndex
- },
- // 遮罩的过渡时间,单位为ms
- duration: {
- type: [String, Number],
- default: props$G.overlay.duration
- },
- // 不透明度值,当做rgba的第四个参数
- opacity: {
- type: [String, Number],
- default: props$G.overlay.opacity
- }
- }
- };
- const _sfc_main$1M = {
- name: "u-overlay",
- mixins: [mpMixin, mixin, props$r],
- 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$1L(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
- 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$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1M, [["render", _sfc_render$1L], ["__scopeId", "data-v-9112bed9"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-overlay/u-overlay.vue"]]);
- const props$q = {
- props: {
- bgColor: {
- type: String,
- default: props$G.statusBar.bgColor
- }
- }
- };
- const _sfc_main$1L = {
- name: "u-status-bar",
- mixins: [mpMixin, mixin, props$q],
- 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$1K(_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_0$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1L, [["render", _sfc_render$1K], ["__scopeId", "data-v-eb8e0cdd"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-status-bar/u-status-bar.vue"]]);
- const props$p = {
- props: {}
- };
- const _sfc_main$1K = {
- name: "u-safe-bottom",
- mixins: [mpMixin, mixin, props$p],
- data() {
- return {
- safeAreaBottomHeight: 0,
- isNvue: false
- };
- },
- computed: {
- style() {
- const style = {};
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- }
- },
- mounted() {
- }
- };
- function _sfc_render$1J(_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$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1K, [["render", _sfc_render$1J], ["__scopeId", "data-v-f3d22cfe"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.vue"]]);
- const props$o = {
- props: {
- // 是否展示弹窗
- show: {
- type: Boolean,
- default: props$G.popup.show
- },
- // 是否显示遮罩
- overlay: {
- type: Boolean,
- default: props$G.popup.overlay
- },
- // 弹出的方向,可选值为 top bottom right left center
- mode: {
- type: String,
- default: props$G.popup.mode
- },
- // 动画时长,单位ms
- duration: {
- type: [String, Number],
- default: props$G.popup.duration
- },
- // 是否显示关闭图标
- closeable: {
- type: Boolean,
- default: props$G.popup.closeable
- },
- // 自定义遮罩的样式
- overlayStyle: {
- type: [Object, String],
- default: props$G.popup.overlayStyle
- },
- // 点击遮罩是否关闭弹窗
- closeOnClickOverlay: {
- type: Boolean,
- default: props$G.popup.closeOnClickOverlay
- },
- // 层级
- zIndex: {
- type: [String, Number],
- default: props$G.popup.zIndex
- },
- // 是否为iPhoneX留出底部安全距离
- safeAreaInsetBottom: {
- type: Boolean,
- default: props$G.popup.safeAreaInsetBottom
- },
- // 是否留出顶部安全距离(状态栏高度)
- safeAreaInsetTop: {
- type: Boolean,
- default: props$G.popup.safeAreaInsetTop
- },
- // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角
- closeIconPos: {
- type: String,
- default: props$G.popup.closeIconPos
- },
- // 是否显示圆角
- round: {
- type: [Boolean, String, Number],
- default: props$G.popup.round
- },
- // mode=center,也即中部弹出时,是否使用缩放模式
- zoom: {
- type: Boolean,
- default: props$G.popup.zoom
- },
- // 弹窗背景色,设置为transparent可去除白色背景
- bgColor: {
- type: String,
- default: props$G.popup.bgColor
- },
- // 遮罩的透明度,0-1之间
- overlayOpacity: {
- type: [Number, String],
- default: props$G.popup.overlayOpacity
- }
- }
- };
- const _sfc_main$1J = {
- name: "u-popup",
- mixins: [mpMixin, mixin, props$o],
- 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$1I(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$9);
- const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$8);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- const _component_u_safe_bottom = resolveEasycom(vue.resolveDynamicComponent("u-safe-bottom"), __easycom_3$5);
- const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
- 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_7 = /* @__PURE__ */ _export_sfc(_sfc_main$1J, [["render", _sfc_render$1I], ["__scopeId", "data-v-05c24e9b"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-popup/u-popup.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(res2) {
- return res2.tempFiles.map((item) => ({
- ...pickExclude(item, ["path"]),
- type: "image",
- url: item.path,
- thumb: item.path,
- size: item.size
- }));
- }
- function formatVideo(res2) {
- return [
- {
- ...pickExclude(res2, ["tempFilePath", "thumbTempFilePath", "errMsg"]),
- type: "video",
- url: res2.tempFilePath,
- thumb: res2.thumbTempFilePath,
- size: res2.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: (res2) => resolve(formatImage(res2)),
- fail: reject
- });
- break;
- case "video":
- uni.chooseVideo({
- sourceType: capture,
- compressed,
- maxDuration,
- camera,
- success: (res2) => resolve(formatVideo(res2)),
- 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$n = {
- props: {
- // 接受的文件类型, 可选值为all media image file video
- accept: {
- type: String,
- default: props$G.upload.accept
- },
- // 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头
- capture: {
- type: [String, Array],
- default: props$G.upload.capture
- },
- // 当accept为video时生效,是否压缩视频,默认为true
- compressed: {
- type: Boolean,
- default: props$G.upload.compressed
- },
- // 当accept为video时生效,可选值为back或front
- camera: {
- type: String,
- default: props$G.upload.camera
- },
- // 当accept为video时生效,拍摄视频最长拍摄时间,单位秒
- maxDuration: {
- type: Number,
- default: props$G.upload.maxDuration
- },
- // 上传区域的图标,只能内置图标
- uploadIcon: {
- type: String,
- default: props$G.upload.uploadIcon
- },
- // 上传区域的图标的颜色,默认
- uploadIconColor: {
- type: String,
- default: props$G.upload.uploadIconColor
- },
- // 是否开启文件读取前事件
- useBeforeRead: {
- type: Boolean,
- default: props$G.upload.useBeforeRead
- },
- // 读取后的处理函数
- afterRead: {
- type: Function,
- default: null
- },
- // 读取前的处理函数
- beforeRead: {
- type: Function,
- default: null
- },
- // 是否显示组件自带的图片预览功能
- previewFullImage: {
- type: Boolean,
- default: props$G.upload.previewFullImage
- },
- // 最大上传数量
- maxCount: {
- type: [String, Number],
- default: props$G.upload.maxCount
- },
- // 是否启用
- disabled: {
- type: Boolean,
- default: props$G.upload.disabled
- },
- // 预览上传的图片时的裁剪模式,和image组件mode属性一致
- imageMode: {
- type: String,
- default: props$G.upload.imageMode
- },
- // 标识符,可以在回调函数的第二项参数中获取
- name: {
- type: String,
- default: props$G.upload.name
- },
- // 所选的图片的尺寸, 可选值为original compressed
- sizeType: {
- type: Array,
- default: props$G.upload.sizeType
- },
- // 是否开启图片多选,部分安卓机型不支持
- multiple: {
- type: Boolean,
- default: props$G.upload.multiple
- },
- // 是否展示删除按钮
- deletable: {
- type: Boolean,
- default: props$G.upload.deletable
- },
- // 文件大小限制,单位为byte
- maxSize: {
- type: [String, Number],
- default: props$G.upload.maxSize
- },
- // 显示已上传的文件列表
- fileList: {
- type: Array,
- default: props$G.upload.fileList
- },
- // 上传区域的提示文字
- uploadText: {
- type: String,
- default: props$G.upload.uploadText
- },
- // 内部预览图片区域和选择图片按钮的区域宽度
- width: {
- type: [String, Number],
- default: props$G.upload.width
- },
- // 内部预览图片区域和选择图片按钮的区域高度
- height: {
- type: [String, Number],
- default: props$G.upload.height
- },
- // 是否在上传完成后展示预览图
- previewImage: {
- type: Boolean,
- default: props$G.upload.previewImage
- }
- }
- };
- const _sfc_main$1I = {
- name: "u-upload",
- mixins: [mpMixin, mixin, mixinUp, props$n],
- 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((res2) => {
- this.onBeforeRead(multiple ? res2 : res2[0]);
- }).catch((error2) => {
- this.$emit("error", error2);
- });
- },
- // 文件读取之前
- onBeforeRead(file) {
- const {
- beforeRead,
- useBeforeRead
- } = this;
- let res2 = true;
- if (uni.$u.test.func(beforeRead)) {
- res2 = beforeRead(file, this.getDetail());
- }
- if (useBeforeRead) {
- res2 = new Promise((resolve, reject) => {
- this.$emit(
- "beforeRead",
- Object.assign(Object.assign({
- file
- }, this.getDetail()), {
- callback: (ok) => {
- ok ? resolve() : reject();
- }
- })
- );
- });
- }
- if (!res2) {
- return;
- }
- if (uni.$u.test.promise(res2)) {
- res2.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$1H(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
- 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_0$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1I, [["render", _sfc_render$1H], ["__scopeId", "data-v-c8491d64"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-upload/u-upload.vue"]]);
- const baseUrl = "https://bpi.shuhi.com";
- function initRequest() {
- formatAppLog("log", "at config/request.js:6", "初始化了 http 请求代码");
- uni.$u.http.setConfig((config2) => {
- config2.baseURL = baseUrl;
- config2.custom.toast = true;
- config2.sslVerify = false;
- return config2;
- });
- uni.$u.http.interceptors.request.use(
- (config2) => {
- config2.data = config2.data || {};
- let token = uni.getStorageSync("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 || "身份认证失败,请先登录");
- uni.removeStorageSync("token");
- 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);
- }
- );
- }
- const _sfc_main$1H = {
- __name: "index",
- props: {
- filename: {
- type: [Array, String],
- default: () => []
- },
- url: {
- type: String
- },
- notFile: {
- type: Boolean,
- default: false
- },
- tips: {
- type: String
- },
- disabled: {
- type: Boolean,
- default: false
- },
- isUpdate: {
- type: Boolean,
- default: false
- },
- loading: {
- type: Boolean,
- default: false
- }
- },
- emits: ["update:filename", "update:keyValue", "success", "update:loading"],
- setup(__props, { expose: __expose, emit: __emit }) {
- __expose();
- const emit2 = __emit;
- const props2 = __props;
- const fileList = vue.ref([]);
- vue.watch(() => props2.filename, (filename) => {
- if (!filename)
- return fileList.value = [];
- if (typeof filename == "string") {
- fileList.value = filename.split(",").map((v) => ({
- url: baseUrl + v
- }));
- } else {
- fileList.value = filename && filename.length > 0 ? filename.map((v) => ({
- url: v.url || v
- })) : [];
- }
- }, {
- immediate: true,
- deep: true
- });
- const afterRead = async (e) => {
- const {
- file
- } = e;
- fileList.value.push({
- ...file,
- status: "uploading",
- message: "上传中..."
- });
- emit2("update:loading", true);
- const result = await uploadFilePromise(file.url);
- formatAppLog("log", "at components/cy-upload/index.vue:73", result, "result");
- fileList.value.forEach((v, index2) => {
- if (index2 == fileList.value.length - 1) {
- v.url = result.url;
- v.status = "success";
- v.message = "";
- }
- });
- formatAppLog("log", "at components/cy-upload/index.vue:82", fileList.value, "fileList.value");
- emit2("update:filename", fileList.value.map((v) => v.url));
- emit2("success", result);
- emit2("update:loading", false);
- };
- const deletePic = (event) => {
- fileList.value.splice(event.index, 1);
- };
- const uploadFilePromise = (url2, baseStr = "/app/common/upload") => {
- let token = uni.getStorageSync("token");
- return new Promise((resolve, reject) => {
- uni.uploadFile({
- url: baseUrl + baseStr,
- // 图片上传地址
- filePath: url2,
- name: "file",
- header: {
- "Authorization": token
- },
- success: (res2) => {
- let respic = JSON.parse(res2.data);
- resolve(respic);
- }
- });
- });
- };
- const __returned__ = { emit: emit2, props: props2, fileList, afterRead, deletePic, uploadFilePromise, watch: vue.watch, ref: vue.ref, get baseUrl() {
- return baseUrl;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1G(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_0$7);
- return vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- null,
- [
- vue.createVNode(_component_u_upload, vue.mergeProps(_ctx.$attrs, {
- fileList: $setup.fileList,
- onAfterRead: $setup.afterRead,
- onDelete: $setup.deletePic,
- notFile: $props.notFile,
- disabled: $props.disabled
- }), null, 16, ["fileList", "notFile", "disabled"]),
- $props.tips ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "tips"
- },
- vue.toDisplayString($props.tips),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 64
- /* STABLE_FRAGMENT */
- );
- }
- const cyUpload = /* @__PURE__ */ _export_sfc(_sfc_main$1H, [["render", _sfc_render$1G], ["__scopeId", "data-v-5002576b"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/components/cy-upload/index.vue"]]);
- const _sfc_main$1G = {
- __name: "feedbackPopup",
- emits: ["submit"],
- setup(__props, { expose: __expose, emit: __emit }) {
- const show = vue.ref(false);
- const emit2 = __emit;
- const formRef = vue.ref(null);
- const submitting = vue.ref(false);
- const loading = vue.ref(false);
- const formData = vue.reactive({
- feedbackContent: "",
- imgUrl: [],
- isbn: ""
- });
- const rules2 = {
- feedbackContent: [
- {
- required: true,
- message: "请输入反馈信息",
- trigger: ["blur", "change"]
- }
- ]
- };
- function open2(data) {
- show.value = true;
- formData.isbn = data.isbn;
- }
- function handleCancel() {
- resetForm();
- show.value = false;
- }
- async function handleConfirm() {
- var _a;
- (_a = formRef.value) == null ? void 0 : _a.validate().then((res2) => {
- submitting.value = true;
- let data = JSON.parse(JSON.stringify(formData));
- data.imgUrl = data.imgUrl.join(",");
- uni.$u.http.post("/app/feedback/add", data).then((res3) => {
- if (res3.code == 200) {
- uni.showToast({
- title: "反馈已提交",
- icon: "success"
- });
- emit2("submit", formData);
- show.value = false;
- } else {
- uni.$u.toast(res3.msg);
- }
- }).finally(() => {
- submitting.value = false;
- });
- });
- }
- function resetForm() {
- var _a;
- formData.feedbackContent = "";
- formData.imgUrl = "";
- (_a = formRef.value) == null ? void 0 : _a.resetFields();
- }
- __expose({
- open: open2
- });
- const __returned__ = { show, emit: emit2, formRef, submitting, loading, formData, rules: rules2, open: open2, handleCancel, handleConfirm, resetForm, cyUpload, ref: vue.ref, reactive: vue.reactive };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1F(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
- const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$6);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
- return vue.openBlock(), vue.createBlock(_component_u_popup, {
- mode: "center",
- show: $setup.show,
- onClose: $setup.handleCancel,
- 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%",
- "error-type": "toast"
- }, {
- default: vue.withCtx(() => [
- vue.createCommentVNode(" 反馈信息 "),
- vue.createVNode(_component_u_form_item, {
- label: "反馈图书信息",
- prop: "feedbackContent",
- borderBottom: true
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- modelValue: $setup.formData.feedbackContent,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.feedbackContent = $event),
- type: "textarea",
- placeholder: "请输入反馈信息",
- height: "100"
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createCommentVNode(" 图片上传 "),
- vue.createVNode(_component_u_form_item, {
- label: "上传照片",
- prop: "imgUrl",
- borderBottom: false
- }, {
- default: vue.withCtx(() => [
- vue.createVNode($setup["cyUpload"], {
- filename: $setup.formData.imgUrl,
- "onUpdate:filename": _cache[1] || (_cache[1] = ($event) => $setup.formData.imgUrl = $event),
- multiple: "",
- maxCount: 4,
- loading: $setup.loading
- }, {
- 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, ["filename", "loading"])
- ]),
- _: 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,
- disabled: $setup.loading
- }, null, 8, ["loading", "disabled"])
- ])
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["show"]);
- }
- const FeedbackPopup = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["render", _sfc_render$1F], ["__scopeId", "data-v-0265fb8a"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/book/components/feedbackPopup.vue"]]);
- const _sfc_main$1F = {
- __name: "index",
- setup(__props, { expose: __expose }) {
- __expose();
- const showFeedback = vue.ref(null);
- function handleFeedbackSubmit(data) {
- formatAppLog("log", "at pages/book/index.vue:49", "反馈数据:", data);
- }
- const searchText = vue.ref("");
- const bookList = vue.ref([]);
- async function handleSearch() {
- if (!searchText.value) {
- uni.showToast({
- title: "请输入ISBN",
- icon: "none"
- });
- return;
- }
- await getSimpleBookInfoByIsbn(searchText.value);
- }
- async function getSimpleBookInfoByIsbn(isbn) {
- uni.$u.http.get(`/app/book/getSimpleBookInfoByIsbn/${isbn}`).then((res2) => {
- if (res2.code == 200) {
- let bool = bookList.value.some((v) => v.isbn == isbn);
- if (!bool) {
- bookList.value.push(res2.data);
- }
- } else {
- uni.$u.toast(res2.msg);
- }
- });
- }
- function scanCode() {
- uni.scanCode({
- scanType: ["barCode"],
- success: (res2) => {
- searchText.value = res2.result;
- getSimpleBookInfoByIsbn(res2.result);
- },
- fail: () => {
- uni.showToast({
- title: "扫码失败",
- icon: "none"
- });
- }
- });
- }
- function editBook(book) {
- var _a;
- (_a = showFeedback.value) == null ? void 0 : _a.open(book);
- }
- onLoad(() => {
- uni.$u.useGlobalEvent((e) => {
- if (!e.barcode)
- return;
- getSimpleBookInfoByIsbn(e.barcode);
- });
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { showFeedback, handleFeedbackSubmit, searchText, bookList, handleSearch, getSimpleBookInfoByIsbn, scanCode, editBook, ref: vue.ref, computed: vue.computed, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- }, FeedbackPopup };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1E(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "book-list",
- style: { "padding": "0" }
- }, [
- vue.createCommentVNode(" 搜索框 "),
- vue.createElementVNode("view", { class: "search-header" }, [
- vue.createElementVNode("view", { class: "search-box" }, [
- vue.createVNode(_component_u_icon, {
- style: { "margin-right": "16rpx" },
- name: "scan",
- size: "30",
- color: "#ffffff",
- onClick: $setup.scanCode
- }),
- vue.createVNode(_component_u_search, {
- height: "80rpx",
- modelValue: $setup.searchText,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
- placeholder: "请输入ISBN",
- showAction: false,
- clearabled: true,
- onSearch: $setup.handleSearch,
- 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.cover,
- mode: "aspectFill"
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "book-details" }, [
- vue.createElementVNode(
- "text",
- { class: "book-title" },
- vue.toDisplayString(book.bookName),
- 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.suit == 1 ? "是" : "否"),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "book-action" }, [
- vue.createVNode(_component_u_icon, {
- name: "edit-pen",
- size: "30",
- color: "#4cd964",
- onClick: ($event) => $setup.editBook(book)
- }, null, 8, ["onClick"])
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true),
- vue.createVNode(
- $setup["FeedbackPopup"],
- {
- ref: "showFeedback",
- onSubmit: $setup.handleFeedbackSubmit
- },
- null,
- 512
- /* NEED_PATCH */
- )
- ]);
- }
- const PagesBookIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["render", _sfc_render$1E], ["__scopeId", "data-v-0452ab4c"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/book/index.vue"]]);
- const props$m = {
- props: {
- // 标签类型info、primary、success、warning、error
- type: {
- type: String,
- default: props$G.tag.type
- },
- // 不可用
- disabled: {
- type: [Boolean, String],
- default: props$G.tag.disabled
- },
- // 标签的大小,large,medium,mini
- size: {
- type: String,
- default: props$G.tag.size
- },
- // tag的形状,circle(两边半圆形), square(方形,带圆角)
- shape: {
- type: String,
- default: props$G.tag.shape
- },
- // 标签文字
- text: {
- type: [String, Number],
- default: props$G.tag.text
- },
- // 背景颜色,默认为空字符串,即不处理
- bgColor: {
- type: String,
- default: props$G.tag.bgColor
- },
- // 标签字体颜色,默认为空字符串,即不处理
- color: {
- type: String,
- default: props$G.tag.color
- },
- // 标签的边框颜色
- borderColor: {
- type: String,
- default: props$G.tag.borderColor
- },
- // 关闭按钮图标的颜色
- closeColor: {
- type: String,
- default: props$G.tag.closeColor
- },
- // 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了
- name: {
- type: [String, Number],
- default: props$G.tag.name
- },
- // // 模式选择,dark|light|plain
- // mode: {
- // type: String,
- // default: 'light'
- // },
- // 镂空时是否填充背景色
- plainFill: {
- type: Boolean,
- default: props$G.tag.plainFill
- },
- // 是否镂空
- plain: {
- type: Boolean,
- default: props$G.tag.plain
- },
- // 是否可关闭
- closable: {
- type: Boolean,
- default: props$G.tag.closable
- },
- // 是否显示
- show: {
- type: Boolean,
- default: props$G.tag.show
- },
- // 内置图标,或绝对路径的图片
- icon: {
- type: String,
- default: props$G.tag.icon
- }
- }
- };
- const _sfc_main$1E = {
- name: "u-tag",
- mixins: [mpMixin, mixin, props$m],
- 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$1D(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
- 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$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1E, [["render", _sfc_render$1D], ["__scopeId", "data-v-2fd891bb"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-tag/u-tag.vue"]]);
- const _sfc_main$1D = {
- __name: "WarehouseSelector",
- props: {
- show: {
- type: Boolean,
- default: false
- }
- },
- emits: ["update:show", "warehouse-selected"],
- setup(__props, { expose: __expose, emit: __emit }) {
- __expose();
- const props2 = __props;
- const emit2 = __emit;
- const searchKeyword = vue.ref("");
- const searchResults = vue.ref([]);
- const historyWarehouses = vue.ref([""]);
- const selectedWarehouse = vue.ref("");
- const warehouseSearch = (name) => {
- formatAppLog("log", "at pages/index/express/components/WarehouseSelector.vue:68", name);
- uni.$u.http.post("/app/appUser/searchGodown?name=" + name).then((res2) => {
- if (res2.code == 200) {
- searchResults.value = res2.data;
- }
- });
- };
- const getUserBindHistory = () => {
- uni.$u.http.get("/app/appUser/getUserBindGodownReocrd").then((res2) => {
- if (res2.code == 200) {
- historyWarehouses.value = res2.data;
- }
- });
- };
- getUserBindHistory();
- const handleSearch = () => {
- warehouseSearch(searchKeyword.value);
- };
- const selectItem = vue.ref({});
- const selectWarehouse = (item) => {
- selectedWarehouse.value = item.godownName;
- selectItem.value = item;
- };
- const handleClose = () => {
- emit2("update:show", false);
- searchKeyword.value = "";
- };
- const handleConfirm = () => {
- if (selectedWarehouse.value) {
- emit2("warehouse-selected", selectItem.value);
- handleClose();
- }
- };
- const __returned__ = { props: props2, emit: emit2, searchKeyword, searchResults, historyWarehouses, selectedWarehouse, warehouseSearch, getUserBindHistory, handleSearch, selectItem, selectWarehouse, handleClose, handleConfirm, ref: vue.ref };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1C(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
- const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
- 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, {
- inputStyle: { "height": "80rpx", "font-size": "16px" },
- actionStyle: { "font-size": "16px", color: "#22ac38" },
- modelValue: $setup.searchKeyword,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchKeyword = $event),
- placeholder: "搜索仓库",
- "show-action": true,
- "action-text": "搜索",
- onSearch: $setup.handleSearch,
- onCustom: $setup.handleSearch
- }, null, 8, ["modelValue"])
- ]),
- vue.createCommentVNode(" 搜索结果 "),
- $setup.searchResults.length > 0 ? (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.godownName,
- plain: $setup.selectedWarehouse !== item.godownName,
- shape: "circle",
- onClick: ($event) => $setup.selectWarehouse(item),
- size: "large"
- }, null, 8, ["text", "plain", "onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 历史绑定 "),
- $setup.historyWarehouses.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- 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: $setup.selectedWarehouse !== item.godownName,
- shape: "circle",
- onClick: ($event) => $setup.selectWarehouse(item),
- size: "large"
- }, null, 8, ["text", "plain", "onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- 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$1D, [["render", _sfc_render$1C], ["__scopeId", "data-v-b9bd3f04"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/components/WarehouseSelector.vue"]]);
- const placeholderStyle$3 = "font-size:32rpx";
- const _sfc_main$1C = {
- __name: "transfer-sign",
- setup(__props, { expose: __expose }) {
- __expose();
- const customStyle = vue.reactive({
- height: "90rpx"
- });
- const selectedWarehouse = vue.ref("");
- const form = vue.ref({
- "packageCode": "",
- "godownId": ""
- });
- const showSelector = vue.ref(false);
- function openWarehouseSelector() {
- showSelector.value = true;
- }
- function handleWarehouseSelected(item) {
- selectedWarehouse.value = item.godownName;
- form.value.godownId = item.id;
- }
- function scanCode() {
- uni.scanCode({
- success: (res2) => {
- form.value.packageCode = res2.result;
- handleBarcode(res2.result);
- },
- fail: (err) => {
- uni.$u.toast("扫码失败");
- }
- });
- }
- function handleBarcode(code2) {
- if (!code2)
- return uni.$u.toast("请输入物流单号");
- uni.$u.http.post("/app/ordersign/transferSign", form.value).then((res2) => {
- if (res2.code == 200) {
- let text = code2 + "签收成功";
- uni.$u.ttsModule.speak(text);
- } else {
- let text = code2 + "订单不存在";
- uni.$u.ttsModule.speak(text);
- }
- });
- }
- function getUserBindWarehouse() {
- uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
- var _a, _b;
- if (res2.code == 200) {
- selectedWarehouse.value = (_a = res2.data) == null ? void 0 : _a.godownName;
- form.value.godownId = (_b = res2.data) == null ? void 0 : _b.id;
- }
- });
- }
- onLoad(() => {
- getUserBindWarehouse();
- uni.$u.useGlobalEvent((e) => {
- form.value.packageCode = e.barcode;
- handleBarcode(e.barcode);
- });
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { placeholderStyle: placeholderStyle$3, customStyle, selectedWarehouse, form, showSelector, openWarehouseSelector, handleWarehouseSelected, scanCode, handleBarcode, getUserBindWarehouse, reactive: vue.reactive, ref: vue.ref, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- }, WarehouseSelector };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1B(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- const _directive_permission = vue.resolveDirective("permission");
- 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, {
- customStyle: $setup.customStyle,
- "placeholder-style": $setup.placeholderStyle,
- modelValue: $setup.selectedWarehouse,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedWarehouse = $event),
- placeholder: "请选择仓库",
- readonly: "",
- border: "surround"
- }, null, 8, ["customStyle", "modelValue"]),
- vue.createVNode(_component_u_button, {
- customStyle: $setup.customStyle,
- type: "info",
- color: "#a4adb3",
- onClick: $setup.openWarehouseSelector,
- text: "选择"
- }, null, 8, ["customStyle"])
- ]),
- vue.createElementVNode("view", { class: "input-group" }, [
- vue.createVNode(_component_u_input, {
- customStyle: $setup.customStyle,
- "placeholder-style": $setup.placeholderStyle,
- modelValue: $setup.form.packageCode,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.packageCode = $event),
- placeholder: "扫描/输入物流单号",
- border: "surround"
- }, null, 8, ["customStyle", "modelValue"]),
- vue.withDirectives(vue.createVNode(_component_u_button, {
- customStyle: $setup.customStyle,
- type: "info",
- color: "#a4adb3",
- onClick: _cache[2] || (_cache[2] = ($event) => $setup.handleBarcode($setup.form.packageCode)),
- text: "确定"
- }, null, 8, ["customStyle"]), [
- [_directive_permission, "app:express:transferSign:confirm"]
- ])
- ])
- ]),
- 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[3] || (_cache[3] = ($event) => $setup.showSelector = $event),
- onWarehouseSelected: $setup.handleWarehouseSelected
- }, null, 8, ["show"])
- ]);
- }
- const PagesIndexExpressTransferSign = /* @__PURE__ */ _export_sfc(_sfc_main$1C, [["render", _sfc_render$1B], ["__scopeId", "data-v-333d344a"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/transfer-sign.vue"]]);
- const _sfc_main$1B = {
- __name: "scan",
- setup(__props, { expose: __expose }) {
- __expose();
- const isInitializing = vue.ref(false);
- const isBluetoothOpened = vue.ref(false);
- const isDiscovering = vue.ref(false);
- const isConnecting = vue.ref(false);
- const isConnected = vue.ref(false);
- const devices = vue.ref([]);
- const selectedDevice = vue.ref(null);
- const scanData = vue.ref(null);
- const deviceId = vue.ref("");
- const serviceId = vue.ref("");
- const characteristicId = vue.ref("");
- const initBluetooth = () => {
- isInitializing.value = true;
- uni.openBluetoothAdapter({
- success: (res2) => {
- formatAppLog("log", "at pages/index/express/scan.vue:35", "蓝牙适配器初始化成功");
- isBluetoothOpened.value = true;
- isInitializing.value = false;
- },
- fail: (err) => {
- formatAppLog("log", "at pages/index/express/scan.vue:40", "蓝牙适配器初始化失败:", err);
- isInitializing.value = false;
- }
- });
- };
- const startDiscovery = () => {
- isDiscovering.value = true;
- uni.startBluetoothDevicesDiscovery({
- success: (res2) => {
- formatAppLog("log", "at pages/index/express/scan.vue:50", "开始搜索蓝牙设备成功");
- uni.onBluetoothDeviceFound((devicesRes) => {
- const newDevices = devicesRes.devices;
- devices.value = devices.value.concat(newDevices);
- formatAppLog("log", "at pages/index/express/scan.vue:54", devices.value, "devices.value");
- const scanGunDevice = newDevices.find((device) => device.name.includes("Z0"));
- if (scanGunDevice) {
- selectedDevice.value = scanGunDevice;
- deviceId.value = scanGunDevice.deviceId;
- }
- });
- uni.onBluetoothAdapterStateChange((stateRes) => {
- if (!stateRes.available) {
- isDiscovering.value = false;
- formatAppLog("log", "at pages/index/express/scan.vue:64", "蓝牙适配器不可用,停止搜索");
- }
- });
- },
- fail: (err) => {
- formatAppLog("log", "at pages/index/express/scan.vue:69", "开始搜索蓝牙设备失败:", err);
- isDiscovering.value = false;
- }
- });
- };
- const connectDevice = () => {
- isConnecting.value = true;
- uni.createBLEConnection({
- deviceId: deviceId.value,
- success: (res2) => {
- formatAppLog("log", "at pages/index/express/scan.vue:80", "连接蓝牙设备成功");
- isConnected.value = true;
- isConnecting.value = false;
- getBLEDeviceServices(deviceId.value);
- },
- fail: (err) => {
- formatAppLog("log", "at pages/index/express/scan.vue:86", "连接蓝牙设备失败:", err);
- isConnecting.value = false;
- }
- });
- };
- const getBLEDeviceServices = (deviceId2) => {
- uni.getBLEDeviceServices({
- deviceId: deviceId2,
- success: (res2) => {
- formatAppLog("log", "at pages/index/express/scan.vue:96", "获取服务列表成功:", res2.services);
- const targetService = res2.services.find((service) => service.uuid === "目标服务UUID");
- if (targetService) {
- serviceId.value = targetService.uuid;
- getBLEDeviceCharacteristics(deviceId2, serviceId.value);
- }
- },
- fail: (err) => {
- formatAppLog("log", "at pages/index/express/scan.vue:104", "获取服务列表失败:", err);
- }
- });
- };
- const getBLEDeviceCharacteristics = (deviceId2, serviceId2) => {
- uni.getBLEDeviceCharacteristics({
- deviceId: deviceId2,
- serviceId: serviceId2,
- success: (res2) => {
- formatAppLog("log", "at pages/index/express/scan.vue:114", "获取特征列表成功:", res2.characteristics);
- const targetCharacteristic = res2.characteristics.find((characteristic) => characteristic.properties.read && characteristic.properties.notify);
- if (targetCharacteristic) {
- characteristicId.value = targetCharacteristic.uuid;
- }
- },
- fail: (err) => {
- formatAppLog("log", "at pages/index/express/scan.vue:121", "获取特征列表失败:", err);
- }
- });
- };
- const startDataMonitor = () => {
- uni.onBLECharacteristicValueChange((characteristicRes) => {
- const value2 = characteristicRes.value;
- const data = ab2str(value2);
- formatAppLog("log", "at pages/index/express/scan.vue:130", "获取到扫码枪扫描的数据:", data);
- scanData.value = data;
- });
- uni.notifyBLECharacteristicValueChange({
- state: true,
- deviceId: deviceId.value,
- characteristicId: characteristicId.value,
- success: (res2) => {
- formatAppLog("log", "at pages/index/express/scan.vue:138", "开启特征值通知成功");
- },
- fail: (err) => {
- formatAppLog("log", "at pages/index/express/scan.vue:141", "开启特征值通知失败:", err);
- }
- });
- };
- const ab2str = (buffer) => {
- return String.fromCharCode.apply(null, new Uint8Array(buffer));
- };
- const __returned__ = { isInitializing, isBluetoothOpened, isDiscovering, isConnecting, isConnected, devices, selectedDevice, scanData, deviceId, serviceId, characteristicId, initBluetooth, startDiscovery, connectDevice, getBLEDeviceServices, getBLEDeviceCharacteristics, startDataMonitor, ab2str, ref: vue.ref, get onLoad() {
- return onLoad;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1A(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("button", {
- onClick: $setup.initBluetooth,
- disabled: $setup.isInitializing
- }, "初始化蓝牙", 8, ["disabled"]),
- vue.createElementVNode("button", {
- onClick: $setup.startDiscovery,
- disabled: $setup.isDiscovering || !$setup.isBluetoothOpened
- }, "开始搜索设备", 8, ["disabled"]),
- vue.createElementVNode("button", {
- onClick: $setup.connectDevice,
- disabled: !$setup.selectedDevice || $setup.isConnecting
- }, "连接设备", 8, ["disabled"]),
- vue.createElementVNode("button", {
- onClick: $setup.startDataMonitor,
- disabled: !$setup.isConnected
- }, "开始监听数据", 8, ["disabled"]),
- $setup.scanData ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- "扫描结果: " + vue.toDisplayString($setup.scanData),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.devices, (item) => {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- null,
- vue.toDisplayString(item.name),
- 1
- /* TEXT */
- );
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ]);
- }
- const PagesIndexExpressScan = /* @__PURE__ */ _export_sfc(_sfc_main$1B, [["render", _sfc_render$1A], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/scan.vue"]]);
- const props$l = {
- props: {
- // radio的名称
- name: {
- type: [String, Number, Boolean],
- default: props$G.radio.name
- },
- // 形状,square为方形,circle为圆型
- shape: {
- type: String,
- default: props$G.radio.shape
- },
- // 是否禁用
- disabled: {
- type: [String, Boolean],
- default: props$G.radio.disabled
- },
- // 是否禁止点击提示语选中单选框
- labelDisabled: {
- type: [String, Boolean],
- default: props$G.radio.labelDisabled
- },
- // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
- activeColor: {
- type: String,
- default: props$G.radio.activeColor
- },
- // 未选中的颜色
- inactiveColor: {
- type: String,
- default: props$G.radio.inactiveColor
- },
- // 图标的大小,单位px
- iconSize: {
- type: [String, Number],
- default: props$G.radio.iconSize
- },
- // label的字体大小,px单位
- labelSize: {
- type: [String, Number],
- default: props$G.radio.labelSize
- },
- // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
- label: {
- type: [String, Number],
- default: props$G.radio.label
- },
- // 整体的大小
- size: {
- type: [String, Number],
- default: props$G.radio.size
- },
- // 图标颜色
- color: {
- type: String,
- default: props$G.radio.color
- },
- // label的颜色
- labelColor: {
- type: String,
- default: props$G.radio.labelColor
- },
- // 图标颜色
- iconColor: {
- type: String,
- default: props$G.radio.iconColor
- }
- }
- };
- const _sfc_main$1A = {
- name: "u-radio",
- mixins: [mpMixin, mixin, props$l],
- 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$1z(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- 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_0$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1A, [["render", _sfc_render$1z], ["__scopeId", "data-v-83036558"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-radio/u-radio.vue"]]);
- const props$k = {
- props: {
- // 绑定的值
- modelValue: {
- type: [String, Number, Boolean],
- default: props$G.radioGroup.value
- },
- // 是否禁用全部radio
- disabled: {
- type: Boolean,
- default: props$G.radioGroup.disabled
- },
- // 形状,circle-圆形,square-方形
- shape: {
- type: String,
- default: props$G.radioGroup.shape
- },
- // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
- activeColor: {
- type: String,
- default: props$G.radioGroup.activeColor
- },
- // 未选中的颜色
- inactiveColor: {
- type: String,
- default: props$G.radioGroup.inactiveColor
- },
- // 标识符
- name: {
- type: String,
- default: props$G.radioGroup.name
- },
- // 整个组件的尺寸,默认px
- size: {
- type: [String, Number],
- default: props$G.radioGroup.size
- },
- // 布局方式,row-横向,column-纵向
- placement: {
- type: String,
- default: props$G.radioGroup.placement
- },
- // label的文本
- label: {
- type: [String],
- default: props$G.radioGroup.label
- },
- // label的颜色 (默认 '#303133' )
- labelColor: {
- type: [String],
- default: props$G.radioGroup.labelColor
- },
- // label的字体大小,px单位
- labelSize: {
- type: [String, Number],
- default: props$G.radioGroup.labelSize
- },
- // 是否禁止点击文本操作checkbox(默认 false )
- labelDisabled: {
- type: Boolean,
- default: props$G.radioGroup.labelDisabled
- },
- // 图标颜色
- iconColor: {
- type: String,
- default: props$G.radioGroup.iconColor
- },
- // 图标的大小,单位px
- iconSize: {
- type: [String, Number],
- default: props$G.radioGroup.iconSize
- },
- // 竖向配列时,是否显示下划线
- borderBottom: {
- type: Boolean,
- default: props$G.radioGroup.borderBottom
- },
- // 图标与文字的对齐方式
- iconPlacement: {
- type: String,
- default: props$G.radio.iconPlacement
- }
- }
- };
- const _sfc_main$1z = {
- name: "u-radio-group",
- mixins: [mpMixin, mixin, props$k],
- 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$1y(_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_1$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["render", _sfc_render$1y], ["__scopeId", "data-v-cbc8bf70"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-radio-group/u-radio-group.vue"]]);
- const props$j = {
- props: {
- // 是否虚线
- dashed: {
- type: Boolean,
- default: props$G.divider.dashed
- },
- // 是否细线
- hairline: {
- type: Boolean,
- default: props$G.divider.hairline
- },
- // 是否以点替代文字,优先于text字段起作用
- dot: {
- type: Boolean,
- default: props$G.divider.dot
- },
- // 内容文本的位置,left-左边,center-中间,right-右边
- textPosition: {
- type: String,
- default: props$G.divider.textPosition
- },
- // 文本内容
- text: {
- type: [String, Number],
- default: props$G.divider.text
- },
- // 文本大小
- textSize: {
- type: [String, Number],
- default: props$G.divider.textSize
- },
- // 文本颜色
- textColor: {
- type: String,
- default: props$G.divider.textColor
- },
- // 线条颜色
- lineColor: {
- type: String,
- default: props$G.divider.lineColor
- }
- }
- };
- const _sfc_main$1y = {
- name: "u-divider",
- mixins: [mpMixin, mixin, props$j],
- 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$1x(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$c);
- 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_2$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["render", _sfc_render$1x], ["__scopeId", "data-v-ea022cee"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-divider/u-divider.vue"]]);
- const _sfc_main$1x = {
- __name: "quick-check",
- setup(__props, { expose: __expose }) {
- __expose();
- const selectedBatchId = vue.ref("");
- const showBatchSelector = vue.ref(false);
- const count = vue.ref(0);
- const formData = vue.ref({
- batchNum: "",
- packageCode: "",
- searchType: "2",
- packageStatus: ""
- });
- const batchList = vue.ref([]);
- function getBatchList() {
- uni.$u.http.get("/app/batchnum/pagelist").then((res2) => {
- batchList.value = res2.rows;
- });
- }
- getBatchList();
- const openBatchSelector = () => {
- showBatchSelector.value = true;
- };
- const selectBatch = (batch) => {
- selectedBatchId.value = batch.id;
- count.value = Number(batch.num);
- formData.value.batchNum = batch.batchNum;
- showBatchSelector.value = false;
- };
- const handleSearch = () => {
- formatAppLog("log", "at pages/index/express/quick-check.vue:117", "查询:", formData.value.packageCode);
- };
- const handleSubmitBatch = () => {
- formatAppLog("log", "at pages/index/express/quick-check.vue:122", "提交批次:", formData.value.batchNum);
- if (!formData.value.batchNum) {
- uni.$u.toast("请选择批次");
- return;
- }
- if (!formData.value.packageCode) {
- uni.$u.toast("请扫描/输入物流单号");
- return;
- }
- uni.$u.http.post("/app/ordersign/deliverySign", formData.value).then((res2) => {
- formatAppLog("log", "at pages/index/express/quick-check.vue:132", res2);
- if (res2.code == 200) {
- let text = code + "快递验收成功";
- uni.$u.ttsModule.speak(text);
- } else {
- let text = code + "订单不存在";
- uni.$u.ttsModule.speak(text);
- }
- });
- };
- const handleScan = () => {
- uni.scanCode({
- success: (res2) => {
- formData.value.packageCode = res2.result;
- handleSubmitBatch();
- }
- });
- };
- const createNewBatch = () => {
- uni.$u.http.post("/app/batchnum/add").then((res2) => {
- if (res2.code == 200) {
- getBatchList();
- }
- });
- };
- onLoad(() => {
- uni.$u.useGlobalEvent((e) => {
- formData.value.packageCode = e.barcode;
- handleSubmitBatch();
- });
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { selectedBatchId, showBatchSelector, count, formData, batchList, getBatchList, openBatchSelector, selectBatch, handleSearch, handleSubmitBatch, handleScan, createNewBatch, ref: vue.ref, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1w(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
- const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
- const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$5);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$2);
- const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
- const _directive_permission = vue.resolveDirective("permission");
- 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", { style: { "font-size": "32rpx" } }, "批次:"),
- vue.createElementVNode("view", { class: "batch-input" }, [
- vue.createElementVNode("view", {
- class: "batch-input-text",
- onClick: $setup.openBatchSelector
- }),
- vue.createVNode(_component_u_input, {
- modelValue: $setup.formData.batchNum,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.batchNum = $event),
- placeholder: "请选择/新建批次",
- readonly: "",
- border: "surround",
- "placeholder-style": "font-size: 32rpx",
- "custom-style": "font-size: 32rpx;height: 88rpx;"
- }, {
- suffix: vue.withCtx(() => [
- vue.createVNode(_component_u_icon, {
- name: "arrow-down",
- size: "18"
- })
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue"])
- ])
- ])
- ]),
- vue.createCommentVNode(" 数量显示 "),
- vue.createElementVNode("view", { class: "count-badge" }, [
- vue.createTextVNode(" 数量 "),
- vue.createElementVNode(
- "text",
- { style: { "font-size": "32rpx" } },
- 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.formData.searchType,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.searchType = $event),
- class: "query-radio"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_radio, {
- label: "查订单",
- name: "1",
- labelSize: "16px",
- iconSize: "16px"
- }),
- vue.createVNode(_component_u_radio, {
- label: "查物流",
- "custom-style": "margin-left:20px",
- name: "2",
- labelSize: "16px",
- iconSize: "16px"
- })
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue"]),
- vue.createElementVNode("view", { class: "search-box" }, [
- vue.createVNode(_component_u_input, {
- "custom-style": "font-size: 32rpx;",
- "placeholder-style": "font-size: 32rpx;",
- modelValue: $setup.formData.packageCode,
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.packageCode = $event),
- adjustPosition: true,
- 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.withDirectives(vue.createVNode(
- _component_u_button,
- {
- size: "large",
- type: "primary",
- text: "提交批次",
- onClick: $setup.handleSubmitBatch
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [_directive_permission, "app:express:quickCheck:confirm"]
- ])
- ])
- ]),
- 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",
- style: { "min-height": "300px" }
- }, [
- vue.createElementVNode("view", { class: "popup-header" }, [
- vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "批次"),
- vue.createElementVNode("view", {
- style: { "font-size": "32rpx", "color": "#007AFF" },
- onClick: $setup.createNewBatch
- }, [
- vue.createElementVNode("text", null, "新建批次")
- ])
- ]),
- 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.batchNum),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(batch.num),
- 1
- /* TEXT */
- )
- ], 10, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["show"])
- ]);
- }
- const PagesIndexExpressQuickCheck = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["render", _sfc_render$1w], ["__scopeId", "data-v-61cc11f4"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/quick-check.vue"]]);
- const keymap = {
- "7": "0",
- "8": "1",
- "9": "2",
- "10": "3",
- "11": "4",
- "12": "5",
- "13": "6",
- "14": "7",
- "15": "8",
- "16": "9",
- "29": "A",
- "30": "B",
- "31": "C",
- "32": "D",
- "33": "E",
- "34": "F",
- "35": "G",
- "36": "H",
- "37": "I",
- "38": "J",
- "39": "K",
- "40": "L",
- "41": "M",
- "42": "N",
- "43": "O",
- "44": "P",
- "45": "Q",
- "46": "R",
- "47": "S",
- "48": "T",
- "49": "U",
- "50": "V",
- "51": "W",
- "52": "X",
- "53": "Y",
- "54": "Z",
- "55": ",",
- "56": ".",
- "59": "",
- "69": "-",
- "70": "=",
- "81": "+"
- };
- const _sfc_main$1w = {
- __name: "quick-unpack",
- setup(__props, { expose: __expose }) {
- __expose();
- function goScan() {
- uni.redirectTo({
- url: "/pages/index/express/scan"
- });
- }
- const unpackCode = vue.ref("");
- function confirmTrackingNumber(code2) {
- uni.$u.http.post("/app/ordersign/unpackingSign", {
- packageCode: code2
- }).then((res2) => {
- if (res2.code == 200) {
- let text = code2 + "拆包成功";
- uni.$u.ttsModule.speak(text);
- } else {
- let text = code2 + res2.msg;
- uni.$u.ttsModule.speak(text);
- }
- });
- }
- function scanCode() {
- uni.scanCode({
- success: (res2) => {
- unpackCode.value = res2.result;
- confirmTrackingNumber(res2.result);
- formatAppLog("log", "at pages/index/express/quick-unpack.vue:68", "扫码结果:", res2.result);
- },
- fail: (err) => {
- formatAppLog("error", "at pages/index/express/quick-unpack.vue:71", "扫码失败:", err);
- }
- });
- }
- const inputCache = vue.ref("");
- const keypress = (e) => {
- if (e.keyCode === 66 || e.key == "Enter") {
- unpackCode.value = inputCache.value;
- confirmTrackingNumber(unpackCode.value);
- inputCache.value = "";
- } else {
- inputCache.value += keymap[e.keyCode] || "";
- }
- };
- onLoad(() => {
- uni.$u.useGlobalEvent((e) => {
- unpackCode.value = e.barcode;
- confirmTrackingNumber(e.barcode);
- });
- plus.key.addEventListener("keyup", keypress);
- });
- onUnload(() => {
- plus.key.removeEventListener("keyup", keypress);
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { goScan, unpackCode, confirmTrackingNumber, scanCode, inputCache, keypress, ref: vue.ref, get onLoad() {
- return onLoad;
- }, get onUnload() {
- return onUnload;
- }, get onShow() {
- return onShow;
- }, get keymap() {
- return keymap;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1v(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- const _directive_permission = vue.resolveDirective("permission");
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createCommentVNode(' <view class="container">\n <button @click="initBluetooth" :disabled="isInitializing">初始化蓝牙</button>\n <button @click="startDiscovery" :disabled="isDiscovering || !isBluetoothOpened">开始搜索设备</button>\n <button @click="connectDevice" :disabled="!selectedDevice || isConnecting">连接设备</button>\n <button @click="startDataMonitor" :disabled="!isConnected">开始监听数据</button>\n <view v-if="scanData">扫描结果: {{ scanData }}</view>\n </view> '),
- vue.createCommentVNode(' <u-button type="primary" @click="goScan" text="扫码" /> '),
- vue.createElementVNode("view", { class: "main-content" }, [
- vue.createElementVNode("view", { class: "input-group" }, [
- vue.createVNode(_component_u_input, {
- "placeholder-style": "font-size:32rpx",
- modelValue: $setup.unpackCode,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.unpackCode = $event),
- placeholder: "扫描/输入物流单号",
- border: "surround"
- }, null, 8, ["modelValue"]),
- vue.withDirectives(vue.createVNode(
- _component_u_button,
- {
- type: "primary",
- onClick: _cache[1] || (_cache[1] = ($event) => $setup.confirmTrackingNumber($setup.unpackCode)),
- text: "确定"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [_directive_permission, "app:express:quickUnpack:confirm"]
- ])
- ])
- ]),
- 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$1w, [["render", _sfc_render$1v], ["__scopeId", "data-v-cd1b3ab5"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/quick-unpack.vue"]]);
- const props$i = {
- props: {
- // tab的数据
- list: {
- type: Array,
- default: props$G.subsection.list
- },
- // 当前活动的tab的index
- current: {
- type: [String, Number],
- default: props$G.subsection.current
- },
- // 激活的颜色
- activeColor: {
- type: String,
- default: props$G.subsection.activeColor
- },
- // 未激活的颜色
- inactiveColor: {
- type: String,
- default: props$G.subsection.inactiveColor
- },
- // 模式选择,mode=button为按钮形式,mode=subsection时为分段模式
- mode: {
- type: String,
- default: props$G.subsection.mode
- },
- // 字体大小
- fontSize: {
- type: [String, Number],
- default: props$G.subsection.fontSize
- },
- // 激活tab的字体是否加粗
- bold: {
- type: Boolean,
- default: props$G.subsection.bold
- },
- // mode = button时,组件背景颜色
- bgColor: {
- type: String,
- default: props$G.subsection.bgColor
- },
- // 从list元素对象中读取的键名
- keyName: {
- type: String,
- default: props$G.subsection.keyName
- }
- }
- };
- const _sfc_main$1v = {
- name: "u-subsection",
- mixins: [mpMixin, mixin, props$i],
- 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$1u(_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$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["render", _sfc_render$1u], ["__scopeId", "data-v-b5ccb67e"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-subsection/u-subsection.vue"]]);
- const props$h = {
- props: {
- // 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px
- offsetTop: {
- type: [String, Number],
- default: props$G.sticky.offsetTop
- },
- // 自定义导航栏的高度
- customNavHeight: {
- type: [String, Number],
- default: props$G.sticky.customNavHeight
- },
- // 是否开启吸顶功能
- disabled: {
- type: Boolean,
- default: props$G.sticky.disabled
- },
- // 吸顶区域的背景颜色
- bgColor: {
- type: String,
- default: props$G.sticky.bgColor
- },
- // z-index值
- zIndex: {
- type: [String, Number],
- default: props$G.sticky.zIndex
- },
- // 列表中的索引值
- index: {
- type: [String, Number],
- default: props$G.sticky.index
- }
- }
- };
- const _sfc_main$1u = {
- name: "u-sticky",
- mixins: [mpMixin, mixin, props$h],
- 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((res2) => {
- this.height = res2.height;
- this.left = res2.left;
- this.width = res2.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}`, (res2) => {
- this.setFixed(res2.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$1t(_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$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["render", _sfc_render$1t], ["__scopeId", "data-v-8b303089"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-sticky/u-sticky.vue"]]);
- const props$g = {
- props: {
- // 是否展示modal
- show: {
- type: Boolean,
- default: props$G.modal.show
- },
- // 标题
- title: {
- type: [String],
- default: props$G.modal.title
- },
- // 弹窗内容
- content: {
- type: String,
- default: props$G.modal.content
- },
- // 确认文案
- confirmText: {
- type: String,
- default: props$G.modal.confirmText
- },
- // 取消文案
- cancelText: {
- type: String,
- default: props$G.modal.cancelText
- },
- // 是否显示确认按钮
- showConfirmButton: {
- type: Boolean,
- default: props$G.modal.showConfirmButton
- },
- // 是否显示取消按钮
- showCancelButton: {
- type: Boolean,
- default: props$G.modal.showCancelButton
- },
- // 确认按钮颜色
- confirmColor: {
- type: String,
- default: props$G.modal.confirmColor
- },
- // 取消文字颜色
- cancelColor: {
- type: String,
- default: props$G.modal.cancelColor
- },
- // 对调确认和取消的位置
- buttonReverse: {
- type: Boolean,
- default: props$G.modal.buttonReverse
- },
- // 是否开启缩放效果
- zoom: {
- type: Boolean,
- default: props$G.modal.zoom
- },
- // 是否异步关闭,只对确定按钮有效
- asyncClose: {
- type: Boolean,
- default: props$G.modal.asyncClose
- },
- // 是否允许点击遮罩关闭modal
- closeOnClickOverlay: {
- type: Boolean,
- default: props$G.modal.closeOnClickOverlay
- },
- // 给一个负的margin-top,往上偏移,避免和键盘重合的情况
- negativeTop: {
- type: [String, Number],
- default: props$G.modal.negativeTop
- },
- // modal宽度,不支持百分比,可以数值,px,rpx单位
- width: {
- type: [String, Number],
- default: props$G.modal.width
- },
- // 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮
- confirmButtonShape: {
- type: String,
- default: props$G.modal.confirmButtonShape
- }
- }
- };
- const _sfc_main$1t = {
- name: "u-modal",
- mixins: [mpMixin, mixin, props$g],
- 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$1s(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$c);
- const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
- const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
- 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$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["render", _sfc_render$1s], ["__scopeId", "data-v-f667648f"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-modal/u-modal.vue"]]);
- const _sfc_main$1s = {
- __name: "ApproveButton",
- emits: ["approve"],
- setup(__props, { expose: __expose, emit: __emit }) {
- __expose();
- const emit2 = __emit;
- const showConfirmModal = vue.ref(false);
- const handleApprove = () => {
- showConfirmModal.value = true;
- };
- const confirmApprove = () => {
- emit2("approve");
- showConfirmModal.value = false;
- };
- const __returned__ = { emit: emit2, showConfirmModal, handleApprove, confirmApprove, ref: vue.ref };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1r(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
- 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,
- showCancelButton: "",
- "content-style": { textAlign: "center" },
- onCancel: _cache[0] || (_cache[0] = ($event) => $setup.showConfirmModal = false)
- }, null, 8, ["show"])
- ]);
- }
- const ApproveButton = /* @__PURE__ */ _export_sfc(_sfc_main$1s, [["render", _sfc_render$1r], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/components/ApproveButton.vue"]]);
- const props$f = {
- props: {
- // 是否展示工具条
- show: {
- type: Boolean,
- default: props$G.toolbar.show
- },
- // 取消按钮的文字
- cancelText: {
- type: String,
- default: props$G.toolbar.cancelText
- },
- // 确认按钮的文字
- confirmText: {
- type: String,
- default: props$G.toolbar.confirmText
- },
- // 取消按钮的颜色
- cancelColor: {
- type: String,
- default: props$G.toolbar.cancelColor
- },
- // 确认按钮的颜色
- confirmColor: {
- type: String,
- default: props$G.toolbar.confirmColor
- },
- // 标题文字
- title: {
- type: String,
- default: props$G.toolbar.title
- }
- }
- };
- const _sfc_main$1r = {
- name: "u-toolbar",
- mixins: [mpMixin, mixin, props$f],
- methods: {
- // 点击取消按钮
- cancel() {
- this.$emit("cancel");
- },
- // 点击确定按钮
- confirm() {
- this.$emit("confirm");
- }
- }
- };
- function _sfc_render$1q(_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$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1r, [["render", _sfc_render$1q], ["__scopeId", "data-v-eadae74e"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-toolbar/u-toolbar.vue"]]);
- const props$e = {
- props: {
- // 是否展示picker弹窗
- show: {
- type: Boolean,
- default: props$G.picker.show
- },
- // 是否展示顶部的操作栏
- showToolbar: {
- type: Boolean,
- default: props$G.picker.showToolbar
- },
- // 顶部标题
- title: {
- type: String,
- default: props$G.picker.title
- },
- // 对象数组,设置每一列的数据
- columns: {
- type: Array,
- default: props$G.picker.columns
- },
- // 是否显示加载中状态
- loading: {
- type: Boolean,
- default: props$G.picker.loading
- },
- // 各列中,单个选项的高度
- itemHeight: {
- type: [String, Number],
- default: props$G.picker.itemHeight
- },
- // 取消按钮的文字
- cancelText: {
- type: String,
- default: props$G.picker.cancelText
- },
- // 确认按钮的文字
- confirmText: {
- type: String,
- default: props$G.picker.confirmText
- },
- // 取消按钮的颜色
- cancelColor: {
- type: String,
- default: props$G.picker.cancelColor
- },
- // 确认按钮的颜色
- confirmColor: {
- type: String,
- default: props$G.picker.confirmColor
- },
- // 每列中可见选项的数量
- visibleItemCount: {
- type: [String, Number],
- default: props$G.picker.visibleItemCount
- },
- // 选项对象中,需要展示的属性键名
- keyName: {
- type: String,
- default: props$G.picker.keyName
- },
- // 是否允许点击遮罩关闭选择器
- closeOnClickOverlay: {
- type: Boolean,
- default: props$G.picker.closeOnClickOverlay
- },
- // 各列的默认索引
- defaultIndex: {
- type: Array,
- default: props$G.picker.defaultIndex
- },
- // 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效
- immediateChange: {
- type: Boolean,
- default: props$G.picker.immediateChange
- }
- }
- };
- const _sfc_main$1q = {
- name: "u-picker",
- mixins: [mpMixin, mixin, props$e],
- 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$1p(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_toolbar = resolveEasycom(vue.resolveDynamicComponent("u-toolbar"), __easycom_0$4);
- const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
- const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
- 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$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", _sfc_render$1p], ["__scopeId", "data-v-91b05052"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-picker/u-picker.vue"]]);
- const _sfc_main$1p = {
- __name: "RejectButton",
- emits: ["reject"],
- setup(__props, { expose: __expose, emit: __emit }) {
- __expose();
- const emit2 = __emit;
- const showRejectPicker = vue.ref(false);
- const rejectReasons = vue.ref([]);
- const getRejectReason = async () => {
- const res2 = await uni.$u.http.get("/app/sysDict/getDict?key=route_exception_reason ");
- if (res2.code == 200) {
- rejectReasons.value = res2.data.map((item) => item.dictValue);
- }
- };
- getRejectReason();
- const handleReject = () => {
- showRejectPicker.value = true;
- };
- const confirmReject = (e) => {
- const reason = e.value[0];
- emit2("reject", reason);
- showRejectPicker.value = false;
- };
- const __returned__ = { emit: emit2, showRejectPicker, rejectReasons, getRejectReason, handleReject, confirmReject, ref: vue.ref };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$2);
- 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$1p, [["render", _sfc_render$1o], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/components/RejectButton.vue"]]);
- const _sfc_main$1o = {
- __name: "ExceptionItem",
- props: {
- order: {
- type: Object,
- default: () => ({
- orderNo: "",
- expressNo: "",
- estimatedPrice: "",
- pusher: "",
- pushTime: ""
- })
- }
- },
- emits: ["refresh"],
- setup(__props, { expose: __expose, emit: __emit }) {
- __expose();
- const props2 = __props;
- const emit2 = __emit;
- const handleCheckLogistics = () => {
- uni.redirectTo({
- url: `/pages/index/express/logistics-detail?orderId=${props2.order.orderId}&status=${props2.order.checkStatus}&id=${props2.order.id}`
- });
- };
- function handleButtonClick(checkStatus, reason) {
- uni.$u.http.post("/app/orderexception/update", {
- id: props2.order.id,
- checkStatus,
- refusalReason: reason
- }).then((res2) => {
- if (res2.code == 200) {
- if (checkStatus == 2) {
- let text = props2.order.waybillCode + "签收成功";
- uni.$u.ttsModule.speak(text);
- }
- uni.$u.toast("操作成功");
- emit2("refresh");
- } else {
- uni.$u.toast(res2.msg);
- }
- });
- }
- const __returned__ = { props: props2, emit: emit2, handleCheckLogistics, handleButtonClick, ref: vue.ref, ApproveButton, RejectButton };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- const _directive_permission = vue.resolveDirective("permission");
- return vue.openBlock(), vue.createElementBlock("view", { class: "exception-item" }, [
- vue.createCommentVNode(" 订单信息 "),
- vue.createElementVNode("view", { class: "info-section flex-1" }, [
- vue.createElementVNode("view", { class: "info-row" }, [
- vue.createElementVNode("text", { class: "label" }, "订单编号:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($props.order.orderId),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-row" }, [
- vue.createElementVNode("text", { class: "label" }, "快递单号:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($props.order.waybillCode),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-row" }, [
- vue.createElementVNode("text", { class: "label" }, "预估单价:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($props.order.expectMoney) + "元",
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-row" }, [
- vue.createElementVNode("text", { class: "label" }, "推送人:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($props.order.createName),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", {
- class: "info-row",
- style: { "margin-bottom": "0" }
- }, [
- vue.createElementVNode("text", { class: "label" }, "推送时间:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($props.order.createTime),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createCommentVNode(" 操作按钮 "),
- vue.createElementVNode("view", { class: "action-section" }, [
- vue.createVNode(_component_u_button, {
- type: "primary",
- text: "查看物流",
- size: "small",
- onClick: $setup.handleCheckLogistics
- }),
- $props.order.checkStatus == 1 ? vue.withDirectives((vue.openBlock(), vue.createBlock(
- $setup["ApproveButton"],
- {
- key: 0,
- onApprove: _cache[0] || (_cache[0] = ($event) => $setup.handleButtonClick(2))
- },
- null,
- 512
- /* NEED_PATCH */
- )), [
- [_directive_permission, "app:express:exception:approve"]
- ]) : vue.createCommentVNode("v-if", true),
- $props.order.checkStatus == 1 ? vue.withDirectives((vue.openBlock(), vue.createBlock(
- $setup["RejectButton"],
- {
- key: 1,
- onReject: _cache[1] || (_cache[1] = (reason) => $setup.handleButtonClick(3, reason))
- },
- null,
- 512
- /* NEED_PATCH */
- )), [
- [_directive_permission, "app:express:exception:reject"]
- ]) : vue.createCommentVNode("v-if", true),
- $props.order.checkStatus == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- style: { "color": "#19be6b" }
- }, "[已签收]")) : vue.createCommentVNode("v-if", true),
- $props.order.checkStatus == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- style: { "color": "#f00" }
- }, "[已驳回]")) : vue.createCommentVNode("v-if", true)
- ])
- ]);
- }
- const ExceptionItem = /* @__PURE__ */ _export_sfc(_sfc_main$1o, [["render", _sfc_render$1n], ["__scopeId", "data-v-e0527396"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/components/ExceptionItem.vue"]]);
- const _sfc_main$1n = {
- __name: "route-exception",
- setup(__props, { expose: __expose }) {
- __expose();
- const tabList = ["待处理订单", "历史异常签收"];
- const curNow = vue.ref(0);
- const exceptionList = vue.ref([]);
- let urlList = ["/app/orderexception/pagelist", "/app/orderexception/getPageLoglist"];
- const requestStr = vue.ref(urlList[0]);
- function sectionChange(index2) {
- curNow.value = index2;
- requestStr.value = urlList[index2];
- handleSearch();
- }
- const pageScrollRef = vue.ref(null);
- const otherParams = vue.ref({ search: "" });
- const updateList = (list) => {
- exceptionList.value = list;
- };
- const handleSearch = () => {
- var _a;
- (_a = pageScrollRef.value) == null ? void 0 : _a.resetUpScroll();
- };
- const handleScan = () => {
- uni.scanCode({
- success: (res2) => {
- otherParams.value.search = res2.result;
- handleSearch();
- }
- });
- };
- onLoad(() => {
- uni.$u.useGlobalEvent((e) => {
- otherParams.value.search = e.barcode;
- handleSearch();
- });
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { tabList, curNow, exceptionList, get urlList() {
- return urlList;
- }, set urlList(v) {
- urlList = v;
- }, requestStr, sectionChange, pageScrollRef, otherParams, updateList, handleSearch, handleScan, ref: vue.ref, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- }, ExceptionItem, PageScroll: pageScroll };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$5);
- const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
- const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createCommentVNode(" 列表区域 "),
- vue.createVNode($setup["PageScroll"], {
- ref: "pageScrollRef",
- height: "100vh",
- requestStr: $setup.requestStr,
- onUpdateList: $setup.updateList,
- otherParams: $setup.otherParams
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_sticky, { "offset-top": 0 }, {
- default: vue.withCtx(() => [
- vue.createCommentVNode(" 顶部标签页 "),
- vue.createVNode(_component_u_subsection, {
- fontSize: "16",
- list: $setup.tabList,
- current: $setup.curNow,
- onChange: $setup.sectionChange,
- mode: "subsection",
- class: "tabs-list"
- }, null, 8, ["current"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createElementVNode("view", { class: "list-container" }, [
- (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,
- onRefresh: $setup.handleSearch
- }, null, 8, ["order"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["requestStr", "otherParams"]),
- vue.createCommentVNode(" 底部搜索框 "),
- vue.createElementVNode("view", { class: "search-bar fixed-bottom" }, [
- vue.createVNode(_component_u_search, {
- modelValue: $setup.otherParams.search,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.otherParams.search = $event),
- placeholder: "请输入物流单号/订单编号",
- "show-action": false,
- inputStyle: { fontSize: "32rpx" },
- 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$1n, [["render", _sfc_render$1m], ["__scopeId", "data-v-388e5b84"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/route-exception.vue"]]);
- const placeholderStyle$2 = "font-size:32rpx";
- const _sfc_main$1m = {
- __name: "warehouse-sign",
- setup(__props, { expose: __expose }) {
- __expose();
- const customStyle = vue.reactive({
- height: "90rpx"
- });
- const selectedWarehouse = vue.ref("");
- const form = vue.ref({
- "packageCode": "",
- "godownId": ""
- });
- const showSelector = vue.ref(false);
- function openWarehouseSelector() {
- showSelector.value = true;
- }
- function handleWarehouseSelected(item) {
- selectedWarehouse.value = item.godownName;
- form.value.godownId = item.id;
- }
- function scanCode() {
- uni.scanCode({
- success: (res2) => {
- form.value.packageCode = res2.result;
- handleBarcode(res2.result);
- },
- fail: (err) => {
- uni.$u.toast("扫码失败");
- }
- });
- }
- function handleBarcode(code2) {
- if (!code2)
- return uni.$u.toast("请输入物流单号");
- uni.$u.http.post("/app/ordersign/toGodownSign", form.value).then((res2) => {
- if (res2.code == 200) {
- let text = code2 + "到仓签收成功";
- uni.$u.ttsModule.speak(text);
- } else {
- let text = code2 + "订单不存在";
- uni.$u.ttsModule.speak(text);
- }
- });
- }
- function getUserBindWarehouse() {
- uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
- var _a, _b;
- if (res2.code == 200) {
- selectedWarehouse.value = (_a = res2.data) == null ? void 0 : _a.godownName;
- form.value.godownId = (_b = res2.data) == null ? void 0 : _b.id;
- }
- });
- }
- onLoad(() => {
- getUserBindWarehouse();
- uni.$u.useGlobalEvent((e) => {
- form.value.packageCode = e.barcode;
- handleBarcode(e.barcode);
- });
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { placeholderStyle: placeholderStyle$2, customStyle, selectedWarehouse, form, showSelector, openWarehouseSelector, handleWarehouseSelected, scanCode, handleBarcode, getUserBindWarehouse, reactive: vue.reactive, ref: vue.ref, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- }, WarehouseSelector };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- const _directive_permission = vue.resolveDirective("permission");
- 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, {
- customStyle: $setup.customStyle,
- "placeholder-style": $setup.placeholderStyle,
- modelValue: $setup.selectedWarehouse,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedWarehouse = $event),
- placeholder: "请选择仓库",
- readonly: "",
- border: "surround"
- }, null, 8, ["customStyle", "modelValue"]),
- vue.createVNode(_component_u_button, {
- customStyle: $setup.customStyle,
- type: "info",
- color: "#a4adb3",
- onClick: $setup.openWarehouseSelector,
- text: "选择"
- }, null, 8, ["customStyle"])
- ]),
- vue.createElementVNode("view", { class: "input-group" }, [
- vue.createVNode(_component_u_input, {
- customStyle: $setup.customStyle,
- "placeholder-style": $setup.placeholderStyle,
- modelValue: $setup.form.packageCode,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.packageCode = $event),
- placeholder: "扫描/输入物流单号",
- border: "surround"
- }, null, 8, ["customStyle", "modelValue"]),
- vue.withDirectives(vue.createVNode(_component_u_button, {
- customStyle: $setup.customStyle,
- type: "info",
- color: "#a4adb3",
- onClick: _cache[2] || (_cache[2] = ($event) => $setup.handleBarcode($setup.form.packageCode)),
- text: "确定"
- }, null, 8, ["customStyle"]), [
- [_directive_permission, "app:express:warehouseSign:confirm"]
- ])
- ])
- ]),
- 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[3] || (_cache[3] = ($event) => $setup.showSelector = $event),
- onWarehouseSelected: $setup.handleWarehouseSelected
- }, null, 8, ["show"])
- ]);
- }
- const PagesIndexExpressWarehouseSign = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["render", _sfc_render$1l], ["__scopeId", "data-v-7473f06e"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/warehouse-sign.vue"]]);
- const placeholderStyle$1 = "font-size:32rpx";
- const _sfc_main$1l = {
- __name: "weight-modify",
- setup(__props, { expose: __expose }) {
- __expose();
- const customStyle = vue.reactive({
- height: "90rpx"
- });
- const formRef = vue.ref(null);
- const form = vue.ref({
- "packageCode": "",
- "batchNum": "",
- "godownId": "",
- "otherInfo": "",
- "actualWeight": "",
- "imgUrlList": []
- });
- const rules2 = {
- packageCode: [{
- required: true,
- message: "请输入物流单号",
- trigger: "blur"
- }],
- actualWeight: [{
- required: true,
- message: "请输入重量",
- trigger: "blur"
- }]
- };
- function scanCode() {
- uni.scanCode({
- success: (res2) => {
- form.value.packageCode = res2.result;
- },
- fail: (err) => {
- uni.$u.toast("扫码失败");
- }
- });
- }
- function submitForm() {
- formRef.value.validate().then((valid) => {
- if (valid) {
- uni.$u.http.post("/app/ordersign/changeWeight", form.value).then((res2) => {
- if (res2.code == 200) {
- uni.$u.toast("重量修改成功");
- let text = code + "已提交审核";
- uni.$u.ttsModule.speak(text);
- } else {
- let text = code + "订单不存在";
- uni.$u.ttsModule.speak(text);
- }
- });
- }
- });
- }
- onLoad(() => {
- uni.$u.useGlobalEvent((e) => {
- form.value.packageCode = e.barcode;
- });
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { placeholderStyle: placeholderStyle$1, customStyle, formRef, form, rules: rules2, scanCode, submitForm, ref: vue.ref, reactive: vue.reactive, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- }, cyUpload };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
- const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
- const _component_u__form = resolveEasycom(vue.resolveDynamicComponent("u--form"), __easycom_2$5);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- const _directive_permission = vue.resolveDirective("permission");
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createVNode(_component_u__form, {
- ref: "formRef",
- model: $setup.form,
- rules: $setup.rules,
- "label-width": "165px",
- "label-position": "top",
- labelStyle: { fontSize: "32rpx" },
- errorType: "toast"
- }, {
- default: vue.withCtx(() => [
- vue.createCommentVNode(" 物流单号输入 "),
- vue.createVNode(_component_u_form_item, {
- label: "",
- prop: "packageCode"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- placeholderStyle: $setup.placeholderStyle,
- customStyle: $setup.customStyle,
- modelValue: $setup.form.packageCode,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.packageCode = $event),
- placeholder: "扫描/输入物流单号",
- border: "surround",
- name: "packageCode"
- }, null, 8, ["customStyle", "modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createCommentVNode(" 重量输入 "),
- vue.createVNode(_component_u_form_item, {
- label: "重量(kg)",
- prop: "actualWeight"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- placeholderStyle: $setup.placeholderStyle,
- customStyle: $setup.customStyle,
- modelValue: $setup.form.actualWeight,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.actualWeight = $event),
- placeholder: "请输入重量",
- border: "surround",
- name: "actualWeight",
- type: "number"
- }, null, 8, ["customStyle", "modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createCommentVNode(" 图片上传 "),
- vue.createVNode(_component_u_form_item, {
- label: "上传图片",
- prop: "imgUrlList"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode($setup["cyUpload"], {
- filename: $setup.form.imgUrlList,
- "onUpdate:filename": _cache[2] || (_cache[2] = ($event) => $setup.form.imgUrlList = $event),
- name: "imgUrlList",
- limit: 10,
- "max-size": 1024 * 1024
- }, null, 8, ["filename"])
- ]),
- _: 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.withDirectives(vue.createVNode(
- _component_u_button,
- {
- size: "large",
- type: "success",
- onClick: $setup.submitForm,
- text: "提交",
- class: "submit-button"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [_directive_permission, "app:express:changeWeight:confirm"]
- ])
- ])
- ]);
- }
- const PagesIndexExpressWeightModify = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["render", _sfc_render$1k], ["__scopeId", "data-v-e6126507"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/weight-modify.vue"]]);
- const _sfc_main$1k = {
- __name: "confirm-receipt",
- setup(__props, { expose: __expose }) {
- __expose();
- const formData = vue.ref({
- searchType: "2",
- search: ""
- });
- const handleSubmit = () => {
- if (!formData.value.search) {
- uni.$u.toast("请扫描/输入物流单号");
- return;
- }
- uni.$u.http.post("/app/orderinfo/confirmOrder", formData.value).then((res2) => {
- if (res2.code == 200) {
- let text = formData.value.search + "收货成功";
- uni.$u.ttsModule.speak(text);
- } else {
- let text = formData.value.search + "订单不存在";
- uni.$u.ttsModule.speak(text);
- }
- });
- };
- const handleScan = () => {
- uni.scanCode({
- success: (res2) => {
- formData.value.search = res2.result;
- handleSubmit();
- }
- });
- };
- onLoad(() => {
- uni.$u.useGlobalEvent((e) => {
- formData.value.search = e.barcode;
- handleSubmit();
- });
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { formData, handleSubmit, handleScan, ref: vue.ref, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
- const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$5);
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$2);
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createCommentVNode(" 底部按钮 "),
- vue.createElementVNode("view", { class: "footer" }, [
- vue.createCommentVNode(" 查询区域 "),
- vue.createElementVNode("view", { class: "query-section" }, [
- vue.createVNode(_component_u_radio_group, {
- modelValue: $setup.formData.searchType,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.searchType = $event)
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_radio, {
- label: "查订单",
- name: "1",
- labelSize: "16px",
- iconSize: "16px"
- }),
- vue.createVNode(_component_u_radio, {
- label: "查物流",
- "custom-style": "margin-left:20px",
- name: "2",
- labelSize: "16px",
- iconSize: "16px"
- })
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue"]),
- vue.createElementVNode("view", { class: "search-box" }, [
- vue.createVNode(_component_u_input, {
- "custom-style": "font-size:32rpx",
- "placeholder-style": "fong-size:32rpx",
- modelValue: $setup.formData.search,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.search = $event),
- placeholder: $setup.formData.searchType == "1" ? "扫描/输入订单号" : "扫描/输入物流单号",
- border: "surround",
- clearable: ""
- }, null, 8, ["modelValue", "placeholder"]),
- vue.createVNode(_component_u_button, {
- color: "#c8c8c8",
- text: "查询",
- onClick: $setup.handleSubmit
- })
- ])
- ]),
- vue.createVNode(_component_u_divider),
- vue.createElementVNode("view", { style: { "display": "flex" } }, [
- vue.createVNode(_component_u_button, {
- size: "large",
- type: "success",
- text: "确认收货扫码",
- onClick: $setup.handleScan
- })
- ])
- ])
- ]);
- }
- const PagesIndexAuditConfirmReceipt = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1j], ["__scopeId", "data-v-fec7d541"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/audit/confirm-receipt.vue"]]);
- const props$d = {
- props: {
- // 是否开启顶部安全区适配
- safeAreaInsetTop: {
- type: Boolean,
- default: props$G.navbar.safeAreaInsetTop
- },
- // 固定在顶部时,是否生成一个等高元素,以防止塌陷
- placeholder: {
- type: Boolean,
- default: props$G.navbar.placeholder
- },
- // 是否固定在顶部
- fixed: {
- type: Boolean,
- default: props$G.navbar.fixed
- },
- // 是否显示下边框
- border: {
- type: Boolean,
- default: props$G.navbar.border
- },
- // 左边的图标
- leftIcon: {
- type: String,
- default: props$G.navbar.leftIcon
- },
- // 左边的提示文字
- leftText: {
- type: String,
- default: props$G.navbar.leftText
- },
- // 左右的提示文字
- rightText: {
- type: String,
- default: props$G.navbar.rightText
- },
- // 右边的图标
- rightIcon: {
- type: String,
- default: props$G.navbar.rightIcon
- },
- // 标题
- title: {
- type: [String, Number],
- default: props$G.navbar.title
- },
- // 背景颜色
- bgColor: {
- type: String,
- default: props$G.navbar.bgColor
- },
- // 标题的宽度
- titleWidth: {
- type: [String, Number],
- default: props$G.navbar.titleWidth
- },
- // 导航栏高度
- height: {
- type: [String, Number],
- default: props$G.navbar.height
- },
- // 左侧返回图标的大小
- leftIconSize: {
- type: [String, Number],
- default: props$G.navbar.leftIconSize
- },
- // 左侧返回图标的颜色
- leftIconColor: {
- type: String,
- default: props$G.navbar.leftIconColor
- },
- // 点击左侧区域(返回图标),是否自动返回上一页
- autoBack: {
- type: Boolean,
- default: props$G.navbar.autoBack
- },
- // 标题的样式,对象或字符串
- titleStyle: {
- type: [String, Object],
- default: props$G.navbar.titleStyle
- }
- }
- };
- const _sfc_main$1j = {
- name: "u-navbar",
- mixins: [mpMixin, mixin, props$d],
- data() {
- return {};
- },
- methods: {
- // 点击左侧区域
- leftClick() {
- this.$emit("leftClick");
- if (this.autoBack) {
- uni.navigateBack();
- }
- },
- // 点击右侧区域
- rightClick() {
- this.$emit("rightClick");
- }
- }
- };
- function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$8);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- return vue.openBlock(), vue.createElementBlock("view", { class: "u-navbar" }, [
- _ctx.fixed && _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "u-navbar__placeholder",
- style: vue.normalizeStyle({
- height: _ctx.$u.addUnit(_ctx.$u.getPx(_ctx.height) + _ctx.$u.sys().statusBarHeight, "px")
- })
- },
- null,
- 4
- /* STYLE */
- )) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass([_ctx.fixed && "u-navbar--fixed"])
- },
- [
- _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, {
- key: 0,
- bgColor: _ctx.bgColor
- }, null, 8, ["bgColor"])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["u-navbar__content", [_ctx.border && "u-border-bottom"]]),
- style: vue.normalizeStyle({
- height: _ctx.$u.addUnit(_ctx.height),
- backgroundColor: _ctx.bgColor
- })
- },
- [
- vue.createElementVNode("view", {
- class: "u-navbar__content__left",
- "hover-class": "u-navbar__content__left--hover",
- "hover-start-time": "150",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.leftClick && $options.leftClick(...args))
- }, [
- vue.renderSlot(_ctx.$slots, "left", {}, () => [
- _ctx.leftIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
- key: 0,
- name: _ctx.leftIcon,
- size: _ctx.leftIconSize,
- color: _ctx.leftIconColor
- }, null, 8, ["name", "size", "color"])) : vue.createCommentVNode("v-if", true),
- _ctx.leftText ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- style: vue.normalizeStyle({
- color: _ctx.leftIconColor
- }),
- class: "u-navbar__content__left__text"
- },
- vue.toDisplayString(_ctx.leftText),
- 5
- /* TEXT, STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ], true)
- ]),
- vue.renderSlot(_ctx.$slots, "center", {}, () => [
- vue.createElementVNode(
- "text",
- {
- class: "u-line-1 u-navbar__content__title",
- style: vue.normalizeStyle([{
- width: _ctx.$u.addUnit(_ctx.titleWidth)
- }, _ctx.$u.addStyle(_ctx.titleStyle)])
- },
- vue.toDisplayString(_ctx.title),
- 5
- /* TEXT, STYLE */
- )
- ], true),
- _ctx.$slots.right || _ctx.rightIcon || _ctx.rightText ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "u-navbar__content__right",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.rightClick && $options.rightClick(...args))
- }, [
- vue.renderSlot(_ctx.$slots, "right", {}, () => [
- _ctx.rightIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
- key: 0,
- name: _ctx.rightIcon,
- size: "20"
- }, null, 8, ["name"])) : vue.createCommentVNode("v-if", true),
- _ctx.rightText ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- class: "u-navbar__content__right__text"
- },
- vue.toDisplayString(_ctx.rightText),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ], true)
- ])) : vue.createCommentVNode("v-if", true)
- ],
- 6
- /* CLASS, STYLE */
- )
- ],
- 2
- /* CLASS */
- )
- ]);
- }
- const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$1i], ["__scopeId", "data-v-f631659b"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-navbar/u-navbar.vue"]]);
- const props$c = {
- props: {
- // 步进器标识符,在change回调返回
- name: {
- type: [String, Number],
- default: props$G.numberBox.name
- },
- // 用于双向绑定的值,初始化时设置设为默认min值(最小值)
- modelValue: {
- type: [String, Number],
- default: props$G.numberBox.value
- },
- // 最小值
- min: {
- type: [String, Number],
- default: props$G.numberBox.min
- },
- // 最大值
- max: {
- type: [String, Number],
- default: props$G.numberBox.max
- },
- // 加减的步长,可为小数
- step: {
- type: [String, Number],
- default: props$G.numberBox.step
- },
- // 是否只允许输入整数
- integer: {
- type: Boolean,
- default: props$G.numberBox.integer
- },
- // 是否禁用,包括输入框,加减按钮
- disabled: {
- type: Boolean,
- default: props$G.numberBox.disabled
- },
- // 是否禁用输入框
- disabledInput: {
- type: Boolean,
- default: props$G.numberBox.disabledInput
- },
- // 是否开启异步变更,开启后需要手动控制输入值
- asyncChange: {
- type: Boolean,
- default: props$G.numberBox.asyncChange
- },
- // 输入框宽度,单位为px
- inputWidth: {
- type: [String, Number],
- default: props$G.numberBox.inputWidth
- },
- // 是否显示减少按钮
- showMinus: {
- type: Boolean,
- default: props$G.numberBox.showMinus
- },
- // 是否显示增加按钮
- showPlus: {
- type: Boolean,
- default: props$G.numberBox.showPlus
- },
- // 显示的小数位数
- decimalLength: {
- type: [String, Number, null],
- default: props$G.numberBox.decimalLength
- },
- // 是否开启长按加减手势
- longPress: {
- type: Boolean,
- default: props$G.numberBox.longPress
- },
- // 输入框文字和加减按钮图标的颜色
- color: {
- type: String,
- default: props$G.numberBox.color
- },
- // 按钮大小,宽高等于此值,单位px,输入框高度和此值保持一致
- buttonSize: {
- type: [String, Number],
- default: props$G.numberBox.buttonSize
- },
- // 输入框和按钮的背景颜色
- bgColor: {
- type: String,
- default: props$G.numberBox.bgColor
- },
- // 指定光标于键盘的距离,避免键盘遮挡输入框,单位px
- cursorSpacing: {
- type: [String, Number],
- default: props$G.numberBox.cursorSpacing
- },
- // 是否禁用增加按钮
- disablePlus: {
- type: Boolean,
- default: props$G.numberBox.disablePlus
- },
- // 是否禁用减少按钮
- disableMinus: {
- type: Boolean,
- default: props$G.numberBox.disableMinus
- },
- // 加减按钮图标的样式
- iconStyle: {
- type: [Object, String],
- default: props$G.numberBox.iconStyle
- }
- }
- };
- const _sfc_main$1i = {
- name: "u-number-box",
- mixins: [mpMixin, mixin, props$c],
- data() {
- return {
- // 输入框实际操作的值
- currentValue: "",
- // 定时器
- longPressTimer: null
- };
- },
- watch: {
- // 多个值之间,只要一个值发生变化,都要重新检查check()函数
- watchChange(n) {
- this.check();
- },
- // 监听v-mode的变化,重新初始化内部的值
- modelValue(n) {
- if (n !== this.currentValue) {
- this.currentValue = this.format(this.modelValue);
- }
- }
- },
- computed: {
- getCursorSpacing() {
- return uni.$u.getPx(this.cursorSpacing);
- },
- // 按钮的样式
- buttonStyle() {
- return (type2) => {
- const style = {
- backgroundColor: this.bgColor,
- height: uni.$u.addUnit(this.buttonSize),
- color: this.color
- };
- if (this.isDisabled(type2)) {
- style.backgroundColor = "#f7f8fa";
- }
- return style;
- };
- },
- // 输入框的样式
- inputStyle() {
- this.disabled || this.disabledInput;
- const style = {
- color: this.color,
- backgroundColor: this.bgColor,
- height: uni.$u.addUnit(this.buttonSize),
- width: uni.$u.addUnit(this.inputWidth)
- };
- return style;
- },
- // 用于监听多个值发生变化
- watchChange() {
- return [this.integer, this.decimalLength, this.min, this.max];
- },
- isDisabled() {
- return (type2) => {
- if (type2 === "plus") {
- return this.disabled || this.disablePlus || this.currentValue >= this.max;
- }
- return this.disabled || this.disableMinus || this.currentValue <= this.min;
- };
- }
- },
- mounted() {
- this.init();
- },
- emits: ["update:modelValue", "focus", "blur", "overlimit", "change", "plus", "minus"],
- methods: {
- init() {
- this.currentValue = this.format(this.modelValue);
- },
- // 格式化整理数据,限制范围
- format(value2) {
- value2 = this.filter(value2);
- value2 = value2 === "" ? 0 : +value2;
- value2 = Math.max(Math.min(this.max, value2), this.min);
- if (this.decimalLength !== null) {
- value2 = value2.toFixed(this.decimalLength);
- }
- return value2;
- },
- // 过滤非法的字符
- filter(value2) {
- value2 = String(value2).replace(/[^0-9.-]/g, "");
- if (this.integer && value2.indexOf(".") !== -1) {
- value2 = value2.split(".")[0];
- }
- return value2;
- },
- check() {
- const val = this.format(this.currentValue);
- if (val !== this.currentValue) {
- this.currentValue = val;
- }
- },
- // 判断是否出于禁止操作状态
- // isDisabled(type) {
- // if (type === 'plus') {
- // // 在点击增加按钮情况下,判断整体的disabled,是否单独禁用增加按钮,以及当前值是否大于最大的允许值
- // return (
- // this.disabled ||
- // this.disablePlus ||
- // this.currentValue >= this.max
- // )
- // }
- // // 点击减少按钮同理
- // return (
- // this.disabled ||
- // this.disableMinus ||
- // this.currentValue <= this.min
- // )
- // },
- // 输入框活动焦点
- onFocus(event) {
- this.$emit("focus", {
- ...event.detail,
- name: this.name
- });
- },
- // 输入框失去焦点
- onBlur(event) {
- this.format(event.detail.value);
- this.$emit(
- "blur",
- {
- ...event.detail,
- name: this.name
- }
- );
- },
- // 输入框值发生变化
- onInput(e) {
- const {
- value: value2 = ""
- } = e.detail || {};
- if (value2 === "")
- return;
- let formatted = this.filter(value2);
- if (this.decimalLength !== null && formatted.indexOf(".") !== -1) {
- const pair = formatted.split(".");
- formatted = `${pair[0]}.${pair[1].slice(0, this.decimalLength)}`;
- }
- formatted = this.format(formatted);
- this.emitChange(formatted);
- },
- // 发出change事件
- emitChange(value2) {
- if (!this.asyncChange) {
- this.$nextTick(() => {
- this.$emit("update:modelValue", value2);
- this.currentValue = value2;
- this.$forceUpdate();
- });
- }
- this.$emit("change", {
- value: value2,
- name: this.name
- });
- },
- onChange() {
- const {
- type: type2
- } = this;
- if (this.isDisabled(type2)) {
- return this.$emit("overlimit", type2);
- }
- const diff = type2 === "minus" ? -this.step : +this.step;
- const value2 = this.format(this.add(+this.currentValue, diff));
- this.emitChange(value2);
- this.$emit(type2);
- },
- // 对值扩大后进行四舍五入,再除以扩大因子,避免出现浮点数操作的精度问题
- add(num1, num2) {
- const cardinal = Math.pow(10, 10);
- return Math.round((num1 + num2) * cardinal) / cardinal;
- },
- // 点击加减按钮
- clickHandler(type2) {
- this.type = type2;
- this.onChange();
- },
- longPressStep() {
- this.clearTimeout();
- this.longPressTimer = setTimeout(() => {
- this.onChange();
- this.longPressStep();
- }, 250);
- },
- onTouchStart(type2) {
- if (!this.longPress)
- return;
- this.clearTimeout();
- this.type = type2;
- this.longPressTimer = setTimeout(() => {
- this.onChange();
- this.longPressStep();
- }, 600);
- },
- // 触摸结束,清除定时器,停止长按加减
- onTouchEnd() {
- if (!this.longPress)
- return;
- this.clearTimeout();
- },
- // 清除定时器
- clearTimeout() {
- clearTimeout(this.longPressTimer);
- this.longPressTimer = null;
- }
- }
- };
- function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- return vue.openBlock(), vue.createElementBlock("view", { class: "u-number-box" }, [
- _ctx.showMinus && _ctx.$slots.minus ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "u-number-box__slot",
- onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => $options.clickHandler("minus"), ["stop"])),
- onTouchstart: _cache[1] || (_cache[1] = ($event) => $options.onTouchStart("minus")),
- onTouchend: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"]))
- },
- [
- vue.renderSlot(_ctx.$slots, "minus", {}, void 0, true)
- ],
- 32
- /* NEED_HYDRATION */
- )) : _ctx.showMinus ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: vue.normalizeClass(["u-number-box__minus", { "u-number-box__minus--disabled": $options.isDisabled("minus") }]),
- onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.clickHandler("minus"), ["stop"])),
- onTouchstart: _cache[4] || (_cache[4] = ($event) => $options.onTouchStart("minus")),
- onTouchend: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"])),
- "hover-class": "u-number-box__minus--hover",
- "hover-stay-time": "150",
- style: vue.normalizeStyle([$options.buttonStyle("minus")])
- },
- [
- vue.createVNode(_component_u_icon, {
- name: "minus",
- color: $options.isDisabled("minus") ? "#c8c9cc" : "#323233",
- size: "15",
- bold: "",
- customStyle: _ctx.iconStyle
- }, null, 8, ["color", "customStyle"])
- ],
- 38
- /* CLASS, STYLE, NEED_HYDRATION */
- )) : vue.createCommentVNode("v-if", true),
- vue.renderSlot(_ctx.$slots, "input", {}, () => [
- vue.withDirectives(vue.createElementVNode("input", {
- disabled: _ctx.disabledInput || _ctx.disabled,
- "cursor-spacing": $options.getCursorSpacing,
- class: vue.normalizeClass([{ "u-number-box__input--disabled": _ctx.disabled || _ctx.disabledInput }, "u-number-box__input"]),
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.currentValue = $event),
- onBlur: _cache[7] || (_cache[7] = (...args) => $options.onBlur && $options.onBlur(...args)),
- onFocus: _cache[8] || (_cache[8] = (...args) => $options.onFocus && $options.onFocus(...args)),
- onInput: _cache[9] || (_cache[9] = (...args) => $options.onInput && $options.onInput(...args)),
- type: "number",
- style: vue.normalizeStyle([$options.inputStyle])
- }, null, 46, ["disabled", "cursor-spacing"]), [
- [vue.vModelText, $data.currentValue]
- ])
- ], true),
- _ctx.showPlus && _ctx.$slots.plus ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 2,
- class: "u-number-box__slot",
- onClick: _cache[10] || (_cache[10] = vue.withModifiers(($event) => $options.clickHandler("plus"), ["stop"])),
- onTouchstart: _cache[11] || (_cache[11] = ($event) => $options.onTouchStart("plus")),
- onTouchend: _cache[12] || (_cache[12] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"]))
- },
- [
- vue.renderSlot(_ctx.$slots, "plus", {}, void 0, true)
- ],
- 32
- /* NEED_HYDRATION */
- )) : _ctx.showPlus ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 3,
- class: vue.normalizeClass(["u-number-box__plus", { "u-number-box__minus--disabled": $options.isDisabled("plus") }]),
- onClick: _cache[13] || (_cache[13] = vue.withModifiers(($event) => $options.clickHandler("plus"), ["stop"])),
- onTouchstart: _cache[14] || (_cache[14] = ($event) => $options.onTouchStart("plus")),
- onTouchend: _cache[15] || (_cache[15] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"])),
- "hover-class": "u-number-box__plus--hover",
- "hover-stay-time": "150",
- style: vue.normalizeStyle([$options.buttonStyle("plus")])
- },
- [
- vue.createVNode(_component_u_icon, {
- name: "plus",
- color: $options.isDisabled("plus") ? "#c8c9cc" : "#323233",
- size: "15",
- bold: "",
- customStyle: _ctx.iconStyle
- }, null, 8, ["color", "customStyle"])
- ],
- 38
- /* CLASS, STYLE, NEED_HYDRATION */
- )) : vue.createCommentVNode("v-if", true)
- ]);
- }
- const __easycom_3$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$1h], ["__scopeId", "data-v-eb6f6237"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-number-box/u-number-box.vue"]]);
- const _sfc_main$1h = {
- __name: "scan-order",
- setup(__props, { expose: __expose }) {
- __expose();
- function playGlobalSound() {
- uni.$u.playClickSound();
- }
- const isbnList = vue.ref([]);
- const showModal = vue.ref(false);
- const newIsbn = vue.ref("");
- const removeItem = (index2) => {
- isbnList.value.splice(index2, 1);
- };
- const goBack = () => {
- uni.navigateBack();
- };
- function clearAll() {
- isbnList.value.length = 0;
- }
- const addOrUpdateIsbn = (isbn) => {
- const existingItem = isbnList.value.find((item) => item.isbn === isbn);
- if (existingItem) {
- existingItem.quantity += 1;
- } else {
- isbnList.value.push({
- isbn,
- quantity: 1
- });
- }
- };
- function handleIsbn(isbn) {
- if (isValidISBN(isbn)) {
- addOrUpdateIsbn(isbn);
- } else {
- uni.$u.ttsModule.speak("不正确的ISBN码");
- }
- }
- const handleScan = () => {
- uni.scanCode({
- success: (res2) => {
- handleIsbn(res2.result);
- }
- });
- };
- const isValidISBN = (isbn) => {
- return /^97[89]\d{10}$/.test(isbn);
- };
- const handleQuery = () => {
- if (isbnList.value.length === 0) {
- uni.showToast({
- title: "请先添加ISBN",
- icon: "none"
- });
- return;
- }
- uni.setStorageSync("isbnList", isbnList.value);
- uni.redirectTo({
- url: "/pages/index/audit/isbn-order"
- });
- };
- const addIsbn = () => {
- if (isValidISBN(newIsbn.value)) {
- addOrUpdateIsbn(newIsbn.value);
- showModal.value = false;
- newIsbn.value = "";
- } else {
- uni.$u.ttsModule.speak("不正确的ISBN码");
- }
- };
- onLoad(() => {
- uni.$u.useGlobalEvent((e) => {
- addOrUpdateIsbn(e.barcode);
- });
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { playGlobalSound, isbnList, showModal, newIsbn, removeItem, goBack, clearAll, addOrUpdateIsbn, handleIsbn, handleScan, isValidISBN, handleQuery, addIsbn, ref: vue.ref, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
- const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
- const _component_u_number_box = resolveEasycom(vue.resolveDynamicComponent("u-number-box"), __easycom_3$4);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
- const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "container",
- onClick: $setup.playGlobalSound
- }, [
- vue.createVNode(_component_u_navbar, {
- title: "扫书查单",
- border: false,
- fixed: "",
- bgColor: "#22ac38",
- leftIconColor: "#fff",
- titleStyle: "font-size:36rpx;color:#fff"
- }, {
- left: vue.withCtx(() => [
- vue.createVNode(_component_u_icon, {
- name: "arrow-left",
- color: "#fff",
- size: "20",
- onClick: $setup.goBack
- })
- ]),
- right: vue.withCtx(() => [
- vue.createElementVNode("text", {
- style: { "color": "#fff", "font-size": "32rpx" },
- type: "primary",
- onClick: _cache[0] || (_cache[0] = ($event) => $setup.showModal = true)
- }, "新增")
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createCommentVNode(" 顶部操作栏 "),
- vue.createVNode(_component_u_sticky, null, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", {
- class: "header",
- onClick: $setup.clearAll
- }, "清除全部"),
- vue.createCommentVNode(" 提示信息 "),
- vue.createElementVNode("view", { class: "tips" }, [
- vue.createElementVNode("text", null, "请勿录入审核为不良的书籍ISBN!"),
- vue.createElementVNode("text", { class: "sub-tips" }, "不良书籍的ISBN可能是错误的!")
- ])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createCommentVNode(" ISBN列表 "),
- vue.createElementVNode("scroll-view", {
- "scroll-y": "",
- class: "isbn-list"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.isbnList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "isbn-item"
- }, [
- vue.createElementVNode("view", { class: "item-left" }, [
- vue.createVNode(_component_u_icon, {
- name: "minus-circle-fill",
- color: "#dd524d",
- size: "24",
- onClick: ($event) => $setup.removeItem(index2)
- }, null, 8, ["onClick"]),
- vue.createElementVNode(
- "text",
- { class: "index" },
- vue.toDisplayString(index2 + 1) + "、",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "isbn" },
- vue.toDisplayString(item.isbn),
- 1
- /* TEXT */
- )
- ]),
- vue.createVNode(_component_u_number_box, {
- modelValue: item.quantity,
- "onUpdate:modelValue": ($event) => item.quantity = $event,
- disableMinus: item.quantity <= 1
- }, null, 8, ["modelValue", "onUpdate:modelValue", "disableMinus"])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createCommentVNode(" 底部按钮 "),
- vue.createElementVNode("view", { class: "fixed-bottom" }, [
- 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.handleQuery
- })
- ]),
- vue.createCommentVNode(" ISBN Input Modal "),
- vue.createVNode(_component_u_popup, {
- show: $setup.showModal,
- mode: "center",
- customStyle: "width: 84%;border-radius:10px"
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "modal-content" }, [
- vue.createElementVNode("text", null, "输入ISBN码"),
- vue.createVNode(_component_u_input, {
- modelValue: $setup.newIsbn,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.newIsbn = $event),
- placeholder: "请输入ISBN码",
- "custom-style": "margin:60rpx 0"
- }, null, 8, ["modelValue"]),
- vue.createElementVNode("view", { class: "modal-buttons" }, [
- vue.createVNode(_component_u_button, {
- text: "取消",
- onClick: _cache[2] || (_cache[2] = ($event) => $setup.showModal = false)
- }),
- vue.createVNode(_component_u_button, {
- type: "primary",
- text: "确定",
- onClick: $setup.addIsbn
- })
- ])
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["show"])
- ]);
- }
- const PagesIndexAuditScanOrder = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1g], ["__scopeId", "data-v-1af411ea"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/audit/scan-order.vue"]]);
- const _sfc_main$1g = {
- __name: "orderItem",
- props: {
- item: {
- type: Object,
- default: () => {
- }
- }
- },
- setup(__props, { expose: __expose }) {
- __expose();
- const props2 = __props;
- const statusEnum = {
- 0: "创建",
- 1: "用户删除",
- 2: "下单(待初审)",
- 3: "初审(待取书)",
- 4: "初审未通过",
- 5: "快递取书(待签收)",
- 6: "快递签收(待收货)",
- 7: "物流签收(路由异常)",
- 8: "仓库收货(待审核)",
- 9: "审核中(审核未提交)",
- 10: "已审核(待付款)",
- 11: "已完成"
- };
- const maskedNickName = vue.computed(() => {
- let nickName = props2.item.userNick || props2.item.nickName;
- if (!nickName)
- return "";
- return nickName.charAt(0) + "*".repeat(nickName.length - 1);
- });
- let statusText = vue.computed(() => {
- return props2.item.status ? statusEnum[props2.item.status] : "-";
- });
- const statusColor = vue.ref("#FF4D4F");
- const copyToClipboard = (text) => {
- uni.setClipboardData({
- data: text,
- success: () => {
- uni.showToast({
- title: "复制成功",
- icon: "success"
- });
- }
- });
- };
- const handleAudit = () => {
- uni.redirectTo({
- url: `/pages/index/detail/index?id=${props2.item.orderId}`
- });
- };
- const handleView = () => {
- uni.redirectTo({
- url: `/pages/index/detail/index?id=${props2.item.orderId}&type=2`
- });
- };
- const __returned__ = { props: props2, statusEnum, maskedNickName, get statusText() {
- return statusText;
- }, set statusText(v) {
- statusText = v;
- }, statusColor, copyToClipboard, handleAudit, handleView, ref: vue.ref, computed: vue.computed };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) {
- var _a, _b, _c;
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "order-card" }, [
- vue.createCommentVNode(" 用户信息 "),
- vue.createElementVNode("view", { class: "user-info" }, [
- vue.createElementVNode("image", {
- class: "avatar",
- src: $props.item.imgPath,
- mode: "aspectFill"
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "user-details" }, [
- vue.createElementVNode(
- "text",
- { class: "username" },
- vue.toDisplayString($props.item.plat == 1 ? "微信用户" : "支付宝用户") + " (" + vue.toDisplayString($setup.maskedNickName) + ")",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "date" },
- "共卖出" + vue.toDisplayString($props.item.totalNum) + "本书",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "date" },
- "来自" + vue.toDisplayString($props.item.sendSsq),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "user-details right-items" }, [
- vue.createElementVNode(
- "text",
- { class: "date" },
- vue.toDisplayString($props.item.schedulePickupStartTime),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- {
- class: "status",
- style: vue.normalizeStyle({ color: $setup.statusColor })
- },
- "[" + vue.toDisplayString($setup.statusText) + "]",
- 5
- /* TEXT, STYLE */
- )
- ])
- ]),
- vue.createCommentVNode(" 订单详情 "),
- vue.createElementVNode("view", { class: "order-details" }, [
- vue.createElementVNode("view", { class: "detail-row flex flex-col" }, [
- vue.createElementVNode("view", { class: "flex-1" }, [
- vue.createElementVNode("text", null, "订单ID:"),
- vue.createElementVNode(
- "text",
- {
- class: "link",
- onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyToClipboard($props.item.orderId))
- },
- vue.toDisplayString($props.item.orderId),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", {
- class: "flex-1",
- style: { "flex": "1.5" }
- }, [
- vue.createElementVNode("text", null, "运单号:"),
- vue.createElementVNode(
- "text",
- {
- class: "link",
- onClick: _cache[1] || (_cache[1] = ($event) => $setup.copyToClipboard($props.item.waybillCode))
- },
- vue.toDisplayString($props.item.waybillCode),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "detail-row" }, [
- vue.createElementVNode(
- "text",
- { class: "flex-1" },
- "预估金额:" + vue.toDisplayString($props.item.expectMoney || 0),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "flex-1" },
- "审核金额:" + vue.toDisplayString($props.item.finalMoney || "待核算"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "detail-row" }, [
- vue.createElementVNode(
- "text",
- null,
- "内部备注:" + vue.toDisplayString(((_a = $props.item) == null ? void 0 : _a.manageRemark) ? (_c = (_b = $props.item) == null ? void 0 : _b.manageRemark[0]) == null ? void 0 : _c.remark : "-"),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createCommentVNode(" 操作按钮 "),
- vue.createElementVNode("view", { class: "action-buttons" }, [
- vue.createVNode(_component_u_button, {
- size: "small",
- type: "primary",
- onClick: $setup.handleAudit,
- disabled: $props.item.status != 8 || $props.item.status != 9
- }, {
- default: vue.withCtx(() => [
- vue.createTextVNode("到货审核")
- ]),
- _: 1
- /* STABLE */
- }, 8, ["disabled"]),
- vue.createVNode(_component_u_button, {
- size: "small",
- onClick: $setup.handleView
- }, {
- default: vue.withCtx(() => [
- vue.createTextVNode("查看")
- ]),
- _: 1
- /* STABLE */
- })
- ])
- ]);
- }
- const orderItem = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["render", _sfc_render$1f], ["__scopeId", "data-v-12bc2a79"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/my/components/orderItem.vue"]]);
- const _sfc_main$1f = {
- __name: "isbn-order",
- setup(__props, { expose: __expose }) {
- __expose();
- const otherParams = vue.ref({
- isbnList: ""
- });
- const scrollRef = vue.ref(null);
- const refreshList = () => {
- var _a;
- (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
- };
- function playGlobalSound() {
- uni.$u.playClickSound();
- }
- let dataList = vue.ref([]);
- const updateList = (data, page2) => {
- dataList.value = data;
- if (data.length > 0 && page2 == 1) {
- uni.$u.ttsModule.speak("查询到" + data.length + "条数据");
- }
- if (data.length == 0 && page2 == 1) {
- uni.$u.ttsModule.speak("未查询到数据");
- }
- };
- onLoad(() => {
- const storedList = uni.getStorageSync("isbnList");
- if (storedList) {
- otherParams.value.isbnList = storedList.map((v) => v.isbn);
- refreshList();
- }
- });
- const __returned__ = { otherParams, scrollRef, refreshList, playGlobalSound, get dataList() {
- return dataList;
- }, set dataList(v) {
- dataList = v;
- }, updateList, reactive: vue.reactive, PageScroll: pageScroll, OrderItem: orderItem, ref: vue.ref, get onLoad() {
- return onLoad;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "common-page",
- style: { "padding": "0" },
- onClick: $setup.playGlobalSound
- }, [
- vue.createVNode($setup["PageScroll"], {
- requestStr: "/app/orderinfo/getOrderListByIsbn",
- onUpdateList: $setup.updateList,
- ref: "scrollRef",
- otherParams: $setup.otherParams,
- method: "post"
- }, {
- default: vue.withCtx(() => [
- $setup.dataList.length ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "list-con"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.dataList, (cell) => {
- return vue.openBlock(), vue.createBlock($setup["OrderItem"], {
- key: cell.id,
- item: cell,
- class: "mt-20"
- }, null, 8, ["item"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- _: 1
- /* STABLE */
- }, 8, ["otherParams"])
- ]);
- }
- const PagesIndexAuditIsbnOrder = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["render", _sfc_render$1e], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/audit/isbn-order.vue"]]);
- const _sfc_main$1e = {
- __name: "express-order",
- setup(__props, { expose: __expose }) {
- __expose();
- const form = vue.ref({
- searchType: "2",
- search: ""
- });
- function playGlobalSound() {
- formatAppLog("log", "at pages/index/audit/express-order.vue:48", "playGlobalSound");
- uni.$u.playClickSound();
- }
- const handleSearch = () => {
- playGlobalSound();
- if (!form.value.search) {
- let text = form.value.searchType == "1" ? "请输入订单编号" : "请输入物流单号";
- uni.$u.ttsModule.speak(text);
- return;
- }
- uni.$u.http.get("/app/orderinfo/getOrderInfoForCheck", {
- params: {
- ...form.value
- }
- }).then((res2) => {
- if (res2.code == 200) {
- uni.setStorageSync("orderDetail", res2.data);
- uni.redirectTo({
- url: `/pages/index/detail/index?id=${res2.data.orderId}`
- });
- } else {
- let text = form.value.search + res2.msg;
- uni.$u.ttsModule.speak(text);
- }
- });
- };
- const handleScan = () => {
- playGlobalSound();
- uni.scanCode({
- success: (res2) => {
- form.value.search = res2.result;
- handleSearch();
- }
- });
- };
- onLoad(() => {
- uni.$u.useGlobalEvent((e) => {
- form.value.search = e.barcode;
- handleSearch();
- });
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { form, playGlobalSound, handleSearch, handleScan, ref: vue.ref, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
- const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$5);
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$2);
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createCommentVNode(" 底部按钮 "),
- vue.createElementVNode("view", { class: "footer" }, [
- vue.createCommentVNode(" 查询区域 "),
- vue.createElementVNode("view", { class: "query-section" }, [
- vue.createVNode(_component_u_radio_group, {
- modelValue: $setup.form.searchType,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.searchType = $event),
- onChange: $setup.playGlobalSound
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_radio, {
- label: "查订单",
- name: "1",
- "label-size": "17"
- }),
- vue.createVNode(_component_u_radio, {
- label: "查物流",
- "custom-style": "margin-left:20px",
- name: "2",
- "label-size": "17"
- })
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue"]),
- vue.createElementVNode("view", { class: "search-box" }, [
- vue.createVNode(_component_u_input, {
- "custom-style": "width:100rpx",
- modelValue: $setup.form.search,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.search = $event),
- placeholder: $setup.form.searchType == "1" ? "扫描/输入订单编号" : "扫描/输入物流单号",
- border: "surround",
- clearable: "",
- onFocus: $setup.playGlobalSound,
- "placeholder-style": "font-size:32rpx",
- customStyle: { "fontSize": "32rpx" }
- }, null, 8, ["modelValue", "placeholder"]),
- 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: "success",
- text: "扫码",
- onClick: $setup.handleScan
- })
- ])
- ])
- ]);
- }
- const PagesIndexAuditExpressOrder = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$1d], ["__scopeId", "data-v-b27ee25f"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/audit/express-order.vue"]]);
- const _sfc_main$1d = {
- __name: "user-orders",
- setup(__props, { expose: __expose }) {
- __expose();
- const otherParams = vue.ref({
- userId: ""
- });
- const scrollRef = vue.ref(null);
- const refreshList = () => {
- var _a;
- (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
- };
- let dataList = vue.ref([]);
- const updateList = (data, page2) => {
- dataList.value = data;
- if (data.length > 0 && page2 == 1) {
- uni.$u.ttsModule.speak("查询到" + data.length + "条数据");
- }
- if (data.length == 0 && page2 == 1) {
- uni.$u.ttsModule.speak("未查询到数据");
- }
- };
- onLoad((options) => {
- otherParams.value.userId = options.userId;
- refreshList();
- });
- const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
- return dataList;
- }, set dataList(v) {
- dataList = v;
- }, updateList, reactive: vue.reactive, PageScroll: pageScroll, OrderItem: orderItem, ref: vue.ref, get onLoad() {
- return onLoad;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "common-page",
- style: { "padding": "0" }
- }, [
- vue.createVNode($setup["PageScroll"], {
- requestStr: "/app/orderinfo/getOrderListByUserId",
- onUpdateList: $setup.updateList,
- ref: "scrollRef",
- otherParams: $setup.otherParams,
- method: "get"
- }, {
- default: vue.withCtx(() => [
- $setup.dataList.length ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "list-con"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.dataList, (cell) => {
- return vue.openBlock(), vue.createBlock($setup["OrderItem"], {
- key: cell.id,
- item: cell,
- class: "mt-20"
- }, null, 8, ["item"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- _: 1
- /* STABLE */
- }, 8, ["otherParams"])
- ]);
- }
- const PagesIndexDetailUserOrders = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$1c], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/user-orders.vue"]]);
- const _sfc_main$1c = {
- __name: "AuditorSelector",
- props: {
- show: {
- type: Boolean,
- default: false
- }
- },
- emits: ["update:show", "auditor-selected"],
- setup(__props, { expose: __expose, emit: __emit }) {
- __expose();
- const props2 = __props;
- const emit2 = __emit;
- const searchKeyword = vue.ref("");
- const searchResults = vue.ref([]);
- const historyAuditors = vue.ref(uni.getStorageSync("historyAuditors") || []);
- const checkUserId = vue.ref("");
- const auditorSearch = (name) => {
- formatAppLog("log", "at pages/index/detail/components/AuditorSelector.vue:66", name);
- uni.$u.http.get("/app/appUser/getCheckUser?name=" + name).then((res2) => {
- if (res2.code == 200) {
- searchResults.value = res2.data;
- }
- });
- };
- const handleSearch = () => {
- auditorSearch(searchKeyword.value);
- };
- const selectItem = vue.ref({});
- const selectAuditor = (item) => {
- checkUserId.value = item.userId;
- selectItem.value = item;
- };
- const handleClose = () => {
- emit2("update:show", false);
- searchKeyword.value = "";
- };
- const handleConfirm = () => {
- if (checkUserId.value) {
- emit2("auditor-selected", selectItem.value);
- uni.setStorageSync("checkUserInfo", selectItem.value);
- addToHistory(selectItem.value);
- handleClose();
- }
- };
- const addToHistory = (item) => {
- const existingIndex = historyAuditors.value.findIndex((auditor) => auditor.userId === item.userId);
- if (existingIndex !== -1) {
- historyAuditors.value.splice(existingIndex, 1);
- }
- historyAuditors.value.unshift(item);
- if (historyAuditors.value.length > 10) {
- historyAuditors.value.pop();
- }
- uni.setStorageSync("historyAuditors", historyAuditors.value);
- };
- vue.onMounted(() => {
- const storedHistory = uni.getStorageSync("historyAuditors") || [];
- historyAuditors.value = storedHistory;
- });
- const __returned__ = { props: props2, emit: emit2, searchKeyword, searchResults, historyAuditors, checkUserId, auditorSearch, handleSearch, selectItem, selectAuditor, handleClose, handleConfirm, addToHistory, ref: vue.ref, onMounted: vue.onMounted };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
- const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
- 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: "auditor-selector" }, [
- vue.createElementVNode("view", { style: { "flex": "1" } }, [
- vue.createCommentVNode(" Title "),
- vue.createElementVNode("view", { class: "header" }, [
- vue.createElementVNode("text", { class: "title" }, "绑定审核员")
- ]),
- vue.createCommentVNode(" Search Box "),
- vue.createElementVNode("view", { class: "search-box" }, [
- vue.createVNode(_component_u_search, {
- inputStyle: { "height": "80rpx", "font-size": "16px" },
- actionStyle: { "font-size": "16px", color: "#22ac38" },
- modelValue: $setup.searchKeyword,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchKeyword = $event),
- placeholder: "搜索审核员",
- "show-action": true,
- "action-text": "搜索",
- onSearch: $setup.handleSearch,
- onCustom: $setup.handleSearch
- }, null, 8, ["modelValue"])
- ]),
- vue.createCommentVNode(" Search Results "),
- $setup.searchResults.length > 0 ? (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.userName,
- plain: $setup.checkUserId !== item.userId,
- shape: "circle",
- onClick: ($event) => $setup.selectAuditor(item),
- size: "large"
- }, null, 8, ["text", "plain", "onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" History "),
- $setup.historyAuditors.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- 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.historyAuditors, (item) => {
- return vue.openBlock(), vue.createBlock(_component_u_tag, {
- key: item,
- text: item.userName,
- plain: $setup.checkUserId !== item.userId,
- shape: "circle",
- onClick: ($event) => $setup.selectAuditor(item),
- size: "large"
- }, null, 8, ["text", "plain", "onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createCommentVNode(" Footer Buttons "),
- 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 AuditorSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$1b], ["__scopeId", "data-v-8d9417b9"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/components/AuditorSelector.vue"]]);
- const props$b = {
- props: {
- // 输入框的内容
- value: {
- type: [String, Number],
- default: props$G.textarea.value
- },
- // 输入框的内容
- modelValue: {
- type: [String, Number],
- default: props$G.textarea.value
- },
- // 输入框为空时占位符
- placeholder: {
- type: [String, Number],
- default: props$G.textarea.placeholder
- },
- // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
- placeholderClass: {
- type: String,
- default: props$G.input.placeholderClass
- },
- // 指定placeholder的样式
- placeholderStyle: {
- type: [String, Object],
- default: props$G.input.placeholderStyle
- },
- // 输入框高度
- height: {
- type: [String, Number],
- default: props$G.textarea.height
- },
- // 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效
- confirmType: {
- type: String,
- default: props$G.textarea.confirmType
- },
- // 是否禁用
- disabled: {
- type: Boolean,
- default: props$G.textarea.disabled
- },
- // 是否显示统计字数
- count: {
- type: Boolean,
- default: props$G.textarea.count
- },
- // 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现
- focus: {
- type: Boolean,
- default: props$G.textarea.focus
- },
- // 是否自动增加高度
- autoHeight: {
- type: Boolean,
- default: props$G.textarea.autoHeight
- },
- // 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true
- fixed: {
- type: Boolean,
- default: props$G.textarea.fixed
- },
- // 指定光标与键盘的距离
- cursorSpacing: {
- type: Number,
- default: props$G.textarea.cursorSpacing
- },
- // 指定focus时的光标位置
- cursor: {
- type: [String, Number],
- default: props$G.textarea.cursor
- },
- // 是否显示键盘上方带有”完成“按钮那一栏,
- showConfirmBar: {
- type: Boolean,
- default: props$G.textarea.showConfirmBar
- },
- // 光标起始位置,自动聚焦时有效,需与selection-end搭配使用
- selectionStart: {
- type: Number,
- default: props$G.textarea.selectionStart
- },
- // 光标结束位置,自动聚焦时有效,需与selection-start搭配使用
- selectionEnd: {
- type: Number,
- default: props$G.textarea.selectionEnd
- },
- // 键盘弹起时,是否自动上推页面
- adjustPosition: {
- type: Boolean,
- default: props$G.textarea.adjustPosition
- },
- // 是否去掉 iOS 下的默认内边距,只微信小程序有效
- disableDefaultPadding: {
- type: Boolean,
- default: props$G.textarea.disableDefaultPadding
- },
- // focus时,点击页面的时候不收起键盘,只微信小程序有效
- holdKeyboard: {
- type: Boolean,
- default: props$G.textarea.holdKeyboard
- },
- // 最大输入长度,设置为 -1 的时候不限制最大长度
- maxlength: {
- type: [String, Number],
- default: props$G.textarea.maxlength
- },
- // 边框类型,surround-四周边框,bottom-底部边框
- border: {
- type: String,
- default: props$G.textarea.border
- },
- // 用于处理或者过滤输入框内容的方法
- formatter: {
- type: [Function, null],
- default: props$G.textarea.formatter
- },
- // 是否忽略组件内对文本合成系统事件的处理
- ignoreCompositionEvent: {
- type: Boolean,
- default: true
- }
- }
- };
- const _sfc_main$1b = {
- name: "u-textarea",
- mixins: [mpMixin, mixin, props$b],
- 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$1a(_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$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$1a], ["__scopeId", "data-v-b6c174a6"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-textarea/u-textarea.vue"]]);
- const props$a = {
- props: {
- // 背景颜色(默认transparent)
- bgColor: {
- type: String,
- default: props$G.gap.bgColor
- },
- // 分割槽高度,单位px(默认30)
- height: {
- type: [String, Number],
- default: props$G.gap.height
- },
- // 与上一个组件的距离
- marginTop: {
- type: [String, Number],
- default: props$G.gap.marginTop
- },
- // 与下一个组件的距离
- marginBottom: {
- type: [String, Number],
- default: props$G.gap.marginBottom
- }
- }
- };
- const _sfc_main$1a = {
- name: "u-gap",
- mixins: [mpMixin, mixin, props$a],
- computed: {
- gapStyle() {
- const style = {
- backgroundColor: this.bgColor,
- height: uni.$u.addUnit(this.height),
- marginTop: uni.$u.addUnit(this.marginTop),
- marginBottom: uni.$u.addUnit(this.marginBottom)
- };
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- }
- }
- };
- function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "u-gap",
- style: vue.normalizeStyle([$options.gapStyle])
- },
- null,
- 4
- /* STYLE */
- );
- }
- const __easycom_3$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$19], ["__scopeId", "data-v-6fe44ee6"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-gap/u-gap.vue"]]);
- const props$9 = {
- props: {
- // 操作菜单是否展示 (默认false)
- show: {
- type: Boolean,
- default: props$G.actionSheet.show
- },
- // 标题
- title: {
- type: String,
- default: props$G.actionSheet.title
- },
- // 选项上方的描述信息
- description: {
- type: String,
- default: props$G.actionSheet.description
- },
- // 数据
- actions: {
- type: Array,
- default: props$G.actionSheet.actions
- },
- // 取消按钮的文字,不为空时显示按钮
- cancelText: {
- type: String,
- default: props$G.actionSheet.cancelText
- },
- // 点击某个菜单项时是否关闭弹窗
- closeOnClickAction: {
- type: Boolean,
- default: props$G.actionSheet.closeOnClickAction
- },
- // 处理底部安全区(默认true)
- safeAreaInsetBottom: {
- type: Boolean,
- default: props$G.actionSheet.safeAreaInsetBottom
- },
- // 小程序的打开方式
- openType: {
- type: String,
- default: props$G.actionSheet.openType
- },
- // 点击遮罩是否允许关闭 (默认true)
- closeOnClickOverlay: {
- type: Boolean,
- default: props$G.actionSheet.closeOnClickOverlay
- },
- // 圆角值
- round: {
- type: [Boolean, String, Number],
- default: props$G.actionSheet.round
- }
- }
- };
- const _sfc_main$19 = {
- name: "u-action-sheet",
- // 一些props参数和methods方法,通过mixin混入,因为其他文件也会用到
- mixins: [openType, button, mixin, props$9],
- data() {
- return {};
- },
- computed: {
- // 操作项目的样式
- itemStyle() {
- return (index2) => {
- let style = {};
- if (this.actions[index2].color)
- style.color = this.actions[index2].color;
- if (this.actions[index2].fontSize)
- style.fontSize = uni.$u.addUnit(this.actions[index2].fontSize);
- if (this.actions[index2].disabled)
- style.color = "#c0c4cc";
- return style;
- };
- }
- },
- methods: {
- closeHandler() {
- if (this.closeOnClickOverlay) {
- this.$emit("close");
- }
- },
- // 点击取消按钮
- cancel() {
- this.$emit("close");
- },
- selectHandler(index2) {
- const item = this.actions[index2];
- if (item && !item.disabled && !item.loading) {
- this.$emit("select", item);
- if (this.closeOnClickAction) {
- this.$emit("close");
- }
- }
- }
- }
- };
- function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$c);
- const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
- const _component_u_gap = resolveEasycom(vue.resolveDynamicComponent("u-gap"), __easycom_3$2);
- const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
- return vue.openBlock(), vue.createBlock(_component_u_popup, {
- show: _ctx.show,
- mode: "bottom",
- onClose: $options.closeHandler,
- safeAreaInsetBottom: _ctx.safeAreaInsetBottom,
- round: _ctx.round
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "u-action-sheet" }, [
- _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "u-action-sheet__header"
- }, [
- vue.createElementVNode(
- "text",
- { class: "u-action-sheet__header__title u-line-1" },
- vue.toDisplayString(_ctx.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "u-action-sheet__header__icon-wrap",
- onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.cancel && $options.cancel(...args), ["stop"]))
- }, [
- vue.createVNode(_component_u_icon, {
- name: "close",
- size: "17",
- color: "#c8c9cc",
- bold: ""
- })
- ])
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.description ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- class: "u-action-sheet__description",
- style: vue.normalizeStyle([{
- marginTop: `${_ctx.title && _ctx.description ? 0 : "18px"}`
- }])
- },
- vue.toDisplayString(_ctx.description),
- 5
- /* TEXT, STYLE */
- )) : vue.createCommentVNode("v-if", true),
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
- _ctx.description ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "u-action-sheet__item-wrap" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.actions, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
- vue.createElementVNode("view", {
- class: "u-action-sheet__item-wrap__item",
- onClick: vue.withModifiers(($event) => $options.selectHandler(index2), ["stop"]),
- "hover-class": !item.disabled && !item.loading ? "u-action-sheet--hover" : "",
- "hover-stay-time": 150
- }, [
- !item.loading ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- [
- vue.createElementVNode(
- "text",
- {
- class: "u-action-sheet__item-wrap__item__name",
- style: vue.normalizeStyle([$options.itemStyle(index2)])
- },
- vue.toDisplayString(item.name),
- 5
- /* TEXT, STYLE */
- ),
- item.subname ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "u-action-sheet__item-wrap__item__subname"
- },
- vue.toDisplayString(item.subname),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : (vue.openBlock(), vue.createBlock(_component_u_loading_icon, {
- key: 1,
- "custom-class": "van-action-sheet__loading",
- size: "18",
- mode: "circle"
- }))
- ], 8, ["onClick", "hover-class"]),
- index2 !== _ctx.actions.length - 1 ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ], true),
- _ctx.cancelText ? (vue.openBlock(), vue.createBlock(_component_u_gap, {
- key: 2,
- bgColor: "#eaeaec",
- height: "6"
- })) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { "hover-class": "u-action-sheet--hover" }, [
- _ctx.cancelText ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers(() => {
- }, ["stop", "prevent"])),
- "hover-stay-time": 150,
- class: "u-action-sheet__cancel-text",
- onClick: _cache[2] || (_cache[2] = (...args) => $options.cancel && $options.cancel(...args))
- },
- vue.toDisplayString(_ctx.cancelText),
- 33
- /* TEXT, NEED_HYDRATION */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ]),
- _: 3
- /* FORWARDED */
- }, 8, ["show", "onClose", "safeAreaInsetBottom", "round"]);
- }
- const __easycom_4$2 = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$18], ["__scopeId", "data-v-69669810"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-action-sheet/u-action-sheet.vue"]]);
- const _sfc_main$18 = {
- __name: "SmsModal",
- props: {
- "modelValue": { type: Boolean },
- "modelModifiers": {}
- },
- emits: /* @__PURE__ */ vue.mergeModels(["success"], ["update:modelValue"]),
- setup(__props, { expose: __expose, emit: __emit }) {
- const { proxy } = vue.getCurrentInstance();
- const emit2 = __emit;
- const visible = vue.useModel(__props, "modelValue");
- const formRef = vue.ref();
- const smsRecords = vue.ref([]);
- const form = vue.reactive({
- orderId: null,
- type: "",
- remark: ""
- });
- const smsContentList = vue.ref([]);
- const handleChangeType = (val) => {
- const selectedItem = smsContentList.value.find((item) => item.type === val);
- if (selectedItem) {
- form.remark = selectedItem.smsContent;
- }
- };
- const rules2 = vue.reactive({
- type: [
- {
- required: true,
- message: "请选择短信类型",
- trigger: "change"
- }
- ],
- remark: [
- {
- required: true,
- message: "请输入短信预览",
- trigger: "blur"
- }
- ]
- });
- const handleCancel = () => {
- visible.value = false;
- resetForm();
- };
- const resetForm = () => {
- var _a;
- form.orderId = null;
- form.type = "";
- form.remark = "";
- smsRecords.value = [];
- smsContentList.value = [];
- (_a = formRef.value) == null ? void 0 : _a.resetFields();
- };
- const handleOpen = (orderId) => {
- resetForm();
- if (orderId) {
- formatAppLog("log", "at pages/index/detail/components/SmsModal.vue:152", "打开短信弹窗,订单ID:", orderId);
- visible.value = true;
- getSmsLogInfo(orderId);
- }
- };
- const getSmsLogInfo = (orderId) => {
- uni.$u.http.get(`/app/orderinfo/orderSmsLog/${orderId}`).then((res2) => {
- if (res2.code === 200) {
- let data = res2.data || {};
- form.orderId = data.orderId;
- smsRecords.value = data.smsLogList || [];
- smsContentList.value = data.smsContentList || [];
- } else {
- uni.$u.toast(res2.msg || "获取短信记录失败");
- }
- }).catch((err) => {
- formatAppLog("error", "at pages/index/detail/components/SmsModal.vue:170", "获取短信记录失败:", err);
- uni.$u.toast("获取短信记录失败");
- });
- };
- const handleSubmit = () => {
- var _a;
- (_a = formRef.value) == null ? void 0 : _a.validate().then((valid) => {
- if (!valid)
- return;
- uni.$u.http.post("/app/orderinfo/orderSmsLogSend", {
- orderId: form.orderId,
- type: form.type
- }).then((res2) => {
- if (res2.code == 200) {
- uni.$u.toast("短信发送成功");
- emit2("success");
- handleCancel();
- } else {
- uni.$u.toast(res2.msg || "短信发送失败");
- }
- }).catch((err) => {
- formatAppLog("error", "at pages/index/detail/components/SmsModal.vue:192", "短信发送失败:", err);
- uni.$u.toast("短信发送失败");
- });
- }).catch((err) => {
- formatAppLog("log", "at pages/index/detail/components/SmsModal.vue:196", "表单验证失败:", err);
- });
- };
- __expose({
- handleOpen
- });
- const __returned__ = { proxy, emit: emit2, visible, formRef, smsRecords, form, smsContentList, handleChangeType, rules: rules2, handleCancel, resetForm, handleOpen, getSmsLogInfo, handleSubmit, ref: vue.ref, reactive: vue.reactive, nextTick: vue.nextTick, getCurrentInstance: vue.getCurrentInstance };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
- const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$5);
- const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
- const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$3);
- const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$6);
- const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
- return vue.openBlock(), vue.createBlock(_component_u_modal, {
- show: $setup.visible,
- title: "推送短信",
- "show-cancel-button": true,
- showCancelButton: true,
- "show-confirm-button": true,
- showConfirmButton: true,
- confirmText: "确定",
- cancelText: "关闭",
- onConfirm: $setup.handleSubmit,
- onCancel: $setup.handleCancel,
- onClose: $setup.handleCancel,
- width: "650rpx"
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "modal-content" }, [
- vue.createVNode(_component_u_form, {
- ref: "formRef",
- model: $setup.form,
- rules: $setup.rules,
- labelWidth: "120",
- labelPosition: "top"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_form_item, {
- label: "短信类型",
- prop: "type",
- required: ""
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_radio_group, {
- modelValue: $setup.form.type,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.type = $event),
- placement: "column",
- onChange: $setup.handleChangeType
- }, {
- default: vue.withCtx(() => [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.smsContentList, (item) => {
- return vue.openBlock(), vue.createBlock(_component_u_radio, {
- key: item.type,
- name: item.type,
- label: item.typeName
- }, null, 8, ["name", "label"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- label: "短信预览",
- prop: "remark",
- required: ""
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_textarea, {
- modelValue: $setup.form.remark,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.remark = $event),
- placeholder: "请输入短信预览",
- disabled: true,
- rows: 4,
- count: ""
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, { label: "推送历史" }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "sms-history" }, [
- $setup.smsRecords.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "no-data"
- }, [
- vue.createElementVNode("text", null, "暂无推送记录")
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "history-list"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.smsRecords, (record, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: record.id || index2,
- class: "history-item"
- }, [
- vue.createElementVNode("view", { class: "history-header" }, [
- vue.createElementVNode(
- "text",
- { class: "sender" },
- vue.toDisplayString(record.createName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "time" },
- vue.toDisplayString(record.createTime),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["status", record.status == 1 ? "success" : "fail"])
- },
- vue.toDisplayString(record.status == 1 ? "成功" : "失败"),
- 3
- /* TEXT, CLASS */
- )
- ]),
- vue.createElementVNode("view", { class: "history-content" }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(record.smsContent),
- 1
- /* TEXT */
- )
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]))
- ])
- ]),
- _: 1
- /* STABLE */
- })
- ]),
- _: 1
- /* STABLE */
- }, 8, ["model", "rules"])
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["show"]);
- }
- const SmsModal = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$17], ["__scopeId", "data-v-3cc29a87"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/components/SmsModal.vue"]]);
- const _sfc_main$17 = {
- __name: "OrderInfo",
- props: {
- orderId: String,
- estimatedAmount: Number,
- userNote: String,
- detail: Object
- // Add more props as needed
- },
- emits: ["refresh"],
- setup(__props, { expose: __expose, emit: __emit }) {
- __expose();
- const props2 = __props;
- let finalExpressList = { 1: "顺丰快递", 2: "京东快递", 3: "德邦快递" };
- let finalExpressText = vue.computed(() => {
- return props2.detail.finalExpress ? finalExpressList[props2.detail.finalExpress] : "";
- });
- function playGlobalSound() {
- uni.$u.playClickSound();
- }
- const statusEnum = {
- 0: "创建",
- 1: "用户删除",
- 2: "下单(待初审)",
- 3: "初审(待取书)",
- 4: "初审未通过",
- 5: "快递取书(待签收)",
- 6: "快递签收(待收货)",
- 7: "物流签收(路由异常)",
- 8: "仓库收货(待审核)",
- 9: "审核中(审核未提交)",
- 10: "已审核(待付款)",
- 11: "已完成"
- };
- let statusText = vue.computed(() => {
- return statusEnum[props2.detail.status] || "未知状态";
- });
- const maskedSendMobile = vue.computed(() => {
- if (props2.detail.sendMobile && props2.detail.sendMobile.length === 11) {
- return props2.detail.sendMobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
- }
- return props2.detail.sendMobile;
- });
- function copyToClipboard(text) {
- uni.setClipboardData({
- data: text,
- success: function() {
- uni.showToast({
- title: "复制成功",
- icon: "success"
- });
- },
- fail: function(err) {
- formatAppLog("error", "at pages/index/detail/components/OrderInfo.vue:148", "Could not copy text: ", err);
- }
- });
- }
- const showModal = vue.ref(false);
- const internalRemark = vue.ref("");
- function fillRemark(text) {
- internalRemark.value = text;
- }
- const remarkInfo = vue.ref({});
- function handleRemark() {
- var _a;
- showModal.value = true;
- remarkInfo.value = ((_a = props2.detail.manageRemark) == null ? void 0 : _a[0]) || {};
- internalRemark.value = remarkInfo.value.remark || "";
- }
- function handleCancel() {
- showModal.value = false;
- playGlobalSound();
- }
- const emit2 = __emit;
- function confirmRemark() {
- playGlobalSound();
- uni.$u.http.post("/app/orderinfo/setManageRemark", {
- orderId: props2.detail.orderId,
- remark: internalRemark.value,
- id: remarkInfo.value.id
- }).then((res2) => {
- if (res2.code == 200) {
- uni.$u.toast("保存成功");
- uni.$u.ttsModule.speak("保存成功");
- showModal.value = false;
- emit2("refresh");
- } else {
- uni.$u.toast(res2.msg);
- }
- });
- }
- const showActionSheet = vue.ref(false);
- const actionSheetActions = vue.ref([
- {
- name: "发送短信(手机发送)",
- value: "sms"
- },
- {
- name: "一键发送短信(服务器发送)",
- value: "server_sms"
- },
- {
- name: "QQ",
- value: "qq"
- },
- {
- name: "微信",
- value: "wechat"
- },
- {
- name: "取消",
- value: "cancel"
- }
- ]);
- function handleWeixin() {
- playGlobalSound();
- showActionSheet.value = true;
- }
- function closeActionSheet() {
- showActionSheet.value = false;
- }
- function selectAction(item) {
- playGlobalSound();
- showActionSheet.value = false;
- if (item.value === "server_sms") {
- handleSendSMS();
- } else if (item.value == "cancel") {
- closeActionSheet();
- } else {
- uni.showToast({
- title: "此功能暂无开放",
- icon: "none"
- });
- }
- }
- const showSmsModal = vue.ref(false);
- const smsModalRef = vue.ref();
- function handleSendSMS() {
- playGlobalSound();
- if (smsModalRef.value && props2.detail.orderId) {
- smsModalRef.value.handleOpen(props2.detail.orderId);
- } else {
- uni.showToast({
- title: "订单信息异常",
- icon: "none"
- });
- }
- }
- function handleSmsSuccess() {
- uni.showToast({
- title: "短信发送成功",
- icon: "success"
- });
- uni.$u.ttsModule.speak("短信发送成功");
- }
- const __returned__ = { props: props2, get finalExpressList() {
- return finalExpressList;
- }, set finalExpressList(v) {
- finalExpressList = v;
- }, get finalExpressText() {
- return finalExpressText;
- }, set finalExpressText(v) {
- finalExpressText = v;
- }, playGlobalSound, statusEnum, get statusText() {
- return statusText;
- }, set statusText(v) {
- statusText = v;
- }, maskedSendMobile, copyToClipboard, showModal, internalRemark, fillRemark, remarkInfo, handleRemark, handleCancel, emit: emit2, confirmRemark, showActionSheet, actionSheetActions, handleWeixin, closeActionSheet, selectAction, showSmsModal, smsModalRef, handleSendSMS, handleSmsSuccess, computed: vue.computed, ref: vue.ref, watch: vue.watch, SmsModal };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
- var _a, _b, _c, _d;
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$3);
- const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
- const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
- const _component_u_action_sheet = resolveEasycom(vue.resolveDynamicComponent("u-action-sheet"), __easycom_4$2);
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "order-info bg-white" }, [
- vue.createElementVNode("view", { class: "info-item flex" }, [
- vue.createElementVNode("text", { class: "label" }, "订单编号"),
- vue.createElementVNode(
- "text",
- {
- style: { "color": "#22ac38" },
- class: "flex-1 text-center content",
- onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyToClipboard($props.detail.orderId))
- },
- vue.toDisplayString($props.detail.orderId),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-item" }, [
- vue.createElementVNode("text", { class: "label" }, "预估金额"),
- vue.createElementVNode(
- "text",
- { class: "content" },
- vue.toDisplayString($props.detail.expectMoney),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "label border-left" }, "审核金额"),
- vue.createElementVNode(
- "text",
- { class: "content" },
- vue.toDisplayString($props.detail.finalMoney),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-item" }, [
- vue.createElementVNode("text", { class: "label" }, "用户备注"),
- vue.createElementVNode(
- "text",
- { class: "content" },
- vue.toDisplayString($props.detail.userRemark),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", {
- class: "info-item",
- onClick: $setup.handleRemark
- }, [
- vue.createElementVNode("text", { class: "label" }, "内部备注"),
- vue.createElementVNode(
- "text",
- { class: "content" },
- vue.toDisplayString(((_a = $props.detail) == null ? void 0 : _a.manageRemark) ? ((_b = $props.detail) == null ? void 0 : _b.manageRemark.length) > 0 ? (_d = (_c = $props.detail) == null ? void 0 : _c.manageRemark[0]) == null ? void 0 : _d.remark : " " : " "),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-item" }, [
- vue.createElementVNode("text", { class: "label" }, "订单状态"),
- vue.createElementVNode(
- "text",
- {
- class: "content",
- style: { "color": "#c5493e" }
- },
- "[" + vue.toDisplayString($setup.statusText) + "]",
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-item" }, [
- vue.createElementVNode("text", { class: "label" }, "快递"),
- vue.createElementVNode("text", { class: "content" }, [
- vue.createTextVNode(
- vue.toDisplayString($setup.finalExpressText),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- {
- style: { "color": "#409eef" },
- onClick: _cache[1] || (_cache[1] = ($event) => $setup.copyToClipboard($props.detail.waybillCode))
- },
- "(单号:" + vue.toDisplayString($props.detail.waybillCode) + ")",
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "info-item" }, [
- vue.createElementVNode("text", { class: "label" }, [
- vue.createTextVNode("发件人"),
- vue.createElementVNode("text", { style: { "color": "#e99d42" } }, "(所有单)")
- ]),
- vue.createElementVNode("view", { class: "content flex flex-a-c flex-j-c" }, [
- vue.createElementVNode("text", {
- class: "content-text",
- onClick: _cache[2] || (_cache[2] = ($event) => $setup.copyToClipboard($props.detail.sendMobile))
- }, "复制"),
- vue.createElementVNode(
- "text",
- { class: "content-text ml-10 mr-10" },
- vue.toDisplayString($setup.maskedSendMobile),
- 1
- /* TEXT */
- ),
- $props.detail.orderFrom == 1 ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
- key: 0,
- name: "weixin-circle-fill",
- size: "18",
- color: "#22ac38",
- onClick: $setup.handleWeixin
- })) : vue.createCommentVNode("v-if", true),
- $props.detail.orderFrom == 2 ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
- key: 1,
- name: "zhifubao-circle-fill",
- size: "18",
- color: "#999",
- onClick: $setup.handleWeixin
- })) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createElementVNode("view", { class: "info-item" }, [
- vue.createElementVNode("text", { class: "label" }, "发货地址"),
- vue.createElementVNode(
- "text",
- { class: "content" },
- vue.toDisplayString($props.detail.sendAddress),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-item" }, [
- vue.createElementVNode("text", { class: "label" }, "收货仓库"),
- vue.createElementVNode(
- "text",
- { class: "content" },
- vue.toDisplayString($props.detail.recipientAddress) + "-" + vue.toDisplayString($props.detail.recipientGodown) + "-" + vue.toDisplayString($props.detail.recipientName),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createVNode(_component_u_modal, {
- show: $setup.showModal,
- title: "编辑内部备注",
- showCancelButton: true,
- onConfirm: $setup.confirmRemark,
- onCancel: $setup.handleCancel
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", {
- class: "modal-content w100",
- onClick: $setup.playGlobalSound
- }, [
- vue.createVNode(_component_u_textarea, {
- modelValue: $setup.internalRemark,
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.internalRemark = $event),
- placeholder: "编辑内部备注",
- autoHeight: "",
- style: { "min-height": "100px" }
- }, null, 8, ["modelValue"]),
- vue.createElementVNode("view", { class: "mt-20 common-title" }, "快速填入"),
- vue.createElementVNode("view", { class: "quick-fill mt-16" }, [
- vue.createVNode(_component_u_tag, {
- class: "mr-10 mb-10",
- onClick: _cache[4] || (_cache[4] = ($event) => $setup.fillRemark("少书给客服")),
- text: "少书给客服"
- }),
- vue.createVNode(_component_u_tag, {
- class: "mr-10 mb-10",
- onClick: _cache[5] || (_cache[5] = ($event) => $setup.fillRemark("多书给客服")),
- text: "多书给客服"
- }),
- vue.createVNode(_component_u_tag, {
- class: "mr-10 mb-10",
- onClick: _cache[6] || (_cache[6] = ($event) => $setup.fillRemark("子母件")),
- text: "子母件"
- }),
- vue.createVNode(_component_u_tag, {
- class: "mr-10 mb-10",
- onClick: _cache[7] || (_cache[7] = ($event) => $setup.fillRemark("书单不符给客服")),
- text: "书单不符给客服"
- }),
- vue.createVNode(_component_u_tag, {
- class: "mr-10 mb-10",
- onClick: _cache[8] || (_cache[8] = ($event) => $setup.fillRemark("需理赔给客服")),
- text: "需理赔给客服"
- })
- ])
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["show"]),
- vue.createVNode(_component_u_action_sheet, {
- show: $setup.showActionSheet,
- "show-cancel": true,
- actions: $setup.actionSheetActions,
- title: "发送短信",
- onClose: $setup.closeActionSheet,
- onSelect: $setup.selectAction
- }, null, 8, ["show", "actions"]),
- vue.createCommentVNode(" 短信推送弹窗 "),
- vue.createVNode($setup["SmsModal"], {
- ref: "smsModalRef",
- modelValue: $setup.showSmsModal,
- "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $setup.showSmsModal = $event),
- onSuccess: $setup.handleSmsSuccess
- }, null, 8, ["modelValue"])
- ]);
- }
- const OrderInfo = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$16], ["__scopeId", "data-v-034ad4bc"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/components/OrderInfo.vue"]]);
- const _sfc_main$16 = {
- __name: "UserInfoCard",
- props: {
- detail: {
- type: Object,
- default: () => ({})
- }
- },
- setup(__props, { expose: __expose }) {
- __expose();
- const props2 = __props;
- const handleUserOrders = () => {
- uni.redirectTo({
- url: `/pages/index/detail/user-orders?userId=${props2.detail.userId}`
- });
- };
- const formattedName = vue.computed(() => {
- var _a, _b;
- return ((_b = (_a = props2.detail) == null ? void 0 : _a.userNick) == null ? void 0 : _b.charAt(0)) + "**";
- });
- const statusClass = vue.computed(() => {
- return props2.detail.userStatus == 1 ? "color-green" : "color-red";
- });
- const blacklistAction = vue.computed(() => {
- return props2.detail.userStatus == 1 ? "加入黑名单" : "移除黑名单";
- });
- const showModal = vue.ref(false);
- const showBlacklistModal = vue.ref(false);
- const reason = vue.ref("");
- const toggleBlacklist = () => {
- showBlacklistModal.value = true;
- };
- const confirmBlacklist = () => {
- let apiStr = props2.detail.userStatus == 1 ? "/app/appUser/setUserBlack" : "app/appUser/removeUserBlack";
- uni.$u.http.post(apiStr, {
- userId: props2.detail.userId,
- reason: reason.value
- }).then((res2) => {
- if (res2.code == 200) {
- uni.$u.toast("操作成功");
- showBlacklistModal.value = false;
- props2.detail.userStatus = props2.detail.userStatus == 1 ? 2 : 1;
- } else {
- uni.$u.toast(res2.msg);
- }
- });
- };
- const __returned__ = { props: props2, handleUserOrders, formattedName, statusClass, blacklistAction, showModal, showBlacklistModal, reason, toggleBlacklist, confirmBlacklist, ref: vue.ref, computed: vue.computed };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
- return vue.openBlock(), vue.createElementBlock("view", { class: "user-info-card bg-white mt-16" }, [
- vue.createElementVNode("view", { class: "header" }, [
- vue.createElementVNode(
- "text",
- { style: { "color": "#666" } },
- vue.toDisplayString($props.detail.orderTime),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", {
- onClick: _cache[0] || (_cache[0] = ($event) => $setup.showModal = true),
- class: "color-green"
- }, "[查看订单日志]")
- ]),
- vue.createElementVNode("view", { class: "content flex flex-j-b" }, [
- vue.createElementVNode("image", {
- src: $props.detail.imgPath,
- class: "user-image"
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "flex flex-a-e flex-1 ml-12" }, [
- vue.createElementVNode("view", { class: "flex flex-d flex-1" }, [
- vue.createElementVNode("text", {
- class: "color-green",
- onClick: $setup.handleUserOrders
- }, [
- vue.createTextVNode(
- vue.toDisplayString($setup.formattedName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { style: { "color": "#e99d42" } }, "(所有单)")
- ]),
- vue.createElementVNode(
- "text",
- {
- class: "common-text",
- style: { "margin-top": "10rpx" }
- },
- "共卖出" + vue.toDisplayString($props.detail.totalNum) + "本书",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "common-text" },
- "来自" + vue.toDisplayString($props.detail.sendSsq),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", {
- class: "common-text",
- style: { "margin-top": "10rpx" }
- }, [
- vue.createTextVNode("用户状态: "),
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass($setup.statusClass)
- },
- vue.toDisplayString($props.detail.userStatus == 1 ? "正常" : $props.detail.userStatus == 2 ? "黑名单" : "-"),
- 3
- /* TEXT, CLASS */
- )
- ])
- ]),
- vue.createElementVNode(
- "text",
- {
- style: { "min-width": "160rpx" },
- onClick: $setup.toggleBlacklist,
- class: "color-red"
- },
- "[" + vue.toDisplayString($setup.blacklistAction) + "]",
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createVNode(_component_u_modal, {
- show: $setup.showModal,
- "onUpdate:show": _cache[1] || (_cache[1] = ($event) => $setup.showModal = $event),
- title: "订单日志",
- showCancelButton: false,
- confirmText: "关闭",
- onConfirm: _cache[2] || (_cache[2] = ($event) => $setup.showModal = false),
- class: "log-modal"
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "log-container" }, [
- vue.createElementVNode("view", { class: "log-header" }, [
- vue.createElementVNode("text", null, "描述"),
- vue.createElementVNode("text", null, "操作人"),
- vue.createElementVNode("text", null, "时间")
- ]),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($props.detail.logVoList, (log, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "log-item",
- key: index2
- }, [
- vue.createElementVNode(
- "text",
- { class: "log-item-content" },
- vue.toDisplayString(log.statusName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "log-item-name" },
- vue.toDisplayString(log.createName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "log-item-time" },
- vue.toDisplayString(log.createTime),
- 1
- /* TEXT */
- )
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["show"]),
- vue.createVNode(_component_u_modal, {
- show: $setup.showBlacklistModal,
- "onUpdate:show": _cache[4] || (_cache[4] = ($event) => $setup.showBlacklistModal = $event),
- title: "拉黑用户",
- showCancelButton: true,
- confirmText: "提交",
- cancelText: "取消",
- onConfirm: $setup.confirmBlacklist,
- onCancel: _cache[5] || (_cache[5] = ($event) => $setup.showBlacklistModal = false)
- }, {
- default: vue.withCtx(() => [
- vue.withDirectives(vue.createElementVNode(
- "textarea",
- {
- class: "reason-textarea",
- placeholder: "请输入拉黑原因...",
- autoHeight: "",
- "bg-color": "#f8f8f8",
- "border-radius": "10rpx",
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.reason = $event),
- height: "100px"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $setup.reason]
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["show"])
- ]);
- }
- const UserInfoCard = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$15], ["__scopeId", "data-v-42a1a738"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/components/UserInfoCard.vue"]]);
- const _sfc_main$15 = {
- __name: "LogisticsTimeline",
- props: {
- list: {
- type: Array,
- default: []
- }
- },
- setup(__props, { expose: __expose }) {
- __expose();
- const props2 = __props;
- const __returned__ = { props: props2 };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- return vue.openBlock(), vue.createElementBlock("view", {
- "scroll-y": "",
- class: "timeline-container"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($props.list, (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: "title" },
- vue.toDisplayString(item.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "desc" },
- vue.toDisplayString(item.description),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "time" },
- vue.toDisplayString(item.time),
- 1
- /* TEXT */
- )
- ]),
- index2 < $props.list.length - 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "timeline-line"
- })) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]);
- }
- const LogisticsTimeline = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$14], ["__scopeId", "data-v-140e9488"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/components/LogisticsTimeline.vue"]]);
- const _sfc_main$14 = {
- __name: "BookItem",
- props: {
- item: Object,
- showClose: {
- type: Boolean,
- default: false
- }
- },
- setup(__props, { expose: __expose }) {
- __expose();
- const props2 = __props;
- const goodNum = vue.computed(() => {
- var _a;
- return ((_a = props2.item.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 1).length) || 0;
- });
- const badNum = vue.computed(() => {
- var _a;
- return ((_a = props2.item.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 3).length) || 0;
- });
- const reasons = vue.computed(() => {
- let list = props2.item.auditCommentList;
- if (!list)
- return "";
- if (list.length > 0) {
- let poorList = list.filter((v) => v.sts == 3);
- if (poorList.length == 0)
- return "";
- return poorList.map((v) => v.com).join(";");
- }
- });
- const __returned__ = { props: props2, goodNum, badNum, reasons, computed: vue.computed };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [
- vue.createElementVNode("view", { class: "flex w100" }, [
- vue.createElementVNode("view", { class: "flex-d" }, [
- vue.createElementVNode("image", {
- style: { "width": "70px", "height": "90px" },
- src: $props.item.cover,
- mode: "aspectFill"
- }, null, 8, ["src"]),
- !$props.showClose ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "quantity mt-24"
- },
- "数量: " + vue.toDisplayString($props.item.num),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
- vue.createElementVNode(
- "view",
- { class: "common-title mb-20" },
- vue.toDisplayString($props.item.bookName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
- vue.createElementVNode(
- "view",
- { class: "isbn" },
- "ISBN: " + vue.toDisplayString($props.item.isbn),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "set" },
- "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "不是"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
- vue.createElementVNode(
- "view",
- { class: "price" },
- "定价: " + vue.toDisplayString($props.item.bookPrice),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "estimate" },
- "预估单价: " + vue.toDisplayString(($props.item.recycleDiscount * $props.item.bookPrice * 0.1).toFixed(2)),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
- vue.createElementVNode(
- "view",
- { class: "discount" },
- "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "review" }, [
- vue.createTextVNode("审核金额: "),
- vue.createElementVNode(
- "text",
- { class: "color-red" },
- vue.toDisplayString($props.item.finalMoney || 0),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "quality mb-10" }, [
- vue.createTextVNode(
- " 品相: 良好(" + vue.toDisplayString($setup.goodNum) + ") 、 一般(" + vue.toDisplayString($props.item.averageNum || 0) + ") 、 ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass($props.item.badNum > 0 ? "color-red" : "")
- },
- "极差(" + vue.toDisplayString($setup.badNum) + ")",
- 3
- /* TEXT, CLASS */
- )
- ]),
- $setup.reasons ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "color-red"
- },
- "原因:" + vue.toDisplayString($setup.reasons),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ]);
- }
- const BookItem$2 = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$13], ["__scopeId", "data-v-a629889e"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/components/BookItem.vue"]]);
- const pinyin = {
- "a": "啊阿锕",
- "ai": "埃挨哎唉哀皑癌蔼矮艾碍爱隘诶捱嗳嗌嫒瑷暧砹锿霭",
- "an": "鞍氨安俺按暗岸胺案谙埯揞犴庵桉铵鹌顸黯",
- "ang": "肮昂盎",
- "ao": "凹敖熬翱袄傲奥懊澳坳拗嗷噢岙廒遨媪骜聱螯鏊鳌鏖",
- "ba": "芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸茇菝萆捭岜灞杷钯粑鲅魃",
- "bai": "白柏百摆佰败拜稗薜掰鞴",
- "ban": "斑班搬扳般颁板版扮拌伴瓣半办绊阪坂豳钣瘢癍舨",
- "bang": "邦帮梆榜膀绑棒磅蚌镑傍谤蒡螃",
- "bao": "苞胞包褒雹保堡饱宝抱报暴豹鲍爆勹葆宀孢煲鸨褓趵龅",
- "bo": "剥薄玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳亳蕃啵饽檗擘礴钹鹁簸跛",
- "bei": "杯碑悲卑北辈背贝钡倍狈备惫焙被孛陂邶埤蓓呗怫悖碚鹎褙鐾",
- "ben": "奔苯本笨畚坌锛",
- "beng": "崩绷甭泵蹦迸唪嘣甏",
- "bi": "逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛匕仳俾芘荜荸吡哔狴庳愎滗濞弼妣婢嬖璧贲畀铋秕裨筚箅篦舭襞跸髀",
- "bian": "鞭边编贬扁便变卞辨辩辫遍匾弁苄忭汴缏煸砭碥稹窆蝙笾鳊",
- "biao": "标彪膘表婊骠飑飙飚灬镖镳瘭裱鳔",
- "bie": "鳖憋别瘪蹩鳘",
- "bin": "彬斌濒滨宾摈傧浜缤玢殡膑镔髌鬓",
- "bing": "兵冰柄丙秉饼炳病并禀邴摒绠枋槟燹",
- "bu": "捕卜哺补埠不布步簿部怖拊卟逋瓿晡钚醭",
- "ca": "擦嚓礤",
- "cai": "猜裁材才财睬踩采彩菜蔡",
- "can": "餐参蚕残惭惨灿骖璨粲黪",
- "cang": "苍舱仓沧藏伧",
- "cao": "操糙槽曹草艹嘈漕螬艚",
- "ce": "厕策侧册测刂帻恻",
- "ceng": "层蹭噌",
- "cha": "插叉茬茶查碴搽察岔差诧猹馇汊姹杈楂槎檫钗锸镲衩",
- "chai": "拆柴豺侪茈瘥虿龇",
- "chan": "搀掺蝉馋谗缠铲产阐颤冁谄谶蒇廛忏潺澶孱羼婵嬗骣觇禅镡裣蟾躔",
- "chang": "昌猖场尝常长偿肠厂敞畅唱倡伥鬯苌菖徜怅惝阊娼嫦昶氅鲳",
- "chao": "超抄钞朝嘲潮巢吵炒怊绉晁耖",
- "che": "车扯撤掣彻澈坼屮砗",
- "chen": "郴臣辰尘晨忱沉陈趁衬称谌抻嗔宸琛榇肜胂碜龀",
- "cheng": "撑城橙成呈乘程惩澄诚承逞骋秤埕嵊徵浈枨柽樘晟塍瞠铖裎蛏酲",
- "chi": "吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽傺墀芪茌搋叱哧啻嗤彳饬沲媸敕胝眙眵鸱瘛褫蚩螭笞篪豉踅踟魑",
- "chong": "充冲虫崇宠茺忡憧铳艟",
- "chou": "抽酬畴踌稠愁筹仇绸瞅丑俦圳帱惆溴妯瘳雠鲋",
- "chu": "臭初出橱厨躇锄雏滁除楚础储矗搐触处亍刍憷绌杵楮樗蜍蹰黜",
- "chuan": "揣川穿椽传船喘串掾舛惴遄巛氚钏镩舡",
- "chuang": "疮窗幢床闯创怆",
- "chui": "吹炊捶锤垂陲棰槌",
- "chun": "春椿醇唇淳纯蠢促莼沌肫朐鹑蝽",
- "chuo": "戳绰蔟辶辍镞踔龊",
- "ci": "疵茨磁雌辞慈瓷词此刺赐次荠呲嵯鹚螅糍趑",
- "cong": "聪葱囱匆从丛偬苁淙骢琮璁枞",
- "cu": "凑粗醋簇猝殂蹙",
- "cuan": "蹿篡窜汆撺昕爨",
- "cui": "摧崔催脆瘁粹淬翠萃悴璀榱隹",
- "cun": "村存寸磋忖皴",
- "cuo": "撮搓措挫错厝脞锉矬痤鹾蹉躜",
- "da": "搭达答瘩打大耷哒嗒怛妲疸褡笪靼鞑",
- "dai": "呆歹傣戴带殆代贷袋待逮怠埭甙呔岱迨逯骀绐玳黛",
- "dan": "耽担丹单郸掸胆旦氮但惮淡诞弹蛋亻儋卩萏啖澹檐殚赕眈瘅聃箪",
- "dang": "当挡党荡档谠凼菪宕砀铛裆",
- "dao": "刀捣蹈倒岛祷导到稻悼道盗叨啁忉洮氘焘忑纛",
- "de": "德得的锝",
- "deng": "蹬灯登等瞪凳邓噔嶝戥磴镫簦",
- "di": "堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔氐籴诋谛邸坻莜荻嘀娣柢棣觌砥碲睇镝羝骶",
- "dian": "颠掂滇碘点典靛垫电佃甸店惦奠淀殿丶阽坫埝巅玷癜癫簟踮",
- "diao": "碉叼雕凋刁掉吊钓调轺铞蜩粜貂",
- "die": "跌爹碟蝶迭谍叠佚垤堞揲喋渫轶牒瓞褶耋蹀鲽鳎",
- "ding": "丁盯叮钉顶鼎锭定订丢仃啶玎腚碇町铤疔耵酊",
- "dong": "东冬董懂动栋侗恫冻洞垌咚岽峒夂氡胨胴硐鸫",
- "dou": "兜抖斗陡豆逗痘蔸钭窦窬蚪篼酡",
- "du": "都督毒犊独读堵睹赌杜镀肚度渡妒芏嘟渎椟橐牍蠹笃髑黩",
- "duan": "端短锻段断缎彖椴煅簖",
- "dui": "堆兑队对怼憝碓",
- "dun": "墩吨蹲敦顿囤钝盾遁炖砘礅盹镦趸",
- "duo": "掇哆多夺垛躲朵跺舵剁惰堕咄哚缍柁铎裰踱",
- "e": "蛾峨鹅俄额讹娥恶厄扼遏鄂饿噩谔垩垭苊莪萼呃愕屙婀轭曷腭硪锇锷鹗颚鳄",
- "en": "恩蒽摁唔嗯",
- "er": "而儿耳尔饵洱二贰迩珥铒鸸鲕",
- "fa": "发罚筏伐乏阀法珐垡砝",
- "fan": "藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛蘩幡犭梵攵燔畈蹯",
- "fang": "坊芳方肪房防妨仿访纺放匚邡彷钫舫鲂",
- "fei": "菲非啡飞肥匪诽吠肺废沸费芾狒悱淝妃绋绯榧腓斐扉祓砩镄痱蜚篚翡霏鲱",
- "fen": "芬酚吩氛分纷坟焚汾粉奋份忿愤粪偾瀵棼愍鲼鼢",
- "feng": "丰封枫蜂峰锋风疯烽逢冯缝讽奉凤俸酆葑沣砜",
- "fu": "佛否夫敷肤孵扶拂辐幅氟符伏俘服浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐匐凫郛芙苻茯莩菔呋幞滏艴孚驸绂桴赙黻黼罘稃馥虍蚨蜉蝠蝮麸趺跗鳆",
- "ga": "噶嘎蛤尬呷尕尜旮钆",
- "gai": "该改概钙盖溉丐陔垓戤赅胲",
- "gan": "干甘杆柑竿肝赶感秆敢赣坩苷尴擀泔淦澉绀橄旰矸疳酐",
- "gang": "冈刚钢缸肛纲岗港戆罡颃筻",
- "gong": "杠工攻功恭龚供躬公宫弓巩汞拱贡共蕻廾咣珙肱蚣蛩觥",
- "gao": "篙皋高膏羔糕搞镐稿告睾诰郜蒿藁缟槔槁杲锆",
- "ge": "哥歌搁戈鸽胳疙割革葛格阁隔铬个各鬲仡哿塥嗝纥搿膈硌铪镉袼颌虼舸骼髂",
- "gei": "给",
- "gen": "根跟亘茛哏艮",
- "geng": "耕更庚羹埂耿梗哽赓鲠",
- "gou": "钩勾沟苟狗垢构购够佝诟岣遘媾缑觏彀鸲笱篝鞲",
- "gu": "辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇嘏诂菰哌崮汩梏轱牯牿胍臌毂瞽罟钴锢瓠鸪鹄痼蛄酤觚鲴骰鹘",
- "gua": "刮瓜剐寡挂褂卦诖呱栝鸹",
- "guai": "乖拐怪哙",
- "guan": "棺关官冠观管馆罐惯灌贯倌莞掼涫盥鹳鳏",
- "guang": "光广逛犷桄胱疒",
- "gui": "瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽匦刿庋宄妫桧炅晷皈簋鲑鳜",
- "gun": "辊滚棍丨衮绲磙鲧",
- "guo": "锅郭国果裹过馘蠃埚掴呙囗帼崞猓椁虢锞聒蜮蜾蝈",
- "ha": "哈",
- "hai": "骸孩海氦亥害骇咴嗨颏醢",
- "han": "酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉邗菡撖阚瀚晗焓颔蚶鼾",
- "hen": "夯痕很狠恨",
- "hang": "杭航沆绗珩桁",
- "hao": "壕嚎豪毫郝好耗号浩薅嗥嚆濠灏昊皓颢蚝",
- "he": "呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺诃劾壑藿嗑嗬阖盍蚵翮",
- "hei": "嘿黑",
- "heng": "哼亨横衡恒訇蘅",
- "hong": "轰哄烘虹鸿洪宏弘红黉讧荭薨闳泓",
- "hou": "喉侯猴吼厚候后堠後逅瘊篌糇鲎骺",
- "hu": "呼乎忽瑚壶葫胡蝴狐糊湖弧虎唬护互沪户冱唿囫岵猢怙惚浒滹琥槲轷觳烀煳戽扈祜鹕鹱笏醐斛",
- "hua": "花哗华猾滑画划化话劐浍骅桦铧稞",
- "huai": "槐徊怀淮坏还踝",
- "huan": "欢环桓缓换患唤痪豢焕涣宦幻郇奂垸擐圜洹浣漶寰逭缳锾鲩鬟",
- "huang": "荒慌黄磺蝗簧皇凰惶煌晃幌恍谎隍徨湟潢遑璜肓癀蟥篁鳇",
- "hui": "灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘诙茴荟蕙哕喙隳洄彗缋珲晖恚虺蟪麾",
- "hun": "荤昏婚魂浑混诨馄阍溷缗",
- "huo": "豁活伙火获或惑霍货祸攉嚯夥钬锪镬耠蠖",
- "ji": "击圾基机畸稽积箕肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪居丌乩剞佶佴脔墼芨芰萁蒺蕺掎叽咭哜唧岌嵴洎彐屐骥畿玑楫殛戟戢赍觊犄齑矶羁嵇稷瘠瘵虮笈笄暨跻跽霁鲚鲫髻麂",
- "jia": "嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁伽郏拮岬浃迦珈戛胛恝铗镓痂蛱笳袈跏",
- "jian": "歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件健舰剑饯渐溅涧建僭谏谫菅蒹搛囝湔蹇謇缣枧柙楗戋戬牮犍毽腱睑锏鹣裥笕箴翦趼踺鲣鞯",
- "jiang": "僵姜将浆江疆蒋桨奖讲匠酱降茳洚绛缰犟礓耩糨豇",
- "jiao": "蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫佼僬茭挢噍峤徼姣纟敫皎鹪蛟醮跤鲛",
- "jie": "窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届偈讦诘喈嗟獬婕孑桀獒碣锴疖袷颉蚧羯鲒骱髫",
- "jin": "巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸尽卺荩堇噤馑廑妗缙瑾槿赆觐钅锓衿矜",
- "jing": "劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净刭儆阱菁獍憬泾迳弪婧肼胫腈旌",
- "jiong": "炯窘冂迥扃",
- "jiu": "揪究纠玖韭久灸九酒厩救旧臼舅咎就疚僦啾阄柩桕鹫赳鬏",
- "ju": "鞠拘狙疽驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧倨讵苣苴莒掬遽屦琚枸椐榘榉橘犋飓钜锔窭裾趄醵踽龃雎鞫",
- "juan": "捐鹃娟倦眷卷绢鄄狷涓桊蠲锩镌隽",
- "jue": "撅攫抉掘倔爵觉决诀绝厥劂谲矍蕨噘崛獗孓珏桷橛爝镢蹶觖",
- "jun": "均菌钧军君峻俊竣浚郡骏捃狻皲筠麇",
- "ka": "喀咖卡佧咔胩",
- "ke": "咯坷苛柯棵磕颗科壳咳可渴克刻客课岢恪溘骒缂珂轲氪瞌钶疴窠蝌髁",
- "kai": "开揩楷凯慨剀垲蒈忾恺铠锎",
- "kan": "刊堪勘坎砍看侃凵莰莶戡龛瞰",
- "kang": "康慷糠扛抗亢炕坑伉闶钪",
- "kao": "考拷烤靠尻栲犒铐",
- "ken": "肯啃垦恳垠裉颀",
- "keng": "吭忐铿",
- "kong": "空恐孔控倥崆箜",
- "kou": "抠口扣寇芤蔻叩眍筘",
- "ku": "枯哭窟苦酷库裤刳堀喾绔骷",
- "kua": "夸垮挎跨胯侉",
- "kuai": "块筷侩快蒯郐蒉狯脍",
- "kuan": "宽款髋",
- "kuang": "匡筐狂框矿眶旷况诓诳邝圹夼哐纩贶",
- "kui": "亏盔岿窥葵奎魁傀馈愧溃馗匮夔隗揆喹喟悝愦阕逵暌睽聩蝰篑臾跬",
- "kun": "坤昆捆困悃阃琨锟醌鲲髡",
- "kuo": "括扩廓阔蛞",
- "la": "垃拉喇蜡腊辣啦剌摺邋旯砬瘌",
- "lai": "莱来赖崃徕涞濑赉睐铼癞籁",
- "lan": "蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥啉岚懔漤榄斓罱镧褴",
- "lang": "琅榔狼廊郎朗浪莨蒗啷阆锒稂螂",
- "lao": "捞劳牢老佬姥酪烙涝唠崂栳铑铹痨醪",
- "le": "勒乐肋仂叻嘞泐鳓",
- "lei": "雷镭蕾磊累儡垒擂类泪羸诔荽咧漯嫘缧檑耒酹",
- "ling": "棱冷拎玲菱零龄铃伶羚凌灵陵岭领另令酃塄苓呤囹泠绫柃棂瓴聆蛉翎鲮",
- "leng": "楞愣",
- "li": "厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐痢立粒沥隶力璃哩俪俚郦坜苈莅蓠藜捩呖唳喱猁溧澧逦娌嫠骊缡珞枥栎轹戾砺詈罹锂鹂疠疬蛎蜊蠡笠篥粝醴跞雳鲡鳢黧",
- "lian": "俩联莲连镰廉怜涟帘敛脸链恋炼练挛蔹奁潋濂娈琏楝殓臁膦裢蠊鲢",
- "liang": "粮凉梁粱良两辆量晾亮谅墚椋踉靓魉",
- "liao": "撩聊僚疗燎寥辽潦了撂镣廖料蓼尥嘹獠寮缭钌鹩耢",
- "lie": "列裂烈劣猎冽埒洌趔躐鬣",
- "lin": "琳林磷霖临邻鳞淋凛赁吝蔺嶙廪遴檩辚瞵粼躏麟",
- "liu": "溜琉榴硫馏留刘瘤流柳六抡偻蒌泖浏遛骝绺旒熘锍镏鹨鎏",
- "long": "龙聋咙笼窿隆垄拢陇弄垅茏泷珑栊胧砻癃",
- "lou": "楼娄搂篓漏陋喽嵝镂瘘耧蝼髅",
- "lu": "芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮垆摅撸噜泸渌漉璐栌橹轳辂辘氇胪镥鸬鹭簏舻鲈",
- "lv": "驴吕铝侣旅履屡缕虑氯律率滤绿捋闾榈膂稆褛",
- "luan": "峦孪滦卵乱栾鸾銮",
- "lue": "掠略锊",
- "lun": "轮伦仑沦纶论囵",
- "luo": "萝螺罗逻锣箩骡裸落洛骆络倮荦摞猡泺椤脶镙瘰雒",
- "ma": "妈麻玛码蚂马骂嘛吗唛犸嬷杩麽",
- "mai": "埋买麦卖迈脉劢荬咪霾",
- "man": "瞒馒蛮满蔓曼慢漫谩墁幔缦熳镘颟螨鳗鞔",
- "mang": "芒茫盲忙莽邙漭朦硭蟒",
- "meng": "氓萌蒙檬盟锰猛梦孟勐甍瞢懵礞虻蜢蠓艋艨黾",
- "miao": "猫苗描瞄藐秒渺庙妙喵邈缈缪杪淼眇鹋蜱",
- "mao": "茅锚毛矛铆卯茂冒帽貌贸侔袤勖茆峁瑁昴牦耄旄懋瞀蛑蝥蟊髦",
- "me": "么",
- "mei": "玫枚梅酶霉煤没眉媒镁每美昧寐妹媚坶莓嵋猸浼湄楣镅鹛袂魅",
- "men": "门闷们扪玟焖懑钔",
- "mi": "眯醚靡糜迷谜弥米秘觅泌蜜密幂芈冖谧蘼嘧猕獯汨宓弭脒敉糸縻麋",
- "mian": "棉眠绵冕免勉娩缅面沔湎腼眄",
- "mie": "蔑灭咩蠛篾",
- "min": "民抿皿敏悯闽苠岷闵泯珉",
- "ming": "明螟鸣铭名命冥茗溟暝瞑酩",
- "miu": "谬",
- "mo": "摸摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谟茉蓦馍嫫镆秣瘼耱蟆貊貘",
- "mou": "谋牟某厶哞婺眸鍪",
- "mu": "拇牡亩姆母墓暮幕募慕木目睦牧穆仫苜呒沐毪钼",
- "na": "拿哪呐钠那娜纳内捺肭镎衲箬",
- "nai": "氖乃奶耐奈鼐艿萘柰",
- "nan": "南男难囊喃囡楠腩蝻赧",
- "nao": "挠脑恼闹孬垴猱瑙硇铙蛲",
- "ne": "淖呢讷",
- "nei": "馁",
- "nen": "嫩能枘恁",
- "ni": "妮霓倪泥尼拟你匿腻逆溺伲坭猊怩滠昵旎祢慝睨铌鲵",
- "nian": "蔫拈年碾撵捻念廿辇黏鲇鲶",
- "niang": "娘酿",
- "niao": "鸟尿茑嬲脲袅",
- "nie": "捏聂孽啮镊镍涅乜陧蘖嗫肀颞臬蹑",
- "nin": "您柠",
- "ning": "狞凝宁拧泞佞蓥咛甯聍",
- "niu": "牛扭钮纽狃忸妞蚴",
- "nong": "脓浓农侬",
- "nu": "奴努怒呶帑弩胬孥驽",
- "nv": "女恧钕衄",
- "nuan": "暖",
- "nuenue": "虐",
- "nue": "疟谑",
- "nuo": "挪懦糯诺傩搦喏锘",
- "ou": "哦欧鸥殴藕呕偶沤怄瓯耦",
- "pa": "啪趴爬帕怕琶葩筢",
- "pai": "拍排牌徘湃派俳蒎",
- "pan": "攀潘盘磐盼畔判叛爿泮袢襻蟠蹒",
- "pang": "乓庞旁耪胖滂逄",
- "pao": "抛咆刨炮袍跑泡匏狍庖脬疱",
- "pei": "呸胚培裴赔陪配佩沛掊辔帔淠旆锫醅霈",
- "pen": "喷盆湓",
- "peng": "砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯堋嘭怦蟛",
- "pi": "砒霹批披劈琵毗啤脾疲皮匹痞僻屁譬丕陴邳郫圮鼙擗噼庀媲纰枇甓睥罴铍痦癖疋蚍貔",
- "pian": "篇偏片骗谝骈犏胼褊翩蹁",
- "piao": "飘漂瓢票剽嘌嫖缥殍瞟螵",
- "pie": "撇瞥丿苤氕",
- "pin": "拼频贫品聘拚姘嫔榀牝颦",
- "ping": "乒坪苹萍平凭瓶评屏俜娉枰鲆",
- "po": "坡泼颇婆破魄迫粕叵鄱溥珀钋钷皤笸",
- "pou": "剖裒踣",
- "pu": "扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑匍噗濮璞氆镤镨蹼",
- "qi": "期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫亟亓圻芑萋葺嘁屺岐汔淇骐绮琪琦杞桤槭欹祺憩碛蛴蜞綦綮趿蹊鳍麒",
- "qia": "掐恰洽葜",
- "qian": "牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉佥阡芊芡荨掮岍悭慊骞搴褰缱椠肷愆钤虔箝",
- "qiang": "枪呛腔羌墙蔷强抢嫱樯戗炝锖锵镪襁蜣羟跫跄",
- "qiao": "橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍劁诮谯荞愀憔缲樵毳硗跷鞒",
- "qie": "切茄且怯窃郄唼惬妾挈锲箧",
- "qin": "钦侵亲秦琴勤芹擒禽寝沁芩蓁蕲揿吣嗪噙溱檎螓衾",
- "qing": "青轻氢倾卿清擎晴氰情顷请庆倩苘圊檠磬蜻罄箐謦鲭黥",
- "qiong": "琼穷邛茕穹筇銎",
- "qiu": "秋丘邱球求囚酋泅俅氽巯艽犰湫逑遒楸赇鸠虬蚯蝤裘糗鳅鼽",
- "qu": "趋区蛆曲躯屈驱渠取娶龋趣去诎劬蕖蘧岖衢阒璩觑氍祛磲癯蛐蠼麴瞿黢",
- "quan": "圈颧权醛泉全痊拳犬券劝诠荃獾悛绻辁畎铨蜷筌鬈",
- "que": "缺炔瘸却鹊榷确雀阙悫",
- "qun": "裙群逡",
- "ran": "然燃冉染苒髯",
- "rang": "瓤壤攘嚷让禳穰",
- "rao": "饶扰绕荛娆桡",
- "ruo": "惹若弱",
- "re": "热偌",
- "ren": "壬仁人忍韧任认刃妊纫仞荏葚饪轫稔衽",
- "reng": "扔仍",
- "ri": "日",
- "rong": "戎茸蓉荣融熔溶容绒冗嵘狨缛榕蝾",
- "rou": "揉柔肉糅蹂鞣",
- "ru": "茹蠕儒孺如辱乳汝入褥蓐薷嚅洳溽濡铷襦颥",
- "ruan": "软阮朊",
- "rui": "蕊瑞锐芮蕤睿蚋",
- "run": "闰润",
- "sa": "撒洒萨卅仨挲飒",
- "sai": "腮鳃塞赛噻",
- "san": "三叁伞散彡馓氵毵糁霰",
- "sang": "桑嗓丧搡磉颡",
- "sao": "搔骚扫嫂埽臊瘙鳋",
- "se": "瑟色涩啬铩铯穑",
- "sen": "森",
- "seng": "僧",
- "sha": "莎砂杀刹沙纱傻啥煞脎歃痧裟霎鲨",
- "shai": "筛晒酾",
- "shan": "珊苫杉山删煽衫闪陕擅赡膳善汕扇缮剡讪鄯埏芟潸姗骟膻钐疝蟮舢跚鳝",
- "shang": "墒伤商赏晌上尚裳垧绱殇熵觞",
- "shao": "梢捎稍烧芍勺韶少哨邵绍劭苕潲蛸笤筲艄",
- "she": "奢赊蛇舌舍赦摄射慑涉社设厍佘猞畲麝",
- "shen": "砷申呻伸身深娠绅神沈审婶甚肾慎渗诜谂吲哂渖椹矧蜃",
- "sheng": "声生甥牲升绳省盛剩胜圣丞渑媵眚笙",
- "shi": "师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试谥埘莳蓍弑唑饣轼耆贳炻礻铈铊螫舐筮豕鲥鲺",
- "shou": "收手首守寿授售受瘦兽扌狩绶艏",
- "shu": "蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱恕倏塾菽忄沭涑澍姝纾毹腧殳镯秫鹬",
- "shua": "刷耍唰涮",
- "shuai": "摔衰甩帅蟀",
- "shuan": "栓拴闩",
- "shuang": "霜双爽孀",
- "shui": "谁水睡税",
- "shun": "吮瞬顺舜恂",
- "shuo": "说硕朔烁蒴搠嗍濯妁槊铄",
- "si": "斯撕嘶思私司丝死肆寺嗣四伺似饲巳厮俟兕菥咝汜泗澌姒驷缌祀祠锶鸶耜蛳笥",
- "song": "松耸怂颂送宋讼诵凇菘崧嵩忪悚淞竦",
- "sou": "搜艘擞嗽叟嗖嗾馊溲飕瞍锼螋",
- "su": "苏酥俗素速粟僳塑溯宿诉肃夙谡蔌嗉愫簌觫稣",
- "suan": "酸蒜算",
- "sui": "虽隋随绥髓碎岁穗遂隧祟蓑冫谇濉邃燧眭睢",
- "sun": "孙损笋荪狲飧榫跣隼",
- "suo": "梭唆缩琐索锁所唢嗦娑桫睃羧",
- "ta": "塌他它她塔獭挞蹋踏闼溻遢榻沓",
- "tai": "胎苔抬台泰酞太态汰邰薹肽炱钛跆鲐",
- "tan": "坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭郯蕈昙钽锬覃",
- "tang": "汤塘搪堂棠膛唐糖傥饧溏瑭铴镗耥螗螳羰醣",
- "thang": "倘躺淌",
- "theng": "趟烫",
- "tao": "掏涛滔绦萄桃逃淘陶讨套挑鼗啕韬饕",
- "te": "特",
- "teng": "藤腾疼誊滕",
- "ti": "梯剔踢锑提题蹄啼体替嚏惕涕剃屉荑悌逖绨缇鹈裼醍",
- "tian": "天添填田甜恬舔腆掭忝阗殄畋钿蚺",
- "tiao": "条迢眺跳佻祧铫窕龆鲦",
- "tie": "贴铁帖萜餮",
- "ting": "厅听烃汀廷停亭庭挺艇莛葶婷梃蜓霆",
- "tong": "通桐酮瞳同铜彤童桶捅筒统痛佟僮仝茼嗵恸潼砼",
- "tou": "偷投头透亠",
- "tu": "凸秃突图徒途涂屠土吐兔堍荼菟钍酴",
- "tuan": "湍团疃",
- "tui": "推颓腿蜕褪退忒煺",
- "tun": "吞屯臀饨暾豚窀",
- "tuo": "拖托脱鸵陀驮驼椭妥拓唾乇佗坨庹沱柝砣箨舄跎鼍",
- "wa": "挖哇蛙洼娃瓦袜佤娲腽",
- "wai": "歪外",
- "wan": "豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕剜芄苋菀纨绾琬脘畹蜿箢",
- "wang": "汪王亡枉网往旺望忘妄罔尢惘辋魍",
- "wei": "威巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫倭偎诿隈葳薇帏帷崴嵬猥猬闱沩洧涠逶娓玮韪軎炜煨熨痿艉鲔",
- "wen": "瘟温蚊文闻纹吻稳紊问刎愠阌汶璺韫殁雯",
- "weng": "嗡翁瓮蓊蕹",
- "wo": "挝蜗涡窝我斡卧握沃莴幄渥杌肟龌",
- "wu": "巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误兀仵阢邬圬芴庑怃忤浯寤迕妩骛牾焐鹉鹜蜈鋈鼯",
- "xi": "昔熙析西硒矽晰嘻吸锡牺稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细僖兮隰郗茜葸蓰奚唏徙饩阋浠淅屣嬉玺樨曦觋欷熹禊禧钸皙穸蜥蟋舾羲粞翕醯鼷",
- "xia": "瞎虾匣霞辖暇峡侠狭下厦夏吓掀葭嗄狎遐瑕硖瘕罅黠",
- "xian": "锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线冼藓岘猃暹娴氙祆鹇痫蚬筅籼酰跹",
- "xiang": "相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象芗葙饷庠骧缃蟓鲞飨",
- "xiao": "萧硝霄削哮嚣销消宵淆晓小孝校肖啸笑效哓咻崤潇逍骁绡枭枵筱箫魈",
- "xie": "楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑偕亵勰燮薤撷廨瀣邂绁缬榭榍歙躞",
- "xin": "薪芯锌欣辛新忻心信衅囟馨莘歆铽鑫",
- "xing": "星腥猩惺兴刑型形邢行醒幸杏性姓陉荇荥擤悻硎",
- "xiong": "兄凶胸匈汹雄熊芎",
- "xiu": "休修羞朽嗅锈秀袖绣莠岫馐庥鸺貅髹",
- "xu": "墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续讴诩圩蓿怵洫溆顼栩煦砉盱胥糈醑",
- "xuan": "轩喧宣悬旋玄选癣眩绚儇谖萱揎馔泫洵渲漩璇楦暄炫煊碹铉镟痃",
- "xue": "靴薛学穴雪血噱泶鳕",
- "xun": "勋熏循旬询寻驯巡殉汛训讯逊迅巽埙荀薰峋徇浔曛窨醺鲟",
- "ya": "压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶伢揠吖岈迓娅琊桠氩砑睚痖",
- "yan": "焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验厣靥赝俨偃兖讠谳郾鄢芫菸崦恹闫阏洇湮滟妍嫣琰晏胭腌焱罨筵酽魇餍鼹",
- "yang": "殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾徉怏泱炀烊恙蛘鞅",
- "yao": "邀腰妖瑶摇尧遥窑谣姚咬舀药要耀夭爻吆崾徭瀹幺珧杳曜肴鹞窈繇鳐",
- "ye": "椰噎耶爷野冶也页掖业叶曳腋夜液谒邺揶馀晔烨铘",
- "yi": "一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎刈劓佾诒圪圯埸懿苡薏弈奕挹弋呓咦咿噫峄嶷猗饴怿怡悒漪迤驿缢殪贻旖熠钇镒镱痍瘗癔翊衤蜴舣羿翳酏黟",
- "yin": "茵荫因殷音阴姻吟银淫寅饮尹引隐印胤鄞堙茚喑狺夤氤铟瘾蚓霪龈",
- "ying": "英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映嬴郢茔莺萦撄嘤膺滢潆瀛瑛璎楹鹦瘿颍罂",
- "yo": "哟唷",
- "yong": "拥佣臃痈庸雍踊蛹咏泳涌永恿勇用俑壅墉慵邕镛甬鳙饔",
- "you": "幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼卣攸侑莸呦囿宥柚猷牖铕疣蝣鱿黝鼬",
- "yu": "迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉浴寓裕预豫驭禺毓伛俣谀谕萸蓣揄喁圄圉嵛狳饫庾阈妪妤纡瑜昱觎腴欤於煜燠聿钰鹆瘐瘀窳蝓竽舁雩龉",
- "yuan": "鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院塬沅媛瑗橼爰眢鸢螈鼋",
- "yue": "曰约越跃钥岳粤月悦阅龠樾刖钺",
- "yun": "耘云郧匀陨允运蕴酝晕韵孕郓芸狁恽纭殒昀氲",
- "za": "匝砸杂拶咂",
- "zai": "栽哉灾宰载再在咱崽甾",
- "zan": "攒暂赞瓒昝簪糌趱錾",
- "zang": "赃脏葬奘戕臧",
- "zao": "遭糟凿藻枣早澡蚤躁噪造皂灶燥唣缫",
- "ze": "责择则泽仄赜啧迮昃笮箦舴",
- "zei": "贼",
- "zen": "怎谮",
- "zeng": "增憎曾赠缯甑罾锃",
- "zha": "扎喳渣札轧铡闸眨栅榨咋乍炸诈揸吒咤哳怍砟痄蚱齄",
- "zhai": "摘斋宅窄债寨砦",
- "zhan": "瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽谵搌旃",
- "zhang": "樟章彰漳张掌涨杖丈帐账仗胀瘴障仉鄣幛嶂獐嫜璋蟑",
- "zhao": "招昭找沼赵照罩兆肇召爪诏棹钊笊",
- "zhe": "遮折哲蛰辙者锗蔗这浙谪陬柘辄磔鹧褚蜇赭",
- "zhen": "珍斟真甄砧臻贞针侦枕疹诊震振镇阵缜桢榛轸赈胗朕祯畛鸩",
- "zheng": "蒸挣睁征狰争怔整拯正政帧症郑证诤峥钲铮筝",
- "zhi": "芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒卮陟郅埴芷摭帙忮彘咫骘栉枳栀桎轵轾攴贽膣祉祗黹雉鸷痣蛭絷酯跖踬踯豸觯",
- "zhong": "中盅忠钟衷终种肿重仲众冢锺螽舂舯踵",
- "zhou": "舟周州洲诌粥轴肘帚咒皱宙昼骤啄着倜诹荮鬻纣胄碡籀舳酎鲷",
- "zhu": "珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑住注祝驻伫侏邾苎茱洙渚潴驺杼槠橥炷铢疰瘃蚰竺箸翥躅麈",
- "zhua": "抓",
- "zhuai": "拽",
- "zhuan": "专砖转撰赚篆抟啭颛",
- "zhuang": "桩庄装妆撞壮状丬",
- "zhui": "椎锥追赘坠缀萑骓缒",
- "zhun": "谆准",
- "zhuo": "捉拙卓桌琢茁酌灼浊倬诼廴蕞擢啜浞涿杓焯禚斫",
- "zi": "兹咨资姿滋淄孜紫仔籽滓子自渍字谘嵫姊孳缁梓辎赀恣眦锱秭耔笫粢觜訾鲻髭",
- "zong": "鬃棕踪宗综总纵腙粽",
- "zou": "邹走奏揍鄹鲰",
- "zu": "租足卒族祖诅阻组俎菹啐徂驵蹴",
- "zuan": "钻纂攥缵",
- "zui": "嘴醉最罪",
- "zun": "尊遵撙樽鳟",
- "zuo": "昨左佐柞做作坐座阝阼胙祚酢",
- "cou": "薮楱辏腠",
- "nang": "攮哝囔馕曩",
- "o": "喔",
- "dia": "嗲",
- "chuai": "嘬膪踹",
- "cen": "岑涔",
- "diu": "铥",
- "nou": "耨",
- "fou": "缶",
- "bia": "髟"
- };
- const _ToPinyin = class _ToPinyin {
- constructor() {
- }
- static getInstance() {
- if (!this.instance) {
- this.instance = new _ToPinyin();
- }
- return this.instance;
- }
- // 转首字母 this.chineseToInitials(this.chineseToPinYin('你好')) this.chineseToInitials('NiHao')
- chineseToInitials(word) {
- let SX = "";
- for (var i = 0; i < word.length; i++) {
- var c = word.charAt(i);
- if (/^[A-Z]+$/.test(c)) {
- SX += c;
- }
- }
- return SX;
- }
- // 转拼音
- chineseToPinYin(l1) {
- var l2 = l1.length;
- var I1 = "";
- var reg = new RegExp("[a-zA-Z0-9]");
- for (var i = 0; i < l2; i++) {
- var val = l1.substr(i, 1);
- var name = this.arraySearch(val, pinyin);
- if (reg.test(val)) {
- I1 += val.toLocaleUpperCase();
- } else if (name !== false) {
- I1 += name;
- }
- }
- I1 = I1.replace(/ /g, "-");
- while (I1.indexOf("--") > 0) {
- I1 = I1.replace("--", "-");
- }
- return I1;
- }
- arraySearch(l1, l2) {
- for (var name in pinyin) {
- if (pinyin[name].indexOf(l1) !== -1) {
- return this.ucfirst(name);
- }
- }
- return false;
- }
- ucfirst(l1) {
- if (l1.length > 0) {
- var first = l1.substr(0, 1).toUpperCase();
- var spare = l1.substr(1, l1.length);
- return first + spare;
- }
- }
- };
- __publicField(_ToPinyin, "instance");
- let ToPinyin = _ToPinyin;
- const toPinyin = ToPinyin.getInstance();
- const _sfc_main$13 = {
- __name: "BookInfo",
- props: {
- bookList: {
- type: Array,
- default: () => []
- },
- detail: {
- type: Object,
- default: () => ({})
- },
- isShow: {
- type: Boolean,
- default: true
- }
- },
- emits: ["get-all-firstLetter"],
- setup(__props, { expose: __expose, emit: __emit }) {
- __expose();
- const props2 = __props;
- const emit2 = __emit;
- const auditNum = vue.computed(() => {
- return props2.bookList.reduce((total, item) => {
- var _a;
- let num = ((_a = item.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts != 0).length) || 0;
- return total + num;
- }, 0);
- });
- function handleBookClick(book) {
- if (props2.detail.status >= 10) {
- uni.$u.ttsModule.speak("订单已审核完成");
- return;
- }
- uni.redirectTo({
- url: `/pages/index/detail/book-audit?isbn=${book.isbn}&orderId=${props2.detail.orderId}`
- });
- uni.setStorageSync("auditBook", book);
- }
- function getAuditCateNum(cate) {
- let auditList = [];
- props2.bookList.forEach((v) => {
- auditList.push(...v.auditCommentList || []);
- });
- return auditList.filter((v) => v.sts == cate).length;
- }
- const formatBookList = (list) => {
- const poorBooks = { title: "极差", list: [], backgroundColor: "#de868f", id: "poor" };
- const goodBooks = { title: "良好", list: [], backgroundColor: "#81b337", id: "good" };
- const otherBooks = [];
- const allFirstLetter = [];
- const handleBookCategorization = (book) => {
- let firstLetter;
- let firstChineseChar = null;
- for (let i = 0; i < book.bookName.length; i++) {
- const char = book.bookName.charAt(i);
- if (/^[\u4E00-\u9FA5]$/.test(char)) {
- firstChineseChar = char;
- break;
- }
- }
- if (firstChineseChar) {
- firstLetter = toPinyin.chineseToInitials(toPinyin.chineseToPinYin(firstChineseChar));
- } else {
- const char = book.bookName.charAt(0);
- if (/^[A-Za-z]$/.test(char)) {
- firstLetter = char.toUpperCase();
- } else {
- firstLetter = char;
- }
- }
- let bool = otherBooks.some((item) => item.title == firstLetter);
- if (!bool) {
- otherBooks.push({ id: firstLetter, title: firstLetter, list: [{ ...book }] });
- allFirstLetter.push(firstLetter);
- emit2("get-all-firstLetter", allFirstLetter);
- } else {
- otherBooks.find((item) => item.title == firstLetter).list.push(book);
- }
- };
- list.forEach((book) => {
- var _a, _b, _c;
- book.goodNum = ((_a = book.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 1).length) || 0;
- book.badNum = ((_b = book.auditCommentList) == null ? void 0 : _b.filter((v) => v.sts == 3).length) || 0;
- const totalAudited = ((_c = book.auditCommentList) == null ? void 0 : _c.filter((v) => v.sts !== 0).length) || 0;
- const isFullyAudited = totalAudited === book.num;
- if (isFullyAudited) {
- if (book.auditCommentList.some((v) => v.sts === 3)) {
- poorBooks.list.push(book);
- } else if (book.auditCommentList.every((v) => v.sts === 1)) {
- goodBooks.list.push(book);
- } else {
- handleBookCategorization(book);
- }
- } else {
- handleBookCategorization(book);
- }
- });
- return { poorBooks, goodBooks, otherBooks };
- };
- const formatList = vue.ref([]);
- vue.watch(
- () => props2.bookList,
- (newVal) => {
- let { poorBooks, goodBooks, otherBooks } = formatBookList(newVal);
- otherBooks.sort((a, b) => a.id.localeCompare(b.id));
- let poor = poorBooks.list.length > 0 ? poorBooks : {};
- let good = goodBooks.list.length > 0 ? goodBooks : {};
- formatList.value = [...otherBooks, poor, good];
- },
- { immediate: true, deep: true }
- );
- const __returned__ = { props: props2, emit: emit2, auditNum, handleBookClick, getAuditCateNum, formatBookList, formatList, ref: vue.ref, watch: vue.watch, computed: vue.computed, BookItem: BookItem$2, get toPinyin() {
- return toPinyin;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "book-info" }, [
- $props.isShow ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- [
- vue.createElementVNode(
- "view",
- {
- class: "font-bold mt-12 mb-10",
- style: { "padding": "0 20rpx" }
- },
- vue.toDisplayString($props.bookList.length) + "条记录,共" + vue.toDisplayString($props.detail.totalNum) + "本,已审" + vue.toDisplayString($setup.auditNum || 0) + "本 ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- {
- class: "font-light",
- style: { "padding": "0 20rpx" }
- },
- " 其中已审:良好" + vue.toDisplayString($setup.getAuditCateNum(1)) + "本,一般0本,极差" + vue.toDisplayString($setup.getAuditCateNum(3)) + "本 ",
- 1
- /* TEXT */
- )
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.formatList, (item) => {
- return vue.withDirectives((vue.openBlock(), vue.createElementBlock("view", {
- class: "book-info-item bg-white mt-12",
- style: vue.normalizeStyle({ backgroundColor: item.backgroundColor }),
- key: item.title,
- id: item.id
- }, [
- vue.createElementVNode(
- "view",
- { class: "book-info-item-title" },
- vue.toDisplayString(item.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "book-info-item-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item.list, (book) => {
- return vue.openBlock(), vue.createBlock($setup["BookItem"], {
- key: book.bookId,
- item: book,
- onClick: ($event) => $setup.handleBookClick(book)
- }, null, 8, ["item", "onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ], 12, ["id"])), [
- [vue.vShow, item == null ? void 0 : item.title]
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]);
- }
- const BookInfo = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$12], ["__scopeId", "data-v-8c7d14f9"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/components/BookInfo.vue"]]);
- const props$8 = {
- props: {
- // 图片地址
- src: {
- type: String,
- default: props$G.image.src
- },
- // 裁剪模式
- mode: {
- type: String,
- default: props$G.image.mode
- },
- // 宽度,单位任意
- width: {
- type: [String, Number],
- default: props$G.image.width
- },
- // 高度,单位任意
- height: {
- type: [String, Number],
- default: props$G.image.height
- },
- // 图片形状,circle-圆形,square-方形
- shape: {
- type: String,
- default: props$G.image.shape
- },
- // 圆角,单位任意
- radius: {
- type: [String, Number],
- default: props$G.image.radius
- },
- // 是否懒加载,微信小程序、App、百度小程序、字节跳动小程序
- lazyLoad: {
- type: Boolean,
- default: props$G.image.lazyLoad
- },
- // 开启长按图片显示识别微信小程序码菜单
- showMenuByLongpress: {
- type: Boolean,
- default: props$G.image.showMenuByLongpress
- },
- // 加载中的图标,或者小图片
- loadingIcon: {
- type: String,
- default: props$G.image.loadingIcon
- },
- // 加载失败的图标,或者小图片
- errorIcon: {
- type: String,
- default: props$G.image.errorIcon
- },
- // 是否显示加载中的图标或者自定义的slot
- showLoading: {
- type: Boolean,
- default: props$G.image.showLoading
- },
- // 是否显示加载错误的图标或者自定义的slot
- showError: {
- type: Boolean,
- default: props$G.image.showError
- },
- // 是否需要淡入效果
- fade: {
- type: Boolean,
- default: props$G.image.fade
- },
- // 只支持网络资源,只对微信小程序有效
- webp: {
- type: Boolean,
- default: props$G.image.webp
- },
- // 过渡时间,单位ms
- duration: {
- type: [String, Number],
- default: props$G.image.duration
- },
- // 背景颜色,用于深色页面加载图片时,为了和背景色融合
- bgColor: {
- type: String,
- default: props$G.image.bgColor
- }
- }
- };
- const _sfc_main$12 = {
- name: "u-image",
- mixins: [mpMixin, mixin, props$8],
- data() {
- return {
- // 图片是否加载错误,如果是,则显示错误占位图
- isError: false,
- // 初始化组件时,默认为加载中状态
- loading: true,
- // 不透明度,为了实现淡入淡出的效果
- opacity: 1,
- // 过渡时间,因为props的值无法修改,故需要一个中间值
- durationTime: this.duration,
- // 图片加载完成时,去掉背景颜色,因为如果是png图片,就会显示灰色的背景
- backgroundStyle: {},
- // 用于fade模式的控制组件显示与否
- show: false
- };
- },
- watch: {
- src: {
- immediate: true,
- handler(n) {
- if (!n) {
- this.isError = true;
- } else {
- this.isError = false;
- this.loading = true;
- }
- }
- }
- },
- computed: {
- wrapStyle() {
- let style = {};
- style.width = this.$u.addUnit(this.width);
- style.height = this.$u.addUnit(this.height);
- style.borderRadius = this.shape == "circle" ? "10000px" : uni.$u.addUnit(this.radius);
- style.overflow = this.radius > 0 ? "hidden" : "visible";
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- }
- },
- mounted() {
- this.show = true;
- },
- emits: ["click", "error", "load"],
- methods: {
- // 点击图片
- onClick() {
- this.$emit("click");
- },
- // 图片加载失败
- onErrorHandler(err) {
- this.loading = false;
- this.isError = true;
- this.$emit("error", err);
- },
- // 图片加载完成,标记loading结束
- onLoadHandler(event) {
- this.loading = false;
- this.isError = false;
- this.$emit("load", event);
- this.removeBgColor();
- },
- // 移除图片的背景色
- removeBgColor() {
- this.backgroundStyle = {
- backgroundColor: "transparent"
- };
- }
- }
- };
- function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
- return vue.openBlock(), vue.createBlock(_component_u_transition, {
- mode: "fade",
- show: $data.show,
- duration: _ctx.fade ? 1e3 : 0
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode(
- "view",
- {
- class: "u-image",
- onClick: _cache[2] || (_cache[2] = (...args) => $options.onClick && $options.onClick(...args)),
- style: vue.normalizeStyle([$options.wrapStyle, $data.backgroundStyle])
- },
- [
- !$data.isError ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: _ctx.src,
- mode: _ctx.mode,
- onError: _cache[0] || (_cache[0] = (...args) => $options.onErrorHandler && $options.onErrorHandler(...args)),
- onLoad: _cache[1] || (_cache[1] = (...args) => $options.onLoadHandler && $options.onLoadHandler(...args)),
- "show-menu-by-longpress": _ctx.showMenuByLongpress,
- "lazy-load": _ctx.lazyLoad,
- class: "u-image__image",
- style: vue.normalizeStyle({
- borderRadius: _ctx.shape == "circle" ? "10000px" : _ctx.$u.addUnit(_ctx.radius),
- width: _ctx.$u.addUnit(_ctx.width),
- height: _ctx.$u.addUnit(_ctx.height)
- })
- }, null, 44, ["src", "mode", "show-menu-by-longpress", "lazy-load"])) : vue.createCommentVNode("v-if", true),
- _ctx.showLoading && $data.loading ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "u-image__loading",
- style: vue.normalizeStyle({
- borderRadius: _ctx.shape == "circle" ? "50%" : _ctx.$u.addUnit(_ctx.radius),
- backgroundColor: this.bgColor,
- width: _ctx.$u.addUnit(_ctx.width),
- height: _ctx.$u.addUnit(_ctx.height)
- })
- },
- [
- vue.renderSlot(_ctx.$slots, "loading", {}, () => [
- vue.createVNode(_component_u_icon, {
- name: _ctx.loadingIcon,
- width: _ctx.width,
- height: _ctx.height
- }, null, 8, ["name", "width", "height"])
- ], true)
- ],
- 4
- /* STYLE */
- )) : vue.createCommentVNode("v-if", true),
- _ctx.showError && $data.isError && !$data.loading ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 2,
- class: "u-image__error",
- style: vue.normalizeStyle({
- borderRadius: _ctx.shape == "circle" ? "50%" : _ctx.$u.addUnit(_ctx.radius),
- width: _ctx.$u.addUnit(_ctx.width),
- height: _ctx.$u.addUnit(_ctx.height)
- })
- },
- [
- vue.renderSlot(_ctx.$slots, "error", {}, () => [
- vue.createVNode(_component_u_icon, {
- name: _ctx.errorIcon,
- width: _ctx.width,
- height: _ctx.height
- }, null, 8, ["name", "width", "height"])
- ], true)
- ],
- 4
- /* STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 4
- /* STYLE */
- )
- ]),
- _: 3
- /* FORWARDED */
- }, 8, ["show", "duration"]);
- }
- const __easycom_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$11], ["__scopeId", "data-v-abebd402"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-image/u-image.vue"]]);
- const _sfc_main$11 = {
- __name: "FileInfo",
- props: {
- orderId: {
- type: String,
- default: ""
- },
- annexType: {
- type: Number,
- default: 1
- },
- isbn: {
- type: String,
- default: ""
- }
- },
- setup(__props, { expose: __expose }) {
- __expose();
- const form = vue.ref({
- imgInfo: [],
- remark: ""
- });
- const props2 = __props;
- const fileList = vue.ref([]);
- function getFileList() {
- uni.$u.http.get("/app/orderinfo/getOrderAnnexList", {
- params: {
- orderId: props2.orderId,
- annexType: props2.annexType,
- isbn: props2.isbn
- }
- }).then((res2) => {
- if (res2.code == 200) {
- fileList.value = res2.data;
- }
- });
- }
- getFileList();
- const handleUpload = () => {
- formatAppLog("log", "at pages/index/detail/components/FileInfo.vue:73", form.value);
- let data = {
- orderId: props2.orderId,
- annexType: props2.annexType,
- isbn: props2.isbn,
- ...form.value
- };
- uni.$u.http.post("/app/orderinfo/setOrderAnnex", data).then((res2) => {
- if (res2.code == 200) {
- uni.$u.toast("上传成功");
- form.value.imgInfo = [];
- form.value.remark = "";
- getFileList();
- } else {
- uni.$u.toast(res2.msg);
- }
- });
- };
- const __returned__ = { form, props: props2, fileList, getFileList, handleUpload, ref: vue.ref, cyUpload };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
- var _a;
- const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$3);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- const _component_u_image = resolveEasycom(vue.resolveDynamicComponent("u-image"), __easycom_2$1);
- return vue.openBlock(), vue.createElementBlock("view", { class: "file-info bg-white" }, [
- vue.createElementVNode("view", { class: "file-info-container" }, [
- vue.createVNode($setup["cyUpload"], {
- filename: $setup.form.imgInfo,
- "onUpdate:filename": _cache[0] || (_cache[0] = ($event) => $setup.form.imgInfo = $event),
- limit: 3
- }, null, 8, ["filename"]),
- vue.createVNode(_component_u_textarea, {
- modelValue: $setup.form.remark,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.remark = $event),
- placeholder: "上传说明...",
- autoHeight: "",
- style: { "min-height": "60px" }
- }, null, 8, ["modelValue"]),
- vue.createElementVNode("view", { class: "flex flex-a-c flex-j-c" }, [
- vue.createVNode(_component_u_button, {
- class: "mt-24",
- type: "primary",
- onClick: $setup.handleUpload
- }, {
- default: vue.withCtx(() => [
- vue.createTextVNode("上传(最多上传3张)")
- ]),
- _: 1
- /* STABLE */
- })
- ])
- ]),
- vue.createElementVNode("view", { class: "file-info-list" }, [
- vue.createElementVNode("view", { class: "file-info-list-title text-center" }, "已上传记录"),
- !((_a = $setup.fileList) == null ? void 0 : _a.length) ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "file-info-list-content mt-24 mb-24 text-center"
- }, "还没有上传记录")) : (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- vue.renderList($setup.fileList, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "file-info-item",
- key: item.id
- }, [
- vue.createElementVNode("view", { class: "file-info-item-img flex flex-a-c" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item.imgInfo, (img) => {
- return vue.openBlock(), vue.createBlock(_component_u_image, {
- src: img,
- width: "90",
- height: "90",
- style: { "margin-right": "10px" }
- }, null, 8, ["src"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("view", { class: "file-info-item-info mt-10 font-14" }, [
- vue.createElementVNode(
- "view",
- { class: "file-info-item-info-name" },
- "上传说明:" + vue.toDisplayString(item.remark),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "file-info-item-info-name mt-10" }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(item.createTime),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "ml-20" },
- vue.toDisplayString(item.createName),
- 1
- /* TEXT */
- )
- ])
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]);
- }
- const FileInfo = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$10], ["__scopeId", "data-v-b4cf7c83"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/components/FileInfo.vue"]]);
- const _sfc_main$10 = {
- __name: "index",
- setup(__props, { expose: __expose }) {
- __expose();
- const showAuditorSelector = vue.ref(false);
- const selectedAuditor = vue.ref({});
- const handleAuditorSelected = (auditor) => {
- selectedAuditor.value = auditor;
- orderDetail.value.auditUserId = auditor.userId;
- orderDetail.value.auditUserName = auditor.userName;
- uni.setStorageSync("checkUserInfo", {
- userName: auditor.userName,
- userId: auditor.userId
- });
- };
- function playGlobalSound() {
- uni.$u.playClickSound();
- }
- const toView = vue.ref("");
- function scrollToView(to) {
- toView.value = to;
- uni.pageScrollTo({
- selector: "#" + to,
- duration: 200
- });
- }
- function scrollToTop() {
- uni.pageScrollTo({
- top: 0,
- duration: 200
- });
- }
- function handleBindCode() {
- uni.$u.toast("暂无开发");
- }
- const list = vue.ref(["图书清单", "物流信息", "上传附件"]);
- const current = vue.ref(0);
- const handleSectionChange = (index2) => {
- current.value = index2;
- };
- const allLetters = vue.ref([]);
- function onGetAllFirstLetter(data) {
- allLetters.value = data;
- }
- function handleLogisticsConfirm() {
- uni.showModal({
- title: "提示",
- content: "是否确认物流签收?",
- success: (res2) => {
- if (res2.confirm) {
- uni.showLoading({ title: "加载中...", mask: true });
- uni.$u.http.post("/app/orderinfo/signLogistics", {
- searchType: 1,
- search: orderDetail.value.orderId
- }).then((res3) => {
- if (res3.code == 200) {
- uni.showToast({ title: "签收成功", icon: "none" });
- uni.$u.ttsModule.speak("签收成功");
- uni.navigateBack();
- }
- }).finally(() => {
- uni.hideLoading();
- });
- }
- }
- });
- }
- function handleConfirm() {
- uni.showLoading({ title: "加载中...", mask: true });
- uni.$u.http.post("/app/orderinfo/confirmOrder", {
- searchType: 1,
- search: orderDetail.value.orderId
- }).then((res2) => {
- if (res2.code == 200) {
- uni.showToast({ title: "确认收货成功", icon: "none" });
- uni.$u.ttsModule.speak("确认收货成功");
- getOrderDetail();
- }
- }).finally(() => {
- uni.hideLoading();
- });
- }
- function handleComplete() {
- let bookList = orderDetail.value.detailVoList;
- let bool = bookList.some((item) => {
- var _a;
- return ((_a = item.auditCommentList) == null ? void 0 : _a.length) < item.num;
- });
- if (bool) {
- let text = "还有未审核的书";
- uni.$u.toast(text);
- uni.$u.ttsModule.speak(text);
- return;
- } else {
- uni.$u.http.post("/app/orderinfo/checkOrderFinish", {
- checkUserId: orderDetail.value.auditUserId,
- orderId: orderDetail.value.orderId
- }).then((res2) => {
- if (res2.code == 200) {
- uni.showToast({ title: "审核完成", icon: "none" });
- uni.$u.ttsModule.speak("审核完成");
- uni.navigateBack();
- }
- });
- }
- }
- const orderDetail = vue.ref({ status: 0 });
- function getOrderDetail() {
- if (!orderId.value)
- return;
- uni.showLoading({
- title: "加载中...",
- mask: true
- });
- uni.$u.http.get("/app/orderinfo/getOrderInfoForCheck", {
- params: {
- searchType: 1,
- search: orderId.value
- }
- }).then((res2) => {
- if (res2.code == 200) {
- orderDetail.value = res2.data;
- getCheckUserInfo();
- if (res2.data.auditUserId) {
- let auditUserInfo = {
- userName: res2.data.auditUserName,
- userId: res2.data.auditUserId
- };
- uni.setStorageSync("checkUserInfo", auditUserInfo);
- } else {
- let userInfo = uni.getStorageSync("checkUserInfo");
- orderDetail.value.auditUserName = userInfo.userName;
- orderDetail.value.auditUserId = userInfo.userId;
- }
- if (isOnLoad.value) {
- if (res2.data.manageRemark.length > 0 && res2.data.status < 10) {
- uni.$u.ttsModule.speak("此订单有备注信息,请注意查看");
- }
- if (res2.data.warnArea && res2.data.warnArea.length > 0) {
- let text = `此订单来源于${res2.data.warnArea}`;
- uni.$u.ttsModule.speak(text);
- }
- isOnLoad.value = false;
- }
- } else {
- uni.$u.toast(res2.msg);
- }
- }).finally(() => {
- uni.hideLoading();
- });
- }
- function getCheckUserInfo() {
- uni.$u.http.get("/app/orderinfo/getCheckUser").then((res2) => {
- if (res2.code == 200) {
- let userInfo = res2.data;
- orderDetail.value.auditUserName = userInfo.userName;
- orderDetail.value.auditUserId = userInfo.userId;
- uni.setStorageSync("checkUserInfo", {
- userName: userInfo.userName,
- userId: userInfo.userId
- });
- }
- });
- }
- function checkIsbn(isbn) {
- const isbn13Regex = /^(?:97[89]-?\d{1,5}-?\d{1,7}-?\d{1,6}-?\d)$/;
- if (isbn13Regex.test(isbn)) {
- return true;
- }
- return false;
- }
- function handleScan(isbn) {
- if (!checkIsbn(isbn)) {
- let text = `不是正确的ISBN码`;
- uni.$u.ttsModule.speak(text);
- return;
- }
- if (orderDetail.value.status >= 10) {
- uni.$u.ttsModule.speak("订单已审核完成");
- return;
- }
- let isbnStr = `${isbn.slice(-4)}`;
- let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
- if (isbns.includes(isbn)) {
- let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
- if (book.suit == 1) {
- let text = `${isbnStr}请注意套装书是否齐全`;
- uni.$u.ttsModule.speak(text);
- }
- if (book.bookWarn == 1) {
- let text = `请注意${isbnStr}需要取出`;
- uni.$u.ttsModule.speak(text);
- }
- uni.redirectTo({
- url: `/pages/index/detail/book-audit?isbn=${isbn}&orderId=${orderDetail.value.orderId}`
- });
- uni.setStorageSync("auditBook", book);
- uni.setStorageSync("orderDetail", orderDetail.value);
- } else {
- let text = `此订单中不存在${isbnStr}这本书 `;
- uni.$u.ttsModule.speak(text);
- }
- }
- function handleScanCode() {
- uni.scanCode({
- success: (res2) => {
- res2.result && handleScan(res2.result);
- }
- });
- }
- const orderId = vue.ref("");
- const isOnLoad = vue.ref(false);
- const type2 = vue.ref(1);
- onLoad((option) => {
- orderId.value = option.id;
- getOrderDetail();
- isOnLoad.value = true;
- type2.value = option.type || 1;
- uni.removeStorageSync("scannedBooks");
- uni.$u.useGlobalEvent((e) => {
- if (e.barcode) {
- handleScan(e.barcode);
- }
- });
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- getOrderDetail();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { showAuditorSelector, selectedAuditor, handleAuditorSelected, playGlobalSound, toView, scrollToView, scrollToTop, handleBindCode, list, current, handleSectionChange, allLetters, onGetAllFirstLetter, handleLogisticsConfirm, handleConfirm, handleComplete, orderDetail, getOrderDetail, getCheckUserInfo, checkIsbn, handleScan, handleScanCode, orderId, isOnLoad, type: type2, ref: vue.ref, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- }, AuditorSelector, OrderInfo, UserInfoCard, LogisticsTimeline, BookInfo, FileInfo };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
- var _a;
- const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$5);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["order-detail", { "fixed-bottom-2": $setup.type == 2 }]),
- onClick: $setup.playGlobalSound
- },
- [
- vue.createElementVNode("scroll-view", {
- class: "scroller",
- "scroll-into-view": $setup.toView,
- "scroll-y": "true",
- "scroll-with-animation": "true"
- }, [
- vue.createElementVNode("view", { class: "flex flex-a-c flex-j-b bg-white bind-audit mb-16" }, [
- vue.createElementVNode("text", null, "绑定审核员"),
- vue.createElementVNode(
- "text",
- { class: "text-center flex-1" },
- vue.toDisplayString($setup.orderDetail.auditUserName || ((_a = $setup.selectedAuditor) == null ? void 0 : _a.userName) || ""),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", {
- onClick: _cache[0] || (_cache[0] = ($event) => $setup.showAuditorSelector = true),
- class: "color-primary"
- }, "绑定")
- ]),
- vue.createVNode($setup["OrderInfo"], {
- detail: $setup.orderDetail,
- onRefresh: $setup.getOrderDetail
- }, null, 8, ["detail"]),
- vue.createVNode($setup["UserInfoCard"], { detail: $setup.orderDetail }, null, 8, ["detail"]),
- vue.createElementVNode("view", {
- class: "mt-16",
- style: { "padding": "0 6rpx" }
- }, [
- vue.createVNode(_component_u_subsection, {
- list: $setup.list,
- mode: "subsection",
- current: $setup.current,
- onChange: $setup.handleSectionChange
- }, null, 8, ["list", "current"]),
- $setup.current == 0 ? (vue.openBlock(), vue.createBlock($setup["BookInfo"], {
- key: 0,
- bookList: $setup.orderDetail.detailVoList,
- detail: $setup.orderDetail,
- onGetAllFirstLetter: $setup.onGetAllFirstLetter
- }, null, 8, ["bookList", "detail"])) : vue.createCommentVNode("v-if", true),
- $setup.current == 1 ? (vue.openBlock(), vue.createBlock($setup["LogisticsTimeline"], {
- key: 1,
- list: $setup.orderDetail.trackingVoList
- }, null, 8, ["list"])) : vue.createCommentVNode("v-if", true),
- $setup.current == 2 ? (vue.openBlock(), vue.createBlock($setup["FileInfo"], {
- key: 2,
- orderId: $setup.orderDetail.orderId
- }, null, 8, ["orderId"])) : vue.createCommentVNode("v-if", true)
- ])
- ], 8, ["scroll-into-view"]),
- vue.createElementVNode("view", { class: "fixed-left" }, [
- vue.createElementVNode("view", {
- class: "bind-code common-bg",
- style: { "margin-bottom": "30px", "padding": "20rpx" },
- onClick: $setup.handleBindCode
- }, "绑码 "),
- vue.createElementVNode("view", { class: "common-bg flex flex-a-c flex-j-c flex-d" }, [
- vue.createElementVNode("view", {
- class: "book-status-item",
- onClick: _cache[1] || (_cache[1] = ($event) => $setup.scrollToView("good"))
- }, "良好"),
- vue.createElementVNode("view", {
- class: "book-status-item item-center",
- onClick: _cache[2] || (_cache[2] = ($event) => $setup.scrollToView("average"))
- }, "一般"),
- vue.createElementVNode("view", {
- class: "book-status-item",
- onClick: _cache[3] || (_cache[3] = ($event) => $setup.scrollToView("poor"))
- }, "极差")
- ])
- ]),
- vue.createElementVNode("view", { class: "fixed-right" }, [
- vue.createElementVNode("view", { class: "letter-bg flex flex-a-c flex-j-c flex-d" }, [
- vue.createElementVNode("view", { class: "letter-item" }, [
- vue.createVNode(_component_u_icon, {
- name: "arrow-up-fill",
- size: "20",
- color: "#ffffff",
- onClick: $setup.scrollToTop
- })
- ]),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.allLetters, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "letter-item",
- onClick: ($event) => $setup.scrollToView(item)
- }, vue.toDisplayString(item), 9, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ]),
- $setup.type != 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "common-bg fixed-bottom"
- }, [
- $setup.orderDetail.status == 5 ? (vue.openBlock(), vue.createBlock(_component_u_button, {
- key: 0,
- type: "warning",
- size: "large",
- onClick: $setup.handleLogisticsConfirm
- }, {
- default: vue.withCtx(() => [
- vue.createTextVNode("物流签收")
- ]),
- _: 1
- /* STABLE */
- })) : vue.createCommentVNode("v-if", true),
- $setup.orderDetail.status == 6 ? (vue.openBlock(), vue.createBlock(_component_u_button, {
- key: 1,
- type: "primary",
- size: "large",
- onClick: $setup.handleConfirm
- }, {
- default: vue.withCtx(() => [
- vue.createTextVNode("确认收货")
- ]),
- _: 1
- /* STABLE */
- })) : vue.createCommentVNode("v-if", true),
- $setup.orderDetail.status == 8 || $setup.orderDetail.status == 9 || $setup.orderDetail.status == 10 ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 2 },
- [
- vue.createVNode(_component_u_button, {
- type: "warning",
- size: "large",
- onClick: $setup.handleScanCode
- }, {
- default: vue.withCtx(() => [
- vue.createTextVNode("扫码")
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_button, {
- type: "primary",
- size: "large",
- onClick: $setup.handleComplete
- }, {
- default: vue.withCtx(() => [
- vue.createTextVNode("完成")
- ]),
- _: 1
- /* STABLE */
- })
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true),
- vue.createVNode($setup["AuditorSelector"], {
- show: $setup.showAuditorSelector,
- "onUpdate:show": _cache[4] || (_cache[4] = ($event) => $setup.showAuditorSelector = $event),
- onAuditorSelected: $setup.handleAuditorSelected
- }, null, 8, ["show"])
- ],
- 2
- /* CLASS */
- );
- }
- const PagesIndexDetailIndex = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$$], ["__scopeId", "data-v-8b10f148"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/index.vue"]]);
- const _sfc_main$$ = {
- __name: "AuditInfo",
- props: {
- detail: {
- type: Object,
- default: () => ({})
- },
- auditList: {
- type: Array,
- default: () => []
- }
- },
- emits: ["selected"],
- setup(__props, { expose: __expose, emit: __emit }) {
- const props2 = __props;
- const auditCommentList = vue.ref([]);
- const initAuditList = (detail) => {
- if (!(detail == null ? void 0 : detail.auditCommentList))
- return;
- auditCommentList.value = detail.auditCommentList.map((item, index2) => ({
- ...item,
- idx: index2,
- isbn: detail.isbn,
- comList: item.com ? typeof item.com === "string" ? item.com.split(",") : item.com : []
- }));
- sortByAuditStatus();
- };
- vue.watch(
- () => props2.detail,
- () => {
- initAuditList(props2.detail);
- },
- { deep: true, immediate: true }
- );
- const auditList = vue.ref([
- { sts: 1, label: "品相良好" },
- { sts: 2, label: "品相一般", disabled: true },
- { sts: 3, label: "品相极差" }
- ]);
- const emit2 = __emit;
- const radioClick = (audit, index2, sts) => {
- if (sts == 2)
- return;
- audit.sts = sts;
- if (sts == 1) {
- audit.comList = [];
- }
- auditCommentList.value[index2] = audit;
- formatReason();
- };
- const getAuditCateNum = (cate) => {
- var _a, _b;
- return ((_b = (_a = props2.detail.auditCommentList) == null ? void 0 : _a.filter((item) => item.sts == cate)) == null ? void 0 : _b.length) || 0;
- };
- let reasonList = vue.ref([
- { sts: 3, label: "明显泛黄水印/发霉/明显异味" },
- { sts: 3, label: "老化泛黄褪色/污渍" },
- { sts: 3, label: "明显破损/脱胶缺页/书籍变型" },
- { sts: 3, label: "无此书" },
- { sts: 3, label: "印刷不清晰" },
- { sts: 3, label: "无防伪" },
- { sts: 3, label: "无外护封/无ISBN" },
- { sts: 3, label: "无此书多其他书" },
- { sts: 3, label: "笔记杂乱/习题做完" },
- { sts: 3, label: "有笔记贴" },
- { sts: 3, label: "套装缺册" },
- { sts: 3, label: "听力无光盘" },
- { sts: 3, label: "图书馆/藏书印章" }
- ]);
- const formatReason = () => {
- let list = auditCommentList.value.map((item, index2) => ({
- ...item,
- idx: index2,
- com: item.comList.join(",")
- }));
- return list;
- };
- const toggleReason = (audit, index2, item) => {
- const idx = audit.comList.indexOf(item.label);
- if (idx > -1) {
- audit.comList.splice(idx, 1);
- } else {
- audit.comList.push(item.label);
- }
- auditCommentList.value[index2] = audit;
- };
- const sortByAuditStatus = () => {
- const sortedList = [...auditCommentList.value];
- sortedList.sort((a, b) => {
- if (a.sts === 0 && (b.sts === 1 || b.sts === 3)) {
- return -1;
- }
- if (b.sts === 0 && (a.sts === 1 || a.sts === 3)) {
- return 1;
- }
- return 0;
- });
- auditCommentList.value = sortedList;
- return sortedList;
- };
- __expose({
- formatReason,
- initAuditList,
- sortByAuditStatus
- });
- const __returned__ = { props: props2, auditCommentList, initAuditList, auditList, emit: emit2, radioClick, getAuditCateNum, get reasonList() {
- return reasonList;
- }, set reasonList(v) {
- reasonList = v;
- }, formatReason, toggleReason, sortByAuditStatus, ref: vue.ref, watch: vue.watch, nextTick: vue.nextTick, onMounted: vue.onMounted };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- return vue.openBlock(), vue.createElementBlock("view", { class: "audit-info" }, [
- vue.createElementVNode(
- "view",
- {
- class: "font-bold mt-16",
- style: { "padding": "0 20rpx" }
- },
- " 该书共" + vue.toDisplayString($props.detail.num) + "本,其中:良好" + vue.toDisplayString($setup.getAuditCateNum(1)) + "本,一般" + vue.toDisplayString($setup.getAuditCateNum(2)) + "本,极差" + vue.toDisplayString($setup.getAuditCateNum(3)) + "本 ",
- 1
- /* TEXT */
- ),
- $setup.auditCommentList.length > 0 ? (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- vue.renderList($setup.auditCommentList, (audit, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
- vue.createElementVNode(
- "view",
- {
- class: "mt-10 bind-code",
- style: { "padding": "10rpx 20rpx" }
- },
- " 第" + vue.toDisplayString(index2 + 1) + "本的审核意见 ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "mt-20 bg-white flex flex-j-a flex-a-c",
- style: { "padding": "20rpx", "border-radius": "10rpx" }
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.auditList, (item, idx) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "u-page__tag-item",
- key: idx
- }, [
- vue.createVNode(_component_u_tag, {
- size: "large",
- text: item.label,
- plain: audit.sts != item.sts,
- type: "primary",
- name: item.sts,
- class: vue.normalizeClass({ disabled: item.sts == 2 }),
- onClick: ($event) => $setup.radioClick(audit, index2, item.sts)
- }, null, 8, ["text", "plain", "name", "class", "onClick"])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- audit.sts == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "mt-20 bg-white",
- style: { "padding": "20rpx", "border-radius": "10rpx" }
- }, [
- vue.createElementVNode("view", { class: "flex flex-a-c flex-wrap" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.reasonList, (item, idx) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: vue.normalizeClass(["mr-10 reason-item", { selected: audit.comList.includes(item.label) }]),
- key: idx,
- onClick: ($event) => $setup.toggleReason(audit, index2, item)
- }, vue.toDisplayString(item.label), 11, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 悬浮排序按钮 "),
- vue.createElementVNode("view", {
- class: "floating-sort-btn",
- onClick: $setup.sortByAuditStatus
- }, [
- vue.createVNode(_component_u_icon, {
- name: "list",
- color: "#FFFFFF",
- size: "22"
- }),
- vue.createElementVNode("text", { class: "btn-text" }, "排序")
- ])
- ]);
- }
- const AuditInfo = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$_], ["__scopeId", "data-v-9873c737"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/components/AuditInfo.vue"]]);
- const _sfc_main$_ = {
- __name: "book-audit",
- setup(__props, { expose: __expose }) {
- __expose();
- const detail = vue.ref({});
- function playGlobalSound() {
- uni.$u.playClickSound();
- }
- const getBookInfo = (isbn) => {
- uni.$u.http.get(`/app/book/getBookByIsbn/${isbn}`).then((res2) => {
- if (res2.code == 200) {
- detail.value = res2.data;
- }
- });
- };
- const auditBook = vue.ref({});
- const getBookInfoAndAuditInfo = (isbn, orderId2) => {
- uni.$u.http.get(`/app/orderinfo/getBookCheckInfo?isbn=${isbn}&&orderId=${orderId2}`).then((res2) => {
- if (res2.code == 200) {
- auditBook.value = res2.data;
- vue.nextTick(() => {
- var _a;
- (_a = auditInfoRef.value) == null ? void 0 : _a.initAuditList(auditBook.value);
- });
- }
- });
- };
- const list = vue.ref(["图书审核", "绑码", "附件信息"]);
- const current = vue.ref(0);
- const handleSectionChange = (index2) => {
- current.value = index2;
- };
- const auditData = vue.ref([]);
- const handleAuditSelected = (data) => {
- auditData.value = data.map((item, index2) => {
- item.idx = index2;
- item.com = Array.isArray(item.com) ? item.com.join(",") : item.com;
- return item;
- });
- };
- const scannedBooks = vue.ref([]);
- function checkIsbn(isbn) {
- const isbn13Regex = /^(?:97[89]-?\d{1,5}-?\d{1,7}-?\d{1,6}-?\d)$/;
- if (isbn13Regex.test(isbn)) {
- return true;
- }
- return false;
- }
- function handleScan(isbn) {
- var _a;
- if (!checkIsbn(isbn)) {
- let text = `不是正确的ISBN码`;
- uni.$u.ttsModule.speak(text);
- return;
- }
- let isbnStr = `${isbn.slice(-4)}`;
- let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
- if (isbns.includes(isbn)) {
- let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
- if (((_a = book.auditCommentList) == null ? void 0 : _a.length) > 0) {
- let noAuditNum = book.auditCommentList.filter((item) => item.sts == 0).length;
- formatAppLog("log", "at pages/index/detail/book-audit.vue:142", noAuditNum, "noAuditNum");
- if (noAuditNum == 0) {
- let text = `${isbnStr}已超出订单中的数量`;
- uni.$u.ttsModule.speak(text);
- return;
- }
- if (book.suit == 1) {
- let text = `${isbnStr}请注意套装书是否齐全`;
- uni.$u.ttsModule.speak(text);
- }
- if (book.bookWarn == 1) {
- let text = `请注意${isbnStr}需要取出`;
- uni.$u.ttsModule.speak(text);
- }
- scannedBooks.value.push(isbn);
- uni.setStorageSync("scannedBooks", scannedBooks.value);
- uni.redirectTo({
- url: `/pages/index/detail/batch-audit?orderId=${orderId.value}`
- });
- }
- } else {
- let text = `此订单中不存在${isbnStr}这本书 `;
- uni.$u.ttsModule.speak(text);
- }
- }
- function handleScanCode() {
- uni.scanCode({
- success: (res2) => {
- handleScan(res2.result);
- }
- });
- }
- const auditInfoRef = vue.ref();
- const handleAudit = () => {
- var _a;
- let checkList = (_a = auditInfoRef.value) == null ? void 0 : _a.formatReason(auditData.value);
- let checkUserInfo = uni.getStorageSync("checkUserInfo");
- if (checkUserInfo.userId) {
- checkUserId.value = checkUserInfo.userId;
- } else {
- uni.$u.toast("请先选择审核人");
- }
- let poorList = checkList.filter((item) => item.sts == 3);
- if (poorList.length > 0 && !poorList.every((item) => item.com)) {
- uni.$u.ttsModule.speak("请选择品相");
- return;
- }
- uni.$u.http.post("/app/orderinfo/checkOrder", {
- checkUserId: checkUserId.value,
- orderId: orderId.value,
- checkList
- }).then((res2) => {
- if (res2.code == 200) {
- uni.showToast({ title: "审核成功", icon: "none" });
- uni.$u.ttsModule.speak("审核成功");
- uni.navigateBack();
- } else {
- uni.$u.toast(res2.msg);
- }
- });
- };
- const checkUserId = vue.ref();
- const orderId = vue.ref();
- const orderDetail = vue.ref({});
- let isbnScan = vue.ref("");
- onLoad((options) => {
- options.isbn && getBookInfo(options.isbn);
- scannedBooks.value = [options.isbn];
- isbnScan.value = options.isbn;
- orderId.value = options.orderId;
- getBookInfoAndAuditInfo(options.isbn, options.orderId);
- orderDetail.value = uni.getStorageSync("orderDetail");
- uni.$u.useGlobalEvent((e) => {
- if (e.barcode) {
- handleScan(e.barcode);
- }
- });
- });
- onShow(() => {
- var _a;
- if (isbnScan.value) {
- checkUserId.value = (_a = uni.getStorageSync("userInfo")) == null ? void 0 : _a.userId;
- orderDetail.value = uni.getStorageSync("orderDetail");
- }
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { detail, playGlobalSound, getBookInfo, auditBook, getBookInfoAndAuditInfo, list, current, handleSectionChange, auditData, handleAuditSelected, scannedBooks, checkIsbn, handleScan, handleScanCode, auditInfoRef, handleAudit, checkUserId, orderId, orderDetail, get isbnScan() {
- return isbnScan;
- }, set isbnScan(v) {
- isbnScan = v;
- }, ref: vue.ref, nextTick: vue.nextTick, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- }, AuditInfo, FileInfo };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$5);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "book-audit",
- onClick: $setup.playGlobalSound
- }, [
- vue.createElementVNode("view", {
- class: "bg-white flex flex-a-c",
- style: { "padding": "20rpx", "border-radius": "10rpx" }
- }, [
- vue.createElementVNode("image", {
- src: $setup.detail.cover,
- mode: "aspectFill",
- style: { "width": "80px", "height": "100px" }
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "flex flex-d flex-1 ml-20" }, [
- vue.createElementVNode(
- "text",
- { class: "common-title mb-20" },
- vue.toDisplayString($setup.detail.bookName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "text-sm" }, [
- vue.createTextVNode("ISBN: "),
- vue.createElementVNode(
- "text",
- { class: "color-primary" },
- vue.toDisplayString($setup.detail.isbn),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("text", { class: "text-sm mt-6" }, [
- vue.createTextVNode("作者: "),
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString($setup.detail.author),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("text", { class: "text-sm mt-6" }, [
- vue.createTextVNode("出版社: "),
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString($setup.detail.publish),
- 1
- /* TEXT */
- )
- ])
- ])
- ]),
- vue.createElementVNode("view", {
- class: "mt-20 bg-white price-info",
- style: { "border-radius": "10rpx" }
- }, [
- vue.createElementVNode("view", { class: "flex" }, [
- vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
- vue.createElementVNode("text", { class: "label" }, "定价"),
- vue.createElementVNode(
- "text",
- { class: "content" },
- "¥" + vue.toDisplayString($setup.detail.price),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
- vue.createElementVNode("text", { class: "label" }, "回收折扣"),
- vue.createElementVNode(
- "text",
- { class: "content" },
- vue.toDisplayString($setup.detail.recycleDiscount) + "折",
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "flex flex-a-c" }, [
- vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
- vue.createElementVNode("text", { class: "label" }, "预估金额"),
- vue.createElementVNode(
- "text",
- { class: "content" },
- "¥" + vue.toDisplayString($setup.auditBook.expectMoney),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
- vue.createElementVNode("text", { class: "label" }, "审核金额"),
- vue.createElementVNode(
- "text",
- { class: "content" },
- "¥" + vue.toDisplayString($setup.auditBook.finalMoney || 0),
- 1
- /* TEXT */
- )
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "mt-20" }, [
- vue.createVNode(_component_u_subsection, {
- list: $setup.list,
- mode: "subsection",
- current: $setup.current,
- onChange: $setup.handleSectionChange
- }, null, 8, ["list", "current"]),
- vue.withDirectives(vue.createVNode($setup["AuditInfo"], {
- detail: $setup.auditBook,
- auditList: $setup.auditBook.auditCommentList,
- ref: "auditInfoRef"
- }, null, 8, ["detail", "auditList"]), [
- [vue.vShow, $setup.current == 0]
- ]),
- vue.withDirectives(vue.createVNode($setup["FileInfo"], {
- orderId: $setup.orderId,
- annexType: 2,
- isbn: $setup.isbnScan
- }, null, 8, ["orderId", "isbn"]), [
- [vue.vShow, $setup.current == 2]
- ])
- ]),
- vue.createElementVNode("view", { class: "fixed-bottom" }, [
- vue.createVNode(_component_u_button, {
- type: "warning",
- size: "large",
- onClick: $setup.handleScanCode
- }, {
- default: vue.withCtx(() => [
- vue.createTextVNode("扫码")
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_button, {
- type: "primary",
- size: "large",
- onClick: $setup.handleAudit
- }, {
- default: vue.withCtx(() => [
- vue.createTextVNode("确定")
- ]),
- _: 1
- /* STABLE */
- })
- ])
- ]);
- }
- const PagesIndexDetailBookAudit = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$Z], ["__scopeId", "data-v-376f8a68"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/book-audit.vue"]]);
- const _sfc_main$Z = {
- __name: "BookItem2",
- props: {
- item: Object,
- showClose: {
- type: Boolean,
- default: false
- }
- },
- emits: ["close"],
- setup(__props, { expose: __expose, emit: __emit }) {
- __expose();
- const props2 = __props;
- const emit2 = __emit;
- const handleClose = () => {
- emit2("close", props2.item.isbn);
- };
- const __returned__ = { props: props2, emit: emit2, handleClose, computed: vue.computed };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["card", { "card-close": $props.showClose }])
- },
- [
- vue.createElementVNode("view", { class: "flex w100" }, [
- vue.createElementVNode("view", { class: "flex-d" }, [
- vue.createElementVNode("image", {
- style: { "width": "70px", "height": "90px" },
- src: $props.item.cover,
- mode: "aspectFill"
- }, null, 8, ["src"]),
- !$props.showClose ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "quantity mt-24"
- },
- "数量: " + vue.toDisplayString($props.item.num),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
- vue.createElementVNode(
- "view",
- { class: "common-title mb-20" },
- vue.toDisplayString($props.item.bookName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
- vue.createElementVNode(
- "view",
- { class: "isbn" },
- "ISBN: " + vue.toDisplayString($props.item.isbn),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "set" },
- "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "不是"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
- vue.createElementVNode(
- "view",
- { class: "price" },
- "定价: " + vue.toDisplayString($props.item.price),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "estimate" },
- "预估单价: " + vue.toDisplayString($props.item.expectMoney || 0),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
- vue.createElementVNode(
- "view",
- { class: "discount" },
- "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "review" }, [
- vue.createTextVNode("审核金额: "),
- vue.createElementVNode(
- "text",
- { class: "color-red" },
- vue.toDisplayString($props.item.review || 0),
- 1
- /* TEXT */
- )
- ])
- ])
- ])
- ]),
- $props.showClose ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "quantity-icon mt-24"
- }, [
- vue.createVNode(_component_u_icon, {
- name: "close-circle-fill",
- size: "18",
- color: "#999",
- onClick: $setup.handleClose
- })
- ])) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- );
- }
- const BookItem$1 = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$Y], ["__scopeId", "data-v-469f67ea"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/components/BookItem2.vue"]]);
- const _sfc_main$Y = {
- __name: "batch-audit",
- setup(__props, { expose: __expose }) {
- __expose();
- const detailMap = vue.ref({});
- const scannedBooksDetail = vue.ref([]);
- const getBookInfo = (isbn) => {
- if (detailMap.value[isbn]) {
- scannedBooksDetail.value.push(detailMap.value[isbn]);
- return;
- }
- uni.$u.http.get(`/app/book/getSimpleBookInfoByIsbn/${isbn}`).then((res2) => {
- if (res2.code == 200) {
- detailMap.value[isbn] = res2.data;
- scannedBooksDetail.value.push(res2.data);
- }
- });
- };
- const handleClose = (index2, isbn) => {
- scannedBooksDetail.value.splice(index2, 1);
- scannedBooks.value = scannedBooks.value.filter((item) => item != isbn);
- };
- function checkIsbn(isbn) {
- const isbn13Regex = /^(?:97[89]-?\d{1,5}-?\d{1,7}-?\d{1,6}-?\d)$/;
- if (isbn13Regex.test(isbn)) {
- return true;
- }
- return false;
- }
- const scannedBooks = vue.ref([]);
- function handleScan(isbn) {
- var _a;
- if (!checkIsbn(isbn)) {
- let text = `不是正确的ISBN码`;
- uni.$u.ttsModule.speak(text);
- return;
- }
- let isbnStr = `${isbn.slice(-4)}`;
- let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
- if (isbns.includes(isbn)) {
- let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
- if (((_a = book.auditCommentList) == null ? void 0 : _a.length) > 0) {
- let notAuditNum = book.auditCommentList.filter((item) => item.sts === 0).length || 0;
- let scannedNum = scannedBooks.value.filter((item) => item == isbn).length || 0;
- if (scannedNum >= notAuditNum) {
- let text = `${isbnStr}已超出订单中的数量`;
- return uni.$u.ttsModule.speak(text);
- } else {
- if (book.suit == 1) {
- let text = `${isbnStr}请注意套装书是否齐全`;
- uni.$u.ttsModule.speak(text);
- }
- if (book.bookWarn == 1) {
- let text = `请注意${isbnStr}需要取出`;
- uni.$u.ttsModule.speak(text);
- }
- scannedBooks.value.push(isbn);
- getBookInfo(isbn);
- }
- }
- } else {
- let text = `此订单中不存在${isbnStr}这本书 `;
- uni.$u.ttsModule.speak(text);
- }
- }
- function handleScanCode() {
- uni.scanCode({
- success: (res2) => {
- handleScan(res2.result);
- }
- });
- }
- const checkUserId = vue.ref();
- const orderId = vue.ref();
- const orderDetail = vue.ref({});
- const showModal = vue.ref(false);
- const isQualitySelected = vue.ref(false);
- const showQualityModal = () => {
- showModal.value = true;
- };
- const closeModal = () => {
- showModal.value = false;
- playGlobalSound();
- };
- function playGlobalSound() {
- uni.$u.playClickSound();
- }
- const toggleQuality = () => {
- isQualitySelected.value = !isQualitySelected.value;
- };
- const handleAudit = () => {
- playGlobalSound();
- if (!isQualitySelected.value) {
- uni.$u.toast("请选择品相");
- uni.$u.ttsModule.speak("请选择品相");
- return;
- }
- let checkUserInfo = uni.getStorageSync("checkUserInfo");
- if (checkUserInfo.userId) {
- checkUserId.value = checkUserInfo.userId;
- }
- uni.$u.http.post("/app/orderinfo/checkOrderBatch", {
- checkUserId: checkUserId.value,
- orderId: orderId.value,
- checkList: scannedBooks.value.map((isbn) => ({ sts: 1, com: "", isbn }))
- }).then((res2) => {
- if (res2.code == 200) {
- uni.showToast({ title: "审核成功", icon: "none" });
- uni.$u.ttsModule.speak("审核成功");
- uni.navigateBack({ delta: 2 });
- } else {
- uni.$u.toast(res2.msg);
- }
- });
- };
- onLoad((options) => {
- orderId.value = options.orderId;
- orderDetail.value = uni.getStorageSync("orderDetail");
- scannedBooks.value = uni.getStorageSync("scannedBooks");
- scannedBooks.value.forEach((isbn) => {
- getBookInfo(isbn);
- });
- uni.$u.useGlobalEvent((e) => {
- if (e.barcode) {
- handleScan(e.barcode);
- }
- });
- });
- onShow(() => {
- var _a;
- uni.$u.updateActivePageOnShow();
- checkUserId.value = (_a = uni.getStorageSync("userInfo")) == null ? void 0 : _a.userId;
- orderDetail.value = uni.getStorageSync("orderDetail");
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { detailMap, scannedBooksDetail, getBookInfo, handleClose, checkIsbn, scannedBooks, handleScan, handleScanCode, checkUserId, orderId, orderDetail, showModal, isQualitySelected, showQualityModal, closeModal, playGlobalSound, toggleQuality, handleAudit, ref: vue.ref, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- }, BookItem: BookItem$1 };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
- return vue.openBlock(), vue.createElementBlock("view", { class: "batch-audit" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.scannedBooksDetail, (item, index2) => {
- return vue.openBlock(), vue.createBlock($setup["BookItem"], {
- key: item.isbn,
- item,
- showClose: "",
- onClose: (isbn) => $setup.handleClose(index2, isbn)
- }, null, 8, ["item", "onClose"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createElementVNode("view", { class: "fixed-bottom" }, [
- vue.createVNode(_component_u_button, {
- type: "warning",
- size: "large",
- onClick: $setup.handleScanCode
- }, {
- default: vue.withCtx(() => [
- vue.createTextVNode("扫码")
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_button, {
- type: "primary",
- size: "large",
- onClick: $setup.showQualityModal
- }, {
- default: vue.withCtx(() => [
- vue.createTextVNode("确定")
- ]),
- _: 1
- /* STABLE */
- })
- ]),
- vue.createVNode(_component_u_modal, {
- show: $setup.showModal,
- title: "品相选择",
- onCancel: $setup.closeModal,
- showCancelButton: true,
- closeOnClickOverlay: true,
- onConfirm: $setup.handleAudit
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", {
- class: "quality-selector",
- onClick: $setup.playGlobalSound
- }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["quality-circle", { selected: $setup.isQualitySelected }]),
- onClick: $setup.toggleQuality
- },
- [
- vue.createElementVNode("text", null, "良好")
- ],
- 2
- /* CLASS */
- )
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["show"])
- ]);
- }
- const PagesIndexDetailBatchAudit = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$X], ["__scopeId", "data-v-bc156c69"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/detail/batch-audit.vue"]]);
- const _sfc_main$X = {
- __name: "sender",
- setup(__props, { expose: __expose }) {
- __expose();
- function playGlobalSound() {
- uni.$u.playClickSound();
- }
- const otherParams = vue.ref({
- search: ""
- });
- const scrollRef = vue.ref(null);
- const refreshList = () => {
- var _a;
- (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
- };
- let dataList = vue.ref([]);
- const updateList = (data, page2) => {
- dataList.value = data;
- if (!isSearch.value)
- return;
- if (data.length > 0) {
- uni.$u.ttsModule.speak("查询到" + data.length + "条数据");
- } else {
- uni.$u.ttsModule.speak("未查询到数据");
- }
- isSearch.value = false;
- };
- const isSearch = vue.ref(false);
- const handleSearch = () => {
- isSearch.value = true;
- refreshList();
- };
- const __returned__ = { playGlobalSound, otherParams, scrollRef, refreshList, get dataList() {
- return dataList;
- }, set dataList(v) {
- dataList = v;
- }, updateList, isSearch, handleSearch, reactive: vue.reactive, PageScroll: pageScroll, OrderItem: orderItem, ref: vue.ref, get onLoad() {
- return onLoad;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
- const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "common-page",
- style: { "padding": "0" },
- onClick: $setup.playGlobalSound
- }, [
- vue.createVNode($setup["PageScroll"], {
- requestStr: "/app/orderinfo/getOrderListByUserInfo",
- onUpdateList: $setup.updateList,
- ref: "scrollRef",
- otherParams: $setup.otherParams,
- immediate: false
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "search-area" }, [
- vue.createVNode(_component_u_search, {
- placeholder: "请输入发件人姓名或电话",
- searchIconSize: 18,
- bgColor: "#f6f7f6",
- onSearch: $setup.handleSearch,
- modelValue: $setup.otherParams.search,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.otherParams.search = $event),
- "custom-style": "font-size:32rpx",
- "placeholder-style": "font-size:32rpx",
- clearabled: true,
- focus: false,
- showAction: false,
- height: 36
- }, null, 8, ["modelValue"])
- ])
- ]),
- _: 1
- /* STABLE */
- }),
- $setup.dataList.length ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "list-con"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.dataList, (cell) => {
- return vue.openBlock(), vue.createBlock($setup["OrderItem"], {
- key: cell.id,
- item: cell,
- class: "mt-20"
- }, null, 8, ["item"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- _: 1
- /* STABLE */
- }, 8, ["otherParams"])
- ]);
- }
- const PagesIndexAuditSender = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$W], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/audit/sender.vue"]]);
- const _sfc_main$W = {
- __name: "audit",
- setup(__props, { expose: __expose }) {
- __expose();
- const otherParams = vue.ref({
- sender: ""
- });
- const scrollRef = vue.ref(null);
- const refreshList = () => {
- var _a;
- (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
- };
- let dataList = vue.ref([{
- date: "2024-10-24",
- orderNum: 423,
- auditNum: 293,
- trueNum: 323
- }, {
- date: "2024-10-24",
- orderNum: 423,
- auditNum: 293,
- trueNum: 323
- }, {
- date: "2024-10-24",
- orderNum: 423,
- auditNum: 293,
- trueNum: 323
- }]);
- const updateList = (data) => {
- dataList.value = data;
- };
- const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
- return dataList;
- }, set dataList(v) {
- dataList = v;
- }, updateList, reactive: vue.reactive, PageScroll: pageScroll, ref: vue.ref, get onLoad() {
- return onLoad;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "common-page",
- style: { "padding": "0" }
- }, [
- vue.createVNode($setup["PageScroll"], {
- requestStr: "/team/token/shop/invite/page",
- onUpdateList: $setup.updateList,
- ref: "scrollRef",
- otherParams: $setup.otherParams
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "search-area flex-a" }, [
- vue.createElementVNode("view", { class: "text-item flex-1" }, "审核日期"),
- vue.createElementVNode("view", { class: "text-item flex-1" }, "订单数量"),
- vue.createElementVNode("view", { class: "text-item flex-1" }, "审书数量"),
- vue.createElementVNode("view", { class: "text-item flex-1" }, "实际回收")
- ])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createElementVNode("view", { class: "list-con" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "flex-a"
- }, [
- vue.createElementVNode(
- "view",
- { class: "text-item flex-1" },
- vue.toDisplayString(item.date),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "text-item flex-1" },
- vue.toDisplayString(item.orderNum),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "text-item flex-1" },
- vue.toDisplayString(item.auditNum),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "text-item flex-1" },
- vue.toDisplayString(item.trueNum),
- 1
- /* TEXT */
- )
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["otherParams"])
- ]);
- }
- const PagesIndexStatisticAudit = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$V], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/statistic/audit.vue"]]);
- const icons = {
- "id": "2852637",
- "name": "uniui图标库",
- "font_family": "uniicons",
- "css_prefix_text": "uniui-",
- "description": "",
- "glyphs": [
- {
- "icon_id": "25027049",
- "name": "yanse",
- "font_class": "color",
- "unicode": "e6cf",
- "unicode_decimal": 59087
- },
- {
- "icon_id": "25027048",
- "name": "wallet",
- "font_class": "wallet",
- "unicode": "e6b1",
- "unicode_decimal": 59057
- },
- {
- "icon_id": "25015720",
- "name": "settings-filled",
- "font_class": "settings-filled",
- "unicode": "e6ce",
- "unicode_decimal": 59086
- },
- {
- "icon_id": "25015434",
- "name": "shimingrenzheng-filled",
- "font_class": "auth-filled",
- "unicode": "e6cc",
- "unicode_decimal": 59084
- },
- {
- "icon_id": "24934246",
- "name": "shop-filled",
- "font_class": "shop-filled",
- "unicode": "e6cd",
- "unicode_decimal": 59085
- },
- {
- "icon_id": "24934159",
- "name": "staff-filled-01",
- "font_class": "staff-filled",
- "unicode": "e6cb",
- "unicode_decimal": 59083
- },
- {
- "icon_id": "24932461",
- "name": "VIP-filled",
- "font_class": "vip-filled",
- "unicode": "e6c6",
- "unicode_decimal": 59078
- },
- {
- "icon_id": "24932462",
- "name": "plus_circle_fill",
- "font_class": "plus-filled",
- "unicode": "e6c7",
- "unicode_decimal": 59079
- },
- {
- "icon_id": "24932463",
- "name": "folder_add-filled",
- "font_class": "folder-add-filled",
- "unicode": "e6c8",
- "unicode_decimal": 59080
- },
- {
- "icon_id": "24932464",
- "name": "yanse-filled",
- "font_class": "color-filled",
- "unicode": "e6c9",
- "unicode_decimal": 59081
- },
- {
- "icon_id": "24932465",
- "name": "tune-filled",
- "font_class": "tune-filled",
- "unicode": "e6ca",
- "unicode_decimal": 59082
- },
- {
- "icon_id": "24932455",
- "name": "a-rilidaka-filled",
- "font_class": "calendar-filled",
- "unicode": "e6c0",
- "unicode_decimal": 59072
- },
- {
- "icon_id": "24932456",
- "name": "notification-filled",
- "font_class": "notification-filled",
- "unicode": "e6c1",
- "unicode_decimal": 59073
- },
- {
- "icon_id": "24932457",
- "name": "wallet-filled",
- "font_class": "wallet-filled",
- "unicode": "e6c2",
- "unicode_decimal": 59074
- },
- {
- "icon_id": "24932458",
- "name": "paihangbang-filled",
- "font_class": "medal-filled",
- "unicode": "e6c3",
- "unicode_decimal": 59075
- },
- {
- "icon_id": "24932459",
- "name": "gift-filled",
- "font_class": "gift-filled",
- "unicode": "e6c4",
- "unicode_decimal": 59076
- },
- {
- "icon_id": "24932460",
- "name": "fire-filled",
- "font_class": "fire-filled",
- "unicode": "e6c5",
- "unicode_decimal": 59077
- },
- {
- "icon_id": "24928001",
- "name": "refreshempty",
- "font_class": "refreshempty",
- "unicode": "e6bf",
- "unicode_decimal": 59071
- },
- {
- "icon_id": "24926853",
- "name": "location-ellipse",
- "font_class": "location-filled",
- "unicode": "e6af",
- "unicode_decimal": 59055
- },
- {
- "icon_id": "24926735",
- "name": "person-filled",
- "font_class": "person-filled",
- "unicode": "e69d",
- "unicode_decimal": 59037
- },
- {
- "icon_id": "24926703",
- "name": "personadd-filled",
- "font_class": "personadd-filled",
- "unicode": "e698",
- "unicode_decimal": 59032
- },
- {
- "icon_id": "24923351",
- "name": "back",
- "font_class": "back",
- "unicode": "e6b9",
- "unicode_decimal": 59065
- },
- {
- "icon_id": "24923352",
- "name": "forward",
- "font_class": "forward",
- "unicode": "e6ba",
- "unicode_decimal": 59066
- },
- {
- "icon_id": "24923353",
- "name": "arrowthinright",
- "font_class": "arrow-right",
- "unicode": "e6bb",
- "unicode_decimal": 59067
- },
- {
- "icon_id": "24923353",
- "name": "arrowthinright",
- "font_class": "arrowthinright",
- "unicode": "e6bb",
- "unicode_decimal": 59067
- },
- {
- "icon_id": "24923354",
- "name": "arrowthinleft",
- "font_class": "arrow-left",
- "unicode": "e6bc",
- "unicode_decimal": 59068
- },
- {
- "icon_id": "24923354",
- "name": "arrowthinleft",
- "font_class": "arrowthinleft",
- "unicode": "e6bc",
- "unicode_decimal": 59068
- },
- {
- "icon_id": "24923355",
- "name": "arrowthinup",
- "font_class": "arrow-up",
- "unicode": "e6bd",
- "unicode_decimal": 59069
- },
- {
- "icon_id": "24923355",
- "name": "arrowthinup",
- "font_class": "arrowthinup",
- "unicode": "e6bd",
- "unicode_decimal": 59069
- },
- {
- "icon_id": "24923356",
- "name": "arrowthindown",
- "font_class": "arrow-down",
- "unicode": "e6be",
- "unicode_decimal": 59070
- },
- {
- "icon_id": "24923356",
- "name": "arrowthindown",
- "font_class": "arrowthindown",
- "unicode": "e6be",
- "unicode_decimal": 59070
- },
- {
- "icon_id": "24923349",
- "name": "arrowdown",
- "font_class": "bottom",
- "unicode": "e6b8",
- "unicode_decimal": 59064
- },
- {
- "icon_id": "24923349",
- "name": "arrowdown",
- "font_class": "arrowdown",
- "unicode": "e6b8",
- "unicode_decimal": 59064
- },
- {
- "icon_id": "24923346",
- "name": "arrowright",
- "font_class": "right",
- "unicode": "e6b5",
- "unicode_decimal": 59061
- },
- {
- "icon_id": "24923346",
- "name": "arrowright",
- "font_class": "arrowright",
- "unicode": "e6b5",
- "unicode_decimal": 59061
- },
- {
- "icon_id": "24923347",
- "name": "arrowup",
- "font_class": "top",
- "unicode": "e6b6",
- "unicode_decimal": 59062
- },
- {
- "icon_id": "24923347",
- "name": "arrowup",
- "font_class": "arrowup",
- "unicode": "e6b6",
- "unicode_decimal": 59062
- },
- {
- "icon_id": "24923348",
- "name": "arrowleft",
- "font_class": "left",
- "unicode": "e6b7",
- "unicode_decimal": 59063
- },
- {
- "icon_id": "24923348",
- "name": "arrowleft",
- "font_class": "arrowleft",
- "unicode": "e6b7",
- "unicode_decimal": 59063
- },
- {
- "icon_id": "24923334",
- "name": "eye",
- "font_class": "eye",
- "unicode": "e651",
- "unicode_decimal": 58961
- },
- {
- "icon_id": "24923335",
- "name": "eye-filled",
- "font_class": "eye-filled",
- "unicode": "e66a",
- "unicode_decimal": 58986
- },
- {
- "icon_id": "24923336",
- "name": "eye-slash",
- "font_class": "eye-slash",
- "unicode": "e6b3",
- "unicode_decimal": 59059
- },
- {
- "icon_id": "24923337",
- "name": "eye-slash-filled",
- "font_class": "eye-slash-filled",
- "unicode": "e6b4",
- "unicode_decimal": 59060
- },
- {
- "icon_id": "24923305",
- "name": "info-filled",
- "font_class": "info-filled",
- "unicode": "e649",
- "unicode_decimal": 58953
- },
- {
- "icon_id": "24923299",
- "name": "reload-01",
- "font_class": "reload",
- "unicode": "e6b2",
- "unicode_decimal": 59058
- },
- {
- "icon_id": "24923195",
- "name": "mic_slash_fill",
- "font_class": "micoff-filled",
- "unicode": "e6b0",
- "unicode_decimal": 59056
- },
- {
- "icon_id": "24923165",
- "name": "map-pin-ellipse",
- "font_class": "map-pin-ellipse",
- "unicode": "e6ac",
- "unicode_decimal": 59052
- },
- {
- "icon_id": "24923166",
- "name": "map-pin",
- "font_class": "map-pin",
- "unicode": "e6ad",
- "unicode_decimal": 59053
- },
- {
- "icon_id": "24923167",
- "name": "location",
- "font_class": "location",
- "unicode": "e6ae",
- "unicode_decimal": 59054
- },
- {
- "icon_id": "24923064",
- "name": "starhalf",
- "font_class": "starhalf",
- "unicode": "e683",
- "unicode_decimal": 59011
- },
- {
- "icon_id": "24923065",
- "name": "star",
- "font_class": "star",
- "unicode": "e688",
- "unicode_decimal": 59016
- },
- {
- "icon_id": "24923066",
- "name": "star-filled",
- "font_class": "star-filled",
- "unicode": "e68f",
- "unicode_decimal": 59023
- },
- {
- "icon_id": "24899646",
- "name": "a-rilidaka",
- "font_class": "calendar",
- "unicode": "e6a0",
- "unicode_decimal": 59040
- },
- {
- "icon_id": "24899647",
- "name": "fire",
- "font_class": "fire",
- "unicode": "e6a1",
- "unicode_decimal": 59041
- },
- {
- "icon_id": "24899648",
- "name": "paihangbang",
- "font_class": "medal",
- "unicode": "e6a2",
- "unicode_decimal": 59042
- },
- {
- "icon_id": "24899649",
- "name": "font",
- "font_class": "font",
- "unicode": "e6a3",
- "unicode_decimal": 59043
- },
- {
- "icon_id": "24899650",
- "name": "gift",
- "font_class": "gift",
- "unicode": "e6a4",
- "unicode_decimal": 59044
- },
- {
- "icon_id": "24899651",
- "name": "link",
- "font_class": "link",
- "unicode": "e6a5",
- "unicode_decimal": 59045
- },
- {
- "icon_id": "24899652",
- "name": "notification",
- "font_class": "notification",
- "unicode": "e6a6",
- "unicode_decimal": 59046
- },
- {
- "icon_id": "24899653",
- "name": "staff",
- "font_class": "staff",
- "unicode": "e6a7",
- "unicode_decimal": 59047
- },
- {
- "icon_id": "24899654",
- "name": "VIP",
- "font_class": "vip",
- "unicode": "e6a8",
- "unicode_decimal": 59048
- },
- {
- "icon_id": "24899655",
- "name": "folder_add",
- "font_class": "folder-add",
- "unicode": "e6a9",
- "unicode_decimal": 59049
- },
- {
- "icon_id": "24899656",
- "name": "tune",
- "font_class": "tune",
- "unicode": "e6aa",
- "unicode_decimal": 59050
- },
- {
- "icon_id": "24899657",
- "name": "shimingrenzheng",
- "font_class": "auth",
- "unicode": "e6ab",
- "unicode_decimal": 59051
- },
- {
- "icon_id": "24899565",
- "name": "person",
- "font_class": "person",
- "unicode": "e699",
- "unicode_decimal": 59033
- },
- {
- "icon_id": "24899566",
- "name": "email-filled",
- "font_class": "email-filled",
- "unicode": "e69a",
- "unicode_decimal": 59034
- },
- {
- "icon_id": "24899567",
- "name": "phone-filled",
- "font_class": "phone-filled",
- "unicode": "e69b",
- "unicode_decimal": 59035
- },
- {
- "icon_id": "24899568",
- "name": "phone",
- "font_class": "phone",
- "unicode": "e69c",
- "unicode_decimal": 59036
- },
- {
- "icon_id": "24899570",
- "name": "email",
- "font_class": "email",
- "unicode": "e69e",
- "unicode_decimal": 59038
- },
- {
- "icon_id": "24899571",
- "name": "personadd",
- "font_class": "personadd",
- "unicode": "e69f",
- "unicode_decimal": 59039
- },
- {
- "icon_id": "24899558",
- "name": "chatboxes-filled",
- "font_class": "chatboxes-filled",
- "unicode": "e692",
- "unicode_decimal": 59026
- },
- {
- "icon_id": "24899559",
- "name": "contact",
- "font_class": "contact",
- "unicode": "e693",
- "unicode_decimal": 59027
- },
- {
- "icon_id": "24899560",
- "name": "chatbubble-filled",
- "font_class": "chatbubble-filled",
- "unicode": "e694",
- "unicode_decimal": 59028
- },
- {
- "icon_id": "24899561",
- "name": "contact-filled",
- "font_class": "contact-filled",
- "unicode": "e695",
- "unicode_decimal": 59029
- },
- {
- "icon_id": "24899562",
- "name": "chatboxes",
- "font_class": "chatboxes",
- "unicode": "e696",
- "unicode_decimal": 59030
- },
- {
- "icon_id": "24899563",
- "name": "chatbubble",
- "font_class": "chatbubble",
- "unicode": "e697",
- "unicode_decimal": 59031
- },
- {
- "icon_id": "24881290",
- "name": "upload-filled",
- "font_class": "upload-filled",
- "unicode": "e68e",
- "unicode_decimal": 59022
- },
- {
- "icon_id": "24881292",
- "name": "upload",
- "font_class": "upload",
- "unicode": "e690",
- "unicode_decimal": 59024
- },
- {
- "icon_id": "24881293",
- "name": "weixin",
- "font_class": "weixin",
- "unicode": "e691",
- "unicode_decimal": 59025
- },
- {
- "icon_id": "24881274",
- "name": "compose",
- "font_class": "compose",
- "unicode": "e67f",
- "unicode_decimal": 59007
- },
- {
- "icon_id": "24881275",
- "name": "qq",
- "font_class": "qq",
- "unicode": "e680",
- "unicode_decimal": 59008
- },
- {
- "icon_id": "24881276",
- "name": "download-filled",
- "font_class": "download-filled",
- "unicode": "e681",
- "unicode_decimal": 59009
- },
- {
- "icon_id": "24881277",
- "name": "pengyouquan",
- "font_class": "pyq",
- "unicode": "e682",
- "unicode_decimal": 59010
- },
- {
- "icon_id": "24881279",
- "name": "sound",
- "font_class": "sound",
- "unicode": "e684",
- "unicode_decimal": 59012
- },
- {
- "icon_id": "24881280",
- "name": "trash-filled",
- "font_class": "trash-filled",
- "unicode": "e685",
- "unicode_decimal": 59013
- },
- {
- "icon_id": "24881281",
- "name": "sound-filled",
- "font_class": "sound-filled",
- "unicode": "e686",
- "unicode_decimal": 59014
- },
- {
- "icon_id": "24881282",
- "name": "trash",
- "font_class": "trash",
- "unicode": "e687",
- "unicode_decimal": 59015
- },
- {
- "icon_id": "24881284",
- "name": "videocam-filled",
- "font_class": "videocam-filled",
- "unicode": "e689",
- "unicode_decimal": 59017
- },
- {
- "icon_id": "24881285",
- "name": "spinner-cycle",
- "font_class": "spinner-cycle",
- "unicode": "e68a",
- "unicode_decimal": 59018
- },
- {
- "icon_id": "24881286",
- "name": "weibo",
- "font_class": "weibo",
- "unicode": "e68b",
- "unicode_decimal": 59019
- },
- {
- "icon_id": "24881288",
- "name": "videocam",
- "font_class": "videocam",
- "unicode": "e68c",
- "unicode_decimal": 59020
- },
- {
- "icon_id": "24881289",
- "name": "download",
- "font_class": "download",
- "unicode": "e68d",
- "unicode_decimal": 59021
- },
- {
- "icon_id": "24879601",
- "name": "help",
- "font_class": "help",
- "unicode": "e679",
- "unicode_decimal": 59001
- },
- {
- "icon_id": "24879602",
- "name": "navigate-filled",
- "font_class": "navigate-filled",
- "unicode": "e67a",
- "unicode_decimal": 59002
- },
- {
- "icon_id": "24879603",
- "name": "plusempty",
- "font_class": "plusempty",
- "unicode": "e67b",
- "unicode_decimal": 59003
- },
- {
- "icon_id": "24879604",
- "name": "smallcircle",
- "font_class": "smallcircle",
- "unicode": "e67c",
- "unicode_decimal": 59004
- },
- {
- "icon_id": "24879605",
- "name": "minus-filled",
- "font_class": "minus-filled",
- "unicode": "e67d",
- "unicode_decimal": 59005
- },
- {
- "icon_id": "24879606",
- "name": "micoff",
- "font_class": "micoff",
- "unicode": "e67e",
- "unicode_decimal": 59006
- },
- {
- "icon_id": "24879588",
- "name": "closeempty",
- "font_class": "closeempty",
- "unicode": "e66c",
- "unicode_decimal": 58988
- },
- {
- "icon_id": "24879589",
- "name": "clear",
- "font_class": "clear",
- "unicode": "e66d",
- "unicode_decimal": 58989
- },
- {
- "icon_id": "24879590",
- "name": "navigate",
- "font_class": "navigate",
- "unicode": "e66e",
- "unicode_decimal": 58990
- },
- {
- "icon_id": "24879591",
- "name": "minus",
- "font_class": "minus",
- "unicode": "e66f",
- "unicode_decimal": 58991
- },
- {
- "icon_id": "24879592",
- "name": "image",
- "font_class": "image",
- "unicode": "e670",
- "unicode_decimal": 58992
- },
- {
- "icon_id": "24879593",
- "name": "mic",
- "font_class": "mic",
- "unicode": "e671",
- "unicode_decimal": 58993
- },
- {
- "icon_id": "24879594",
- "name": "paperplane",
- "font_class": "paperplane",
- "unicode": "e672",
- "unicode_decimal": 58994
- },
- {
- "icon_id": "24879595",
- "name": "close",
- "font_class": "close",
- "unicode": "e673",
- "unicode_decimal": 58995
- },
- {
- "icon_id": "24879596",
- "name": "help-filled",
- "font_class": "help-filled",
- "unicode": "e674",
- "unicode_decimal": 58996
- },
- {
- "icon_id": "24879597",
- "name": "plus-filled",
- "font_class": "paperplane-filled",
- "unicode": "e675",
- "unicode_decimal": 58997
- },
- {
- "icon_id": "24879598",
- "name": "plus",
- "font_class": "plus",
- "unicode": "e676",
- "unicode_decimal": 58998
- },
- {
- "icon_id": "24879599",
- "name": "mic-filled",
- "font_class": "mic-filled",
- "unicode": "e677",
- "unicode_decimal": 58999
- },
- {
- "icon_id": "24879600",
- "name": "image-filled",
- "font_class": "image-filled",
- "unicode": "e678",
- "unicode_decimal": 59e3
- },
- {
- "icon_id": "24855900",
- "name": "locked-filled",
- "font_class": "locked-filled",
- "unicode": "e668",
- "unicode_decimal": 58984
- },
- {
- "icon_id": "24855901",
- "name": "info",
- "font_class": "info",
- "unicode": "e669",
- "unicode_decimal": 58985
- },
- {
- "icon_id": "24855903",
- "name": "locked",
- "font_class": "locked",
- "unicode": "e66b",
- "unicode_decimal": 58987
- },
- {
- "icon_id": "24855884",
- "name": "camera-filled",
- "font_class": "camera-filled",
- "unicode": "e658",
- "unicode_decimal": 58968
- },
- {
- "icon_id": "24855885",
- "name": "chat-filled",
- "font_class": "chat-filled",
- "unicode": "e659",
- "unicode_decimal": 58969
- },
- {
- "icon_id": "24855886",
- "name": "camera",
- "font_class": "camera",
- "unicode": "e65a",
- "unicode_decimal": 58970
- },
- {
- "icon_id": "24855887",
- "name": "circle",
- "font_class": "circle",
- "unicode": "e65b",
- "unicode_decimal": 58971
- },
- {
- "icon_id": "24855888",
- "name": "checkmarkempty",
- "font_class": "checkmarkempty",
- "unicode": "e65c",
- "unicode_decimal": 58972
- },
- {
- "icon_id": "24855889",
- "name": "chat",
- "font_class": "chat",
- "unicode": "e65d",
- "unicode_decimal": 58973
- },
- {
- "icon_id": "24855890",
- "name": "circle-filled",
- "font_class": "circle-filled",
- "unicode": "e65e",
- "unicode_decimal": 58974
- },
- {
- "icon_id": "24855891",
- "name": "flag",
- "font_class": "flag",
- "unicode": "e65f",
- "unicode_decimal": 58975
- },
- {
- "icon_id": "24855892",
- "name": "flag-filled",
- "font_class": "flag-filled",
- "unicode": "e660",
- "unicode_decimal": 58976
- },
- {
- "icon_id": "24855893",
- "name": "gear-filled",
- "font_class": "gear-filled",
- "unicode": "e661",
- "unicode_decimal": 58977
- },
- {
- "icon_id": "24855894",
- "name": "home",
- "font_class": "home",
- "unicode": "e662",
- "unicode_decimal": 58978
- },
- {
- "icon_id": "24855895",
- "name": "home-filled",
- "font_class": "home-filled",
- "unicode": "e663",
- "unicode_decimal": 58979
- },
- {
- "icon_id": "24855896",
- "name": "gear",
- "font_class": "gear",
- "unicode": "e664",
- "unicode_decimal": 58980
- },
- {
- "icon_id": "24855897",
- "name": "smallcircle-filled",
- "font_class": "smallcircle-filled",
- "unicode": "e665",
- "unicode_decimal": 58981
- },
- {
- "icon_id": "24855898",
- "name": "map-filled",
- "font_class": "map-filled",
- "unicode": "e666",
- "unicode_decimal": 58982
- },
- {
- "icon_id": "24855899",
- "name": "map",
- "font_class": "map",
- "unicode": "e667",
- "unicode_decimal": 58983
- },
- {
- "icon_id": "24855825",
- "name": "refresh-filled",
- "font_class": "refresh-filled",
- "unicode": "e656",
- "unicode_decimal": 58966
- },
- {
- "icon_id": "24855826",
- "name": "refresh",
- "font_class": "refresh",
- "unicode": "e657",
- "unicode_decimal": 58967
- },
- {
- "icon_id": "24855808",
- "name": "cloud-upload",
- "font_class": "cloud-upload",
- "unicode": "e645",
- "unicode_decimal": 58949
- },
- {
- "icon_id": "24855809",
- "name": "cloud-download-filled",
- "font_class": "cloud-download-filled",
- "unicode": "e646",
- "unicode_decimal": 58950
- },
- {
- "icon_id": "24855810",
- "name": "cloud-download",
- "font_class": "cloud-download",
- "unicode": "e647",
- "unicode_decimal": 58951
- },
- {
- "icon_id": "24855811",
- "name": "cloud-upload-filled",
- "font_class": "cloud-upload-filled",
- "unicode": "e648",
- "unicode_decimal": 58952
- },
- {
- "icon_id": "24855813",
- "name": "redo",
- "font_class": "redo",
- "unicode": "e64a",
- "unicode_decimal": 58954
- },
- {
- "icon_id": "24855814",
- "name": "images-filled",
- "font_class": "images-filled",
- "unicode": "e64b",
- "unicode_decimal": 58955
- },
- {
- "icon_id": "24855815",
- "name": "undo-filled",
- "font_class": "undo-filled",
- "unicode": "e64c",
- "unicode_decimal": 58956
- },
- {
- "icon_id": "24855816",
- "name": "more",
- "font_class": "more",
- "unicode": "e64d",
- "unicode_decimal": 58957
- },
- {
- "icon_id": "24855817",
- "name": "more-filled",
- "font_class": "more-filled",
- "unicode": "e64e",
- "unicode_decimal": 58958
- },
- {
- "icon_id": "24855818",
- "name": "undo",
- "font_class": "undo",
- "unicode": "e64f",
- "unicode_decimal": 58959
- },
- {
- "icon_id": "24855819",
- "name": "images",
- "font_class": "images",
- "unicode": "e650",
- "unicode_decimal": 58960
- },
- {
- "icon_id": "24855821",
- "name": "paperclip",
- "font_class": "paperclip",
- "unicode": "e652",
- "unicode_decimal": 58962
- },
- {
- "icon_id": "24855822",
- "name": "settings",
- "font_class": "settings",
- "unicode": "e653",
- "unicode_decimal": 58963
- },
- {
- "icon_id": "24855823",
- "name": "search",
- "font_class": "search",
- "unicode": "e654",
- "unicode_decimal": 58964
- },
- {
- "icon_id": "24855824",
- "name": "redo-filled",
- "font_class": "redo-filled",
- "unicode": "e655",
- "unicode_decimal": 58965
- },
- {
- "icon_id": "24841702",
- "name": "list",
- "font_class": "list",
- "unicode": "e644",
- "unicode_decimal": 58948
- },
- {
- "icon_id": "24841489",
- "name": "mail-open-filled",
- "font_class": "mail-open-filled",
- "unicode": "e63a",
- "unicode_decimal": 58938
- },
- {
- "icon_id": "24841491",
- "name": "hand-thumbsdown-filled",
- "font_class": "hand-down-filled",
- "unicode": "e63c",
- "unicode_decimal": 58940
- },
- {
- "icon_id": "24841492",
- "name": "hand-thumbsdown",
- "font_class": "hand-down",
- "unicode": "e63d",
- "unicode_decimal": 58941
- },
- {
- "icon_id": "24841493",
- "name": "hand-thumbsup-filled",
- "font_class": "hand-up-filled",
- "unicode": "e63e",
- "unicode_decimal": 58942
- },
- {
- "icon_id": "24841494",
- "name": "hand-thumbsup",
- "font_class": "hand-up",
- "unicode": "e63f",
- "unicode_decimal": 58943
- },
- {
- "icon_id": "24841496",
- "name": "heart-filled",
- "font_class": "heart-filled",
- "unicode": "e641",
- "unicode_decimal": 58945
- },
- {
- "icon_id": "24841498",
- "name": "mail-open",
- "font_class": "mail-open",
- "unicode": "e643",
- "unicode_decimal": 58947
- },
- {
- "icon_id": "24841488",
- "name": "heart",
- "font_class": "heart",
- "unicode": "e639",
- "unicode_decimal": 58937
- },
- {
- "icon_id": "24839963",
- "name": "loop",
- "font_class": "loop",
- "unicode": "e633",
- "unicode_decimal": 58931
- },
- {
- "icon_id": "24839866",
- "name": "pulldown",
- "font_class": "pulldown",
- "unicode": "e632",
- "unicode_decimal": 58930
- },
- {
- "icon_id": "24813798",
- "name": "scan",
- "font_class": "scan",
- "unicode": "e62a",
- "unicode_decimal": 58922
- },
- {
- "icon_id": "24813786",
- "name": "bars",
- "font_class": "bars",
- "unicode": "e627",
- "unicode_decimal": 58919
- },
- {
- "icon_id": "24813788",
- "name": "cart-filled",
- "font_class": "cart-filled",
- "unicode": "e629",
- "unicode_decimal": 58921
- },
- {
- "icon_id": "24813790",
- "name": "checkbox",
- "font_class": "checkbox",
- "unicode": "e62b",
- "unicode_decimal": 58923
- },
- {
- "icon_id": "24813791",
- "name": "checkbox-filled",
- "font_class": "checkbox-filled",
- "unicode": "e62c",
- "unicode_decimal": 58924
- },
- {
- "icon_id": "24813794",
- "name": "shop",
- "font_class": "shop",
- "unicode": "e62f",
- "unicode_decimal": 58927
- },
- {
- "icon_id": "24813795",
- "name": "headphones",
- "font_class": "headphones",
- "unicode": "e630",
- "unicode_decimal": 58928
- },
- {
- "icon_id": "24813796",
- "name": "cart",
- "font_class": "cart",
- "unicode": "e631",
- "unicode_decimal": 58929
- }
- ]
- };
- const getVal = (val) => {
- const reg = /^[0-9]*$/g;
- return typeof val === "number" || reg.test(val) ? val + "px" : val;
- };
- const _sfc_main$V = {
- name: "UniIcons",
- emits: ["click"],
- props: {
- type: {
- type: String,
- default: ""
- },
- color: {
- type: String,
- default: "#333333"
- },
- size: {
- type: [Number, String],
- default: 16
- },
- customPrefix: {
- type: String,
- default: ""
- }
- },
- data() {
- return {
- icons: icons.glyphs
- };
- },
- computed: {
- unicode() {
- let code2 = this.icons.find((v) => v.font_class === this.type);
- if (code2) {
- return unescape(`%u${code2.unicode}`);
- }
- return "";
- },
- iconSize() {
- return getVal(this.size);
- }
- },
- methods: {
- _onClick() {
- this.$emit("click");
- }
- }
- };
- function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "text",
- {
- style: vue.normalizeStyle({ color: $props.color, "font-size": $options.iconSize }),
- class: vue.normalizeClass(["uni-icons", ["uniui-" + $props.type, $props.customPrefix, $props.customPrefix ? $props.type : ""]]),
- onClick: _cache[0] || (_cache[0] = (...args) => $options._onClick && $options._onClick(...args))
- },
- null,
- 6
- /* CLASS, STYLE */
- );
- }
- const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$U], ["__scopeId", "data-v-d31e1c47"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uni-icons/components/uni-icons/uni-icons.vue"]]);
- let Calendar$1 = class Calendar {
- constructor({
- selected,
- startDate,
- endDate,
- range: range2
- } = {}) {
- this.date = this.getDateObj(/* @__PURE__ */ new Date());
- this.selected = selected || [];
- this.startDate = startDate;
- this.endDate = endDate;
- this.range = range2;
- this.cleanMultipleStatus();
- this.weeks = {};
- this.lastHover = false;
- }
- /**
- * 设置日期
- * @param {Object} date
- */
- setDate(date3) {
- const selectDate = this.getDateObj(date3);
- this.getWeeks(selectDate.fullDate);
- }
- /**
- * 清理多选状态
- */
- cleanMultipleStatus() {
- this.multipleStatus = {
- before: "",
- after: "",
- data: []
- };
- }
- setStartDate(startDate) {
- this.startDate = startDate;
- }
- setEndDate(endDate) {
- this.endDate = endDate;
- }
- getPreMonthObj(date3) {
- date3 = fixIosDateFormat(date3);
- date3 = new Date(date3);
- const oldMonth = date3.getMonth();
- date3.setMonth(oldMonth - 1);
- const newMonth = date3.getMonth();
- if (oldMonth !== 0 && newMonth - oldMonth === 0) {
- date3.setMonth(newMonth - 1);
- }
- return this.getDateObj(date3);
- }
- getNextMonthObj(date3) {
- date3 = fixIosDateFormat(date3);
- date3 = new Date(date3);
- const oldMonth = date3.getMonth();
- date3.setMonth(oldMonth + 1);
- const newMonth = date3.getMonth();
- if (newMonth - oldMonth > 1) {
- date3.setMonth(newMonth - 1);
- }
- return this.getDateObj(date3);
- }
- /**
- * 获取指定格式Date对象
- */
- getDateObj(date3) {
- date3 = fixIosDateFormat(date3);
- date3 = new Date(date3);
- return {
- fullDate: getDate(date3),
- year: date3.getFullYear(),
- month: addZero(date3.getMonth() + 1),
- date: addZero(date3.getDate()),
- day: date3.getDay()
- };
- }
- /**
- * 获取上一个月日期集合
- */
- getPreMonthDays(amount2, dateObj) {
- const result = [];
- for (let i = amount2 - 1; i >= 0; i--) {
- const month = dateObj.month > 1 ? dateObj.month - 1 : 12;
- const year = month === 12 ? dateObj.year - 1 : dateObj.year;
- const date3 = new Date(year, month, -i).getDate();
- const fullDate = `${year}-${addZero(month)}-${addZero(date3)}`;
- let multiples = this.multipleStatus.data;
- let multiplesStatus = -1;
- if (this.range && multiples) {
- multiplesStatus = multiples.findIndex((item) => {
- return this.dateEqual(item, fullDate);
- });
- }
- const checked = multiplesStatus !== -1;
- const extraInfo = this.selected && this.selected.find((item) => {
- if (this.dateEqual(fullDate, item.date)) {
- return item;
- }
- });
- result.push({
- fullDate,
- year,
- month,
- date: date3,
- multiple: this.range ? checked : false,
- beforeMultiple: this.isLogicBefore(fullDate, this.multipleStatus.before, this.multipleStatus.after),
- afterMultiple: this.isLogicAfter(fullDate, this.multipleStatus.before, this.multipleStatus.after),
- disable: this.startDate && !dateCompare(this.startDate, fullDate) || this.endDate && !dateCompare(fullDate, this.endDate),
- isToday: fullDate === this.date.fullDate,
- userChecked: false,
- extraInfo
- });
- }
- return result;
- }
- /**
- * 获取本月日期集合
- */
- getCurrentMonthDays(amount2, dateObj) {
- const result = [];
- const fullDate = this.date.fullDate;
- for (let i = 1; i <= amount2; i++) {
- const currentDate = `${dateObj.year}-${dateObj.month}-${addZero(i)}`;
- const isToday = fullDate === currentDate;
- const extraInfo = this.selected && this.selected.find((item) => {
- if (this.dateEqual(currentDate, item.date)) {
- return item;
- }
- });
- if (this.startDate) {
- dateCompare(this.startDate, currentDate);
- }
- if (this.endDate) {
- dateCompare(currentDate, this.endDate);
- }
- let multiples = this.multipleStatus.data;
- let multiplesStatus = -1;
- if (this.range && multiples) {
- multiplesStatus = multiples.findIndex((item) => {
- return this.dateEqual(item, currentDate);
- });
- }
- const checked = multiplesStatus !== -1;
- result.push({
- fullDate: currentDate,
- year: dateObj.year,
- month: dateObj.month,
- date: i,
- multiple: this.range ? checked : false,
- beforeMultiple: this.isLogicBefore(currentDate, this.multipleStatus.before, this.multipleStatus.after),
- afterMultiple: this.isLogicAfter(currentDate, this.multipleStatus.before, this.multipleStatus.after),
- disable: this.startDate && !dateCompare(this.startDate, currentDate) || this.endDate && !dateCompare(currentDate, this.endDate),
- isToday,
- userChecked: false,
- extraInfo
- });
- }
- return result;
- }
- /**
- * 获取下一个月日期集合
- */
- _getNextMonthDays(amount2, dateObj) {
- const result = [];
- dateObj.month + 1;
- for (let i = 1; i <= amount2; i++) {
- const month = dateObj.month === 12 ? 1 : dateObj.month * 1 + 1;
- const year = month === 1 ? dateObj.year + 1 : dateObj.year;
- const fullDate = `${year}-${addZero(month)}-${addZero(i)}`;
- let multiples = this.multipleStatus.data;
- let multiplesStatus = -1;
- if (this.range && multiples) {
- multiplesStatus = multiples.findIndex((item) => {
- return this.dateEqual(item, fullDate);
- });
- }
- const checked = multiplesStatus !== -1;
- const extraInfo = this.selected && this.selected.find((item) => {
- if (this.dateEqual(fullDate, item.date)) {
- return item;
- }
- });
- result.push({
- fullDate,
- year,
- date: i,
- month,
- multiple: this.range ? checked : false,
- beforeMultiple: this.isLogicBefore(fullDate, this.multipleStatus.before, this.multipleStatus.after),
- afterMultiple: this.isLogicAfter(fullDate, this.multipleStatus.before, this.multipleStatus.after),
- disable: this.startDate && !dateCompare(this.startDate, fullDate) || this.endDate && !dateCompare(fullDate, this.endDate),
- isToday: fullDate === this.date.fullDate,
- userChecked: false,
- extraInfo
- });
- }
- return result;
- }
- /**
- * 获取当前日期详情
- * @param {Object} date
- */
- getInfo(date3) {
- if (!date3) {
- date3 = /* @__PURE__ */ new Date();
- }
- return this.calendar.find((item) => item.fullDate === this.getDateObj(date3).fullDate);
- }
- /**
- * 比较时间是否相等
- */
- dateEqual(before, after) {
- before = new Date(fixIosDateFormat(before));
- after = new Date(fixIosDateFormat(after));
- return before.valueOf() === after.valueOf();
- }
- /**
- * 比较真实起始日期
- */
- isLogicBefore(currentDate, before, after) {
- let logicBefore = before;
- if (before && after) {
- logicBefore = dateCompare(before, after) ? before : after;
- }
- return this.dateEqual(logicBefore, currentDate);
- }
- isLogicAfter(currentDate, before, after) {
- let logicAfter = after;
- if (before && after) {
- logicAfter = dateCompare(before, after) ? after : before;
- }
- return this.dateEqual(logicAfter, currentDate);
- }
- /**
- * 获取日期范围内所有日期
- * @param {Object} begin
- * @param {Object} end
- */
- geDateAll(begin, end) {
- var arr = [];
- var ab = begin.split("-");
- var ae = end.split("-");
- var db = /* @__PURE__ */ new Date();
- db.setFullYear(ab[0], ab[1] - 1, ab[2]);
- var de = /* @__PURE__ */ new Date();
- de.setFullYear(ae[0], ae[1] - 1, ae[2]);
- var unixDb = db.getTime() - 24 * 60 * 60 * 1e3;
- var unixDe = de.getTime() - 24 * 60 * 60 * 1e3;
- for (var k = unixDb; k <= unixDe; ) {
- k = k + 24 * 60 * 60 * 1e3;
- arr.push(this.getDateObj(new Date(parseInt(k))).fullDate);
- }
- return arr;
- }
- /**
- * 获取多选状态
- */
- setMultiple(fullDate) {
- if (!this.range)
- return;
- let {
- before,
- after
- } = this.multipleStatus;
- if (before && after) {
- if (!this.lastHover) {
- this.lastHover = true;
- return;
- }
- this.multipleStatus.before = fullDate;
- this.multipleStatus.after = "";
- this.multipleStatus.data = [];
- this.multipleStatus.fulldate = "";
- this.lastHover = false;
- } else {
- if (!before) {
- this.multipleStatus.before = fullDate;
- this.lastHover = false;
- } else {
- this.multipleStatus.after = fullDate;
- if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
- this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
- } else {
- this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
- }
- this.lastHover = true;
- }
- }
- this.getWeeks(fullDate);
- }
- /**
- * 鼠标 hover 更新多选状态
- */
- setHoverMultiple(fullDate) {
- if (!this.range || this.lastHover)
- return;
- const { before } = this.multipleStatus;
- if (!before) {
- this.multipleStatus.before = fullDate;
- } else {
- this.multipleStatus.after = fullDate;
- if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
- this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
- } else {
- this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
- }
- }
- this.getWeeks(fullDate);
- }
- /**
- * 更新默认值多选状态
- */
- setDefaultMultiple(before, after) {
- this.multipleStatus.before = before;
- this.multipleStatus.after = after;
- if (before && after) {
- if (dateCompare(before, after)) {
- this.multipleStatus.data = this.geDateAll(before, after);
- this.getWeeks(after);
- } else {
- this.multipleStatus.data = this.geDateAll(after, before);
- this.getWeeks(before);
- }
- }
- }
- /**
- * 获取每周数据
- * @param {Object} dateData
- */
- getWeeks(dateData) {
- const {
- year,
- month
- } = this.getDateObj(dateData);
- const preMonthDayAmount = new Date(year, month - 1, 1).getDay();
- const preMonthDays = this.getPreMonthDays(preMonthDayAmount, this.getDateObj(dateData));
- const currentMonthDayAmount = new Date(year, month, 0).getDate();
- const currentMonthDays = this.getCurrentMonthDays(currentMonthDayAmount, this.getDateObj(dateData));
- const nextMonthDayAmount = 42 - preMonthDayAmount - currentMonthDayAmount;
- const nextMonthDays = this._getNextMonthDays(nextMonthDayAmount, this.getDateObj(dateData));
- const calendarDays = [...preMonthDays, ...currentMonthDays, ...nextMonthDays];
- const weeks = new Array(6);
- for (let i = 0; i < calendarDays.length; i++) {
- const index2 = Math.floor(i / 7);
- if (!weeks[index2]) {
- weeks[index2] = new Array(7);
- }
- weeks[index2][i % 7] = calendarDays[i];
- }
- this.calendar = calendarDays;
- this.weeks = weeks;
- }
- };
- function getDateTime(date3, hideSecond) {
- return `${getDate(date3)} ${getTime(date3, hideSecond)}`;
- }
- function getDate(date3) {
- date3 = fixIosDateFormat(date3);
- date3 = new Date(date3);
- const year = date3.getFullYear();
- const month = date3.getMonth() + 1;
- const day = date3.getDate();
- return `${year}-${addZero(month)}-${addZero(day)}`;
- }
- function getTime(date3, hideSecond) {
- date3 = fixIosDateFormat(date3);
- date3 = new Date(date3);
- const hour = date3.getHours();
- const minute = date3.getMinutes();
- const second = date3.getSeconds();
- return hideSecond ? `${addZero(hour)}:${addZero(minute)}` : `${addZero(hour)}:${addZero(minute)}:${addZero(second)}`;
- }
- function addZero(num) {
- if (num < 10) {
- num = `0${num}`;
- }
- return num;
- }
- function getDefaultSecond(hideSecond) {
- return hideSecond ? "00:00" : "00:00:00";
- }
- function dateCompare(startDate, endDate) {
- startDate = new Date(fixIosDateFormat(startDate));
- endDate = new Date(fixIosDateFormat(endDate));
- return startDate <= endDate;
- }
- function checkDate(date3) {
- const dateReg = /((19|20)\d{2})(-|\/)\d{1,2}(-|\/)\d{1,2}/g;
- return date3.match(dateReg);
- }
- const dateTimeReg = /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])( [0-5]?[0-9]:[0-5]?[0-9]:[0-5]?[0-9])?$/;
- function fixIosDateFormat(value2) {
- if (typeof value2 === "string" && dateTimeReg.test(value2)) {
- value2 = value2.replace(/-/g, "/");
- }
- return value2;
- }
- const _sfc_main$U = {
- props: {
- weeks: {
- type: Object,
- default() {
- return {};
- }
- },
- calendar: {
- type: Object,
- default: () => {
- return {};
- }
- },
- selected: {
- type: Array,
- default: () => {
- return [];
- }
- },
- checkHover: {
- type: Boolean,
- default: false
- }
- },
- methods: {
- choiceDate(weeks) {
- this.$emit("change", weeks);
- },
- handleMousemove(weeks) {
- this.$emit("handleMouse", weeks);
- }
- }
- };
- function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["uni-calendar-item__weeks-box", {
- "uni-calendar-item--disable": $props.weeks.disable,
- "uni-calendar-item--before-checked-x": $props.weeks.beforeMultiple,
- "uni-calendar-item--multiple": $props.weeks.multiple,
- "uni-calendar-item--after-checked-x": $props.weeks.afterMultiple
- }]),
- onClick: _cache[0] || (_cache[0] = ($event) => $options.choiceDate($props.weeks)),
- onMouseenter: _cache[1] || (_cache[1] = ($event) => $options.handleMousemove($props.weeks))
- },
- [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["uni-calendar-item__weeks-box-item", {
- "uni-calendar-item--checked": $props.calendar.fullDate === $props.weeks.fullDate && ($props.calendar.userChecked || !$props.checkHover),
- "uni-calendar-item--checked-range-text": $props.checkHover,
- "uni-calendar-item--before-checked": $props.weeks.beforeMultiple,
- "uni-calendar-item--multiple": $props.weeks.multiple,
- "uni-calendar-item--after-checked": $props.weeks.afterMultiple,
- "uni-calendar-item--disable": $props.weeks.disable
- }])
- },
- [
- $props.selected && $props.weeks.extraInfo ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "uni-calendar-item__weeks-box-circle"
- })) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "text",
- { class: "uni-calendar-item__weeks-box-text uni-calendar-item__weeks-box-text-disable uni-calendar-item--checked-text" },
- vue.toDisplayString($props.weeks.date),
- 1
- /* TEXT */
- )
- ],
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass({ "uni-calendar-item--today": $props.weeks.isToday })
- },
- null,
- 2
- /* CLASS */
- )
- ],
- 34
- /* CLASS, NEED_HYDRATION */
- );
- }
- const calendarItem = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$T], ["__scopeId", "data-v-3c762a01"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue"]]);
- const isObject$1 = (val) => val !== null && typeof val === "object";
- const defaultDelimiters = ["{", "}"];
- class BaseFormatter {
- constructor() {
- this._caches = /* @__PURE__ */ Object.create(null);
- }
- interpolate(message, values, delimiters = defaultDelimiters) {
- if (!values) {
- return [message];
- }
- let tokens = this._caches[message];
- if (!tokens) {
- tokens = parse(message, delimiters);
- this._caches[message] = tokens;
- }
- return compile(tokens, values);
- }
- }
- const RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
- const RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
- function parse(format2, [startDelimiter, endDelimiter]) {
- const tokens = [];
- let position = 0;
- let text = "";
- while (position < format2.length) {
- let char = format2[position++];
- if (char === startDelimiter) {
- if (text) {
- tokens.push({ type: "text", value: text });
- }
- text = "";
- let sub = "";
- char = format2[position++];
- while (char !== void 0 && char !== endDelimiter) {
- sub += char;
- char = format2[position++];
- }
- const isClosed = char === endDelimiter;
- const type2 = RE_TOKEN_LIST_VALUE.test(sub) ? "list" : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? "named" : "unknown";
- tokens.push({ value: sub, type: type2 });
- } else {
- text += char;
- }
- }
- text && tokens.push({ type: "text", value: text });
- return tokens;
- }
- function compile(tokens, values) {
- const compiled = [];
- let index2 = 0;
- const mode = Array.isArray(values) ? "list" : isObject$1(values) ? "named" : "unknown";
- if (mode === "unknown") {
- return compiled;
- }
- while (index2 < tokens.length) {
- const token = tokens[index2];
- switch (token.type) {
- case "text":
- compiled.push(token.value);
- break;
- case "list":
- compiled.push(values[parseInt(token.value, 10)]);
- break;
- case "named":
- if (mode === "named") {
- compiled.push(values[token.value]);
- } else {
- {
- console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`);
- }
- }
- break;
- case "unknown":
- {
- console.warn(`Detect 'unknown' type of token!`);
- }
- break;
- }
- index2++;
- }
- return compiled;
- }
- const LOCALE_ZH_HANS = "zh-Hans";
- const LOCALE_ZH_HANT = "zh-Hant";
- const LOCALE_EN = "en";
- const LOCALE_FR = "fr";
- const LOCALE_ES = "es";
- const hasOwnProperty = Object.prototype.hasOwnProperty;
- const hasOwn = (val, key) => hasOwnProperty.call(val, key);
- const defaultFormatter = new BaseFormatter();
- function include(str, parts) {
- return !!parts.find((part) => str.indexOf(part) !== -1);
- }
- function startsWith(str, parts) {
- return parts.find((part) => str.indexOf(part) === 0);
- }
- function normalizeLocale(locale, messages2) {
- if (!locale) {
- return;
- }
- locale = locale.trim().replace(/_/g, "-");
- if (messages2 && messages2[locale]) {
- return locale;
- }
- locale = locale.toLowerCase();
- if (locale === "chinese") {
- return LOCALE_ZH_HANS;
- }
- if (locale.indexOf("zh") === 0) {
- if (locale.indexOf("-hans") > -1) {
- return LOCALE_ZH_HANS;
- }
- if (locale.indexOf("-hant") > -1) {
- return LOCALE_ZH_HANT;
- }
- if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) {
- return LOCALE_ZH_HANT;
- }
- return LOCALE_ZH_HANS;
- }
- let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
- if (messages2 && Object.keys(messages2).length > 0) {
- locales = Object.keys(messages2);
- }
- const lang = startsWith(locale, locales);
- if (lang) {
- return lang;
- }
- }
- class I18n {
- constructor({ locale, fallbackLocale, messages: messages2, watcher, formater: formater2 }) {
- this.locale = LOCALE_EN;
- this.fallbackLocale = LOCALE_EN;
- this.message = {};
- this.messages = {};
- this.watchers = [];
- if (fallbackLocale) {
- this.fallbackLocale = fallbackLocale;
- }
- this.formater = formater2 || defaultFormatter;
- this.messages = messages2 || {};
- this.setLocale(locale || LOCALE_EN);
- if (watcher) {
- this.watchLocale(watcher);
- }
- }
- setLocale(locale) {
- const oldLocale = this.locale;
- this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
- if (!this.messages[this.locale]) {
- this.messages[this.locale] = {};
- }
- this.message = this.messages[this.locale];
- if (oldLocale !== this.locale) {
- this.watchers.forEach((watcher) => {
- watcher(this.locale, oldLocale);
- });
- }
- }
- getLocale() {
- return this.locale;
- }
- watchLocale(fn) {
- const index2 = this.watchers.push(fn) - 1;
- return () => {
- this.watchers.splice(index2, 1);
- };
- }
- add(locale, message, override = true) {
- const curMessages = this.messages[locale];
- if (curMessages) {
- if (override) {
- Object.assign(curMessages, message);
- } else {
- Object.keys(message).forEach((key) => {
- if (!hasOwn(curMessages, key)) {
- curMessages[key] = message[key];
- }
- });
- }
- } else {
- this.messages[locale] = message;
- }
- }
- f(message, values, delimiters) {
- return this.formater.interpolate(message, values, delimiters).join("");
- }
- t(key, locale, values) {
- let message = this.message;
- if (typeof locale === "string") {
- locale = normalizeLocale(locale, this.messages);
- locale && (message = this.messages[locale]);
- } else {
- values = locale;
- }
- if (!hasOwn(message, key)) {
- console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`);
- return key;
- }
- return this.formater.interpolate(message[key], values).join("");
- }
- }
- function watchAppLocale(appVm, i18n) {
- if (appVm.$watchLocale) {
- appVm.$watchLocale((newLocale) => {
- i18n.setLocale(newLocale);
- });
- } else {
- appVm.$watch(() => appVm.$locale, (newLocale) => {
- i18n.setLocale(newLocale);
- });
- }
- }
- function getDefaultLocale() {
- if (typeof uni !== "undefined" && uni.getLocale) {
- return uni.getLocale();
- }
- if (typeof global !== "undefined" && global.getLocale) {
- return global.getLocale();
- }
- return LOCALE_EN;
- }
- function initVueI18n(locale, messages2 = {}, fallbackLocale, watcher) {
- if (typeof locale !== "string") {
- const options = [
- messages2,
- locale
- ];
- locale = options[0];
- messages2 = options[1];
- }
- if (typeof locale !== "string") {
- locale = getDefaultLocale();
- }
- if (typeof fallbackLocale !== "string") {
- fallbackLocale = typeof __uniConfig !== "undefined" && __uniConfig.fallbackLocale || LOCALE_EN;
- }
- const i18n = new I18n({
- locale,
- fallbackLocale,
- messages: messages2,
- watcher
- });
- let t2 = (key, values) => {
- if (typeof getApp !== "function") {
- t2 = function(key2, values2) {
- return i18n.t(key2, values2);
- };
- } else {
- let isWatchedAppLocale = false;
- t2 = function(key2, values2) {
- const appVm = getApp().$vm;
- if (appVm) {
- appVm.$locale;
- if (!isWatchedAppLocale) {
- isWatchedAppLocale = true;
- watchAppLocale(appVm, i18n);
- }
- }
- return i18n.t(key2, values2);
- };
- }
- return t2(key, values);
- };
- return {
- i18n,
- f(message, values, delimiters) {
- return i18n.f(message, values, delimiters);
- },
- t(key, values) {
- return t2(key, values);
- },
- add(locale2, message, override = true) {
- return i18n.add(locale2, message, override);
- },
- watch(fn) {
- return i18n.watchLocale(fn);
- },
- getLocale() {
- return i18n.getLocale();
- },
- setLocale(newLocale) {
- return i18n.setLocale(newLocale);
- }
- };
- }
- const en = {
- "uni-datetime-picker.selectDate": "select date",
- "uni-datetime-picker.selectTime": "select time",
- "uni-datetime-picker.selectDateTime": "select date and time",
- "uni-datetime-picker.startDate": "start date",
- "uni-datetime-picker.endDate": "end date",
- "uni-datetime-picker.startTime": "start time",
- "uni-datetime-picker.endTime": "end time",
- "uni-datetime-picker.ok": "ok",
- "uni-datetime-picker.clear": "clear",
- "uni-datetime-picker.cancel": "cancel",
- "uni-datetime-picker.year": "-",
- "uni-datetime-picker.month": "",
- "uni-calender.MON": "MON",
- "uni-calender.TUE": "TUE",
- "uni-calender.WED": "WED",
- "uni-calender.THU": "THU",
- "uni-calender.FRI": "FRI",
- "uni-calender.SAT": "SAT",
- "uni-calender.SUN": "SUN",
- "uni-calender.confirm": "confirm"
- };
- const zhHans = {
- "uni-datetime-picker.selectDate": "选择日期",
- "uni-datetime-picker.selectTime": "选择时间",
- "uni-datetime-picker.selectDateTime": "选择日期时间",
- "uni-datetime-picker.startDate": "开始日期",
- "uni-datetime-picker.endDate": "结束日期",
- "uni-datetime-picker.startTime": "开始时间",
- "uni-datetime-picker.endTime": "结束时间",
- "uni-datetime-picker.ok": "确定",
- "uni-datetime-picker.clear": "清除",
- "uni-datetime-picker.cancel": "取消",
- "uni-datetime-picker.year": "年",
- "uni-datetime-picker.month": "月",
- "uni-calender.SUN": "日",
- "uni-calender.MON": "一",
- "uni-calender.TUE": "二",
- "uni-calender.WED": "三",
- "uni-calender.THU": "四",
- "uni-calender.FRI": "五",
- "uni-calender.SAT": "六",
- "uni-calender.confirm": "确认"
- };
- const zhHant = {
- "uni-datetime-picker.selectDate": "選擇日期",
- "uni-datetime-picker.selectTime": "選擇時間",
- "uni-datetime-picker.selectDateTime": "選擇日期時間",
- "uni-datetime-picker.startDate": "開始日期",
- "uni-datetime-picker.endDate": "結束日期",
- "uni-datetime-picker.startTime": "開始时间",
- "uni-datetime-picker.endTime": "結束时间",
- "uni-datetime-picker.ok": "確定",
- "uni-datetime-picker.clear": "清除",
- "uni-datetime-picker.cancel": "取消",
- "uni-datetime-picker.year": "年",
- "uni-datetime-picker.month": "月",
- "uni-calender.SUN": "日",
- "uni-calender.MON": "一",
- "uni-calender.TUE": "二",
- "uni-calender.WED": "三",
- "uni-calender.THU": "四",
- "uni-calender.FRI": "五",
- "uni-calender.SAT": "六",
- "uni-calender.confirm": "確認"
- };
- const i18nMessages = {
- en,
- "zh-Hans": zhHans,
- "zh-Hant": zhHant
- };
- const { t: t$1 } = initVueI18n(i18nMessages);
- const _sfc_main$T = {
- name: "UniDatetimePicker",
- data() {
- return {
- indicatorStyle: `height: 50px;`,
- visible: false,
- fixNvueBug: {},
- dateShow: true,
- timeShow: true,
- title: "日期和时间",
- // 输入框当前时间
- time: "",
- // 当前的年月日时分秒
- year: 1920,
- month: 0,
- day: 0,
- hour: 0,
- minute: 0,
- second: 0,
- // 起始时间
- startYear: 1920,
- startMonth: 1,
- startDay: 1,
- startHour: 0,
- startMinute: 0,
- startSecond: 0,
- // 结束时间
- endYear: 2120,
- endMonth: 12,
- endDay: 31,
- endHour: 23,
- endMinute: 59,
- endSecond: 59
- };
- },
- props: {
- type: {
- type: String,
- default: "datetime"
- },
- value: {
- type: [String, Number],
- default: ""
- },
- modelValue: {
- type: [String, Number],
- default: ""
- },
- start: {
- type: [Number, String],
- default: ""
- },
- end: {
- type: [Number, String],
- default: ""
- },
- returnType: {
- type: String,
- default: "string"
- },
- disabled: {
- type: [Boolean, String],
- default: false
- },
- border: {
- type: [Boolean, String],
- default: true
- },
- hideSecond: {
- type: [Boolean, String],
- default: false
- }
- },
- watch: {
- modelValue: {
- handler(newVal) {
- if (newVal) {
- this.parseValue(fixIosDateFormat(newVal));
- this.initTime(false);
- } else {
- this.time = "";
- this.parseValue(Date.now());
- }
- },
- immediate: true
- },
- type: {
- handler(newValue) {
- if (newValue === "date") {
- this.dateShow = true;
- this.timeShow = false;
- this.title = "日期";
- } else if (newValue === "time") {
- this.dateShow = false;
- this.timeShow = true;
- this.title = "时间";
- } else {
- this.dateShow = true;
- this.timeShow = true;
- this.title = "日期和时间";
- }
- },
- immediate: true
- },
- start: {
- handler(newVal) {
- this.parseDatetimeRange(fixIosDateFormat(newVal), "start");
- },
- immediate: true
- },
- end: {
- handler(newVal) {
- this.parseDatetimeRange(fixIosDateFormat(newVal), "end");
- },
- immediate: true
- },
- // 月、日、时、分、秒可选范围变化后,检查当前值是否在范围内,不在则当前值重置为可选范围第一项
- months(newVal) {
- this.checkValue("month", this.month, newVal);
- },
- days(newVal) {
- this.checkValue("day", this.day, newVal);
- },
- hours(newVal) {
- this.checkValue("hour", this.hour, newVal);
- },
- minutes(newVal) {
- this.checkValue("minute", this.minute, newVal);
- },
- seconds(newVal) {
- this.checkValue("second", this.second, newVal);
- }
- },
- computed: {
- // 当前年、月、日、时、分、秒选择范围
- years() {
- return this.getCurrentRange("year");
- },
- months() {
- return this.getCurrentRange("month");
- },
- days() {
- return this.getCurrentRange("day");
- },
- hours() {
- return this.getCurrentRange("hour");
- },
- minutes() {
- return this.getCurrentRange("minute");
- },
- seconds() {
- return this.getCurrentRange("second");
- },
- // picker 当前值数组
- ymd() {
- return [this.year - this.minYear, this.month - this.minMonth, this.day - this.minDay];
- },
- hms() {
- return [this.hour - this.minHour, this.minute - this.minMinute, this.second - this.minSecond];
- },
- // 当前 date 是 start
- currentDateIsStart() {
- return this.year === this.startYear && this.month === this.startMonth && this.day === this.startDay;
- },
- // 当前 date 是 end
- currentDateIsEnd() {
- return this.year === this.endYear && this.month === this.endMonth && this.day === this.endDay;
- },
- // 当前年、月、日、时、分、秒的最小值和最大值
- minYear() {
- return this.startYear;
- },
- maxYear() {
- return this.endYear;
- },
- minMonth() {
- if (this.year === this.startYear) {
- return this.startMonth;
- } else {
- return 1;
- }
- },
- maxMonth() {
- if (this.year === this.endYear) {
- return this.endMonth;
- } else {
- return 12;
- }
- },
- minDay() {
- if (this.year === this.startYear && this.month === this.startMonth) {
- return this.startDay;
- } else {
- return 1;
- }
- },
- maxDay() {
- if (this.year === this.endYear && this.month === this.endMonth) {
- return this.endDay;
- } else {
- return this.daysInMonth(this.year, this.month);
- }
- },
- minHour() {
- if (this.type === "datetime") {
- if (this.currentDateIsStart) {
- return this.startHour;
- } else {
- return 0;
- }
- }
- if (this.type === "time") {
- return this.startHour;
- }
- },
- maxHour() {
- if (this.type === "datetime") {
- if (this.currentDateIsEnd) {
- return this.endHour;
- } else {
- return 23;
- }
- }
- if (this.type === "time") {
- return this.endHour;
- }
- },
- minMinute() {
- if (this.type === "datetime") {
- if (this.currentDateIsStart && this.hour === this.startHour) {
- return this.startMinute;
- } else {
- return 0;
- }
- }
- if (this.type === "time") {
- if (this.hour === this.startHour) {
- return this.startMinute;
- } else {
- return 0;
- }
- }
- },
- maxMinute() {
- if (this.type === "datetime") {
- if (this.currentDateIsEnd && this.hour === this.endHour) {
- return this.endMinute;
- } else {
- return 59;
- }
- }
- if (this.type === "time") {
- if (this.hour === this.endHour) {
- return this.endMinute;
- } else {
- return 59;
- }
- }
- },
- minSecond() {
- if (this.type === "datetime") {
- if (this.currentDateIsStart && this.hour === this.startHour && this.minute === this.startMinute) {
- return this.startSecond;
- } else {
- return 0;
- }
- }
- if (this.type === "time") {
- if (this.hour === this.startHour && this.minute === this.startMinute) {
- return this.startSecond;
- } else {
- return 0;
- }
- }
- },
- maxSecond() {
- if (this.type === "datetime") {
- if (this.currentDateIsEnd && this.hour === this.endHour && this.minute === this.endMinute) {
- return this.endSecond;
- } else {
- return 59;
- }
- }
- if (this.type === "time") {
- if (this.hour === this.endHour && this.minute === this.endMinute) {
- return this.endSecond;
- } else {
- return 59;
- }
- }
- },
- /**
- * for i18n
- */
- selectTimeText() {
- return t$1("uni-datetime-picker.selectTime");
- },
- okText() {
- return t$1("uni-datetime-picker.ok");
- },
- clearText() {
- return t$1("uni-datetime-picker.clear");
- },
- cancelText() {
- return t$1("uni-datetime-picker.cancel");
- }
- },
- mounted() {
- },
- methods: {
- /**
- * @param {Object} item
- * 小于 10 在前面加个 0
- */
- lessThanTen(item) {
- return item < 10 ? "0" + item : item;
- },
- /**
- * 解析时分秒字符串,例如:00:00:00
- * @param {String} timeString
- */
- parseTimeType(timeString) {
- if (timeString) {
- let timeArr = timeString.split(":");
- this.hour = Number(timeArr[0]);
- this.minute = Number(timeArr[1]);
- this.second = Number(timeArr[2]);
- }
- },
- /**
- * 解析选择器初始值,类型可以是字符串、时间戳,例如:2000-10-02、'08:30:00'、 1610695109000
- * @param {String | Number} datetime
- */
- initPickerValue(datetime) {
- let defaultValue = null;
- if (datetime) {
- defaultValue = this.compareValueWithStartAndEnd(datetime, this.start, this.end);
- } else {
- defaultValue = Date.now();
- defaultValue = this.compareValueWithStartAndEnd(defaultValue, this.start, this.end);
- }
- this.parseValue(defaultValue);
- },
- /**
- * 初始值规则:
- * - 用户设置初始值 value
- * - 设置了起始时间 start、终止时间 end,并 start < value < end,初始值为 value, 否则初始值为 start
- * - 只设置了起始时间 start,并 start < value,初始值为 value,否则初始值为 start
- * - 只设置了终止时间 end,并 value < end,初始值为 value,否则初始值为 end
- * - 无起始终止时间,则初始值为 value
- * - 无初始值 value,则初始值为当前本地时间 Date.now()
- * @param {Object} value
- * @param {Object} dateBase
- */
- compareValueWithStartAndEnd(value2, start, end) {
- let winner = null;
- value2 = this.superTimeStamp(value2);
- start = this.superTimeStamp(start);
- end = this.superTimeStamp(end);
- if (start && end) {
- if (value2 < start) {
- winner = new Date(start);
- } else if (value2 > end) {
- winner = new Date(end);
- } else {
- winner = new Date(value2);
- }
- } else if (start && !end) {
- winner = start <= value2 ? new Date(value2) : new Date(start);
- } else if (!start && end) {
- winner = value2 <= end ? new Date(value2) : new Date(end);
- } else {
- winner = new Date(value2);
- }
- return winner;
- },
- /**
- * 转换为可比较的时间戳,接受日期、时分秒、时间戳
- * @param {Object} value
- */
- superTimeStamp(value2) {
- let dateBase = "";
- if (this.type === "time" && value2 && typeof value2 === "string") {
- const now2 = /* @__PURE__ */ new Date();
- const year = now2.getFullYear();
- const month = now2.getMonth() + 1;
- const day = now2.getDate();
- dateBase = year + "/" + month + "/" + day + " ";
- }
- if (Number(value2)) {
- value2 = parseInt(value2);
- dateBase = 0;
- }
- return this.createTimeStamp(dateBase + value2);
- },
- /**
- * 解析默认值 value,字符串、时间戳
- * @param {Object} defaultTime
- */
- parseValue(value2) {
- if (!value2) {
- return;
- }
- if (this.type === "time" && typeof value2 === "string") {
- this.parseTimeType(value2);
- } else {
- let defaultDate = null;
- defaultDate = new Date(value2);
- if (this.type !== "time") {
- this.year = defaultDate.getFullYear();
- this.month = defaultDate.getMonth() + 1;
- this.day = defaultDate.getDate();
- }
- if (this.type !== "date") {
- this.hour = defaultDate.getHours();
- this.minute = defaultDate.getMinutes();
- this.second = defaultDate.getSeconds();
- }
- }
- if (this.hideSecond) {
- this.second = 0;
- }
- },
- /**
- * 解析可选择时间范围 start、end,年月日字符串、时间戳
- * @param {Object} defaultTime
- */
- parseDatetimeRange(point, pointType) {
- if (!point) {
- if (pointType === "start") {
- this.startYear = 1920;
- this.startMonth = 1;
- this.startDay = 1;
- this.startHour = 0;
- this.startMinute = 0;
- this.startSecond = 0;
- }
- if (pointType === "end") {
- this.endYear = 2120;
- this.endMonth = 12;
- this.endDay = 31;
- this.endHour = 23;
- this.endMinute = 59;
- this.endSecond = 59;
- }
- return;
- }
- if (this.type === "time") {
- const pointArr = point.split(":");
- this[pointType + "Hour"] = Number(pointArr[0]);
- this[pointType + "Minute"] = Number(pointArr[1]);
- this[pointType + "Second"] = Number(pointArr[2]);
- } else {
- if (!point) {
- pointType === "start" ? this.startYear = this.year - 60 : this.endYear = this.year + 60;
- return;
- }
- if (Number(point)) {
- point = parseInt(point);
- }
- const hasTime = /[0-9]:[0-9]/;
- if (this.type === "datetime" && pointType === "end" && typeof point === "string" && !hasTime.test(
- point
- )) {
- point = point + " 23:59:59";
- }
- const pointDate = new Date(point);
- this[pointType + "Year"] = pointDate.getFullYear();
- this[pointType + "Month"] = pointDate.getMonth() + 1;
- this[pointType + "Day"] = pointDate.getDate();
- if (this.type === "datetime") {
- this[pointType + "Hour"] = pointDate.getHours();
- this[pointType + "Minute"] = pointDate.getMinutes();
- this[pointType + "Second"] = pointDate.getSeconds();
- }
- }
- },
- // 获取 年、月、日、时、分、秒 当前可选范围
- getCurrentRange(value2) {
- const range2 = [];
- for (let i = this["min" + this.capitalize(value2)]; i <= this["max" + this.capitalize(value2)]; i++) {
- range2.push(i);
- }
- return range2;
- },
- // 字符串首字母大写
- capitalize(str) {
- return str.charAt(0).toUpperCase() + str.slice(1);
- },
- // 检查当前值是否在范围内,不在则当前值重置为可选范围第一项
- checkValue(name, value2, values) {
- if (values.indexOf(value2) === -1) {
- this[name] = values[0];
- }
- },
- // 每个月的实际天数
- daysInMonth(year, month) {
- return new Date(year, month, 0).getDate();
- },
- //兼容 iOS、safari 日期格式
- fixIosDateFormat(value2) {
- if (typeof value2 === "string") {
- value2 = value2.replace(/-/g, "/");
- }
- return value2;
- },
- /**
- * 生成时间戳
- * @param {Object} time
- */
- createTimeStamp(time) {
- if (!time)
- return;
- if (typeof time === "number") {
- return time;
- } else {
- time = time.replace(/-/g, "/");
- if (this.type === "date") {
- time = time + " 00:00:00";
- }
- return Date.parse(time);
- }
- },
- /**
- * 生成日期或时间的字符串
- */
- createDomSting() {
- const yymmdd = this.year + "-" + this.lessThanTen(this.month) + "-" + this.lessThanTen(this.day);
- let hhmmss = this.lessThanTen(this.hour) + ":" + this.lessThanTen(this.minute);
- if (!this.hideSecond) {
- hhmmss = hhmmss + ":" + this.lessThanTen(this.second);
- }
- if (this.type === "date") {
- return yymmdd;
- } else if (this.type === "time") {
- return hhmmss;
- } else {
- return yymmdd + " " + hhmmss;
- }
- },
- /**
- * 初始化返回值,并抛出 change 事件
- */
- initTime(emit2 = true) {
- this.time = this.createDomSting();
- if (!emit2)
- return;
- if (this.returnType === "timestamp" && this.type !== "time") {
- this.$emit("change", this.createTimeStamp(this.time));
- this.$emit("input", this.createTimeStamp(this.time));
- this.$emit("update:modelValue", this.createTimeStamp(this.time));
- } else {
- this.$emit("change", this.time);
- this.$emit("input", this.time);
- this.$emit("update:modelValue", this.time);
- }
- },
- /**
- * 用户选择日期或时间更新 data
- * @param {Object} e
- */
- bindDateChange(e) {
- const val = e.detail.value;
- this.year = this.years[val[0]];
- this.month = this.months[val[1]];
- this.day = this.days[val[2]];
- },
- bindTimeChange(e) {
- const val = e.detail.value;
- this.hour = this.hours[val[0]];
- this.minute = this.minutes[val[1]];
- this.second = this.seconds[val[2]];
- },
- /**
- * 初始化弹出层
- */
- initTimePicker() {
- if (this.disabled)
- return;
- const value2 = fixIosDateFormat(this.time);
- this.initPickerValue(value2);
- this.visible = !this.visible;
- },
- /**
- * 触发或关闭弹框
- */
- tiggerTimePicker(e) {
- this.visible = !this.visible;
- },
- /**
- * 用户点击“清空”按钮,清空当前值
- */
- clearTime() {
- this.time = "";
- this.$emit("change", this.time);
- this.$emit("input", this.time);
- this.$emit("update:modelValue", this.time);
- this.tiggerTimePicker();
- },
- /**
- * 用户点击“确定”按钮
- */
- setTime() {
- this.initTime();
- this.tiggerTimePicker();
- }
- }
- };
- function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker" }, [
- vue.createElementVNode("view", {
- onClick: _cache[0] || (_cache[0] = (...args) => $options.initTimePicker && $options.initTimePicker(...args))
- }, [
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["uni-datetime-picker-timebox-pointer", { "uni-datetime-picker-disabled": $props.disabled, "uni-datetime-picker-timebox": $props.border }])
- },
- [
- vue.createElementVNode(
- "text",
- { class: "uni-datetime-picker-text" },
- vue.toDisplayString($data.time),
- 1
- /* TEXT */
- ),
- !$data.time ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "uni-datetime-picker-time"
- }, [
- vue.createElementVNode(
- "text",
- { class: "uni-datetime-picker-text" },
- vue.toDisplayString($options.selectTimeText),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- )
- ], true)
- ]),
- $data.visible ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- id: "mask",
- class: "uni-datetime-picker-mask",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.tiggerTimePicker && $options.tiggerTimePicker(...args))
- })) : vue.createCommentVNode("v-if", true),
- $data.visible ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: vue.normalizeClass(["uni-datetime-picker-popup", [$data.dateShow && $data.timeShow ? "" : "fix-nvue-height"]]),
- style: vue.normalizeStyle($data.fixNvueBug)
- },
- [
- vue.createElementVNode("view", { class: "uni-title" }, [
- vue.createElementVNode(
- "text",
- { class: "uni-datetime-picker-text" },
- vue.toDisplayString($options.selectTimeText),
- 1
- /* TEXT */
- )
- ]),
- $data.dateShow ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "uni-datetime-picker__container-box"
- }, [
- vue.createElementVNode("picker-view", {
- class: "uni-datetime-picker-view",
- "indicator-style": $data.indicatorStyle,
- value: $options.ymd,
- onChange: _cache[2] || (_cache[2] = (...args) => $options.bindDateChange && $options.bindDateChange(...args))
- }, [
- vue.createElementVNode("picker-view-column", null, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($options.years, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "uni-datetime-picker-item",
- key: index2
- }, [
- vue.createElementVNode(
- "text",
- { class: "uni-datetime-picker-item" },
- vue.toDisplayString($options.lessThanTen(item)),
- 1
- /* TEXT */
- )
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("picker-view-column", null, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($options.months, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "uni-datetime-picker-item",
- key: index2
- }, [
- vue.createElementVNode(
- "text",
- { class: "uni-datetime-picker-item" },
- vue.toDisplayString($options.lessThanTen(item)),
- 1
- /* TEXT */
- )
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("picker-view-column", null, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($options.days, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "uni-datetime-picker-item",
- key: index2
- }, [
- vue.createElementVNode(
- "text",
- { class: "uni-datetime-picker-item" },
- vue.toDisplayString($options.lessThanTen(item)),
- 1
- /* TEXT */
- )
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ], 40, ["indicator-style", "value"]),
- vue.createCommentVNode(" 兼容 nvue 不支持伪类 "),
- vue.createElementVNode("text", { class: "uni-datetime-picker-sign sign-left" }, "-"),
- vue.createElementVNode("text", { class: "uni-datetime-picker-sign sign-right" }, "-")
- ])) : vue.createCommentVNode("v-if", true),
- $data.timeShow ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "uni-datetime-picker__container-box"
- }, [
- vue.createElementVNode("picker-view", {
- class: vue.normalizeClass(["uni-datetime-picker-view", [$props.hideSecond ? "time-hide-second" : ""]]),
- "indicator-style": $data.indicatorStyle,
- value: $options.hms,
- onChange: _cache[3] || (_cache[3] = (...args) => $options.bindTimeChange && $options.bindTimeChange(...args))
- }, [
- vue.createElementVNode("picker-view-column", null, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($options.hours, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "uni-datetime-picker-item",
- key: index2
- }, [
- vue.createElementVNode(
- "text",
- { class: "uni-datetime-picker-item" },
- vue.toDisplayString($options.lessThanTen(item)),
- 1
- /* TEXT */
- )
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("picker-view-column", null, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($options.minutes, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "uni-datetime-picker-item",
- key: index2
- }, [
- vue.createElementVNode(
- "text",
- { class: "uni-datetime-picker-item" },
- vue.toDisplayString($options.lessThanTen(item)),
- 1
- /* TEXT */
- )
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- !$props.hideSecond ? (vue.openBlock(), vue.createElementBlock("picker-view-column", { key: 0 }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($options.seconds, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "uni-datetime-picker-item",
- key: index2
- }, [
- vue.createElementVNode(
- "text",
- { class: "uni-datetime-picker-item" },
- vue.toDisplayString($options.lessThanTen(item)),
- 1
- /* TEXT */
- )
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true)
- ], 42, ["indicator-style", "value"]),
- vue.createCommentVNode(" 兼容 nvue 不支持伪类 "),
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["uni-datetime-picker-sign", [$props.hideSecond ? "sign-center" : "sign-left"]])
- },
- ":",
- 2
- /* CLASS */
- ),
- !$props.hideSecond ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "uni-datetime-picker-sign sign-right"
- }, ":")) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "uni-datetime-picker-btn" }, [
- vue.createElementVNode("view", {
- onClick: _cache[4] || (_cache[4] = (...args) => $options.clearTime && $options.clearTime(...args))
- }, [
- vue.createElementVNode(
- "text",
- { class: "uni-datetime-picker-btn-text" },
- vue.toDisplayString($options.clearText),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "uni-datetime-picker-btn-group" }, [
- vue.createElementVNode("view", {
- class: "uni-datetime-picker-cancel",
- onClick: _cache[5] || (_cache[5] = (...args) => $options.tiggerTimePicker && $options.tiggerTimePicker(...args))
- }, [
- vue.createElementVNode(
- "text",
- { class: "uni-datetime-picker-btn-text" },
- vue.toDisplayString($options.cancelText),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", {
- onClick: _cache[6] || (_cache[6] = (...args) => $options.setTime && $options.setTime(...args))
- }, [
- vue.createElementVNode(
- "text",
- { class: "uni-datetime-picker-btn-text" },
- vue.toDisplayString($options.okText),
- 1
- /* TEXT */
- )
- ])
- ])
- ])
- ],
- 6
- /* CLASS, STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ]);
- }
- const TimePicker = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$S], ["__scopeId", "data-v-1d532b70"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue"]]);
- const { t } = initVueI18n(i18nMessages);
- const _sfc_main$S = {
- components: {
- calendarItem,
- timePicker: TimePicker
- },
- props: {
- date: {
- type: String,
- default: ""
- },
- defTime: {
- type: [String, Object],
- default: ""
- },
- selectableTimes: {
- type: [Object],
- default() {
- return {};
- }
- },
- selected: {
- type: Array,
- default() {
- return [];
- }
- },
- startDate: {
- type: String,
- default: ""
- },
- endDate: {
- type: String,
- default: ""
- },
- startPlaceholder: {
- type: String,
- default: ""
- },
- endPlaceholder: {
- type: String,
- default: ""
- },
- range: {
- type: Boolean,
- default: false
- },
- hasTime: {
- type: Boolean,
- default: false
- },
- insert: {
- type: Boolean,
- default: true
- },
- showMonth: {
- type: Boolean,
- default: true
- },
- clearDate: {
- type: Boolean,
- default: true
- },
- checkHover: {
- type: Boolean,
- default: true
- },
- hideSecond: {
- type: [Boolean],
- default: false
- },
- pleStatus: {
- type: Object,
- default() {
- return {
- before: "",
- after: "",
- data: [],
- fulldate: ""
- };
- }
- },
- defaultValue: {
- type: [String, Object, Array],
- default: ""
- }
- },
- data() {
- return {
- show: false,
- weeks: [],
- calendar: {},
- nowDate: {},
- aniMaskShow: false,
- firstEnter: true,
- time: "",
- timeRange: {
- startTime: "",
- endTime: ""
- },
- tempSingleDate: "",
- tempRange: {
- before: "",
- after: ""
- }
- };
- },
- watch: {
- date: {
- immediate: true,
- handler(newVal) {
- if (!this.range) {
- this.tempSingleDate = newVal;
- setTimeout(() => {
- this.init(newVal);
- }, 100);
- }
- }
- },
- defTime: {
- immediate: true,
- handler(newVal) {
- if (!this.range) {
- this.time = newVal;
- } else {
- this.timeRange.startTime = newVal.start;
- this.timeRange.endTime = newVal.end;
- }
- }
- },
- startDate(val) {
- if (!this.cale) {
- return;
- }
- this.cale.setStartDate(val);
- this.cale.setDate(this.nowDate.fullDate);
- this.weeks = this.cale.weeks;
- },
- endDate(val) {
- if (!this.cale) {
- return;
- }
- this.cale.setEndDate(val);
- this.cale.setDate(this.nowDate.fullDate);
- this.weeks = this.cale.weeks;
- },
- selected(newVal) {
- if (!this.cale) {
- return;
- }
- this.cale.setSelectInfo(this.nowDate.fullDate, newVal);
- this.weeks = this.cale.weeks;
- },
- pleStatus: {
- immediate: true,
- handler(newVal) {
- const {
- before,
- after,
- fulldate,
- which
- } = newVal;
- this.tempRange.before = before;
- this.tempRange.after = after;
- setTimeout(() => {
- if (fulldate) {
- this.cale.setHoverMultiple(fulldate);
- if (before && after) {
- this.cale.lastHover = true;
- if (this.rangeWithinMonth(after, before))
- return;
- this.setDate(before);
- } else {
- this.cale.setMultiple(fulldate);
- this.setDate(this.nowDate.fullDate);
- this.calendar.fullDate = "";
- this.cale.lastHover = false;
- }
- } else {
- if (!this.cale) {
- return;
- }
- this.cale.setDefaultMultiple(before, after);
- if (which === "left" && before) {
- this.setDate(before);
- this.weeks = this.cale.weeks;
- } else if (after) {
- this.setDate(after);
- this.weeks = this.cale.weeks;
- }
- this.cale.lastHover = true;
- }
- }, 16);
- }
- }
- },
- computed: {
- timepickerStartTime() {
- const activeDate = this.range ? this.tempRange.before : this.calendar.fullDate;
- return activeDate === this.startDate ? this.selectableTimes.start : "";
- },
- timepickerEndTime() {
- const activeDate = this.range ? this.tempRange.after : this.calendar.fullDate;
- return activeDate === this.endDate ? this.selectableTimes.end : "";
- },
- /**
- * for i18n
- */
- selectDateText() {
- return t("uni-datetime-picker.selectDate");
- },
- startDateText() {
- return this.startPlaceholder || t("uni-datetime-picker.startDate");
- },
- endDateText() {
- return this.endPlaceholder || t("uni-datetime-picker.endDate");
- },
- okText() {
- return t("uni-datetime-picker.ok");
- },
- yearText() {
- return t("uni-datetime-picker.year");
- },
- monthText() {
- return t("uni-datetime-picker.month");
- },
- MONText() {
- return t("uni-calender.MON");
- },
- TUEText() {
- return t("uni-calender.TUE");
- },
- WEDText() {
- return t("uni-calender.WED");
- },
- THUText() {
- return t("uni-calender.THU");
- },
- FRIText() {
- return t("uni-calender.FRI");
- },
- SATText() {
- return t("uni-calender.SAT");
- },
- SUNText() {
- return t("uni-calender.SUN");
- },
- confirmText() {
- return t("uni-calender.confirm");
- }
- },
- created() {
- this.cale = new Calendar$1({
- selected: this.selected,
- startDate: this.startDate,
- endDate: this.endDate,
- range: this.range
- });
- this.init(this.date);
- },
- methods: {
- leaveCale() {
- this.firstEnter = true;
- },
- handleMouse(weeks) {
- if (weeks.disable)
- return;
- if (this.cale.lastHover)
- return;
- let {
- before,
- after
- } = this.cale.multipleStatus;
- if (!before)
- return;
- this.calendar = weeks;
- this.cale.setHoverMultiple(this.calendar.fullDate);
- this.weeks = this.cale.weeks;
- if (this.firstEnter) {
- this.$emit("firstEnterCale", this.cale.multipleStatus);
- this.firstEnter = false;
- }
- },
- rangeWithinMonth(A, B) {
- const [yearA, monthA] = A.split("-");
- const [yearB, monthB] = B.split("-");
- return yearA === yearB && monthA === monthB;
- },
- // 蒙版点击事件
- maskClick() {
- this.close();
- this.$emit("maskClose");
- },
- clearCalender() {
- if (this.range) {
- this.timeRange.startTime = "";
- this.timeRange.endTime = "";
- this.tempRange.before = "";
- this.tempRange.after = "";
- this.cale.multipleStatus.before = "";
- this.cale.multipleStatus.after = "";
- this.cale.multipleStatus.data = [];
- this.cale.lastHover = false;
- } else {
- this.time = "";
- this.tempSingleDate = "";
- }
- this.calendar.fullDate = "";
- this.setDate(/* @__PURE__ */ new Date());
- },
- bindDateChange(e) {
- const value2 = e.detail.value + "-1";
- this.setDate(value2);
- },
- /**
- * 初始化日期显示
- * @param {Object} date
- */
- init(date3) {
- if (!this.cale) {
- return;
- }
- this.cale.setDate(date3 || /* @__PURE__ */ new Date());
- this.weeks = this.cale.weeks;
- this.nowDate = this.cale.getInfo(date3);
- this.calendar = { ...this.nowDate };
- if (!date3) {
- this.calendar.fullDate = "";
- if (this.defaultValue && !this.range) {
- const defaultDate = new Date(this.defaultValue);
- const fullDate = getDate(defaultDate);
- const year = defaultDate.getFullYear();
- const month = defaultDate.getMonth() + 1;
- const date4 = defaultDate.getDate();
- const day = defaultDate.getDay();
- this.calendar = {
- fullDate,
- year,
- month,
- date: date4,
- day
- }, this.tempSingleDate = fullDate;
- this.time = getTime(defaultDate, this.hideSecond);
- }
- }
- },
- /**
- * 打开日历弹窗
- */
- open() {
- if (this.clearDate && !this.insert) {
- this.cale.cleanMultipleStatus();
- this.init(this.date);
- }
- this.show = true;
- this.$nextTick(() => {
- setTimeout(() => {
- this.aniMaskShow = true;
- }, 50);
- });
- },
- /**
- * 关闭日历弹窗
- */
- close() {
- this.aniMaskShow = false;
- this.$nextTick(() => {
- setTimeout(() => {
- this.show = false;
- this.$emit("close");
- }, 300);
- });
- },
- /**
- * 确认按钮
- */
- confirm() {
- this.setEmit("confirm");
- this.close();
- },
- /**
- * 变化触发
- */
- change() {
- if (!this.insert)
- return;
- this.setEmit("change");
- },
- /**
- * 选择月份触发
- */
- monthSwitch() {
- let {
- year,
- month
- } = this.nowDate;
- this.$emit("monthSwitch", {
- year,
- month: Number(month)
- });
- },
- /**
- * 派发事件
- * @param {Object} name
- */
- setEmit(name) {
- if (!this.range) {
- if (!this.calendar.fullDate) {
- this.calendar = this.cale.getInfo(/* @__PURE__ */ new Date());
- this.tempSingleDate = this.calendar.fullDate;
- }
- if (this.hasTime && !this.time) {
- this.time = getTime(/* @__PURE__ */ new Date(), this.hideSecond);
- }
- }
- let {
- year,
- month,
- date: date3,
- fullDate,
- extraInfo
- } = this.calendar;
- this.$emit(name, {
- range: this.cale.multipleStatus,
- year,
- month,
- date: date3,
- time: this.time,
- timeRange: this.timeRange,
- fulldate: fullDate,
- extraInfo: extraInfo || {}
- });
- },
- /**
- * 选择天触发
- * @param {Object} weeks
- */
- choiceDate(weeks) {
- if (weeks.disable)
- return;
- this.calendar = weeks;
- this.calendar.userChecked = true;
- this.cale.setMultiple(this.calendar.fullDate, true);
- this.weeks = this.cale.weeks;
- this.tempSingleDate = this.calendar.fullDate;
- const beforeDate = new Date(this.cale.multipleStatus.before).getTime();
- const afterDate = new Date(this.cale.multipleStatus.after).getTime();
- if (beforeDate > afterDate && afterDate) {
- this.tempRange.before = this.cale.multipleStatus.after;
- this.tempRange.after = this.cale.multipleStatus.before;
- } else {
- this.tempRange.before = this.cale.multipleStatus.before;
- this.tempRange.after = this.cale.multipleStatus.after;
- }
- this.change();
- },
- changeMonth(type2) {
- let newDate;
- if (type2 === "pre") {
- newDate = this.cale.getPreMonthObj(this.nowDate.fullDate).fullDate;
- } else if (type2 === "next") {
- newDate = this.cale.getNextMonthObj(this.nowDate.fullDate).fullDate;
- }
- this.setDate(newDate);
- this.monthSwitch();
- },
- /**
- * 设置日期
- * @param {Object} date
- */
- setDate(date3) {
- this.cale.setDate(date3);
- this.weeks = this.cale.weeks;
- this.nowDate = this.cale.getInfo(date3);
- }
- }
- };
- function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_calendar_item = vue.resolveComponent("calendar-item");
- const _component_time_picker = vue.resolveComponent("time-picker");
- const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$3);
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "uni-calendar",
- onMouseleave: _cache[9] || (_cache[9] = (...args) => $options.leaveCale && $options.leaveCale(...args))
- },
- [
- !$props.insert && $data.show ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: vue.normalizeClass(["uni-calendar__mask", { "uni-calendar--mask-show": $data.aniMaskShow }]),
- onClick: _cache[0] || (_cache[0] = (...args) => $options.maskClick && $options.maskClick(...args))
- },
- null,
- 2
- /* CLASS */
- )) : vue.createCommentVNode("v-if", true),
- $props.insert || $data.show ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: vue.normalizeClass(["uni-calendar__content", { "uni-calendar--fixed": !$props.insert, "uni-calendar--ani-show": $data.aniMaskShow, "uni-calendar__content-mobile": $data.aniMaskShow }])
- },
- [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["uni-calendar__header", { "uni-calendar__header-mobile": !$props.insert }])
- },
- [
- vue.createElementVNode("view", {
- class: "uni-calendar__header-btn-box",
- onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.changeMonth("pre"), ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--left" })
- ]),
- vue.createElementVNode("picker", {
- mode: "date",
- value: $props.date,
- fields: "month",
- onChange: _cache[2] || (_cache[2] = (...args) => $options.bindDateChange && $options.bindDateChange(...args))
- }, [
- vue.createElementVNode(
- "text",
- { class: "uni-calendar__header-text" },
- vue.toDisplayString(($data.nowDate.year || "") + $options.yearText + ($data.nowDate.month || "") + $options.monthText),
- 1
- /* TEXT */
- )
- ], 40, ["value"]),
- vue.createElementVNode("view", {
- class: "uni-calendar__header-btn-box",
- onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.changeMonth("next"), ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--right" })
- ]),
- !$props.insert ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "dialog-close",
- onClick: _cache[4] || (_cache[4] = (...args) => $options.close && $options.close(...args))
- }, [
- vue.createElementVNode("view", {
- class: "dialog-close-plus",
- "data-id": "close"
- }),
- vue.createElementVNode("view", {
- class: "dialog-close-plus dialog-close-rotate",
- "data-id": "close"
- })
- ])) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- ),
- vue.createElementVNode("view", { class: "uni-calendar__box" }, [
- $props.showMonth ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "uni-calendar__box-bg"
- }, [
- vue.createElementVNode(
- "text",
- { class: "uni-calendar__box-bg-text" },
- vue.toDisplayString($data.nowDate.month),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", {
- class: "uni-calendar__weeks",
- style: { "padding-bottom": "7px" }
- }, [
- vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
- vue.createElementVNode(
- "text",
- { class: "uni-calendar__weeks-day-text" },
- vue.toDisplayString($options.SUNText),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
- vue.createElementVNode(
- "text",
- { class: "uni-calendar__weeks-day-text" },
- vue.toDisplayString($options.MONText),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
- vue.createElementVNode(
- "text",
- { class: "uni-calendar__weeks-day-text" },
- vue.toDisplayString($options.TUEText),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
- vue.createElementVNode(
- "text",
- { class: "uni-calendar__weeks-day-text" },
- vue.toDisplayString($options.WEDText),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
- vue.createElementVNode(
- "text",
- { class: "uni-calendar__weeks-day-text" },
- vue.toDisplayString($options.THUText),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
- vue.createElementVNode(
- "text",
- { class: "uni-calendar__weeks-day-text" },
- vue.toDisplayString($options.FRIText),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
- vue.createElementVNode(
- "text",
- { class: "uni-calendar__weeks-day-text" },
- vue.toDisplayString($options.SATText),
- 1
- /* TEXT */
- )
- ])
- ]),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.weeks, (item, weekIndex) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "uni-calendar__weeks",
- key: weekIndex
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item, (weeks, weeksIndex) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "uni-calendar__weeks-item",
- key: weeksIndex
- }, [
- vue.createVNode(_component_calendar_item, {
- class: "uni-calendar-item--hook",
- weeks,
- calendar: $data.calendar,
- selected: $props.selected,
- checkHover: $props.range,
- onChange: $options.choiceDate,
- onHandleMouse: $options.handleMouse
- }, null, 8, ["weeks", "calendar", "selected", "checkHover", "onChange", "onHandleMouse"])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- !$props.insert && !$props.range && $props.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "uni-date-changed uni-calendar--fixed-top",
- style: { "padding": "0 80px" }
- }, [
- vue.createElementVNode(
- "view",
- { class: "uni-date-changed--time-date" },
- vue.toDisplayString($data.tempSingleDate ? $data.tempSingleDate : $options.selectDateText),
- 1
- /* TEXT */
- ),
- vue.createVNode(_component_time_picker, {
- type: "time",
- start: $options.timepickerStartTime,
- end: $options.timepickerEndTime,
- modelValue: $data.time,
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.time = $event),
- disabled: !$data.tempSingleDate,
- border: false,
- "hide-second": $props.hideSecond,
- class: "time-picker-style"
- }, null, 8, ["start", "end", "modelValue", "disabled", "hide-second"])
- ])) : vue.createCommentVNode("v-if", true),
- !$props.insert && $props.range && $props.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "uni-date-changed uni-calendar--fixed-top"
- }, [
- vue.createElementVNode("view", { class: "uni-date-changed--time-start" }, [
- vue.createElementVNode(
- "view",
- { class: "uni-date-changed--time-date" },
- vue.toDisplayString($data.tempRange.before ? $data.tempRange.before : $options.startDateText),
- 1
- /* TEXT */
- ),
- vue.createVNode(_component_time_picker, {
- type: "time",
- start: $options.timepickerStartTime,
- modelValue: $data.timeRange.startTime,
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.timeRange.startTime = $event),
- border: false,
- "hide-second": $props.hideSecond,
- disabled: !$data.tempRange.before,
- class: "time-picker-style"
- }, null, 8, ["start", "modelValue", "hide-second", "disabled"])
- ]),
- vue.createElementVNode("view", { style: { "line-height": "50px" } }, [
- vue.createVNode(_component_uni_icons, {
- type: "arrowthinright",
- color: "#999"
- })
- ]),
- vue.createElementVNode("view", { class: "uni-date-changed--time-end" }, [
- vue.createElementVNode(
- "view",
- { class: "uni-date-changed--time-date" },
- vue.toDisplayString($data.tempRange.after ? $data.tempRange.after : $options.endDateText),
- 1
- /* TEXT */
- ),
- vue.createVNode(_component_time_picker, {
- type: "time",
- end: $options.timepickerEndTime,
- modelValue: $data.timeRange.endTime,
- "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.timeRange.endTime = $event),
- border: false,
- "hide-second": $props.hideSecond,
- disabled: !$data.tempRange.after,
- class: "time-picker-style"
- }, null, 8, ["end", "modelValue", "hide-second", "disabled"])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- !$props.insert ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "uni-date-changed uni-date-btn--ok"
- }, [
- vue.createElementVNode(
- "view",
- {
- class: "uni-datetime-picker--btn",
- onClick: _cache[8] || (_cache[8] = (...args) => $options.confirm && $options.confirm(...args))
- },
- vue.toDisplayString($options.confirmText),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 32
- /* NEED_HYDRATION */
- );
- }
- const Calendar = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$R], ["__scopeId", "data-v-1d379219"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue"]]);
- const _sfc_main$R = {
- name: "UniDatetimePicker",
- options: {
- virtualHost: true
- },
- components: {
- Calendar,
- TimePicker
- },
- data() {
- return {
- isRange: false,
- hasTime: false,
- displayValue: "",
- inputDate: "",
- calendarDate: "",
- pickerTime: "",
- calendarRange: {
- startDate: "",
- startTime: "",
- endDate: "",
- endTime: ""
- },
- displayRangeValue: {
- startDate: "",
- endDate: ""
- },
- tempRange: {
- startDate: "",
- startTime: "",
- endDate: "",
- endTime: ""
- },
- // 左右日历同步数据
- startMultipleStatus: {
- before: "",
- after: "",
- data: [],
- fulldate: ""
- },
- endMultipleStatus: {
- before: "",
- after: "",
- data: [],
- fulldate: ""
- },
- pickerVisible: false,
- pickerPositionStyle: null,
- isEmitValue: false,
- isPhone: false,
- isFirstShow: true,
- i18nT: () => {
- }
- };
- },
- props: {
- type: {
- type: String,
- default: "datetime"
- },
- value: {
- type: [String, Number, Array, Date],
- default: ""
- },
- modelValue: {
- type: [String, Number, Array, Date],
- default: ""
- },
- start: {
- type: [Number, String],
- default: ""
- },
- end: {
- type: [Number, String],
- default: ""
- },
- returnType: {
- type: String,
- default: "string"
- },
- placeholder: {
- type: String,
- default: ""
- },
- startPlaceholder: {
- type: String,
- default: ""
- },
- endPlaceholder: {
- type: String,
- default: ""
- },
- rangeSeparator: {
- type: String,
- default: "-"
- },
- border: {
- type: [Boolean],
- default: true
- },
- disabled: {
- type: [Boolean],
- default: false
- },
- clearIcon: {
- type: [Boolean],
- default: true
- },
- hideSecond: {
- type: [Boolean],
- default: false
- },
- defaultValue: {
- type: [String, Object, Array],
- default: ""
- }
- },
- watch: {
- type: {
- immediate: true,
- handler(newVal) {
- this.hasTime = newVal.indexOf("time") !== -1;
- this.isRange = newVal.indexOf("range") !== -1;
- }
- },
- modelValue: {
- immediate: true,
- handler(newVal) {
- if (this.isEmitValue) {
- this.isEmitValue = false;
- return;
- }
- this.initPicker(newVal);
- }
- },
- start: {
- immediate: true,
- handler(newVal) {
- if (!newVal)
- return;
- this.calendarRange.startDate = getDate(newVal);
- if (this.hasTime) {
- this.calendarRange.startTime = getTime(newVal);
- }
- }
- },
- end: {
- immediate: true,
- handler(newVal) {
- if (!newVal)
- return;
- this.calendarRange.endDate = getDate(newVal);
- if (this.hasTime) {
- this.calendarRange.endTime = getTime(newVal, this.hideSecond);
- }
- }
- }
- },
- computed: {
- timepickerStartTime() {
- const activeDate = this.isRange ? this.tempRange.startDate : this.inputDate;
- return activeDate === this.calendarRange.startDate ? this.calendarRange.startTime : "";
- },
- timepickerEndTime() {
- const activeDate = this.isRange ? this.tempRange.endDate : this.inputDate;
- return activeDate === this.calendarRange.endDate ? this.calendarRange.endTime : "";
- },
- mobileCalendarTime() {
- const timeRange = {
- start: this.tempRange.startTime,
- end: this.tempRange.endTime
- };
- return this.isRange ? timeRange : this.pickerTime;
- },
- mobSelectableTime() {
- return {
- start: this.calendarRange.startTime,
- end: this.calendarRange.endTime
- };
- },
- datePopupWidth() {
- return this.isRange ? 653 : 301;
- },
- /**
- * for i18n
- */
- singlePlaceholderText() {
- return this.placeholder || (this.type === "date" ? this.selectDateText : this.selectDateTimeText);
- },
- startPlaceholderText() {
- return this.startPlaceholder || this.startDateText;
- },
- endPlaceholderText() {
- return this.endPlaceholder || this.endDateText;
- },
- selectDateText() {
- return this.i18nT("uni-datetime-picker.selectDate");
- },
- selectDateTimeText() {
- return this.i18nT("uni-datetime-picker.selectDateTime");
- },
- selectTimeText() {
- return this.i18nT("uni-datetime-picker.selectTime");
- },
- startDateText() {
- return this.startPlaceholder || this.i18nT("uni-datetime-picker.startDate");
- },
- startTimeText() {
- return this.i18nT("uni-datetime-picker.startTime");
- },
- endDateText() {
- return this.endPlaceholder || this.i18nT("uni-datetime-picker.endDate");
- },
- endTimeText() {
- return this.i18nT("uni-datetime-picker.endTime");
- },
- okText() {
- return this.i18nT("uni-datetime-picker.ok");
- },
- clearText() {
- return this.i18nT("uni-datetime-picker.clear");
- },
- showClearIcon() {
- return this.clearIcon && !this.disabled && (this.displayValue || this.displayRangeValue.startDate && this.displayRangeValue.endDate);
- }
- },
- created() {
- this.initI18nT();
- this.platform();
- },
- methods: {
- initI18nT() {
- const vueI18n = initVueI18n(i18nMessages);
- this.i18nT = vueI18n.t;
- },
- initPicker(newVal) {
- if (!newVal && !this.defaultValue || Array.isArray(newVal) && !newVal.length) {
- this.$nextTick(() => {
- this.clear(false);
- });
- return;
- }
- if (!Array.isArray(newVal) && !this.isRange) {
- if (newVal) {
- this.displayValue = this.inputDate = this.calendarDate = getDate(newVal);
- if (this.hasTime) {
- this.pickerTime = getTime(newVal, this.hideSecond);
- this.displayValue = `${this.displayValue} ${this.pickerTime}`;
- }
- } else if (this.defaultValue) {
- this.inputDate = this.calendarDate = getDate(this.defaultValue);
- if (this.hasTime) {
- this.pickerTime = getTime(this.defaultValue, this.hideSecond);
- }
- }
- } else {
- const [before, after] = newVal;
- if (!before && !after)
- return;
- const beforeDate = getDate(before);
- const beforeTime = getTime(before, this.hideSecond);
- const afterDate = getDate(after);
- const afterTime = getTime(after, this.hideSecond);
- const startDate = beforeDate;
- const endDate = afterDate;
- this.displayRangeValue.startDate = this.tempRange.startDate = startDate;
- this.displayRangeValue.endDate = this.tempRange.endDate = endDate;
- if (this.hasTime) {
- this.displayRangeValue.startDate = `${beforeDate} ${beforeTime}`;
- this.displayRangeValue.endDate = `${afterDate} ${afterTime}`;
- this.tempRange.startTime = beforeTime;
- this.tempRange.endTime = afterTime;
- }
- const defaultRange = {
- before: beforeDate,
- after: afterDate
- };
- this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, defaultRange, {
- which: "right"
- });
- this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, defaultRange, {
- which: "left"
- });
- }
- },
- updateLeftCale(e) {
- const left = this.$refs.left;
- left.cale.setHoverMultiple(e.after);
- left.setDate(this.$refs.left.nowDate.fullDate);
- },
- updateRightCale(e) {
- const right = this.$refs.right;
- right.cale.setHoverMultiple(e.after);
- right.setDate(this.$refs.right.nowDate.fullDate);
- },
- platform() {
- if (typeof navigator !== "undefined") {
- this.isPhone = navigator.userAgent.toLowerCase().indexOf("mobile") !== -1;
- return;
- }
- const { windowWidth } = uni.getSystemInfoSync();
- this.isPhone = windowWidth <= 500;
- this.windowWidth = windowWidth;
- },
- show() {
- if (this.disabled) {
- return;
- }
- this.platform();
- if (this.isPhone) {
- setTimeout(() => {
- this.$refs.mobile.open();
- }, 0);
- return;
- }
- this.pickerPositionStyle = {
- top: "10px"
- };
- const dateEditor = uni.createSelectorQuery().in(this).select(".uni-date-editor");
- dateEditor.boundingClientRect((rect) => {
- if (this.windowWidth - rect.left < this.datePopupWidth) {
- this.pickerPositionStyle.right = 0;
- }
- }).exec();
- setTimeout(() => {
- this.pickerVisible = !this.pickerVisible;
- if (!this.isPhone && this.isRange && this.isFirstShow) {
- this.isFirstShow = false;
- const {
- startDate,
- endDate
- } = this.calendarRange;
- if (startDate && endDate) {
- if (this.diffDate(startDate, endDate) < 30) {
- this.$refs.right.changeMonth("pre");
- }
- } else {
- this.$refs.right.changeMonth("next");
- this.$refs.right.cale.lastHover = false;
- }
- }
- }, 50);
- },
- close() {
- setTimeout(() => {
- this.pickerVisible = false;
- this.$emit("maskClick", this.value);
- this.$refs.mobile && this.$refs.mobile.close();
- }, 20);
- },
- setEmit(value2) {
- if (this.returnType === "timestamp" || this.returnType === "date") {
- if (!Array.isArray(value2)) {
- if (!this.hasTime) {
- value2 = value2 + " 00:00:00";
- }
- value2 = this.createTimestamp(value2);
- if (this.returnType === "date") {
- value2 = new Date(value2);
- }
- } else {
- if (!this.hasTime) {
- value2[0] = value2[0] + " 00:00:00";
- value2[1] = value2[1] + " 00:00:00";
- }
- value2[0] = this.createTimestamp(value2[0]);
- value2[1] = this.createTimestamp(value2[1]);
- if (this.returnType === "date") {
- value2[0] = new Date(value2[0]);
- value2[1] = new Date(value2[1]);
- }
- }
- }
- this.$emit("update:modelValue", value2);
- this.$emit("input", value2);
- this.$emit("change", value2);
- this.isEmitValue = true;
- },
- createTimestamp(date3) {
- date3 = fixIosDateFormat(date3);
- return Date.parse(new Date(date3));
- },
- singleChange(e) {
- this.calendarDate = this.inputDate = e.fulldate;
- if (this.hasTime)
- return;
- this.confirmSingleChange();
- },
- confirmSingleChange() {
- if (!checkDate(this.inputDate)) {
- const now2 = /* @__PURE__ */ new Date();
- this.calendarDate = this.inputDate = getDate(now2);
- this.pickerTime = getTime(now2, this.hideSecond);
- }
- let startLaterInputDate = false;
- let startDate, startTime;
- if (this.start) {
- let startString = this.start;
- if (typeof this.start === "number") {
- startString = getDateTime(this.start, this.hideSecond);
- }
- [startDate, startTime] = startString.split(" ");
- if (this.start && !dateCompare(startDate, this.inputDate)) {
- startLaterInputDate = true;
- this.inputDate = startDate;
- }
- }
- let endEarlierInputDate = false;
- let endDate, endTime;
- if (this.end) {
- let endString = this.end;
- if (typeof this.end === "number") {
- endString = getDateTime(this.end, this.hideSecond);
- }
- [endDate, endTime] = endString.split(" ");
- if (this.end && !dateCompare(this.inputDate, endDate)) {
- endEarlierInputDate = true;
- this.inputDate = endDate;
- }
- }
- if (this.hasTime) {
- if (startLaterInputDate) {
- this.pickerTime = startTime || getDefaultSecond(this.hideSecond);
- }
- if (endEarlierInputDate) {
- this.pickerTime = endTime || getDefaultSecond(this.hideSecond);
- }
- if (!this.pickerTime) {
- this.pickerTime = getTime(Date.now(), this.hideSecond);
- }
- this.displayValue = `${this.inputDate} ${this.pickerTime}`;
- } else {
- this.displayValue = this.inputDate;
- }
- this.setEmit(this.displayValue);
- this.pickerVisible = false;
- },
- leftChange(e) {
- const {
- before,
- after
- } = e.range;
- this.rangeChange(before, after);
- const obj = {
- before: e.range.before,
- after: e.range.after,
- data: e.range.data,
- fulldate: e.fulldate
- };
- this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, obj);
- },
- rightChange(e) {
- const {
- before,
- after
- } = e.range;
- this.rangeChange(before, after);
- const obj = {
- before: e.range.before,
- after: e.range.after,
- data: e.range.data,
- fulldate: e.fulldate
- };
- this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, obj);
- },
- mobileChange(e) {
- if (this.isRange) {
- const { before, after } = e.range;
- if (!before || !after) {
- return;
- }
- this.handleStartAndEnd(before, after, true);
- if (this.hasTime) {
- const {
- startTime,
- endTime
- } = e.timeRange;
- this.tempRange.startTime = startTime;
- this.tempRange.endTime = endTime;
- }
- this.confirmRangeChange();
- } else {
- if (this.hasTime) {
- this.displayValue = e.fulldate + " " + e.time;
- } else {
- this.displayValue = e.fulldate;
- }
- this.setEmit(this.displayValue);
- }
- this.$refs.mobile.close();
- },
- rangeChange(before, after) {
- if (!(before && after))
- return;
- this.handleStartAndEnd(before, after, true);
- if (this.hasTime)
- return;
- this.confirmRangeChange();
- },
- confirmRangeChange() {
- if (!this.tempRange.startDate || !this.tempRange.endDate) {
- this.pickerVisible = false;
- return;
- }
- if (!checkDate(this.tempRange.startDate)) {
- this.tempRange.startDate = getDate(Date.now());
- }
- if (!checkDate(this.tempRange.endDate)) {
- this.tempRange.endDate = getDate(Date.now());
- }
- let start, end;
- let startDateLaterRangeStartDate = false;
- let startDateLaterRangeEndDate = false;
- let startDate, startTime;
- if (this.start) {
- let startString = this.start;
- if (typeof this.start === "number") {
- startString = getDateTime(this.start, this.hideSecond);
- }
- [startDate, startTime] = startString.split(" ");
- if (this.start && !dateCompare(this.start, this.tempRange.startDate)) {
- startDateLaterRangeStartDate = true;
- this.tempRange.startDate = startDate;
- }
- if (this.start && !dateCompare(this.start, this.tempRange.endDate)) {
- startDateLaterRangeEndDate = true;
- this.tempRange.endDate = startDate;
- }
- }
- let endDateEarlierRangeStartDate = false;
- let endDateEarlierRangeEndDate = false;
- let endDate, endTime;
- if (this.end) {
- let endString = this.end;
- if (typeof this.end === "number") {
- endString = getDateTime(this.end, this.hideSecond);
- }
- [endDate, endTime] = endString.split(" ");
- if (this.end && !dateCompare(this.tempRange.startDate, this.end)) {
- endDateEarlierRangeStartDate = true;
- this.tempRange.startDate = endDate;
- }
- if (this.end && !dateCompare(this.tempRange.endDate, this.end)) {
- endDateEarlierRangeEndDate = true;
- this.tempRange.endDate = endDate;
- }
- }
- if (!this.hasTime) {
- start = this.displayRangeValue.startDate = this.tempRange.startDate;
- end = this.displayRangeValue.endDate = this.tempRange.endDate;
- } else {
- if (startDateLaterRangeStartDate) {
- this.tempRange.startTime = startTime || getDefaultSecond(this.hideSecond);
- } else if (endDateEarlierRangeStartDate) {
- this.tempRange.startTime = endTime || getDefaultSecond(this.hideSecond);
- }
- if (!this.tempRange.startTime) {
- this.tempRange.startTime = getTime(Date.now(), this.hideSecond);
- }
- if (startDateLaterRangeEndDate) {
- this.tempRange.endTime = startTime || getDefaultSecond(this.hideSecond);
- } else if (endDateEarlierRangeEndDate) {
- this.tempRange.endTime = endTime || getDefaultSecond(this.hideSecond);
- }
- if (!this.tempRange.endTime) {
- this.tempRange.endTime = getTime(Date.now(), this.hideSecond);
- }
- start = this.displayRangeValue.startDate = `${this.tempRange.startDate} ${this.tempRange.startTime}`;
- end = this.displayRangeValue.endDate = `${this.tempRange.endDate} ${this.tempRange.endTime}`;
- }
- if (!dateCompare(start, end)) {
- [start, end] = [end, start];
- }
- this.displayRangeValue.startDate = start;
- this.displayRangeValue.endDate = end;
- const displayRange = [start, end];
- this.setEmit(displayRange);
- this.pickerVisible = false;
- },
- handleStartAndEnd(before, after, temp = false) {
- if (!(before && after))
- return;
- const type2 = temp ? "tempRange" : "range";
- const isStartEarlierEnd = dateCompare(before, after);
- this[type2].startDate = isStartEarlierEnd ? before : after;
- this[type2].endDate = isStartEarlierEnd ? after : before;
- },
- /**
- * 比较时间大小
- */
- dateCompare(startDate, endDate) {
- startDate = new Date(startDate.replace("-", "/").replace("-", "/"));
- endDate = new Date(endDate.replace("-", "/").replace("-", "/"));
- return startDate <= endDate;
- },
- /**
- * 比较时间差
- */
- diffDate(startDate, endDate) {
- startDate = new Date(startDate.replace("-", "/").replace("-", "/"));
- endDate = new Date(endDate.replace("-", "/").replace("-", "/"));
- const diff = (endDate - startDate) / (24 * 60 * 60 * 1e3);
- return Math.abs(diff);
- },
- clear(needEmit = true) {
- if (!this.isRange) {
- this.displayValue = "";
- this.inputDate = "";
- this.pickerTime = "";
- if (this.isPhone) {
- this.$refs.mobile && this.$refs.mobile.clearCalender();
- } else {
- this.$refs.pcSingle && this.$refs.pcSingle.clearCalender();
- }
- if (needEmit) {
- this.$emit("change", "");
- this.$emit("input", "");
- this.$emit("update:modelValue", "");
- }
- } else {
- this.displayRangeValue.startDate = "";
- this.displayRangeValue.endDate = "";
- this.tempRange.startDate = "";
- this.tempRange.startTime = "";
- this.tempRange.endDate = "";
- this.tempRange.endTime = "";
- if (this.isPhone) {
- this.$refs.mobile && this.$refs.mobile.clearCalender();
- } else {
- this.$refs.left && this.$refs.left.clearCalender();
- this.$refs.right && this.$refs.right.clearCalender();
- this.$refs.right && this.$refs.right.changeMonth("next");
- }
- if (needEmit) {
- this.$emit("change", []);
- this.$emit("input", []);
- this.$emit("update:modelValue", []);
- }
- }
- }
- }
- };
- function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$3);
- const _component_time_picker = vue.resolveComponent("time-picker");
- const _component_Calendar = vue.resolveComponent("Calendar");
- return vue.openBlock(), vue.createElementBlock("view", { class: "uni-date" }, [
- vue.createElementVNode("view", {
- class: "uni-date-editor",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.show && $options.show(...args))
- }, [
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["uni-date-editor--x", { "uni-date-editor--x__disabled": $props.disabled, "uni-date-x--border": $props.border }])
- },
- [
- !$data.isRange ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "uni-date-x uni-date-single"
- }, [
- vue.createVNode(_component_uni_icons, {
- class: "icon-calendar",
- type: "calendar",
- color: "#c0c4cc",
- size: "22"
- }),
- vue.createElementVNode(
- "view",
- { class: "uni-date__x-input" },
- vue.toDisplayString($data.displayValue || $options.singlePlaceholderText),
- 1
- /* TEXT */
- )
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "uni-date-x uni-date-range"
- }, [
- vue.createVNode(_component_uni_icons, {
- class: "icon-calendar",
- type: "calendar",
- color: "#c0c4cc",
- size: "22"
- }),
- vue.createElementVNode(
- "view",
- { class: "uni-date__x-input text-center" },
- vue.toDisplayString($data.displayRangeValue.startDate || $options.startPlaceholderText),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "range-separator" },
- vue.toDisplayString($props.rangeSeparator),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "uni-date__x-input text-center" },
- vue.toDisplayString($data.displayRangeValue.endDate || $options.endPlaceholderText),
- 1
- /* TEXT */
- )
- ])),
- $options.showClearIcon ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "uni-date__icon-clear",
- onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clear && $options.clear(...args), ["stop"]))
- }, [
- vue.createVNode(_component_uni_icons, {
- type: "clear",
- color: "#c0c4cc",
- size: "22"
- })
- ])) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- )
- ], true)
- ]),
- vue.withDirectives(vue.createElementVNode(
- "view",
- {
- class: "uni-date-mask--pc",
- onClick: _cache[2] || (_cache[2] = (...args) => $options.close && $options.close(...args))
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vShow, $data.pickerVisible]
- ]),
- !$data.isPhone ? vue.withDirectives((vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- ref: "datePicker",
- class: "uni-date-picker__container"
- },
- [
- !$data.isRange ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "uni-date-single--x",
- style: vue.normalizeStyle($data.pickerPositionStyle)
- },
- [
- vue.createElementVNode("view", { class: "uni-popper__arrow" }),
- $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "uni-date-changed popup-x-header"
- }, [
- vue.withDirectives(vue.createElementVNode("input", {
- class: "uni-date__input text-center",
- type: "text",
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.inputDate = $event),
- placeholder: $options.selectDateText
- }, null, 8, ["placeholder"]), [
- [vue.vModelText, $data.inputDate]
- ]),
- vue.createVNode(_component_time_picker, {
- type: "time",
- modelValue: $data.pickerTime,
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.pickerTime = $event),
- border: false,
- disabled: !$data.inputDate,
- start: $options.timepickerStartTime,
- end: $options.timepickerEndTime,
- hideSecond: $props.hideSecond,
- style: { "width": "100%" }
- }, {
- default: vue.withCtx(() => [
- vue.withDirectives(vue.createElementVNode("input", {
- class: "uni-date__input text-center",
- type: "text",
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.pickerTime = $event),
- placeholder: $options.selectTimeText,
- disabled: !$data.inputDate
- }, null, 8, ["placeholder", "disabled"]), [
- [vue.vModelText, $data.pickerTime]
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue", "disabled", "start", "end", "hideSecond"])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createVNode(_component_Calendar, {
- ref: "pcSingle",
- showMonth: false,
- "start-date": $data.calendarRange.startDate,
- "end-date": $data.calendarRange.endDate,
- date: $data.calendarDate,
- onChange: $options.singleChange,
- "default-value": $props.defaultValue,
- style: { "padding": "0 8px" }
- }, null, 8, ["start-date", "end-date", "date", "onChange", "default-value"]),
- $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "popup-x-footer"
- }, [
- vue.createElementVNode(
- "text",
- {
- class: "confirm-text",
- onClick: _cache[6] || (_cache[6] = (...args) => $options.confirmSingleChange && $options.confirmSingleChange(...args))
- },
- vue.toDisplayString($options.okText),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true)
- ],
- 4
- /* STYLE */
- )) : (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "uni-date-range--x",
- style: vue.normalizeStyle($data.pickerPositionStyle)
- },
- [
- vue.createElementVNode("view", { class: "uni-popper__arrow" }),
- $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "popup-x-header uni-date-changed"
- }, [
- vue.createElementVNode("view", { class: "popup-x-header--datetime" }, [
- vue.withDirectives(vue.createElementVNode("input", {
- class: "uni-date__input uni-date-range__input",
- type: "text",
- "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.tempRange.startDate = $event),
- placeholder: $options.startDateText
- }, null, 8, ["placeholder"]), [
- [vue.vModelText, $data.tempRange.startDate]
- ]),
- vue.createVNode(_component_time_picker, {
- type: "time",
- modelValue: $data.tempRange.startTime,
- "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $data.tempRange.startTime = $event),
- start: $options.timepickerStartTime,
- border: false,
- disabled: !$data.tempRange.startDate,
- hideSecond: $props.hideSecond
- }, {
- default: vue.withCtx(() => [
- vue.withDirectives(vue.createElementVNode("input", {
- class: "uni-date__input uni-date-range__input",
- type: "text",
- "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.tempRange.startTime = $event),
- placeholder: $options.startTimeText,
- disabled: !$data.tempRange.startDate
- }, null, 8, ["placeholder", "disabled"]), [
- [vue.vModelText, $data.tempRange.startTime]
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue", "start", "disabled", "hideSecond"])
- ]),
- vue.createVNode(_component_uni_icons, {
- type: "arrowthinright",
- color: "#999",
- style: { "line-height": "40px" }
- }),
- vue.createElementVNode("view", { class: "popup-x-header--datetime" }, [
- vue.withDirectives(vue.createElementVNode("input", {
- class: "uni-date__input uni-date-range__input",
- type: "text",
- "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $data.tempRange.endDate = $event),
- placeholder: $options.endDateText
- }, null, 8, ["placeholder"]), [
- [vue.vModelText, $data.tempRange.endDate]
- ]),
- vue.createVNode(_component_time_picker, {
- type: "time",
- modelValue: $data.tempRange.endTime,
- "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $data.tempRange.endTime = $event),
- end: $options.timepickerEndTime,
- border: false,
- disabled: !$data.tempRange.endDate,
- hideSecond: $props.hideSecond
- }, {
- default: vue.withCtx(() => [
- vue.withDirectives(vue.createElementVNode("input", {
- class: "uni-date__input uni-date-range__input",
- type: "text",
- "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.tempRange.endTime = $event),
- placeholder: $options.endTimeText,
- disabled: !$data.tempRange.endDate
- }, null, 8, ["placeholder", "disabled"]), [
- [vue.vModelText, $data.tempRange.endTime]
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue", "end", "disabled", "hideSecond"])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "popup-x-body" }, [
- vue.createVNode(_component_Calendar, {
- ref: "left",
- showMonth: false,
- "start-date": $data.calendarRange.startDate,
- "end-date": $data.calendarRange.endDate,
- range: true,
- pleStatus: $data.endMultipleStatus,
- onChange: $options.leftChange,
- onFirstEnterCale: $options.updateRightCale,
- style: { "padding": "0 8px" }
- }, null, 8, ["start-date", "end-date", "pleStatus", "onChange", "onFirstEnterCale"]),
- vue.createVNode(_component_Calendar, {
- ref: "right",
- showMonth: false,
- "start-date": $data.calendarRange.startDate,
- "end-date": $data.calendarRange.endDate,
- range: true,
- onChange: $options.rightChange,
- pleStatus: $data.startMultipleStatus,
- onFirstEnterCale: $options.updateLeftCale,
- style: { "padding": "0 8px", "border-left": "1px solid #F1F1F1" }
- }, null, 8, ["start-date", "end-date", "onChange", "pleStatus", "onFirstEnterCale"])
- ]),
- $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "popup-x-footer"
- }, [
- vue.createElementVNode(
- "text",
- {
- onClick: _cache[13] || (_cache[13] = (...args) => $options.clear && $options.clear(...args))
- },
- vue.toDisplayString($options.clearText),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- {
- class: "confirm-text",
- onClick: _cache[14] || (_cache[14] = (...args) => $options.confirmRangeChange && $options.confirmRangeChange(...args))
- },
- vue.toDisplayString($options.okText),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true)
- ],
- 4
- /* STYLE */
- ))
- ],
- 512
- /* NEED_PATCH */
- )), [
- [vue.vShow, $data.pickerVisible]
- ]) : vue.createCommentVNode("v-if", true),
- $data.isPhone ? (vue.openBlock(), vue.createBlock(_component_Calendar, {
- key: 1,
- ref: "mobile",
- clearDate: false,
- date: $data.calendarDate,
- defTime: $options.mobileCalendarTime,
- "start-date": $data.calendarRange.startDate,
- "end-date": $data.calendarRange.endDate,
- selectableTimes: $options.mobSelectableTime,
- startPlaceholder: $props.startPlaceholder,
- endPlaceholder: $props.endPlaceholder,
- "default-value": $props.defaultValue,
- pleStatus: $data.endMultipleStatus,
- showMonth: false,
- range: $data.isRange,
- hasTime: $data.hasTime,
- insert: false,
- hideSecond: $props.hideSecond,
- onConfirm: $options.mobileChange,
- onMaskClose: $options.close
- }, null, 8, ["date", "defTime", "start-date", "end-date", "selectableTimes", "startPlaceholder", "endPlaceholder", "default-value", "pleStatus", "range", "hasTime", "hideSecond", "onConfirm", "onMaskClose"])) : vue.createCommentVNode("v-if", true)
- ]);
- }
- const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$Q], ["__scopeId", "data-v-9802168a"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue"]]);
- const _sfc_main$Q = {
- __name: "after-sale",
- setup(__props, { expose: __expose }) {
- __expose();
- const otherParams = vue.ref({
- sender: ""
- });
- const scrollRef = vue.ref(null);
- const refreshList = () => {
- var _a;
- (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
- };
- let dataList = vue.ref([{
- date: "2024-10-24",
- orderNum: 423,
- auditNum: 293,
- trueNum: 323
- }, {
- date: "2024-10-24",
- orderNum: 423,
- auditNum: 293,
- trueNum: 323
- }, {
- date: "2024-10-24",
- orderNum: 423,
- auditNum: 293,
- trueNum: 323
- }]);
- const updateList = (data) => {
- dataList.value = data;
- };
- const form = vue.reactive({
- startTime: "",
- endTime: ""
- });
- const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
- return dataList;
- }, set dataList(v) {
- dataList = v;
- }, updateList, form, reactive: vue.reactive, PageScroll: pageScroll, ref: vue.ref, get onLoad() {
- return onLoad;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_uni_datetime_picker = resolveEasycom(vue.resolveDynamicComponent("uni-datetime-picker"), __easycom_0$2);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$2);
- const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "common-page",
- style: { "padding": "0" }
- }, [
- vue.createVNode($setup["PageScroll"], {
- requestStr: "/team/token/shop/invite/page",
- onUpdateList: $setup.updateList,
- ref: "scrollRef",
- otherParams: $setup.otherParams
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "search-area flex-d" }, [
- vue.createElementVNode("view", { class: "flex-a mb-12" }, [
- vue.createElementVNode("text", { class: "font-13 mr-10" }, "开始时间:"),
- vue.createVNode(_component_uni_datetime_picker, {
- type: "datetime",
- modelValue: $setup.form.startTime,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.startTime = $event)
- }, null, 8, ["modelValue"])
- ]),
- vue.createElementVNode("view", { class: "flex-a" }, [
- vue.createElementVNode("text", { class: "font-13 mr-10" }, "结束时间:"),
- vue.createVNode(_component_uni_datetime_picker, {
- type: "datetime",
- modelValue: $setup.form.endTime,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.endTime = $event)
- }, null, 8, ["modelValue"]),
- vue.createVNode(_component_u_button, {
- type: "primary",
- "custom-style": "width:160rpx;height:72rpx;margin-left:10px"
- }, {
- default: vue.withCtx(() => [
- vue.createTextVNode("查询")
- ]),
- _: 1
- /* STABLE */
- })
- ]),
- vue.createVNode(_component_u_divider),
- vue.createElementVNode("view", { class: "flex-a" }, [
- vue.createElementVNode("view", { class: "text-item flex-1" }, "审核日期"),
- vue.createElementVNode("view", { class: "text-item flex-1" }, "订单数量"),
- vue.createElementVNode("view", { class: "text-item flex-1" }, "审书数量"),
- vue.createElementVNode("view", { class: "text-item flex-1" }, "实际回收")
- ])
- ])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createElementVNode("view", { class: "list-con" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "flex-a"
- }, [
- vue.createElementVNode(
- "view",
- { class: "text-item flex-1" },
- vue.toDisplayString(item.date),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "text-item flex-1" },
- vue.toDisplayString(item.orderNum),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "text-item flex-1" },
- vue.toDisplayString(item.auditNum),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "text-item flex-1" },
- vue.toDisplayString(item.trueNum),
- 1
- /* TEXT */
- )
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["otherParams"])
- ]);
- }
- const PagesIndexStatisticAfterSale = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$P], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/statistic/after-sale.vue"]]);
- const _sfc_main$P = {
- __name: "package",
- setup(__props, { expose: __expose }) {
- __expose();
- const otherParams = vue.ref({
- sender: ""
- });
- const scrollRef = vue.ref(null);
- const refreshList = () => {
- var _a;
- (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
- };
- let dataList = vue.ref([{
- date: "2024-10-24",
- orderNum: 423
- }, {
- date: "2024-10-24",
- orderNum: 423
- }, {
- date: "2024-10-24",
- orderNum: 423
- }]);
- const updateList = (data) => {
- dataList.value = data;
- };
- const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
- return dataList;
- }, set dataList(v) {
- dataList = v;
- }, updateList, reactive: vue.reactive, PageScroll: pageScroll, ref: vue.ref, get onLoad() {
- return onLoad;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "common-page",
- style: { "padding": "0" }
- }, [
- vue.createVNode($setup["PageScroll"], {
- requestStr: "/team/token/shop/invite/page",
- onUpdateList: $setup.updateList,
- ref: "scrollRef",
- otherParams: $setup.otherParams
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "search-area flex-a" }, [
- vue.createElementVNode("view", { class: "text-item flex-1" }, "审核日期"),
- vue.createElementVNode("view", { class: "text-item flex-1" }, "数量")
- ])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createElementVNode("view", { class: "list-con" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "flex-a"
- }, [
- vue.createElementVNode(
- "view",
- { class: "text-item flex-1" },
- vue.toDisplayString(item.date),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "text-item flex-1" },
- vue.toDisplayString(item.orderNum),
- 1
- /* TEXT */
- )
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["otherParams"])
- ]);
- }
- const PagesIndexStatisticPackage = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$O], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/statistic/package.vue"]]);
- const _sfc_main$O = {
- name: "GoodIn"
- };
- function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createCommentVNode(" 开发中提示 "),
- vue.createElementVNode("view", { class: "developing" }, [
- vue.createElementVNode("text", null, "开发中")
- ])
- ]);
- }
- const PagesIndexWmsMediumIn = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$N], ["__scopeId", "data-v-04e21b6f"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/medium-in.vue"]]);
- const _sfc_main$N = {
- name: "GoodIn"
- };
- function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createCommentVNode(" 开发中提示 "),
- vue.createElementVNode("view", { class: "developing" }, [
- vue.createElementVNode("text", null, "开发中")
- ])
- ]);
- }
- const PagesIndexWmsGoodIn = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$M], ["__scopeId", "data-v-701c6544"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/good-in.vue"]]);
- const _sfc_main$M = {
- name: "GoodIn"
- };
- function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createCommentVNode(" 开发中提示 "),
- vue.createElementVNode("view", { class: "developing" }, [
- vue.createElementVNode("text", null, "开发中")
- ])
- ]);
- }
- const PagesIndexWmsSecondaryIn = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$L], ["__scopeId", "data-v-52deef37"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/secondary-in.vue"]]);
- const MIN_DISTANCE = 10;
- function getDirection(x, y) {
- if (x > y && x > MIN_DISTANCE) {
- return "horizontal";
- }
- if (y > x && y > MIN_DISTANCE) {
- return "vertical";
- }
- return "";
- }
- const touch = {
- methods: {
- getTouchPoint(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
- };
- }
- if (e.changedTouches && e.changedTouches[0]) {
- return {
- x: e.changedTouches[0].pageX,
- y: e.changedTouches[0].pageY
- };
- }
- return {
- x: e.clientX || 0,
- y: e.clientY || 0
- };
- },
- resetTouchStatus() {
- this.direction = "";
- this.deltaX = 0;
- this.deltaY = 0;
- this.offsetX = 0;
- this.offsetY = 0;
- },
- touchStart(event) {
- this.resetTouchStatus();
- const touch2 = this.getTouchPoint(event);
- this.startX = touch2.x;
- this.startY = touch2.y;
- },
- touchMove(event) {
- const touch2 = this.getTouchPoint(event);
- this.deltaX = touch2.x - this.startX;
- this.deltaY = touch2.y - this.startY;
- this.offsetX = Math.abs(this.deltaX);
- this.offsetY = Math.abs(this.deltaY);
- this.direction = this.direction || getDirection(this.offsetX, this.offsetY);
- }
- }
- };
- const props$7 = {
- props: {
- // 控制打开或者关闭
- show: {
- type: Boolean,
- default: props$G.swipeActionItem.show
- },
- // 标识符,如果是v-for,可用index索引值
- name: {
- type: [String, Number],
- default: props$G.swipeActionItem.name
- },
- // 是否禁用
- disabled: {
- type: Boolean,
- default: props$G.swipeActionItem.disabled
- },
- // 是否自动关闭其他swipe按钮组
- autoClose: {
- type: Boolean,
- default: props$G.swipeActionItem.autoClose
- },
- // 滑动距离阈值,只有大于此值,才被认为是要打开菜单
- threshold: {
- type: Number,
- default: props$G.swipeActionItem.threshold
- },
- // 右侧按钮内容
- options: {
- type: Array,
- default() {
- return uni.$u.props.swipeActionItem.rightOptions;
- }
- },
- // 动画过渡时间,单位ms
- duration: {
- type: [String, Number],
- default: props$G.swipeActionItem.duration
- }
- }
- };
- const wxs = {
- methods: {
- // 关闭时执行
- closeHandler() {
- this.status = "close";
- },
- setState(status) {
- this.status = status;
- },
- closeOther() {
- this.parent && this.parent.closeOther(this);
- }
- }
- };
- const block0 = (Comp) => {
- (Comp.$wxs || (Comp.$wxs = [])).push("wxs");
- (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxs"] = "f1d6d7d8";
- };
- const _sfc_main$L = {
- name: "u-swipe-action-item",
- emits: ["click"],
- mixins: [mpMixin, mixin, props$7, touch],
- mixins: [mpMixin, mixin, props$7, touch, wxs],
- data() {
- return {
- // 按钮的尺寸信息
- size: {},
- // 父组件u-swipe-action的参数
- parentData: {
- autoClose: true
- },
- // 当前状态,open-打开,close-关闭
- status: "close"
- };
- },
- watch: {
- // 由于wxs无法直接读取外部的值,需要在外部值变化时,重新执行赋值逻辑
- wxsInit(newValue, oldValue) {
- this.queryRect();
- }
- },
- computed: {
- wxsInit() {
- return [this.disabled, this.autoClose, this.threshold, this.options, this.duration];
- }
- },
- mounted() {
- this.init();
- },
- methods: {
- init() {
- this.updateParentData();
- uni.$u.sleep().then(() => {
- this.queryRect();
- });
- },
- updateParentData() {
- this.getParentData("u-swipe-action");
- },
- // 查询节点
- queryRect() {
- this.$uGetRect(".u-swipe-action-item__right__button", true).then((buttons) => {
- this.size = {
- buttons,
- show: this.show,
- disabled: this.disabled,
- threshold: this.threshold,
- duration: this.duration
- };
- });
- },
- // 按钮被点击
- buttonClickHandler(item, index2) {
- this.$emit("click", {
- index: index2,
- name: this.name
- });
- }
- }
- };
- function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "u-swipe-action-item",
- ref: "u-swipe-action-item"
- },
- [
- vue.createElementVNode("view", { class: "u-swipe-action-item__right" }, [
- vue.renderSlot(_ctx.$slots, "button", {}, () => [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.options, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "u-swipe-action-item__right__button",
- ref_for: true,
- ref: `u-swipe-action-item__right__button-${index2}`,
- style: vue.normalizeStyle([{
- alignItems: item.style && item.style.borderRadius ? "center" : "stretch"
- }]),
- onClick: ($event) => $options.buttonClickHandler(item, index2)
- }, [
- vue.createElementVNode(
- "view",
- {
- class: "u-swipe-action-item__right__button__wrapper",
- style: vue.normalizeStyle([{
- backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : "#C7C6CD",
- borderRadius: item.style && item.style.borderRadius ? item.style.borderRadius : "0",
- padding: item.style && item.style.borderRadius ? "0" : "0 15px"
- }, item.style])
- },
- [
- item.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
- key: 0,
- name: item.icon,
- color: item.style && item.style.color ? item.style.color : "#ffffff",
- size: item.iconSize ? _ctx.$u.addUnit(item.iconSize) : item.style && item.style.fontSize ? _ctx.$u.getPx(item.style.fontSize) * 1.2 : 17,
- customStyle: {
- marginRight: item.text ? "2px" : 0
- }
- }, null, 8, ["name", "color", "size", "customStyle"])) : vue.createCommentVNode("v-if", true),
- item.text ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- class: "u-swipe-action-item__right__button__wrapper__text u-line-1",
- style: vue.normalizeStyle([{
- color: item.style && item.style.color ? item.style.color : "#ffffff",
- fontSize: item.style && item.style.fontSize ? item.style.fontSize : "16px",
- lineHeight: item.style && item.style.fontSize ? item.style.fontSize : "16px"
- }])
- },
- vue.toDisplayString(item.text),
- 5
- /* TEXT, STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 4
- /* STYLE */
- )
- ], 12, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ], true)
- ]),
- vue.createElementVNode("view", {
- class: "u-swipe-action-item__content",
- onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.wxs.touchstart && _ctx.wxs.touchstart(...args)),
- onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.wxs.touchmove && _ctx.wxs.touchmove(...args)),
- onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.wxs.touchend && _ctx.wxs.touchend(...args)),
- status: vue.wp($data.status),
- "change:status": _ctx.wxs.statusChange,
- size: vue.wp($data.size),
- "change:size": _ctx.wxs.sizeChange
- }, [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ], 40, ["status", "change:status", "size", "change:size"])
- ],
- 512
- /* NEED_PATCH */
- );
- }
- if (typeof block0 === "function")
- block0(_sfc_main$L);
- const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$K], ["__scopeId", "data-v-ed3ce04a"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-swipe-action-item/u-swipe-action-item.vue"]]);
- const props$6 = {
- props: {
- // 是否自动关闭其他swipe按钮组
- autoClose: {
- type: Boolean,
- default: props$G.swipeAction.autoClose
- }
- }
- };
- const _sfc_main$K = {
- name: "u-swipe-action",
- mixins: [mpMixin, mixin, props$6],
- data() {
- return {};
- },
- provide() {
- return {
- swipeAction: this
- };
- },
- computed: {
- // 这里computed的变量,都是子组件u-swipe-action-item需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
- // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-swipe-action-item)
- // 拉取父组件新的变化后的参数
- parentData() {
- return [this.autoClose];
- }
- },
- watch: {
- // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
- parentData() {
- if (this.children.length) {
- this.children.map((child) => {
- typeof child.updateParentData === "function" && child.updateParentData();
- });
- }
- }
- },
- created() {
- this.children = [];
- },
- methods: {
- closeOther(child) {
- if (this.autoClose) {
- this.children.map((item, index2) => {
- if (child !== item) {
- item.closeHandler();
- }
- });
- }
- }
- }
- };
- function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "u-swipe-action" }, [
- vue.renderSlot(_ctx.$slots, "default")
- ]);
- }
- const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$J], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-swipe-action/u-swipe-action.vue"]]);
- const _sfc_main$J = {
- __name: "BadItem",
- props: {
- data: {
- type: Object,
- required: true,
- default: () => ({
- orderNo: "",
- badCount: "",
- logisticsNo: "",
- checkDate: "",
- operator: ""
- })
- }
- },
- emits: ["delete", "edit"],
- setup(__props, { expose: __expose, emit: __emit }) {
- __expose();
- const props2 = __props;
- const emit2 = __emit;
- const options = vue.ref([
- {
- text: "删除",
- style: {
- backgroundColor: "#ff4444"
- }
- }
- ]);
- const handleAction = (e) => {
- if (e.index === 0) {
- uni.showModal({
- title: "提示",
- content: "确定要删除该订单吗?",
- success: (res2) => {
- if (res2.confirm) {
- emit2("delete");
- }
- }
- });
- }
- };
- const __returned__ = { props: props2, emit: emit2, options, handleAction, 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_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- const _component_u_swipe_action_item = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action-item"), __easycom_1);
- const _component_u_swipe_action = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action"), __easycom_2);
- return vue.openBlock(), vue.createElementBlock("view", { class: "bad-item" }, [
- vue.createVNode(_component_u_swipe_action, null, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_swipe_action_item, {
- options: $setup.options,
- onClick: $setup.handleAction
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "item-content" }, [
- vue.createElementVNode("view", { class: "item-row" }, [
- vue.createElementVNode("text", { class: "label" }, "订单编号:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($props.data.orderId),
- 1
- /* TEXT */
- ),
- vue.createVNode(_component_u_icon, {
- name: "edit-pen",
- color: "#4CAF50",
- size: "20",
- class: "edit-icon",
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("edit"))
- })
- ]),
- vue.createElementVNode("view", { class: "item-row" }, [
- vue.createElementVNode("text", { class: "label" }, "不良数量:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($props.data.badNum),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "item-row" }, [
- vue.createElementVNode("text", { class: "label" }, "物流单号:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($props.data.waybillCode),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "item-row" }, [
- vue.createElementVNode("text", { class: "label" }, "验货完成日期:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($props.data.auditFinishTime),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "item-row" }, [
- vue.createElementVNode("text", { class: "label" }, "录入人:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($props.data.auditUserName),
- 1
- /* TEXT */
- )
- ])
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["options"])
- ]),
- _: 1
- /* STABLE */
- })
- ]);
- }
- const BadItem = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$I], ["__scopeId", "data-v-93494456"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/components/BadItem.vue"]]);
- const _sfc_main$I = {
- __name: "RemarkDialog",
- props: {
- visible: {
- type: Boolean,
- default: false
- },
- initialValue: {
- type: String,
- default: ""
- }
- },
- emits: ["update:visible", "confirm"],
- setup(__props, { expose: __expose, emit: __emit }) {
- __expose();
- const props2 = __props;
- function playGlobalSound() {
- uni.$u.playClickSound();
- }
- const emit2 = __emit;
- const remarkText = vue.ref("");
- const quickTags = vue.ref(["少书", "多书", "子母件", "书单不符"]);
- vue.watch(() => props2.visible, (newVal) => {
- if (newVal) {
- remarkText.value = props2.initialValue;
- }
- });
- const appendTag = (tag) => {
- remarkText.value += remarkText.value ? " " + tag : tag;
- };
- const onClose = () => {
- emit2("update:visible", false);
- };
- const onConfirm = () => {
- emit2("confirm", remarkText.value);
- onClose();
- };
- const __returned__ = { props: props2, playGlobalSound, emit: emit2, remarkText, quickTags, appendTag, onClose, onConfirm, ref: vue.ref, watch: vue.watch };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$3);
- const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
- return vue.openBlock(), vue.createBlock(_component_u_popup, {
- show: $props.visible,
- onClose: $setup.onClose,
- mode: "center",
- round: "10",
- closeOnClickOverlay: false
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", {
- class: "remark-dialog",
- onClick: $setup.playGlobalSound
- }, [
- vue.createElementVNode("view", { class: "dialog-title" }, "编辑备注"),
- vue.createCommentVNode(" 备注输入框 "),
- vue.createElementVNode("view", { class: "dialog-content mb-30" }, [
- vue.createVNode(_component_u_textarea, {
- modelValue: $setup.remarkText,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.remarkText = $event),
- placeholder: "请输入",
- maxlength: 200,
- height: "100",
- count: ""
- }, null, 8, ["modelValue"]),
- vue.createCommentVNode(" 快速输入标签 "),
- vue.createElementVNode("view", { class: "quick-tags mt-10" }, [
- vue.createElementVNode("text", { class: "common-title" }, "快速填入"),
- vue.createElementVNode("view", { class: "tags-container flex-w mt-20" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.quickTags, (tag, index2) => {
- return vue.openBlock(), vue.createBlock(_component_u_tag, {
- key: index2,
- text: tag,
- plain: "",
- size: "mini",
- type: "primary",
- onClick: ($event) => $setup.appendTag(tag),
- class: "tag-item"
- }, null, 8, ["text", "onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])
- ]),
- vue.createCommentVNode(" 底部按钮 "),
- vue.createElementVNode("view", { class: "dialog-footer" }, [
- vue.createVNode(_component_u_button, {
- plain: "",
- onClick: $setup.onClose,
- class: "footer-btn"
- }, {
- default: vue.withCtx(() => [
- vue.createTextVNode("取消")
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_button, {
- type: "primary",
- onClick: $setup.onConfirm,
- class: "footer-btn"
- }, {
- default: vue.withCtx(() => [
- vue.createTextVNode("确定")
- ]),
- _: 1
- /* STABLE */
- })
- ])
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["show"]);
- }
- const RemarkDialog = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$H], ["__scopeId", "data-v-73050f50"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/components/RemarkDialog.vue"]]);
- const _sfc_main$H = {
- __name: "bad-in",
- setup(__props, { expose: __expose }) {
- __expose();
- const waybillCode = vue.ref();
- const formData = vue.reactive({
- godownName: "",
- godownId: "",
- positionCode: ""
- });
- function playGlobalSound() {
- uni.$u.playClickSound();
- }
- const ordersMap = vue.ref([]);
- const codeMap = vue.ref([]);
- function getDetailByCode2(code2) {
- if (codeMap.value.includes(code2)) {
- uni.$u.ttsModule.speak("重复扫描");
- return;
- }
- uni.$u.http.get("/app/stock/searchOrder?waybillCode=" + code2).then((res2) => {
- if (res2.code == 200) {
- ordersMap.value.unshift(res2.data);
- codeMap.value.push(code2);
- } else if (res2.code == 601) {
- uni.$u.ttsModule.speak(res2.msg);
- uni.showModal({
- title: "提示",
- content: res2.msg,
- showCancel: false,
- success: () => {
- playGlobalSound();
- }
- });
- } else {
- uni.$u.toast(res2.msg);
- }
- });
- }
- const remarkVisible = vue.ref(false);
- const currentRemark = vue.ref("");
- const currentEditIndex = vue.ref(-1);
- const goBack = () => {
- if (ordersMap.value.length > 0) {
- uni.showModal({
- title: "退出确认",
- content: "是否确认放弃本次入库?",
- success: (res2) => {
- playGlobalSound();
- if (res2.confirm) {
- uni.navigateBack();
- }
- }
- });
- } else {
- uni.navigateBack();
- }
- };
- const onSubmit = () => {
- if (!formData.godownId || !formData.positionCode) {
- uni.$u.toast("请先选择仓库和库位");
- uni.$u.ttsModule.speak("请先选择仓库和库位");
- return;
- }
- uni.showModal({
- title: "提交确认",
- content: "是否确认提交本次入库?",
- success: (res2) => {
- playGlobalSound();
- if (res2.confirm) {
- handleSubmitConfirm();
- }
- }
- });
- };
- const handleSubmitConfirm = async () => {
- uni.showLoading({
- title: "提交中..."
- });
- let orderInfo = ordersMap.value.map((item) => {
- return {
- orderId: item.orderId,
- waybillCode: item.waybillCode,
- bookNum: item.badNum,
- remark: item.remark
- };
- });
- if (orderInfo.length == 0) {
- uni.hideLoading();
- uni.$u.ttsModule.speak("请添加订单数据");
- return;
- }
- uni.$u.http.post("/app/stock/addBatch", {
- godownId: formData.godownId,
- positionCode: formData.positionCode,
- orderInfo
- }).then((res2) => {
- if (res2.code == 200) {
- uni.$u.toast("入库成功");
- uni.$u.ttsModule.speak("入库成功");
- clearData();
- } else {
- uni.$u.toast(res2.msg);
- }
- }).finally(() => {
- uni.hideLoading();
- });
- };
- const clearData = () => {
- ordersMap.value.length = 0;
- waybillCode.value = "";
- formData.godownName = "";
- formData.positionCode = "";
- formData.godownId = "";
- };
- const editOrder = (index2) => {
- openRemarkDialog(index2);
- };
- const openScan = () => {
- uni.scanCode({
- success: (res2) => {
- waybillCode.value = res2.result;
- getDetailByCode2(res2.result);
- },
- fail: (err) => {
- uni.showToast({
- title: "扫码失败",
- icon: "error"
- });
- }
- });
- };
- function selectLocation() {
- if (!formData.godownId) {
- uni.$u.toast("请先选择仓库");
- uni.$u.ttsModule.speak("请先选择仓库");
- return;
- }
- uni.redirectTo({
- url: "/pages/index/wms/location-select?godownId=" + formData.godownId + "&positionCode=" + formData.positionCode
- });
- }
- const deleteOrder = (index2) => {
- ordersMap.value.splice(index2, 1);
- };
- vue.onMounted(() => {
- uni.$u.useGlobalEvent((e) => {
- if (e.barcode) {
- waybillCode.value = e.barcode;
- getDetailByCode2(e.barcode);
- }
- });
- uni.$on("updateLocation", (locationCode) => {
- formData.positionCode = locationCode;
- });
- uni.$on("updateWarehouse", (data) => {
- formData.godownName = data.godownName;
- formData.godownId = data.id;
- });
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- uni.$off("updateLocation");
- uni.$off("updateWarehouse");
- });
- const openRemarkDialog = (index2, remark = "") => {
- currentEditIndex.value = index2;
- currentRemark.value = remark;
- remarkVisible.value = true;
- };
- const handleRemarkConfirm = (remark) => {
- if (currentEditIndex.value >= 0) {
- ordersMap.value[currentEditIndex.value].remark = remark;
- }
- currentEditIndex.value = -1;
- currentRemark.value = "";
- };
- const selectWarehouse = () => {
- uni.redirectTo({
- url: "/pages/index/wms/warehouse-select?godownId=" + formData.godownId
- });
- };
- const __returned__ = { waybillCode, formData, playGlobalSound, ordersMap, codeMap, getDetailByCode: getDetailByCode2, remarkVisible, currentRemark, currentEditIndex, goBack, onSubmit, handleSubmitConfirm, clearData, editOrder, openScan, selectLocation, deleteOrder, openRemarkDialog, handleRemarkConfirm, selectWarehouse, ref: vue.ref, reactive: vue.reactive, onMounted: vue.onMounted, onUnmounted: vue.onUnmounted, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- }, BadItem, RemarkDialog };
- 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$f);
- const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$9);
- const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
- const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
- const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$6);
- const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
- const _directive_permission = vue.resolveDirective("permission");
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "common-page",
- style: { "padding": "0" },
- onClick: $setup.playGlobalSound
- }, [
- vue.createCommentVNode(" 顶部导航栏 "),
- vue.createElementVNode("view", { class: "header" }, [
- vue.createVNode(_component_u_navbar, {
- title: "不良入库",
- border: false,
- fixed: "",
- "safe-area-inset-top": ""
- }, {
- left: vue.withCtx(() => [
- vue.createVNode(_component_u_icon, {
- name: "arrow-left",
- color: "#333333",
- size: "20",
- onClick: $setup.goBack
- })
- ]),
- right: vue.withCtx(() => [
- vue.withDirectives(vue.createVNode(
- _component_u_text,
- {
- type: "primary",
- text: "提交",
- onClick: $setup.onSubmit
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [_directive_permission, "app:wms:badIn:submit"]
- ])
- ]),
- _: 1
- /* STABLE */
- })
- ]),
- vue.createCommentVNode(" 主要内容区域 "),
- vue.createElementVNode("view", { class: "content" }, [
- vue.createCommentVNode(" 订单基本信息 "),
- vue.createElementVNode("view", { class: "info-section" }, [
- vue.createVNode(_component_u_form, {
- model: $setup.formData,
- ref: "formRef",
- "label-width": "80px",
- "label-position": "left"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_form_item, {
- label: "订单总数",
- required: ""
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode(
- "span",
- null,
- vue.toDisplayString($setup.ordersMap.length),
- 1
- /* TEXT */
- )
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- label: "仓库",
- required: ""
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", {
- onClick: $setup.selectWarehouse,
- style: { "width": "100%" }
- }, [
- vue.createVNode(_component_u_input, {
- modelValue: $setup.formData.godownName,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.godownName = $event),
- readonly: "",
- "custom-style": "font-size:32rpx",
- placeholder: "请选择仓库",
- suffixIcon: "arrow-right"
- }, null, 8, ["modelValue"])
- ])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- label: "库位",
- required: ""
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", {
- onClick: $setup.selectLocation,
- style: { "width": "100%" }
- }, [
- vue.createVNode(_component_u_input, {
- modelValue: $setup.formData.positionCode,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.positionCode = $event),
- readonly: "",
- "custom-style": "font-size:32rpx",
- placeholder: "请选择库位",
- suffixIcon: "arrow-right"
- }, null, 8, ["modelValue"])
- ])
- ]),
- _: 1
- /* STABLE */
- })
- ]),
- _: 1
- /* STABLE */
- }, 8, ["model"])
- ]),
- vue.createCommentVNode(" 订单列表 "),
- vue.createElementVNode("view", { class: "order-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.ordersMap, (order, index2) => {
- return vue.openBlock(), vue.createBlock($setup["BadItem"], {
- key: index2,
- data: order,
- onDelete: ($event) => $setup.deleteOrder(index2),
- onEdit: ($event) => $setup.editOrder(index2)
- }, null, 8, ["data", "onDelete", "onEdit"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createCommentVNode(" 底部扫码输入框 "),
- vue.createElementVNode("view", {
- class: "fixed-bottom pad-20",
- style: { "background": "#ffffff" }
- }, [
- vue.createVNode(_component_u_search, {
- placeholder: "请输入物流单号",
- searchIconSize: 24,
- bgColor: "#f6f7f6",
- onSearch: _cache[2] || (_cache[2] = ($event) => $setup.getDetailByCode($setup.waybillCode)),
- modelValue: $setup.waybillCode,
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.waybillCode = $event),
- "custom-style": "font-size:32rpx",
- "placeholder-style": "font-size:32rpx",
- clearabled: true,
- focus: false,
- showAction: false,
- height: 42
- }, null, 8, ["modelValue"]),
- vue.createVNode(_component_u_icon, {
- name: "scan",
- size: "32",
- color: "#19be6b",
- onClick: $setup.openScan
- })
- ])
- ]),
- vue.createCommentVNode(" 备注弹窗 "),
- vue.createVNode($setup["RemarkDialog"], {
- visible: $setup.remarkVisible,
- "onUpdate:visible": _cache[4] || (_cache[4] = ($event) => $setup.remarkVisible = $event),
- "initial-value": $setup.currentRemark,
- onConfirm: $setup.handleRemarkConfirm
- }, null, 8, ["visible", "initial-value"])
- ]);
- }
- const PagesIndexWmsBadIn = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$G], ["__scopeId", "data-v-04095d32"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/bad-in.vue"]]);
- const _sfc_main$G = {
- __name: "bad-out",
- setup(__props, { expose: __expose }) {
- __expose();
- const searchText = vue.ref("");
- const searchType = vue.ref("1");
- function playGlobalSound() {
- uni.$u.playClickSound();
- }
- const onSearch = () => {
- uni.redirectTo({
- url: `/pages/index/wms/bad-out-order?searchText=${searchText.value}&searchType=${searchType.value}`
- });
- };
- const openScan = () => {
- uni.scanCode({
- success: (res2) => {
- searchText.value = res2.result;
- onSearch();
- },
- fail: (err) => {
- uni.showToast({
- title: "扫码失败",
- icon: "error"
- });
- }
- });
- };
- onLoad(() => {
- uni.$u.useGlobalEvent((e) => {
- if (e.barcode) {
- searchText.value = e.barcode;
- onSearch();
- }
- });
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { searchText, searchType, playGlobalSound, onSearch, openScan, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
- const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$5);
- const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "container flex-d h100",
- onClick: $setup.playGlobalSound
- }, [
- vue.createCommentVNode(" 库位列表 "),
- vue.createElementVNode("view", { class: "location-list flex-1" }, [
- vue.createElementVNode("view", { class: "no-data flex-c mt-60" }, "请输入快递单号/订单编号")
- ]),
- vue.createCommentVNode(" 底部搜索框 "),
- vue.createElementVNode("view", {
- class: "pad-20 flex flex-column",
- style: { "background": "#ffffff" }
- }, [
- vue.createVNode(_component_u_radio_group, {
- modelValue: $setup.searchType,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchType = $event),
- class: "mb-20 ml-20"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_radio, {
- label: "查订单",
- name: "1",
- "label-size": "17"
- }),
- vue.createVNode(_component_u_radio, {
- label: "查物流",
- "custom-style": "margin-left:20px",
- name: "2",
- "label-size": "17"
- })
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue"]),
- vue.createElementVNode("view", { class: "flex-a" }, [
- vue.createVNode(_component_u_search, {
- modelValue: $setup.searchText,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.searchText = $event),
- placeholder: "请输入快递单号/订单编号",
- "show-action": false,
- clearabled: true,
- onSearch: $setup.onSearch,
- height: "40"
- }, null, 8, ["modelValue"]),
- vue.createVNode(_component_u_icon, {
- name: "scan",
- size: "28",
- color: "#19be6b",
- onClick: $setup.openScan
- })
- ])
- ])
- ]);
- }
- const PagesIndexWmsBadOut = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$F], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/bad-out.vue"]]);
- const _sfc_main$F = {
- __name: "BadOutCard",
- props: {
- item: Object
- },
- setup(__props, { expose: __expose }) {
- __expose();
- const props2 = __props;
- const __returned__ = { props: props2 };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
- var _a;
- return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [
- vue.createElementVNode("view", { class: "flex w100" }, [
- vue.createElementVNode("view", { class: "flex-d" }, [
- vue.createElementVNode("image", {
- style: { "width": "80px", "height": "100px" },
- src: $props.item.cover,
- mode: "aspectFill"
- }, null, 8, ["src"]),
- vue.createElementVNode(
- "view",
- { class: "quantity mt-20" },
- "数量: " + vue.toDisplayString($props.item.num),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
- vue.createElementVNode(
- "view",
- { class: "common-title mb-20" },
- vue.toDisplayString($props.item.bookName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
- vue.createElementVNode(
- "view",
- { class: "isbn" },
- "ISBN: " + vue.toDisplayString($props.item.isbn),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "set" },
- "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "否"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
- vue.createElementVNode(
- "view",
- { class: "discount" },
- "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "review" },
- "审核金额: " + vue.toDisplayString($props.item.finalMoney),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
- vue.createElementVNode(
- "view",
- { class: "price" },
- "定价: " + vue.toDisplayString($props.item.bookPrice),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "estimate" },
- "预估单价: " + vue.toDisplayString($props.item.expectMoney),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "quality mb-10" },
- " 品相: 良好(" + vue.toDisplayString($props.item.goodNum) + ") 、 一般(" + vue.toDisplayString($props.item.generalNum) + ") 、 极差(" + vue.toDisplayString($props.item.badNum) + ") ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "reason color-red" },
- "原因: " + vue.toDisplayString((_a = $props.item.auditCommentList) == null ? void 0 : _a.filter((item) => item.sts == 3).map((item) => item.com).join(";")),
- 1
- /* TEXT */
- )
- ])
- ])
- ]);
- }
- const BadOutCard = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$E], ["__scopeId", "data-v-e52c1f77"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/components/BadOutCard.vue"]]);
- const _sfc_main$E = {
- __name: "bad-out-order",
- setup(__props, { expose: __expose }) {
- __expose();
- const searchText = vue.ref("");
- const searchType = vue.ref("1");
- const errorMsg = vue.ref("");
- const hasData = vue.ref(false);
- function playGlobalSound() {
- uni.$u.playClickSound();
- }
- const locationInfo = vue.ref({
- positionCode: "",
- waybillCode: "",
- orderId: "",
- badNum: "",
- remark: "",
- refundWaybillCode: ""
- });
- const badList = vue.ref([]);
- onLoad((options) => {
- searchType.value = options.searchType || "1";
- if (options.searchText) {
- searchText.value = options.searchText;
- onSearch();
- }
- uni.$u.useGlobalEvent((e) => {
- if (e.barcode) {
- searchText.value = e.barcode;
- onSearch();
- }
- });
- });
- const getSearchType = (text) => {
- return /^[0-9]+$/.test(text) ? 1 : 2;
- };
- const onSearch = async () => {
- if (!searchText.value) {
- errorMsg.value = "请输入运单号或订单编号";
- hasData.value = false;
- return;
- }
- try {
- const res2 = await uni.$u.http.post("/app/stock/findOrderOutStock", {
- search: searchText.value,
- searchType: searchType.value
- });
- if (res2.code == 200) {
- const data = res2.data;
- errorMsg.value = "";
- hasData.value = true;
- locationInfo.value = {
- positionCode: data.positionCode || "",
- waybillCode: data.waybillCode || "",
- orderId: data.orderId || "",
- badNum: data.badNum || "",
- remark: data.remark || "",
- refundWaybillCode: data.refundWaybillCode || ""
- };
- badList.value = data.detailVoList || [];
- } else {
- errorMsg.value = res2.msg || "未找到相关数据";
- hasData.value = false;
- return;
- }
- } catch (error2) {
- errorMsg.value = error2.message || "获取数据失败";
- hasData.value = false;
- uni.showToast({
- title: "获取数据失败",
- icon: "none"
- });
- }
- };
- const openScan = () => {
- uni.scanCode({
- success: (res2) => {
- searchText.value = res2.result;
- onSearch();
- },
- fail: (err) => {
- uni.showToast({
- title: "扫码失败",
- icon: "error"
- });
- }
- });
- };
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const onConfirm = () => {
- uni.showModal({
- title: "确认提示",
- content: "是否确认出库?",
- success: async (res2) => {
- if (res2.confirm) {
- uni.$u.http.post("/app/stock/outStock", {
- orderId: locationInfo.value.orderId,
- positionCode: locationInfo.value.positionCode,
- outputRemark: locationInfo.value.remark
- }).then((res3) => {
- if (res3.code == 200) {
- uni.showToast({
- title: "出库成功",
- icon: "success"
- });
- uni.$u.ttsModule.speak("出库成功");
- searchText.value = "";
- locationInfo.value = {
- positionCode: "",
- waybillCode: "",
- orderId: "",
- badNum: "",
- remark: ""
- };
- badList.value = [];
- } else {
- uni.showToast({
- title: res3.msg,
- icon: "none"
- });
- uni.$u.ttsModule.speak(res3.msg);
- }
- });
- }
- }
- });
- };
- const remarkVisible = vue.ref(false);
- const currentRemark = vue.ref("");
- const currentEditIndex = vue.ref(-1);
- const openRemarkDialog = (index2, remark = "") => {
- currentEditIndex.value = index2;
- currentRemark.value = remark;
- remarkVisible.value = true;
- };
- const handleRemarkConfirm = (remark) => {
- if (currentEditIndex.value >= 0) {
- orders.value[currentEditIndex.value].remark = remark;
- }
- currentEditIndex.value = -1;
- currentRemark.value = "";
- };
- const __returned__ = { searchText, searchType, errorMsg, hasData, playGlobalSound, locationInfo, badList, getSearchType, onSearch, openScan, onConfirm, remarkVisible, currentRemark, currentEditIndex, openRemarkDialog, handleRemarkConfirm, ref: vue.ref, onMounted: vue.onMounted, BadOutCard, RemarkDialog, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "container",
- onClick: $setup.playGlobalSound
- }, [
- vue.createCommentVNode(" 搜索框 "),
- vue.createVNode(_component_u_sticky, null, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "search-area flex-c mb-20" }, [
- vue.createVNode(_component_u_search, {
- modelValue: $setup.searchText,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
- placeholder: $setup.searchType == "1" ? "请输入订单编号" : "请输入运单号",
- "show-action": false,
- clearabled: true,
- onSearch: $setup.onSearch,
- height: "40"
- }, null, 8, ["modelValue", "placeholder"]),
- vue.createVNode(_component_u_icon, {
- name: "scan",
- size: "28",
- color: "#19be6b",
- onClick: $setup.openScan
- })
- ])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createElementVNode("view", { class: "content" }, [
- vue.createCommentVNode(" 错误提示 "),
- $setup.errorMsg ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "error-section"
- }, [
- vue.createVNode(_component_u_icon, {
- name: "info-circle",
- color: "#fa3534",
- size: "20"
- }),
- vue.createElementVNode(
- "text",
- { class: "error-text" },
- vue.toDisplayString($setup.errorMsg),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 基本信息 "),
- $setup.hasData ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- [
- vue.createElementVNode("view", { class: "info-section" }, [
- vue.createElementVNode(
- "view",
- { class: "info-item" },
- "库位:" + vue.toDisplayString($setup.locationInfo.positionCode),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "info-item" },
- "物流单号:" + vue.toDisplayString($setup.locationInfo.waybillCode || "-"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "info-item" },
- "退回物流:" + vue.toDisplayString($setup.locationInfo.refundWaybillCode || "-"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "info-item" },
- "订单编号:" + vue.toDisplayString($setup.locationInfo.orderId),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "info-item" },
- "订单商品:" + vue.toDisplayString($setup.locationInfo.badNum),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "info-item" },
- "备注信息:" + vue.toDisplayString($setup.locationInfo.remark || "-"),
- 1
- /* TEXT */
- )
- ]),
- vue.createCommentVNode(" 极差商品列表 "),
- vue.createElementVNode("view", { class: "bad-list" }, [
- vue.createElementVNode("view", { class: "list-title mb-6" }, "极差"),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.badList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
- vue.createVNode($setup["BadOutCard"], {
- item,
- index: index2
- }, null, 8, ["item", "index"])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createCommentVNode(" 底部按钮 "),
- vue.createElementVNode("view", { class: "fixed-bottom" }, [
- vue.createVNode(_component_u_button, {
- size: "large",
- type: "warning",
- text: "反馈",
- onClick: $setup.openRemarkDialog
- }),
- vue.createVNode(_component_u_button, {
- size: "large",
- type: "primary",
- text: "确定出库",
- onClick: $setup.onConfirm
- })
- ]),
- vue.createCommentVNode(" 备注弹窗 "),
- vue.createVNode($setup["RemarkDialog"], {
- visible: $setup.remarkVisible,
- "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => $setup.remarkVisible = $event),
- "initial-value": $setup.currentRemark,
- onConfirm: $setup.handleRemarkConfirm
- }, null, 8, ["visible", "initial-value"])
- ]);
- }
- const PagesIndexWmsBadOutOrder = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$D], ["__scopeId", "data-v-43bc1c65"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/bad-out-order.vue"]]);
- const _sfc_main$D = {
- __name: "bad-off",
- setup(__props, { expose: __expose }) {
- __expose();
- const searchText = vue.ref("");
- function playGlobalSound() {
- uni.$u.playClickSound();
- }
- const taskList = vue.ref([]);
- const loading = vue.ref(false);
- const taskStatusEnum = {
- 1: "待作业",
- 2: "作业中",
- 3: "已完成",
- 4: "已关闭"
- };
- const getTaskStatusText = (status) => {
- return taskStatusEnum[status] || "未知状态";
- };
- const fetchTaskList = async () => {
- loading.value = true;
- try {
- const response = await uni.$u.http.post("/app/appstock/getNeedStockList");
- formatAppLog("log", "at pages/index/wms/bad-off.vue:82", response);
- taskList.value = response;
- if (response.code === 200) {
- taskList.value = response.data || [];
- } else {
- uni.showToast({
- title: response.msg || "获取任务列表失败",
- icon: "none"
- });
- }
- } catch (error2) {
- uni.showToast({
- title: "获取任务列表失败",
- icon: "none"
- });
- } finally {
- loading.value = false;
- }
- };
- const onSearch = () => {
- fetchTaskList();
- };
- const openScan = () => {
- uni.scanCode({
- success: (res2) => {
- searchText.value = res2.result;
- onSearch();
- },
- fail: (err) => {
- uni.showToast({
- title: "扫码失败",
- icon: "error"
- });
- }
- });
- };
- const handleTaskClick = (task) => {
- uni.showModal({
- title: "领取确认",
- content: "是否确认领取下架任务?",
- cancelText: "取消",
- confirmText: "确认",
- success: async (res2) => {
- playGlobalSound();
- if (res2.confirm) {
- try {
- const response = await uni.$u.http.post(`/app/appstock/lockStockTask?taskCode=${task.taskCode}`);
- if (response.code === 200) {
- uni.redirectTo({
- url: `/pages/index/wms/task-detail?taskCode=${task.taskCode}`
- });
- } else {
- uni.showToast({
- title: response.msg || "任务锁定失败",
- icon: "none"
- });
- }
- } catch (error2) {
- uni.showToast({
- title: error2,
- icon: "none"
- });
- }
- }
- }
- });
- };
- vue.onMounted(() => {
- fetchTaskList();
- });
- const __returned__ = { searchText, playGlobalSound, taskList, loading, taskStatusEnum, getTaskStatusText, fetchTaskList, onSearch, openScan, handleTaskClick, ref: vue.ref, onMounted: vue.onMounted };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "container",
- onClick: $setup.playGlobalSound
- }, [
- vue.createCommentVNode(" 任务列表 "),
- vue.createElementVNode("view", { class: "task-list" }, [
- !$setup.loading ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- [
- $setup.taskList.length > 0 ? (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- vue.renderList($setup.taskList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "task-card",
- onClick: ($event) => $setup.handleTaskClick(item)
- }, [
- vue.createElementVNode("view", { class: "task-header" }, [
- vue.createElementVNode(
- "text",
- { class: "task-no" },
- "作业单号:" + vue.toDisplayString(item.taskCode),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "task-content" }, [
- vue.createElementVNode("view", { class: "flex-a mb-10" }, [
- vue.createElementVNode("text", { class: "label" }, "仓库:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString(item.godownName),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "flex-a mb-10" }, [
- vue.createElementVNode("text", { class: "label" }, "订单数量:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString(item.orderNum),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "flex-a mb-10" }, [
- vue.createElementVNode("text", { class: "label" }, "创建时间:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString(item.createTime),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "flex-a" }, [
- vue.createElementVNode("text", { class: "label" }, "作业状态:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($setup.getTaskStatusText(item.taskStatus)),
- 1
- /* TEXT */
- )
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "empty-state"
- }, [
- vue.createElementVNode("text", null, "暂无任务数据")
- ]))
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "loading-state"
- }, [
- vue.createVNode(_component_u_loading_icon),
- vue.createElementVNode("text", null, "加载中...")
- ]))
- ])
- ]);
- }
- const PagesIndexWmsBadOff = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__scopeId", "data-v-58677b56"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/bad-off.vue"]]);
- const _sfc_main$C = {
- __name: "order-query",
- setup(__props, { expose: __expose }) {
- __expose();
- const query = vue.reactive({
- searchType: 2,
- search: ""
- });
- const orderQuery = () => {
- if (!query.search) {
- uni.$u.toast("请输入快递单号/订单编号");
- return;
- }
- uni.redirectTo({
- url: `/pages/index/wms/order-query-list?id=${query.search}`
- });
- };
- function openScan() {
- uni.scanCode({
- success: (res2) => {
- query.search = res2.result;
- orderQuery();
- }
- });
- }
- onLoad(() => {
- uni.$u.useGlobalEvent((e) => {
- if (e.barcode) {
- query.search = e.barcode;
- orderQuery();
- }
- });
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { query, orderQuery, openScan, reactive: vue.reactive, ref: vue.ref, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createCommentVNode(" 底部扫码输入框 "),
- vue.createElementVNode("view", {
- class: "fixed-bottom pad-20",
- style: { "background": "#ffffff" }
- }, [
- vue.createVNode(_component_u_search, {
- placeholder: "请输入快递单号/订单编号",
- searchIconSize: 24,
- bgColor: "#f6f7f6",
- onSearch: $setup.orderQuery,
- modelValue: $setup.query.search,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.query.search = $event),
- "custom-style": "font-size:32rpx",
- "placeholder-style": "font-size:32rpx",
- clearabled: true,
- focus: false,
- showAction: false,
- height: 42
- }, null, 8, ["modelValue"]),
- vue.createVNode(_component_u_icon, {
- name: "scan",
- size: "34",
- color: "#19be6b",
- onClick: $setup.openScan
- })
- ])
- ]);
- }
- const PagesIndexWmsOrderQuery = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__scopeId", "data-v-c65e1cc0"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/order-query.vue"]]);
- const props$5 = {
- props: {
- // 是否显示圆点
- isDot: {
- type: Boolean,
- default: props$G.badge.isDot
- },
- // 显示的内容
- value: {
- type: [Number, String],
- default: props$G.badge.value
- },
- // 显示的内容
- modelValue: {
- type: [Number, String],
- default: props$G.badge.modelValue
- },
- // 是否显示
- show: {
- type: Boolean,
- default: props$G.badge.show
- },
- // 最大值,超过最大值会显示 '{max}+'
- max: {
- type: [Number, String],
- default: props$G.badge.max
- },
- // 主题类型,error|warning|success|primary
- type: {
- type: String,
- default: props$G.badge.type
- },
- // 当数值为 0 时,是否展示 Badge
- showZero: {
- type: Boolean,
- default: props$G.badge.showZero
- },
- // 背景颜色,优先级比type高,如设置,type参数会失效
- bgColor: {
- type: [String, null],
- default: props$G.badge.bgColor
- },
- // 字体颜色
- color: {
- type: [String, null],
- default: props$G.badge.color
- },
- // 徽标形状,circle-四角均为圆角,horn-左下角为直角
- shape: {
- type: String,
- default: props$G.badge.shape
- },
- // 设置数字的显示方式,overflow|ellipsis|limit
- // overflow会根据max字段判断,超出显示`${max}+`
- // ellipsis会根据max判断,超出显示`${max}...`
- // limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数
- numberType: {
- type: String,
- default: props$G.badge.numberType
- },
- // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
- offset: {
- type: Array,
- default: props$G.badge.offset
- },
- // 是否反转背景和字体颜色
- inverted: {
- type: Boolean,
- default: props$G.badge.inverted
- },
- // 是否绝对定位
- absolute: {
- type: Boolean,
- default: props$G.badge.absolute
- }
- }
- };
- const _sfc_main$B = {
- name: "u-badge",
- mixins: [mpMixin, props$5, mixin],
- computed: {
- // 是否将badge中心与父组件右上角重合
- boxStyle() {
- let style = {};
- return style;
- },
- // 整个组件的样式
- badgeStyle() {
- const style = {};
- if (this.color) {
- style.color = this.color;
- }
- if (this.bgColor && !this.inverted) {
- style.backgroundColor = this.bgColor;
- }
- if (this.absolute) {
- style.position = "absolute";
- if (this.offset.length) {
- const top = this.offset[0];
- const right = this.offset[1] || top;
- style.top = uni.$u.addUnit(top);
- style.right = uni.$u.addUnit(right);
- }
- }
- return style;
- },
- showValue() {
- switch (this.numberType) {
- case "overflow":
- return Number(this.value) > Number(this.max) ? this.max + "+" : this.value;
- case "ellipsis":
- return Number(this.value) > Number(this.max) ? "..." : this.value;
- case "limit":
- return Number(this.value) > 999 ? Number(this.value) >= 9999 ? Math.floor(this.value / 1e4 * 100) / 100 + "w" : Math.floor(this.value / 1e3 * 100) / 100 + "k" : this.value;
- default:
- return Number(this.value);
- }
- }
- }
- };
- function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
- return _ctx.show && ((Number(_ctx.value) === 0 ? _ctx.showZero : true) || _ctx.isDot) ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: vue.normalizeClass([[_ctx.isDot ? "u-badge--dot" : "u-badge--not-dot", _ctx.inverted && "u-badge--inverted", _ctx.shape === "horn" && "u-badge--horn", `u-badge--${_ctx.type}${_ctx.inverted ? "--inverted" : ""}`], "u-badge"]),
- style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), $options.badgeStyle])
- },
- vue.toDisplayString(_ctx.isDot ? "" : $options.showValue),
- 7
- /* TEXT, CLASS, STYLE */
- )) : vue.createCommentVNode("v-if", true);
- }
- const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__scopeId", "data-v-06cca9b7"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-badge/u-badge.vue"]]);
- const props$4 = {
- props: {
- // 滑块的移动过渡时间,单位ms
- duration: {
- type: Number,
- default: props$G.tabs.duration
- },
- // tabs标签数组
- list: {
- type: Array,
- default: props$G.tabs.list
- },
- // 滑块颜色
- lineColor: {
- type: String,
- default: props$G.tabs.lineColor
- },
- // 菜单选择中时的样式
- activeStyle: {
- type: [String, Object],
- default: props$G.tabs.activeStyle
- },
- // 菜单非选中时的样式
- inactiveStyle: {
- type: [String, Object],
- default: props$G.tabs.inactiveStyle
- },
- // 滑块长度
- lineWidth: {
- type: [String, Number],
- default: props$G.tabs.lineWidth
- },
- // 滑块高度
- lineHeight: {
- type: [String, Number],
- default: props$G.tabs.lineHeight
- },
- // 滑块背景显示大小,当滑块背景设置为图片时使用
- lineBgSize: {
- type: String,
- default: props$G.tabs.lineBgSize
- },
- // 菜单item的样式
- itemStyle: {
- type: [String, Object],
- default: props$G.tabs.itemStyle
- },
- // 菜单是否可滚动
- scrollable: {
- type: Boolean,
- default: props$G.tabs.scrollable
- },
- // 当前选中标签的索引
- current: {
- type: [Number, String],
- default: props$G.tabs.current
- },
- // 默认读取的键名
- keyName: {
- type: String,
- default: props$G.tabs.keyName
- }
- }
- };
- const _sfc_main$A = {
- name: "u-tabs",
- mixins: [mpMixin, mixin, props$4],
- data() {
- return {
- firstTime: true,
- scrollLeft: 0,
- scrollViewWidth: 0,
- lineOffsetLeft: 0,
- tabsRect: {
- left: 0
- },
- innerCurrent: 0,
- moving: false
- };
- },
- watch: {
- current: {
- immediate: true,
- handler(newValue, oldValue) {
- if (newValue !== this.innerCurrent) {
- this.innerCurrent = newValue;
- this.$nextTick(() => {
- this.resize();
- });
- }
- }
- },
- // list变化时,重新渲染list各项信息
- list() {
- this.$nextTick(() => {
- this.resize();
- });
- }
- },
- computed: {
- textStyle() {
- return (index2) => {
- const style = {};
- const customeStyle = index2 === this.innerCurrent ? uni.$u.addStyle(this.activeStyle) : uni.$u.addStyle(
- this.inactiveStyle
- );
- if (this.list[index2].disabled) {
- style.color = "#c8c9cc";
- }
- return uni.$u.deepMerge(customeStyle, style);
- };
- },
- propsBadge() {
- return uni.$u.props.badge;
- }
- },
- async mounted() {
- this.init();
- },
- emits: ["click", "change"],
- methods: {
- setLineLeft() {
- const tabItem = this.list[this.innerCurrent];
- if (!tabItem) {
- return;
- }
- let lineOffsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => total + curr.rect.width, 0);
- const lineWidth = uni.$u.getPx(this.lineWidth);
- this.lineOffsetLeft = lineOffsetLeft + (tabItem.rect.width - lineWidth) / 2;
- if (this.firstTime) {
- setTimeout(() => {
- this.firstTime = false;
- }, 10);
- }
- },
- // nvue下设置滑块的位置
- animation(x, duration = 0) {
- },
- // 点击某一个标签
- clickHandler(item, index2) {
- this.$emit("click", {
- ...item,
- index: index2
- });
- if (item.disabled)
- return;
- this.innerCurrent = index2;
- this.resize();
- this.$emit("change", {
- ...item,
- index: index2
- });
- },
- init() {
- uni.$u.sleep().then(() => {
- this.resize();
- });
- },
- setScrollLeft() {
- const tabRect = this.list[this.innerCurrent];
- const offsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => {
- return total + curr.rect.width;
- }, 0);
- const windowWidth = uni.$u.sys().windowWidth;
- let scrollLeft = offsetLeft - (this.tabsRect.width - tabRect.rect.width) / 2 - (windowWidth - this.tabsRect.right) / 2 + this.tabsRect.left / 2;
- scrollLeft = Math.min(scrollLeft, this.scrollViewWidth - this.tabsRect.width);
- this.scrollLeft = Math.max(0, scrollLeft);
- },
- // 获取所有标签的尺寸
- resize() {
- if (this.list.length === 0) {
- return;
- }
- Promise.all([this.getTabsRect(), this.getAllItemRect()]).then(([tabsRect, itemRect = []]) => {
- this.tabsRect = tabsRect;
- this.scrollViewWidth = 0;
- itemRect.map((item, index2) => {
- this.scrollViewWidth += item.width;
- this.list[index2].rect = item;
- });
- this.setLineLeft();
- this.setScrollLeft();
- });
- },
- // 获取导航菜单的尺寸
- getTabsRect() {
- return new Promise((resolve) => {
- this.queryRect("u-tabs__wrapper__scroll-view").then((size) => resolve(size));
- });
- },
- // 获取所有标签的尺寸
- getAllItemRect() {
- return new Promise((resolve) => {
- const promiseAllArr = this.list.map((item, index2) => this.queryRect(
- `u-tabs__wrapper__nav__item-${index2}`,
- true
- ));
- Promise.all(promiseAllArr).then((sizes) => resolve(sizes));
- });
- },
- // 获取各个标签的尺寸
- queryRect(el, item) {
- return new Promise((resolve) => {
- this.$uGetRect(`.${el}`).then((size) => {
- resolve(size);
- });
- });
- }
- }
- };
- function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_badge = resolveEasycom(vue.resolveDynamicComponent("u-badge"), __easycom_0$1);
- return vue.openBlock(), vue.createElementBlock("view", { class: "u-tabs" }, [
- vue.createElementVNode("view", { class: "u-tabs__wrapper" }, [
- vue.renderSlot(_ctx.$slots, "left", {}, void 0, true),
- vue.createElementVNode("view", { class: "u-tabs__wrapper__scroll-view-wrapper" }, [
- vue.createElementVNode("scroll-view", {
- "scroll-x": _ctx.scrollable,
- "scroll-left": $data.scrollLeft,
- "scroll-with-animation": "",
- class: "u-tabs__wrapper__scroll-view",
- "show-scrollbar": false,
- ref: "u-tabs__wrapper__scroll-view"
- }, [
- vue.createElementVNode(
- "view",
- {
- class: "u-tabs__wrapper__nav",
- ref: "u-tabs__wrapper__nav"
- },
- [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.list, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: vue.normalizeClass(["u-tabs__wrapper__nav__item", [`u-tabs__wrapper__nav__item-${index2}`, item.disabled && "u-tabs__wrapper__nav__item--disabled"]]),
- key: index2,
- onClick: ($event) => $options.clickHandler(item, index2),
- ref_for: true,
- ref: `u-tabs__wrapper__nav__item-${index2}`,
- style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.itemStyle), { flex: _ctx.scrollable ? "" : 1 }])
- }, [
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass([[item.disabled && "u-tabs__wrapper__nav__item__text--disabled"], "u-tabs__wrapper__nav__item__text"]),
- style: vue.normalizeStyle([$options.textStyle(index2)])
- },
- vue.toDisplayString(item[_ctx.keyName]),
- 7
- /* TEXT, CLASS, STYLE */
- ),
- vue.createVNode(_component_u_badge, {
- show: !!(item.badge && (item.badge.show || item.badge.isDot || item.badge.value)),
- isDot: item.badge && item.badge.isDot || $options.propsBadge.isDot,
- value: item.badge && item.badge.value || $options.propsBadge.value,
- max: item.badge && item.badge.max || $options.propsBadge.max,
- type: item.badge && item.badge.type || $options.propsBadge.type,
- showZero: item.badge && item.badge.showZero || $options.propsBadge.showZero,
- bgColor: item.badge && item.badge.bgColor || $options.propsBadge.bgColor,
- color: item.badge && item.badge.color || $options.propsBadge.color,
- shape: item.badge && item.badge.shape || $options.propsBadge.shape,
- numberType: item.badge && item.badge.numberType || $options.propsBadge.numberType,
- inverted: item.badge && item.badge.inverted || $options.propsBadge.inverted,
- customStyle: "margin-left: 4px;"
- }, null, 8, ["show", "isDot", "value", "max", "type", "showZero", "bgColor", "color", "shape", "numberType", "inverted"])
- ], 14, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createElementVNode(
- "view",
- {
- class: "u-tabs__wrapper__nav__line",
- ref: "u-tabs__wrapper__nav__line",
- style: vue.normalizeStyle([{
- width: _ctx.$u.addUnit(_ctx.lineWidth),
- transform: `translate(${$data.lineOffsetLeft}px)`,
- transitionDuration: `${$data.firstTime ? 0 : _ctx.duration}ms`,
- height: _ctx.$u.addUnit(_ctx.lineHeight),
- background: _ctx.lineColor,
- backgroundSize: _ctx.lineBgSize
- }])
- },
- null,
- 4
- /* STYLE */
- )
- ],
- 512
- /* NEED_PATCH */
- )
- ], 8, ["scroll-x", "scroll-left"])
- ]),
- vue.renderSlot(_ctx.$slots, "right", {}, void 0, true)
- ])
- ]);
- }
- const __easycom_4$1 = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__scopeId", "data-v-02b0c54f"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-tabs/u-tabs.vue"]]);
- const _sfc_main$z = {
- __name: "order-query-list",
- setup(__props, { expose: __expose }) {
- __expose();
- const list1 = vue.reactive([{
- name: "商品明细"
- }, {
- name: "操作记录"
- }]);
- const activeTab = vue.ref(0);
- const query = vue.reactive({
- searchType: 2,
- search: ""
- });
- const determineSearchType = (search) => {
- const isNumberString = /^\d+$/.test(search.toString());
- return isNumberString ? 1 : 2;
- };
- const detail = vue.ref({});
- const orderQuery = () => {
- if (!query.search) {
- uni.$u.toast("请输入快递单号/订单编号");
- uni.$u.ttsModule.speak("请输入快递单号/订单编号");
- return;
- }
- query.searchType = determineSearchType(query.search);
- uni.$u.http.get("/app/stock/findOrder", { params: query }).then((res2) => {
- if (res2.code == 200) {
- detail.value = res2.data;
- uni.$u.ttsModule.speak("查询成功");
- getOperationLogs(res2.data.orderId);
- } else {
- uni.$u.toast(res2.msg);
- uni.$u.ttsModule.speak(res2.msg);
- }
- });
- };
- const operationLogs = vue.ref([]);
- const getOperationLogs = (orderId) => {
- uni.$u.http.get("/app/stock/getGodownStocklog", { params: { orderId } }).then((res2) => {
- if (res2.code == 200) {
- operationLogs.value = res2.data;
- }
- });
- };
- function handleTabChange(tab) {
- activeTab.value = tab.index;
- }
- function openScan() {
- uni.scanCode({
- success: (res2) => {
- query.search = res2.result;
- orderQuery();
- }
- });
- }
- onLoad((options) => {
- if (options.id) {
- query.search = options.id;
- orderQuery();
- }
- uni.$u.useGlobalEvent((e) => {
- if (e.barcode) {
- getDetailByCode(e.barcode);
- }
- });
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { list1, activeTab, query, determineSearchType, detail, orderQuery, operationLogs, getOperationLogs, handleTabChange, openScan, reactive: vue.reactive, ref: vue.ref, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- }, BookInfo };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_4$1);
- const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- $setup.detail.orderId ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "header"
- }, [
- vue.createElementVNode("view", { class: "flex-d" }, [
- vue.createElementVNode(
- "text",
- null,
- "订单编号: " + vue.toDisplayString($setup.detail.orderId),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "mt-16" },
- "库位: " + vue.toDisplayString($setup.detail.positionCode),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "status" }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString($setup.detail.stockStatus == 1 ? "已入库" : "已出库"),
- 1
- /* TEXT */
- )
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $setup.detail.orderId ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- style: { "background-color": "#ffffff" },
- class: "pad-5 mt-20 content-info"
- }, [
- vue.createVNode(_component_u_tabs, {
- list: $setup.list1,
- modelValue: $setup.activeTab,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.activeTab = $event),
- itemStyle: { height: "44px", width: "48%" },
- onChange: $setup.handleTabChange
- }, null, 8, ["list", "modelValue"]),
- $setup.activeTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "product-details"
- }, [
- vue.createVNode($setup["BookInfo"], {
- bookList: $setup.detail.detailVoList,
- detail: $setup.detail,
- isShow: false
- }, null, 8, ["bookList", "detail"])
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "operation-logs mt-20"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.operationLogs, (log, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "log-item"
- }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(log.createTime),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(log.createName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(log.content),
- 1
- /* TEXT */
- )
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]))
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 底部扫码输入框 "),
- vue.createElementVNode("view", {
- class: "fixed-bottom pad-20",
- style: { "background": "#ffffff" }
- }, [
- vue.createVNode(_component_u_search, {
- placeholder: "请输入快递单号/订单编号",
- searchIconSize: 24,
- bgColor: "#f6f7f6",
- onSearch: $setup.orderQuery,
- modelValue: $setup.query.search,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.query.search = $event),
- "custom-style": "font-size:32rpx",
- "placeholder-style": "font-size:32rpx",
- clearabled: true,
- focus: false,
- showAction: false,
- height: 42
- }, null, 8, ["modelValue"]),
- vue.createVNode(_component_u_icon, {
- name: "scan",
- size: "34",
- color: "#19be6b",
- onClick: $setup.openScan
- })
- ])
- ]);
- }
- const PagesIndexWmsOrderQueryList = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__scopeId", "data-v-13461b03"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/order-query-list.vue"]]);
- const _sfc_main$y = {
- __name: "location-order",
- setup(__props, { expose: __expose }) {
- __expose();
- const positionCode = vue.ref("");
- const onSearch = () => {
- if (positionCode.value) {
- uni.redirectTo({
- url: "/pages/index/wms/location-order-list?positionCode=" + positionCode.value
- });
- } else {
- uni.$u.toast("请输入库位编号");
- }
- };
- function openScan() {
- uni.scanCode({
- success: (res2) => {
- positionCode.value = res2.result;
- onSearch();
- }
- });
- }
- onLoad(() => {
- uni.$u.useGlobalEvent((e) => {
- if (e.barcode) {
- positionCode.value = e.barcode;
- onSearch();
- }
- });
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { positionCode, onSearch, openScan, ref: vue.ref, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- } };
- 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_4$3);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createCommentVNode(" 底部扫码输入框 "),
- vue.createElementVNode("view", {
- class: "fixed-bottom pad-20",
- style: { "background": "#ffffff" }
- }, [
- vue.createVNode(_component_u_search, {
- placeholder: "请输入库位编号",
- searchIconSize: 24,
- bgColor: "#f6f7f6",
- onSearch: $setup.onSearch,
- modelValue: $setup.positionCode,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.positionCode = $event),
- clearabled: true,
- focus: false,
- showAction: false,
- height: 42
- }, null, 8, ["modelValue"]),
- vue.createVNode(_component_u_icon, {
- name: "scan",
- size: "32",
- color: "#19be6b",
- onClick: $setup.openScan
- })
- ])
- ]);
- }
- const PagesIndexWmsLocationOrder = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__scopeId", "data-v-38a6ed3a"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/location-order.vue"]]);
- const _imports_0$1 = "/static/img/share.png";
- const _sfc_main$x = {
- __name: "LocationOrderItem",
- props: {
- item: {
- type: Object,
- required: true
- },
- isCheck: {
- type: Boolean,
- default: false
- },
- isLink: {
- type: Boolean,
- default: true
- }
- },
- emits: ["select"],
- setup(__props, { expose: __expose, emit: __emit }) {
- __expose();
- const props2 = __props;
- const emit2 = __emit;
- const toggleSelect = () => {
- emit2("select", props2.item);
- };
- const handleQuickJump = () => {
- uni.redirectTo({
- url: `/pages/index/wms/order-query-list?id=${props2.item.orderId}`
- });
- };
- const __returned__ = { props: props2, emit: emit2, toggleSelect, handleQuickJump };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- return vue.openBlock(), vue.createElementBlock("view", { class: "order-item" }, [
- vue.createElementVNode("view", { class: "order-header" }, [
- vue.createElementVNode("view", { class: "order-info" }, [
- vue.createElementVNode("view", { class: "info-row" }, [
- vue.createElementVNode("text", { class: "label" }, "订单编号:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($props.item.orderId),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-row" }, [
- vue.createElementVNode("text", { class: "label" }, "不良数量:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($props.item.badNum),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-row" }, [
- vue.createElementVNode("text", { class: "label" }, "物流单号:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($props.item.waybillCode),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-row" }, [
- vue.createElementVNode("text", { class: "label" }, "验货完成日期:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($props.item.auditFinishTime),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-row" }, [
- vue.createElementVNode("text", { class: "label" }, "录入人:"),
- vue.createElementVNode(
- "text",
- { class: "value" },
- vue.toDisplayString($props.item.auditUserName),
- 1
- /* TEXT */
- )
- ])
- ]),
- $props.isCheck ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "check-icon"
- }, [
- vue.createVNode(_component_u_icon, {
- name: $props.item.checked ? "checkmark-circle-fill" : "checkmark-circle",
- color: $props.item.checked ? "#19be6b" : "#c8c9cc",
- size: "28",
- onClick: $setup.toggleSelect
- }, null, 8, ["name", "color"])
- ])) : vue.createCommentVNode("v-if", true),
- $props.isLink ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "flex flex-d flex-a-c flex-j-c quick-jump",
- onClick: $setup.handleQuickJump
- }, [
- vue.createElementVNode("image", {
- src: _imports_0$1,
- mode: "widthFix",
- style: { "width": "30px" }
- }),
- vue.createElementVNode("text", { style: { "font-size": "28rpx", "color": "#19be6b" } }, "快速跳转")
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ]);
- }
- const LocationOrderItem = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__scopeId", "data-v-b4edd1b0"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/components/LocationOrderItem.vue"]]);
- const _sfc_main$w = {
- __name: "location-order-list",
- setup(__props, { expose: __expose }) {
- __expose();
- const orderCode = vue.ref("");
- const originList = vue.ref([]);
- const orderList = vue.ref([]);
- const detail = vue.ref({});
- const getOrderListByPositionCode = (positionCode) => {
- uni.$u.http.get("/app/stock/getOrderByPositionCode?positionCode=" + positionCode).then((res2) => {
- if (res2.code == 200) {
- detail.value = res2.data;
- orderList.value = res2.data.godownStockLogResults;
- originList.value = res2.data.godownStockLogResults;
- if (originList.value.length > 0) {
- uni.$u.ttsModule.speak("查询到" + originList.value.length + "条订单");
- } else {
- uni.$u.toast("暂无订单");
- uni.$u.ttsModule.speak("暂无订单");
- }
- } else {
- uni.$u.toast(res2.msg);
- uni.$u.ttsModule.speak(res2.msg);
- }
- });
- };
- const onSearch = () => {
- if (!orderCode.value) {
- orderList.value = originList.value;
- uni.$u.toast("请输入订单号或物流单号");
- return;
- }
- const searchValue = String(orderCode.value).trim();
- const isNumeric = /^[0-9]+$/.test(searchValue);
- const result = originList.value.filter((item) => {
- if (isNumeric) {
- return item.orderId === orderCode.value;
- } else {
- return item.waybillCode === orderCode.value;
- }
- });
- orderList.value = result;
- };
- function openScan() {
- uni.scanCode({
- success: (res2) => {
- orderCode.value = res2.result;
- onSearch();
- }
- });
- }
- onLoad((options) => {
- if (options.positionCode) {
- getOrderListByPositionCode(options.positionCode);
- }
- uni.$u.useGlobalEvent((e) => {
- if (e.barcode) {
- orderCode.value = res.result;
- onSearch();
- }
- });
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { orderCode, originList, orderList, detail, getOrderListByPositionCode, onSearch, openScan, reactive: vue.reactive, ref: vue.ref, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- }, LocationOrderItem };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "header" }, [
- vue.createElementVNode("view", { class: "flex-d" }, [
- vue.createElementVNode(
- "text",
- null,
- "仓库: " + vue.toDisplayString($setup.detail.godownName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "mt-16" },
- "库位编号: " + vue.toDisplayString($setup.detail.positionCode),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "mt-16" },
- "订单数量: " + vue.toDisplayString($setup.originList.length),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "product-details" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.orderList, (item, index2) => {
- return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
- key: index2,
- item
- }, null, 8, ["item"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createCommentVNode(" 底部扫码输入框 "),
- vue.createElementVNode("view", {
- class: "fixed-bottom pad-20",
- style: { "background": "#ffffff" }
- }, [
- vue.createVNode(_component_u_search, {
- placeholder: "请输入快递单号/订单编号",
- searchIconSize: 24,
- bgColor: "#f6f7f6",
- onSearch: $setup.onSearch,
- modelValue: $setup.orderCode,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.orderCode = $event),
- clearabled: true,
- focus: false,
- showAction: false,
- height: 42
- }, null, 8, ["modelValue"]),
- vue.createVNode(_component_u_icon, {
- name: "scan",
- size: "36",
- color: "#19be6b",
- onClick: $setup.openScan
- })
- ])
- ]);
- }
- const PagesIndexWmsLocationOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$v], ["__scopeId", "data-v-3e424560"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/location-order-list.vue"]]);
- const _sfc_main$v = {
- __name: "location-select",
- setup(__props, { expose: __expose }) {
- __expose();
- const searchText = vue.ref("");
- function playGlobalSound() {
- uni.$u.playClickSound();
- }
- const locations = vue.ref([]);
- function getLocationListByGodownId(godownId2, code2 = "", type2 = "") {
- uni.$u.http.get("/app/stock/getGodownPosition?godownId=" + godownId2 + "&code=" + code2).then((res2) => {
- if (res2.code == 200) {
- locations.value = res2.data;
- if (type2 == "select") {
- setTimeout(() => {
- locations.value.forEach((item) => {
- if (item == code2) {
- selectLocation(item);
- }
- });
- }, 500);
- }
- }
- });
- }
- const scrollHeight = vue.ref(0);
- const onSearch = () => {
- getLocationListByGodownId(godownId.value, searchText.value);
- };
- const openScan = () => {
- uni.scanCode({
- success: (res2) => {
- searchText.value = res2.result;
- onSearch();
- },
- fail: (err) => {
- uni.showToast({
- title: "扫码失败",
- icon: "error"
- });
- }
- });
- };
- const selectLocation = (item) => {
- uni.$emit("updateLocation", item);
- uni.navigateBack();
- };
- const godownId = vue.ref("");
- const positionCode = vue.ref("");
- onLoad((opts) => {
- godownId.value = opts.godownId;
- positionCode.value = opts.positionCode;
- getLocationListByGodownId(godownId.value);
- scrollHeight.value = uni.getSystemInfoSync().windowHeight - 44 - 60;
- uni.$u.useGlobalEvent((e) => {
- if (e.barcode) {
- searchText.value = e.barcode;
- getLocationListByGodownId(godownId.value, e.barcode, "select");
- }
- });
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { searchText, playGlobalSound, locations, getLocationListByGodownId, scrollHeight, onSearch, openScan, selectLocation, godownId, positionCode, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "container",
- onClick: $setup.playGlobalSound
- }, [
- vue.createCommentVNode(" 库位列表 "),
- vue.createElementVNode(
- "scroll-view",
- {
- "scroll-y": "",
- class: "location-list",
- style: vue.normalizeStyle({ height: $setup.scrollHeight + "px" })
- },
- [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.locations, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: vue.normalizeClass(["location-item", item === $setup.positionCode ? "location-item-selected" : ""]),
- "hover-class": "location-item-hover",
- onClick: ($event) => $setup.selectLocation(item)
- }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(item),
- 1
- /* TEXT */
- )
- ], 10, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ],
- 4
- /* STYLE */
- ),
- vue.createCommentVNode(" 底部搜索框 "),
- vue.createElementVNode("view", {
- class: "fixed-bottom pad-20",
- style: { "background": "#ffffff" }
- }, [
- vue.createVNode(_component_u_search, {
- modelValue: $setup.searchText,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
- placeholder: "请输入库位条码",
- "show-action": false,
- clearabled: true,
- onSearch: $setup.onSearch,
- height: "40",
- onClick: _cache[1] || (_cache[1] = ($event) => $setup.searchText = "")
- }, null, 8, ["modelValue"]),
- vue.createVNode(_component_u_icon, {
- name: "scan",
- size: "28",
- color: "#19be6b",
- onClick: $setup.openScan
- })
- ])
- ]);
- }
- const PagesIndexWmsLocationSelect = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$u], ["__scopeId", "data-v-b26ec186"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/location-select.vue"]]);
- const _sfc_main$u = {
- __name: "warehouse-select",
- setup(__props, { expose: __expose }) {
- __expose();
- function playGlobalSound() {
- uni.$u.playClickSound();
- }
- const searchText = vue.ref("");
- const warehouses = vue.ref([]);
- function getGodownListByName(name = "") {
- uni.$u.http.post("/app/appUser/searchGodown?name=" + name).then((res2) => {
- if (res2.code == 200) {
- warehouses.value = res2.data;
- }
- });
- }
- getGodownListByName();
- const onSearch = () => {
- getGodownListByName(searchText.value);
- };
- const selectWarehouse = (item) => {
- uni.$emit("updateWarehouse", item);
- uni.navigateBack();
- };
- const selectedId = vue.ref();
- onLoad((options) => {
- if (options.godownId) {
- selectedId.value = options.godownId;
- }
- });
- const __returned__ = { playGlobalSound, searchText, warehouses, getGodownListByName, onSearch, selectWarehouse, selectedId, ref: vue.ref, computed: vue.computed, get onLoad() {
- return onLoad;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "container",
- onClick: $setup.playGlobalSound
- }, [
- vue.createCommentVNode(" 搜索框 "),
- vue.createElementVNode("view", { class: "search-area" }, [
- vue.createVNode(_component_u_search, {
- modelValue: $setup.searchText,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
- placeholder: "请输入仓库名称",
- "show-action": false,
- clearabled: true,
- onChange: $setup.onSearch,
- height: "40",
- "placeholder-style": "font-size:16px"
- }, null, 8, ["modelValue"])
- ]),
- vue.createCommentVNode(" 仓库列表 "),
- vue.createElementVNode("view", { class: "warehouse-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.warehouses, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: vue.normalizeClass(["warehouse-item", { "warehouse-item-active": item.id == $setup.selectedId }]),
- "hover-class": "warehouse-item-hover",
- onClick: ($event) => $setup.selectWarehouse(item)
- }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(index2 + 1) + "." + vue.toDisplayString(item.godownName),
- 1
- /* TEXT */
- )
- ], 10, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]);
- }
- const PagesIndexWmsWarehouseSelect = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$t], ["__scopeId", "data-v-c3e02812"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/warehouse-select.vue"]]);
- const _sfc_main$t = {
- __name: "speedy-check",
- setup(__props, { expose: __expose }) {
- __expose();
- const goBack = () => {
- uni.navigateBack();
- };
- const showCheckMethodPicker = vue.ref(false);
- const checkMethod = vue.ref("增加数量");
- const resetType = vue.ref(0);
- const checkMethodOptions = ["增加数量", "减少数量", "实际数量"];
- const getUserDefaultWarehouse = () => {
- uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
- if (res2.code == 200) {
- getWarehouseLocationList(res2.data.id);
- }
- });
- };
- const location2 = vue.ref("");
- const showLocationPopup = vue.ref(false);
- const locationList = vue.ref([]);
- const selectedLocation = vue.ref("");
- const godownId = vue.ref();
- const getWarehouseLocationList = (id) => {
- godownId.value = id;
- uni.$u.http.get("/app/stock/getGodownPosition?godownId=" + id).then((res2) => {
- if (res2.code == 200) {
- locationList.value = res2.data;
- }
- });
- };
- const searchValue = vue.ref("");
- const products = vue.ref([]);
- const onCheckMethodConfirm = (e) => {
- checkMethod.value = e.value[0];
- showCheckMethodPicker.value = false;
- resetType.value = e.indexs[0] + 1;
- };
- const handleLocationSelect = () => {
- showLocationPopup.value = true;
- selectedLocation.value = location2.value;
- };
- const onLocationConfirm = () => {
- if (selectedLocation.value) {
- location2.value = selectedLocation.value;
- showLocationPopup.value = false;
- selectedLocation.value = "";
- } else {
- uni.$u.toast("请选择库位");
- }
- };
- const selectLocation = (item) => {
- selectedLocation.value = item;
- };
- const onSubmit = () => {
- if (products.value.length === 0) {
- uni.$u.toast("请添加盘点订单");
- return;
- }
- const params = {
- godownId: godownId.value,
- positionCode: location2.value,
- orderInfo: products.value.map((item) => ({
- orderId: item.orderId,
- waybillCode: item.waybillCode,
- bookNum: item.badNum,
- remark: item.remark || ""
- })),
- resetType: resetType.value
- };
- uni.$u.http.post("/app/stock/resetStock", params).then((res2) => {
- if (res2.code === 200) {
- uni.$u.toast("盘点成功");
- location2.value = "";
- products.value = [];
- searchValue.value = "";
- } else {
- uni.$u.toast(res2.msg || "提交失败");
- }
- }).catch((err) => {
- uni.$u.toast("提交失败");
- formatAppLog("error", "at pages/index/wms/speedy-check.vue:229", err);
- });
- };
- const onSearch = () => {
- if (!searchValue.value) {
- uni.$u.toast("请输入快递单号或订单编号");
- return;
- }
- const searchType = /^[0-9]+$/.test(searchValue.value) ? 1 : 2;
- uni.$u.http.get("/app/stock/searchBadOrderForReset", {
- params: {
- searchType,
- search: searchValue.value
- }
- }).then((res2) => {
- if (res2.code === 200) {
- const exists = products.value.some(
- (item) => item.orderId === res2.data.orderId || item.waybillCode === res2.data.waybillCode
- );
- if (exists) {
- uni.$u.toast("该订单已添加");
- return;
- }
- products.value.push(res2.data);
- searchValue.value = "";
- } else {
- uni.$u.toast(res2.msg || "查询失败");
- }
- }).catch((err) => {
- uni.$u.toast("查询失败");
- formatAppLog("error", "at pages/index/wms/speedy-check.vue:271", err);
- });
- };
- const dealScanText = (scanText) => {
- let isLocation = scanText.indexOf("-") > -1 && scanText.length == 9;
- if (isLocation) {
- if (locationList.value.includes(scanText)) {
- location2.value = scanText;
- } else {
- uni.$u.toast("库位不存在");
- }
- } else {
- searchValue.value = scanText;
- onSearch();
- }
- };
- const openScan = () => {
- uni.scanCode({
- success: (res2) => {
- dealScanText(res2.result);
- },
- fail: (err) => {
- uni.showToast({
- title: "扫码失败",
- icon: "error"
- });
- }
- });
- };
- function handleAdd() {
- if (!location2.value) {
- uni.$u.toast("请选择库位");
- return;
- }
- uni.redirectTo({
- url: "/pages/index/wms/speedy-check-add?location=" + location2.value
- });
- }
- const close = () => {
- showLocationPopup.value = false;
- };
- const open2 = () => {
- showLocationPopup.value = true;
- };
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- onLoad(() => {
- getUserDefaultWarehouse();
- uni.$on("selectedProducts", (list) => {
- products.value = list;
- });
- uni.$u.useGlobalEvent((e) => {
- if (e.barcode) {
- dealScanText(e.barcode);
- }
- });
- });
- const __returned__ = { goBack, showCheckMethodPicker, checkMethod, resetType, checkMethodOptions, getUserDefaultWarehouse, location: location2, showLocationPopup, locationList, selectedLocation, godownId, getWarehouseLocationList, searchValue, products, onCheckMethodConfirm, handleLocationSelect, onLocationConfirm, selectLocation, onSubmit, onSearch, dealScanText, openScan, handleAdd, close, open: open2, reactive: vue.reactive, ref: vue.ref, get onLoad() {
- return onLoad;
- }, get onUnload() {
- return onUnload;
- }, get onShow() {
- return onShow;
- }, LocationOrderItem };
- 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$f);
- const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$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$4);
- const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$2);
- const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$9);
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
- const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
- const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
- const _directive_permission = vue.resolveDirective("permission");
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "container",
- style: { "padding-top": "44px", "padding-bottom": "10px" }
- }, [
- vue.createVNode(_component_u_navbar, {
- title: "快速盘点",
- border: false,
- fixed: "",
- "safe-area-inset-top": "",
- bgColor: "#22ac38",
- titleStyle: "font-size:36rpx;color:#fff"
- }, {
- left: vue.withCtx(() => [
- vue.createVNode(_component_u_icon, {
- name: "arrow-left",
- color: "#fff",
- size: "20",
- onClick: $setup.goBack
- })
- ]),
- right: vue.withCtx(() => [
- vue.withDirectives((vue.openBlock(), vue.createElementBlock("text", {
- style: { "color": "#ffffff" },
- onClick: $setup.onSubmit
- }, [
- vue.createTextVNode("提交")
- ])), [
- [_directive_permission, "app:wms:speedyCheck:confirm"]
- ])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createCommentVNode(" 盘点信息选择区域 "),
- vue.createElementVNode("view", {
- class: "select-area",
- style: { "margin-top": "44px" }
- }, [
- vue.createVNode(_component_u_cell_group, { border: true }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_cell, {
- title: "盘点方式",
- value: $setup.checkMethod,
- onClick: _cache[0] || (_cache[0] = ($event) => $setup.showCheckMethodPicker = true),
- isLink: true,
- border: true
- }, null, 8, ["value"]),
- vue.createVNode(_component_u_cell, {
- title: "目标库位",
- value: $setup.location,
- onClick: $setup.handleLocationSelect,
- isLink: true,
- border: true
- }, null, 8, ["value"])
- ]),
- _: 1
- /* STABLE */
- })
- ]),
- vue.createCommentVNode(" 盘点方式选择器 "),
- vue.createVNode(_component_u_picker, {
- show: $setup.showCheckMethodPicker,
- columns: [$setup.checkMethodOptions],
- onConfirm: $setup.onCheckMethodConfirm,
- onCancel: _cache[1] || (_cache[1] = ($event) => $setup.showCheckMethodPicker = false),
- showToolbar: true,
- title: "选择盘点方式",
- closeOnClickOverlay: true,
- cancelText: "取消",
- confirmText: "确定",
- itemHeight: 44,
- visibleItemCount: 5
- }, null, 8, ["show", "columns"]),
- vue.createCommentVNode(" 库位选择弹出层 "),
- vue.createVNode(_component_u_popup, {
- show: $setup.showLocationPopup,
- mode: "bottom",
- onClose: $setup.close,
- onOpen: $setup.open,
- closeOnClickOverlay: true,
- round: 10,
- safeAreaInsetBottom: true
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "location-popup" }, [
- vue.createElementVNode("view", { class: "location-popup-header" }, [
- vue.createElementVNode("text", { style: { "flex": "1" } }, "选择库位"),
- vue.createVNode(_component_u_text, {
- style: { "width": "40px", "flex": "none" },
- type: "primary",
- text: "确定",
- onClick: $setup.onLocationConfirm
- })
- ]),
- vue.createElementVNode("view", { class: "location-popup-content" }, [
- vue.createVNode(_component_u_input, {
- modelValue: $setup.selectedLocation,
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.selectedLocation = $event),
- placeholder: "请输入库位",
- customStyle: "background-color: #f6f6f6; border-radius: 4px;"
- }, null, 8, ["modelValue"]),
- vue.createElementVNode("view", { class: "location-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.locationList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: vue.normalizeClass(["location-item", { "location-item--selected": $setup.selectedLocation === item }]),
- key: index2,
- onClick: ($event) => $setup.selectLocation(item)
- }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(item),
- 1
- /* TEXT */
- ),
- $setup.selectedLocation === item ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
- key: 0,
- name: "checkmark",
- color: "#19be6b",
- size: "16"
- })) : vue.createCommentVNode("v-if", true)
- ], 10, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["show"]),
- vue.createCommentVNode(" 订单列表 "),
- vue.createElementVNode("view", { class: "product-details" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.products, (item, index2) => {
- return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
- isLink: _ctx.isLink,
- key: index2,
- item
- }, null, 8, ["isLink", "item"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("view", {
- class: "add-btn",
- onClick: $setup.handleAdd
- }, [
- vue.createVNode(_component_u_icon, {
- name: "plus-circle",
- size: "40",
- color: "#19be6b"
- })
- ]),
- vue.createCommentVNode(" 底部扫码输入框 "),
- vue.createElementVNode("view", {
- class: "fixed-bottom pad-20",
- style: { "background": "#ffffff" }
- }, [
- vue.createVNode(_component_u_search, {
- placeholder: "请输入快递单号/订单编号",
- modelValue: $setup.searchValue,
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.searchValue = $event),
- onSearch: $setup.onSearch,
- "show-action": false,
- "custom-style": "margin-right:10px"
- }, null, 8, ["modelValue"]),
- vue.createVNode(_component_u_icon, {
- name: "scan",
- size: "28",
- color: "#19be6b",
- onClick: $setup.openScan
- })
- ])
- ]);
- }
- const PagesIndexWmsSpeedyCheck = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__scopeId", "data-v-283ebe02"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/speedy-check.vue"]]);
- const _sfc_main$s = {
- __name: "BookItemOrder",
- props: {
- book: Object,
- index: Number
- },
- emits: ["remove"],
- setup(__props, { expose: __expose, emit: __emit }) {
- __expose();
- const props2 = __props;
- const emit2 = __emit;
- const removeBook = () => {
- emit2("remove", { book: props2.book, index: props2.index });
- };
- const __returned__ = { props: props2, emit: emit2, removeBook };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- return vue.openBlock(), vue.createElementBlock("view", { class: "book-item" }, [
- vue.createElementVNode("image", {
- class: "book-image",
- src: $props.book.cover,
- mode: "aspectFill"
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "book-info" }, [
- vue.createElementVNode("view", { class: "book-title" }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString($props.book.bookName),
- 1
- /* TEXT */
- ),
- vue.createVNode(_component_u_icon, {
- name: "close",
- size: "18",
- onClick: $setup.removeBook
- })
- ]),
- vue.createElementVNode("view", { class: "flex-a flex-1" }, [
- vue.createElementVNode("view", { class: "book-details flex-d" }, [
- vue.createElementVNode(
- "text",
- null,
- "ISBN: " + vue.toDisplayString($props.book.isbn),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- null,
- "定价: " + vue.toDisplayString($props.book.price),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- null,
- "折扣: " + vue.toDisplayString($props.book.recycleDiscount),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "book-stats flex-d ml-20" }, [
- vue.createElementVNode(
- "text",
- null,
- "数量: " + vue.toDisplayString($props.book.quantity),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- null,
- "预估单价: " + vue.toDisplayString($props.book.expectPrice),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { style: { "color": "#ff0000" } },
- "审核金额: " + vue.toDisplayString($props.book.auditPrice),
- 1
- /* TEXT */
- )
- ])
- ])
- ])
- ]);
- }
- const BookItem = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$r], ["__scopeId", "data-v-97928f7a"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/components/BookItemOrder.vue"]]);
- const _sfc_main$r = {
- __name: "check-order",
- setup(__props, { expose: __expose }) {
- __expose();
- const bookList = vue.ref([]);
- const totalBooks = vue.computed(() => bookList.value.reduce((sum, book) => sum + parseFloat(book.quantity), 0));
- const totalPrice = vue.computed(() => bookList.value.reduce((sum, book) => sum + parseFloat(book.auditPrice), 0).toFixed(2));
- const removeBook = ({ book, index: index2 }) => {
- bookList.value.splice(index2, 1);
- };
- const handleSubmit = () => {
- if (bookList.value.length === 0) {
- uni.$u.toast("请先添加书籍");
- return;
- }
- uni.$u.http.post("/app/offlineorder/submitOfflineOrder", bookList.value).then((res2) => {
- if (res2.code == 200) {
- uni.$u.toast("提交成功");
- bookList.value.length = 0;
- }
- });
- };
- const handleScan = () => {
- uni.scanCode({
- success: (res2) => {
- handleBarcode(res2.result);
- formatAppLog("log", "at pages/index/offline/check-order.vue:52", "扫码结果:", res2.result);
- },
- fail: (res2) => {
- formatAppLog("log", "at pages/index/offline/check-order.vue:56", "扫码失败:", res2);
- uni.$u.toast("扫码失败");
- }
- });
- };
- const handleBarcode = (barcode) => {
- formatAppLog("log", "at pages/index/offline/check-order.vue:63", "扫码结果:", barcode);
- uni.$u.http.get(`/app/offlineorder/getBookInfo/${barcode}`).then((res2) => {
- if (res2.code == 200) {
- res2.data.quantity = 1;
- let item = bookList.value.find((item2) => item2.isbn === res2.data.isbn);
- if (item) {
- item.quantity += 1;
- item.auditPrice = (item.expectPrice * item.quantity).toFixed(2);
- return;
- } else {
- res2.data.auditPrice = (res2.data.expectPrice * res2.data.quantity).toFixed(2);
- bookList.value.push(res2.data);
- }
- }
- });
- };
- onLoad(() => {
- uni.$u.useGlobalEvent((e) => {
- handleBarcode(e.barcode);
- });
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { bookList, totalBooks, totalPrice, removeBook, handleSubmit, handleScan, handleBarcode, ref: vue.ref, computed: vue.computed, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- }, BookItem };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- const _directive_permission = vue.resolveDirective("permission");
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createElementVNode("view", { class: "book-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.bookList, (book, index2) => {
- return vue.openBlock(), vue.createBlock($setup["BookItem"], {
- key: index2,
- book,
- onRemove: $setup.removeBook
- }, null, 8, ["book"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createCommentVNode(" 底部信息和按钮 "),
- vue.createElementVNode("view", {
- class: "footer fixed-bottom flex-d",
- style: { "padding-top": "10rpx" }
- }, [
- $setup.bookList.length > 0 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "pad-10"
- }, [
- vue.createTextVNode("共 "),
- vue.createElementVNode(
- "text",
- { style: { "color": "#ff0000" } },
- vue.toDisplayString($setup.totalBooks),
- 1
- /* TEXT */
- ),
- vue.createTextVNode(" 本,预估回收价 "),
- vue.createElementVNode(
- "text",
- { style: { "color": "#ff0000" } },
- "¥" + vue.toDisplayString($setup.totalPrice),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "flex-a mt-12" }, [
- vue.withDirectives(vue.createVNode(
- _component_u_button,
- {
- size: "large",
- type: "primary",
- text: "提交",
- onClick: $setup.handleSubmit
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [_directive_permission, "app:offline:checkOrder:confirm"]
- ]),
- vue.createVNode(_component_u_button, {
- size: "large",
- type: "warning",
- text: "扫码",
- onClick: $setup.handleScan
- })
- ])
- ])
- ]);
- }
- const PagesIndexOfflineCheckOrder = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__scopeId", "data-v-8fea8cdb"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/offline/check-order.vue"]]);
- const _sfc_main$q = {
- __name: "check-record",
- setup(__props, { expose: __expose }) {
- __expose();
- const scrollRef = vue.ref(null);
- const refreshList = () => {
- var _a;
- (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
- };
- let dataList = vue.ref([]);
- const updateList = (data) => {
- dataList.value = data;
- };
- const __returned__ = { scrollRef, refreshList, get dataList() {
- return dataList;
- }, set dataList(v) {
- dataList = v;
- }, updateList, PageScroll: pageScroll, ref: vue.ref };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "common-page",
- style: { "padding": "0" }
- }, [
- vue.createVNode(
- $setup["PageScroll"],
- {
- requestStr: "/app/offlineorder/getUserStat",
- onUpdateList: $setup.updateList,
- ref: "scrollRef"
- },
- {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "search-area flex-a" }, [
- vue.createElementVNode("view", { class: "text-item flex-1" }, "核单时间"),
- vue.createElementVNode("view", { class: "text-item flex-1" }, "核单数量"),
- vue.createElementVNode("view", { class: "text-item flex-1" }, "核单本数"),
- vue.createElementVNode("view", { class: "text-item flex-1" }, "预估金额")
- ])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createElementVNode("view", { class: "list-con" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "flex-a"
- }, [
- vue.createElementVNode(
- "view",
- { class: "text-item flex-1" },
- vue.toDisplayString(item.statDate),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "text-item flex-1" },
- vue.toDisplayString(item.totalNum),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "text-item flex-1" },
- vue.toDisplayString(item.bookNum),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "text-item flex-1" },
- vue.toDisplayString(item.expectAmount),
- 1
- /* TEXT */
- )
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- },
- 512
- /* NEED_PATCH */
- )
- ]);
- }
- const PagesIndexOfflineCheckRecord = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/offline/check-record.vue"]]);
- const props$3 = {
- props: {
- // 内置图标名称,或图片路径,建议绝对路径
- icon: {
- type: String,
- default: props$G.empty.icon
- },
- // 提示文字
- text: {
- type: String,
- default: props$G.empty.text
- },
- // 文字颜色
- textColor: {
- type: String,
- default: props$G.empty.textColor
- },
- // 文字大小
- textSize: {
- type: [String, Number],
- default: props$G.empty.textSize
- },
- // 图标的颜色
- iconColor: {
- type: String,
- default: props$G.empty.iconColor
- },
- // 图标的大小
- iconSize: {
- type: [String, Number],
- default: props$G.empty.iconSize
- },
- // 选择预置的图标类型
- mode: {
- type: String,
- default: props$G.empty.mode
- },
- // 图标宽度,单位px
- width: {
- type: [String, Number],
- default: props$G.empty.width
- },
- // 图标高度,单位px
- height: {
- type: [String, Number],
- default: props$G.empty.height
- },
- // 是否显示组件
- show: {
- type: Boolean,
- default: props$G.empty.show
- },
- // 组件距离上一个元素之间的距离,默认px单位
- marginTop: {
- type: [String, Number],
- default: props$G.empty.marginTop
- }
- }
- };
- const _sfc_main$p = {
- name: "u-empty",
- mixins: [mpMixin, mixin, props$3],
- data() {
- return {
- icons: {
- car: "购物车为空",
- page: "页面不存在",
- search: "没有搜索结果",
- address: "没有收货地址",
- wifi: "没有WiFi",
- order: "订单为空",
- coupon: "没有优惠券",
- favor: "暂无收藏",
- permission: "无权限",
- history: "无历史记录",
- news: "无新闻列表",
- message: "消息列表为空",
- list: "列表为空",
- data: "数据为空",
- comment: "暂无评论"
- }
- };
- },
- computed: {
- // 组件样式
- emptyStyle() {
- const style = {};
- style.marginTop = uni.$u.addUnit(this.marginTop);
- return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style);
- },
- // 文本样式
- textStyle() {
- const style = {};
- style.color = this.textColor;
- style.fontSize = uni.$u.addUnit(this.textSize);
- return style;
- },
- // 判断icon是否图片路径
- isSrc() {
- return this.icon.indexOf("/") >= 0;
- }
- }
- };
- function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "u-empty",
- style: vue.normalizeStyle([$options.emptyStyle])
- },
- [
- !$options.isSrc ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
- key: 0,
- name: _ctx.mode === "message" ? "chat" : `empty-${_ctx.mode}`,
- size: _ctx.iconSize,
- color: _ctx.iconColor,
- "margin-top": "14"
- }, null, 8, ["name", "size", "color"])) : (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- style: vue.normalizeStyle({
- width: _ctx.$u.addUnit(_ctx.width),
- height: _ctx.$u.addUnit(_ctx.height)
- }),
- src: _ctx.icon,
- mode: "widthFix"
- }, null, 12, ["src"])),
- vue.createElementVNode(
- "text",
- {
- class: "u-empty__text",
- style: vue.normalizeStyle([$options.textStyle])
- },
- vue.toDisplayString(_ctx.text ? _ctx.text : $data.icons[_ctx.mode]),
- 5
- /* TEXT, STYLE */
- ),
- _ctx.$slots.default || _ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "u-empty__wrap"
- }, [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ])) : vue.createCommentVNode("v-if", true)
- ],
- 4
- /* STYLE */
- )) : vue.createCommentVNode("v-if", true);
- }
- const __easycom_3$1 = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__scopeId", "data-v-8dd5928e"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-empty/u-empty.vue"]]);
- const _sfc_main$o = {
- __name: "scan-book",
- setup(__props, { expose: __expose }) {
- __expose();
- const searchValue = vue.ref("");
- const scannedISBN = vue.ref("");
- const currentTab = vue.ref(0);
- const tabsList = [
- {
- name: "简介"
- },
- {
- name: "轨迹"
- }
- ];
- const bookInfo = vue.ref(null);
- const handleSearch = () => {
- if (!searchValue.value)
- return;
- loadBookInfo(searchValue.value);
- };
- const handleScan = () => {
- uni.scanCode({
- success: (res2) => {
- searchValue.value = res2.result;
- scannedISBN.value = res2.result;
- loadBookInfo(res2.result);
- }
- });
- };
- const loadBookInfo = (isbn) => {
- uni.$u.http.get(`/app/book/getBookByIsbn/${isbn}`).then((res2) => {
- if (res2.code == 200) {
- bookInfo.value = res2.data;
- }
- });
- };
- onLoad(() => {
- uni.$u.useGlobalEvent((e) => {
- searchValue.value = e.barcode;
- scannedISBN.value = e.barcode;
- loadBookInfo(e.barcode);
- });
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { searchValue, scannedISBN, currentTab, tabsList, bookInfo, handleSearch, handleScan, loadBookInfo, ref: vue.ref, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
- const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
- const _component_u_empty = resolveEasycom(vue.resolveDynamicComponent("u-empty"), __easycom_3$1);
- const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_4$1);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- vue.createCommentVNode(" 顶部搜索框 "),
- vue.createVNode(_component_u_sticky, null, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "search-area" }, [
- vue.createVNode(_component_u_search, {
- modelValue: $setup.searchValue,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.searchValue = $event),
- placeholder: "扫描/输入ISBN或SH码",
- "show-action": true,
- actionText: "查询",
- onSearch: $setup.handleSearch,
- onCustom: $setup.handleSearch
- }, {
- suffixIcon: vue.withCtx(() => [
- $setup.searchValue ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
- key: 0,
- name: "close",
- size: "20",
- onClick: _cache[0] || (_cache[0] = ($event) => $setup.searchValue = "")
- })) : vue.createCommentVNode("v-if", true)
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue"])
- ])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createCommentVNode(" 已扫描ISBN显示 "),
- $setup.scannedISBN ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "isbn-display"
- }, [
- vue.createElementVNode(
- "text",
- null,
- "已查询ISBN:" + vue.toDisplayString($setup.scannedISBN),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 内容区域 "),
- vue.createElementVNode("view", { class: "content" }, [
- vue.createCommentVNode(" 空状态 "),
- !$setup.bookInfo ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "empty-state"
- }, [
- vue.createVNode(_component_u_empty, {
- mode: "data",
- text: "暂无扫描数据",
- "margin-top": "100"
- })
- ])) : (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- [
- vue.createCommentVNode(" 书籍详情 "),
- vue.createElementVNode("view", { class: "book-detail" }, [
- vue.createElementVNode("view", { class: "common-card mb-20" }, [
- vue.createElementVNode("view", { class: "flex flex-d flex-a-c" }, [
- vue.createElementVNode("image", {
- class: "book-image",
- src: $setup.bookInfo.cover,
- mode: "heightFix"
- }, null, 8, ["src"]),
- vue.createElementVNode(
- "text",
- { class: "ml-20 font-15" },
- vue.toDisplayString($setup.bookInfo.bookName),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "book-status" }, [
- vue.createElementVNode(
- "text",
- { class: "status-text" },
- "状态:" + vue.toDisplayString($setup.bookInfo.recycleStatus ? "已加入回收书单" : "未加入回收书单"),
- 1
- /* TEXT */
- ),
- $setup.bookInfo.recycleTime ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "time-text"
- },
- "加入时间:" + vue.toDisplayString($setup.bookInfo.recycleTime),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createCommentVNode(" 基本信息 "),
- vue.createElementVNode("view", { class: "common-card info-section mb-20" }, [
- vue.createElementVNode("view", { class: "price-info" }, [
- vue.createElementVNode("text", { class: "label" }, "定价:"),
- vue.createElementVNode(
- "text",
- { class: "price" },
- "¥" + vue.toDisplayString($setup.bookInfo.price),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "recycle-price" },
- "回收价:¥" + vue.toDisplayString($setup.bookInfo.expectPrice),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "book-info" }, [
- vue.createElementVNode("view", { class: "info-item" }, [
- vue.createElementVNode("text", { class: "label" }, "ISBN:"),
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString($setup.bookInfo.isbn),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-item" }, [
- vue.createElementVNode("text", { class: "label" }, "语言:"),
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString($setup.bookInfo.lang || "-"),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-item" }, [
- vue.createElementVNode("text", { class: "label" }, "作者:"),
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString($setup.bookInfo.author),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-item" }, [
- vue.createElementVNode("text", { class: "label" }, "出版社:"),
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString($setup.bookInfo.publish),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "info-item" }, [
- vue.createElementVNode("text", { class: "label" }, "出版时间:"),
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString($setup.bookInfo.pubDate),
- 1
- /* TEXT */
- )
- ])
- ])
- ]),
- vue.createCommentVNode(" 简介和轨迹 "),
- vue.createElementVNode("view", {
- class: "common-card tabs-section",
- style: { "padding": "0" }
- }, [
- vue.createVNode(_component_u_tabs, {
- list: $setup.tabsList,
- modelValue: $setup.currentTab,
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.currentTab = $event),
- lineColor: "#19be6b"
- }, null, 8, ["modelValue"]),
- vue.createElementVNode("view", { class: "tab-content" }, [
- $setup.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "intro-content"
- }, [
- vue.createElementVNode("text", { class: "section-title" }, "内容简介:"),
- vue.createElementVNode(
- "text",
- { class: "content-text" },
- vue.toDisplayString($setup.bookInfo.contentBlurb),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "section-title" }, "作者简介:"),
- vue.createElementVNode(
- "text",
- { class: "content-text" },
- vue.toDisplayString($setup.bookInfo.anthorBlurb),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "content-text" },
- vue.toDisplayString($setup.bookInfo.catalog),
- 1
- /* TEXT */
- )
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "track-content"
- }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString($setup.bookInfo.track),
- 1
- /* TEXT */
- )
- ]))
- ])
- ])
- ])
- ],
- 2112
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
- ))
- ]),
- vue.createCommentVNode(" 底部扫描按钮 "),
- vue.createElementVNode("view", { class: "fixed-bottom" }, [
- vue.createVNode(_component_u_button, {
- size: "large",
- type: "primary",
- text: "扫码(ISBN或SH码)",
- onClick: $setup.handleScan
- })
- ])
- ]);
- }
- const PagesIndexEntryScanBook = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$n], ["__scopeId", "data-v-04d3117d"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/entry/scan-book.vue"]]);
- const _sfc_main$n = {
- __name: "book-weight",
- setup(__props, { expose: __expose }) {
- __expose();
- const customStyle = {
- height: "100rpx",
- fontSize: "32rpx"
- };
- const labelStyle = {
- fontSize: "32rpx"
- };
- const placeholderStyle2 = vue.ref("fontSize: 32rpx");
- const form = vue.ref({
- weight: "",
- isbn: ""
- });
- const rules2 = {
- weight: [
- {
- required: true,
- message: "请输入重量",
- trigger: "blur"
- },
- {
- type: "number",
- message: "重量必须是数字",
- trigger: "blur"
- }
- ],
- isbn: [{
- required: true,
- message: "请输入ISBN",
- trigger: "blur"
- }]
- };
- function handleScan() {
- uni.scanCode({
- success: (res2) => {
- form.value.isbn = res2.result;
- }
- });
- }
- const formRef = vue.ref(null);
- const submitForm = () => {
- formRef.value.validate().then((valid) => {
- if (valid) {
- uni.$u.http.post("/app/weighChangeLog/add", form.value).then((res2) => {
- if (res2.code == 200) {
- uni.$u.toast("修改成功");
- form.value.isbn = "";
- form.value.weight = "";
- } else {
- uni.$u.toast(res2.msg);
- }
- });
- }
- });
- };
- onLoad(() => {
- uni.$u.useGlobalEvent((e) => {
- form.value.isbn = e.barcode;
- });
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { customStyle, labelStyle, placeholderStyle: placeholderStyle2, form, rules: rules2, handleScan, formRef, submitForm, ref: vue.ref, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
- const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
- const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$6);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- const _directive_permission = vue.resolveDirective("permission");
- return vue.openBlock(), vue.createElementBlock("view", { class: "common-page" }, [
- vue.createVNode(_component_u_form, {
- model: $setup.form,
- rules: $setup.rules,
- ref: "formRef",
- labelWidth: "90px",
- errorType: "toast",
- labelStyle: $setup.labelStyle
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_form_item, {
- label: "重量(克)",
- prop: "weight",
- required: ""
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- placeholderStyle: $setup.placeholderStyle,
- customStyle: $setup.customStyle,
- modelValue: $setup.form.weight,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.weight = $event),
- placeholder: "请输入数值",
- clearable: ""
- }, null, 8, ["placeholderStyle", "modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- label: "ISBN",
- prop: "isbn",
- required: ""
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- placeholderStyle: $setup.placeholderStyle,
- customStyle: $setup.customStyle,
- modelValue: $setup.form.isbn,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.isbn = $event),
- placeholder: "请输入编码",
- clearable: ""
- }, null, 8, ["placeholderStyle", "modelValue"])
- ]),
- _: 1
- /* STABLE */
- })
- ]),
- _: 1
- /* STABLE */
- }, 8, ["model"]),
- vue.createElementVNode("view", { class: "fixed-bottom" }, [
- vue.createVNode(_component_u_button, {
- size: "large",
- type: "warning",
- text: "扫码",
- onClick: $setup.handleScan
- }),
- vue.withDirectives(vue.createVNode(
- _component_u_button,
- {
- size: "large",
- type: "success",
- text: "提交",
- onClick: $setup.submitForm
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [_directive_permission, "app:entry:bookWeight:confirm"]
- ])
- ])
- ]);
- }
- const PagesIndexEntryBookWeight = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/entry/book-weight.vue"]]);
- const placeholderStyle = "font-size:32rpx";
- const _sfc_main$m = {
- __name: "commodity-scan",
- setup(__props, { expose: __expose }) {
- __expose();
- const customStyle = vue.reactive({
- height: "90rpx"
- });
- const form = vue.ref({
- "isbn": ""
- });
- function scanCode() {
- uni.scanCode({
- success: (res2) => {
- form.value.isbn = res2.result;
- handleSubmit();
- },
- fail: (err) => {
- uni.$u.toast("扫码失败");
- }
- });
- }
- function handleSubmit() {
- if (!form.value.isbn)
- return uni.$u.toast("请输入ISBN");
- uni.$u.http.post("/app/book/bookPushErp", form.value).then((res2) => {
- formatAppLog("log", "at pages/index/entry/commodity-scan.vue:55", res2);
- if (res2.code == 200) {
- let text = form.value.isbn + res2.msg;
- uni.$u.ttsModule.speak(text);
- form.value.isbn = "";
- } else {
- uni.$u.ttsModule.speak(res2.msg);
- }
- }).catch((err) => {
- uni.$u.toast("提交失败,请重试");
- });
- }
- onLoad(() => {
- uni.$u.useGlobalEvent((e) => {
- if (e.barcode) {
- form.value.isbn = e.barcode;
- handleSubmit();
- }
- });
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- const __returned__ = { placeholderStyle, customStyle, form, scanCode, handleSubmit, reactive: vue.reactive, ref: vue.ref, get onLoad() {
- return onLoad;
- }, get onShow() {
- return onShow;
- }, get onUnload() {
- return onUnload;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- 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, {
- customStyle: $setup.customStyle,
- "placeholder-style": $setup.placeholderStyle,
- modelValue: $setup.form.isbn,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.isbn = $event),
- placeholder: "扫描ISBN",
- border: "surround"
- }, null, 8, ["customStyle", "modelValue"]),
- vue.createVNode(_component_u_button, {
- customStyle: $setup.customStyle,
- type: "info",
- color: "#a4adb3",
- onClick: $setup.handleSubmit,
- text: "提交"
- }, null, 8, ["customStyle"])
- ])
- ]),
- vue.createElementVNode("view", { class: "fixed-bottom" }, [
- vue.createVNode(_component_u_button, {
- size: "large",
- type: "success",
- onClick: $setup.scanCode,
- text: "扫码",
- class: "scan-button"
- })
- ])
- ]);
- }
- const PagesIndexEntryCommodityScan = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-9a4165f6"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/entry/commodity-scan.vue"]]);
- const props$2 = {
- props: {
- // 显示文字
- title: {
- type: String,
- default: props$G.alert.title
- },
- // 主题,success/warning/info/error
- type: {
- type: String,
- default: props$G.alert.type
- },
- // 辅助性文字
- description: {
- type: String,
- default: props$G.alert.description
- },
- // 是否可关闭
- closable: {
- type: Boolean,
- default: props$G.alert.closable
- },
- // 是否显示图标
- showIcon: {
- type: Boolean,
- default: props$G.alert.showIcon
- },
- // 浅或深色调,light-浅色,dark-深色
- effect: {
- type: String,
- default: props$G.alert.effect
- },
- // 文字是否居中
- center: {
- type: Boolean,
- default: props$G.alert.center
- },
- // 字体大小
- fontSize: {
- type: [String, Number],
- default: props$G.alert.fontSize
- }
- }
- };
- const _sfc_main$l = {
- name: "u-alert",
- mixins: [mpMixin, mixin, props$2],
- 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$k(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
- 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_3 = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__scopeId", "data-v-158e540a"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-alert/u-alert.vue"]]);
- const _sfc_main$k = {
- __name: "logistics-detail",
- setup(__props, { expose: __expose }) {
- __expose();
- const logisticsInfo = vue.ref([]);
- function getLogisticsDetail(orderId) {
- uni.$u.http.get(`/app/orderinfo/getOrderExpressList?orderId=${orderId}`).then((res2) => {
- if (res2.code == 200) {
- logisticsInfo.value = res2.data;
- }
- });
- }
- function handleButtonClick(status, reason) {
- uni.$u.http.post("/app/orderexception/update", {
- id: id.value,
- checkStatus: status,
- refusalReason: reason
- }).then((res2) => {
- if (res2.code == 200) {
- checkStatus.value = status;
- uni.$u.toast("操作成功");
- emit("refresh");
- } else {
- uni.$u.toast(res2.msg);
- }
- });
- }
- const checkStatus = vue.ref(0);
- const id = vue.ref(0);
- onLoad((e) => {
- checkStatus.value = e.status;
- id.value = e.id;
- getLogisticsDetail(e.orderId);
- });
- const __returned__ = { logisticsInfo, getLogisticsDetail, handleButtonClick, checkStatus, id, ref: vue.ref, get onLoad() {
- return onLoad;
- }, 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_3);
- const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- 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: `物流公司:京东快递`,
- type: "warning"
- })
- ]),
- _: 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, (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: "title" },
- vue.toDisplayString(item.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "desc" },
- vue.toDisplayString(item.description),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "time" },
- vue.toDisplayString(item.time),
- 1
- /* TEXT */
- )
- ]),
- index2 < $setup.logisticsInfo.length - 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "timeline-line"
- })) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createCommentVNode(" 底部操作按钮 "),
- $setup.checkStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "fixed-bottom"
- }, [
- vue.createVNode($setup["RejectButton"], {
- size: "large",
- onReject: _cache[0] || (_cache[0] = (reason) => $setup.handleButtonClick(3, reason))
- }),
- vue.createVNode($setup["ApproveButton"], {
- size: "large",
- onApprove: _cache[1] || (_cache[1] = ($event) => $setup.handleButtonClick(2))
- })
- ])) : vue.createCommentVNode("v-if", true)
- ]);
- }
- const PagesIndexExpressLogisticsDetail = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-8e52fe94"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/express/logistics-detail.vue"]]);
- const _imports_0 = "/static/img/location.png";
- const _imports_1 = "/static/img/location-active.png";
- const _sfc_main$j = {
- __name: "task-detail",
- setup(__props, { expose: __expose }) {
- __expose();
- const currentTask = vue.ref(0);
- const totalTasks = vue.ref(0);
- const curTaskInfo = vue.ref({});
- const nextLocation = vue.ref("");
- const orderList = vue.ref([]);
- const ttsModule2 = vue.ref(null);
- const taskCode = vue.ref("");
- onUnload(() => {
- uni.$u.ttsModule.stop();
- uni.$u.cleanupOnPageUnload();
- });
- function playGlobalSound() {
- uni.$u.playClickSound();
- }
- const searchText = vue.ref("");
- const badList = vue.ref([]);
- const handleNextTask = () => {
- if (currentTask.value < totalTasks.value) {
- currentTask.value++;
- if (currentTask.value == totalTasks.value) {
- uni.$u.ttsModule.speak("任务完成");
- } else {
- curTaskInfo.value = orderList.value[currentTask.value];
- badList.value = curTaskInfo.value.detailVoList || [];
- let nextInfo = orderList.value[currentTask.value + 1];
- nextLocation.value = nextInfo.positionCode;
- }
- }
- };
- const onSearch = () => {
- uni.$u.http.get(`/app/appstock/getStockTaskDetail?taskCode=${taskCode.value}`).then((res2) => {
- if (res2.code == 200) {
- orderList.value = res2.data;
- totalTasks.value = res2.data.length;
- curTaskInfo.value = res2.data[currentTask.value];
- badList.value = curTaskInfo.value.detailVoList || [];
- }
- });
- };
- const confirmStockTask = () => {
- const params = {
- positionCode: curTaskInfo.value.positionCode,
- orderId: curTaskInfo.value.orderId,
- taskCode: taskCode.value
- };
- uni.$u.http.post("/app/appstock/setStockTask", params).then((res2) => {
- if (res2.code === 200) {
- curTaskInfo.value.isCompleted = true;
- orderList.value[currentTask.value] = curTaskInfo.value;
- handleNextTask();
- isFirstScan.value = false;
- uni.$u.ttsModule.speak("下架成功");
- } else {
- uni.showToast({
- title: res2.msg,
- icon: "error"
- });
- }
- });
- };
- const unlockTask = () => {
- uni.$u.http.post("/app/appstock/unlockStockTask?taskCode=" + taskCode.value).then((res2) => {
- if (res2.code == 200) {
- uni.showToast({
- title: "解锁成功",
- icon: "success"
- });
- } else {
- uni.showToast({
- title: res2.msg || "解锁失败",
- icon: "error"
- });
- }
- });
- };
- const onSubmit = () => {
- uni.showModal({
- title: "确认提示",
- content: "是否确认提交本次下架?",
- success: (res2) => {
- playGlobalSound();
- if (res2.confirm) {
- uni.navigateBack();
- uni.$u.ttsModule.speak("任务已提交");
- unlockTask();
- }
- }
- });
- };
- function goBack() {
- uni.showModal({
- title: "确认提示",
- content: "是否确认放弃本次下架?",
- success: (res2) => {
- playGlobalSound();
- if (res2.confirm) {
- uni.navigateBack();
- uni.$u.ttsModule.speak("任务已放弃");
- unlockTask();
- }
- }
- });
- }
- let isFirstScan = vue.ref(false);
- const checkScanText = (scanText) => {
- formatAppLog("log", "at pages/index/wms/task-detail.vue:227", scanText, "scanText");
- let length = scanText ? scanText.length : 0;
- let isPositionCode = scanText.indexOf("-") > -1 && length == 9;
- let isWaybillCode = /^(?=.*[A-Z])(?=.*\d)[A-Z0-9]+$/.test(scanText);
- let isOrderId = /^\d+$/.test(scanText);
- if (isPositionCode) {
- let positionCode = curTaskInfo.value.positionCode;
- if (positionCode != scanText) {
- uni.showToast({
- title: "库位号不正确",
- icon: "error"
- });
- } else {
- isFirstScan.value = true;
- curTaskInfo.value.isValid = true;
- }
- }
- if (!isFirstScan.value) {
- uni.$u.ttsModule.speak("请先校验库位号");
- return;
- }
- if (isWaybillCode || isOrderId) {
- let waybillCode = curTaskInfo.value.waybillCode;
- let orderId = curTaskInfo.value.orderId;
- if (waybillCode == scanText || orderId == scanText) {
- confirmStockTask();
- } else {
- uni.showToast({
- title: "订单号或物流号不匹配",
- icon: "error"
- });
- curTaskInfo.value.isValid = true;
- }
- }
- };
- const openScan = () => {
- uni.scanCode({
- success: (res2) => {
- searchText.value = res2.result;
- checkScanText(res2.result);
- },
- fail: (err) => {
- uni.showToast({
- title: "扫码失败",
- icon: "error"
- });
- }
- });
- };
- onLoad((opts) => {
- taskCode.value = opts.taskCode;
- onSearch();
- uni.$u.useGlobalEvent((e) => {
- if (e.barcode) {
- searchText.value = e.barcode;
- checkScanText(e.barcode);
- }
- });
- });
- onShow(() => {
- uni.$u.updateActivePageOnShow();
- });
- const __returned__ = { currentTask, totalTasks, curTaskInfo, nextLocation, orderList, ttsModule: ttsModule2, taskCode, playGlobalSound, searchText, badList, handleNextTask, onSearch, confirmStockTask, unlockTask, onSubmit, goBack, get isFirstScan() {
- return isFirstScan;
- }, set isFirstScan(v) {
- isFirstScan = v;
- }, checkScanText, openScan, ref: vue.ref, onMounted: vue.onMounted, BadOutCard, get onLoad() {
- return onLoad;
- }, get onUnload() {
- return onUnload;
- }, get onShow() {
- return onShow;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$9);
- const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
- const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_3);
- const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$3);
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "container",
- onClick: $setup.playGlobalSound
- }, [
- vue.createCommentVNode(" 顶部导航栏 "),
- vue.createVNode(_component_u_navbar, {
- title: "下架任务",
- border: false,
- fixed: "",
- "safe-area-inset-top": ""
- }, {
- left: vue.withCtx(() => [
- vue.createVNode(_component_u_icon, {
- name: "arrow-left",
- color: "#333333",
- size: "20",
- onClick: $setup.goBack
- })
- ]),
- right: vue.withCtx(() => [
- vue.createVNode(_component_u_text, {
- type: "primary",
- text: "提交",
- onClick: $setup.onSubmit
- })
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createCommentVNode(" 任务进度 "),
- vue.createElementVNode("view", { class: "progress-section" }, [
- vue.createVNode(_component_u_alert, {
- title: "当前任务",
- type: "info",
- center: ""
- }),
- vue.createElementVNode("view", {
- class: "flex flex-j-c pad-10",
- style: { "padding-right": "40rpx" }
- }, [
- vue.createCommentVNode(' <view class="next-task" @click="handleNextTask">\n <text>上一个</text>\n </view> '),
- vue.createElementVNode("view", { class: "flex-c" }, [
- vue.createElementVNode("text", null, [
- vue.createTextVNode(
- vue.toDisplayString($setup.currentTask),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "progress-text font-20 color-green" },
- "/" + vue.toDisplayString($setup.totalTasks),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createCommentVNode(' <view class="color-green" @click="handleNextTask">\n <text>下一个</text>\n </view> ')
- ])
- ]),
- vue.createCommentVNode(" 库位信息 "),
- vue.createElementVNode("view", {
- class: "flex flex-j-b pad-10 next-location",
- style: { "padding-right": "40rpx", "align-items": "center" }
- }, [
- vue.createElementVNode(
- "view",
- { class: "font-14 mb-20" },
- vue.toDisplayString($setup.currentTask + 1) + "/" + vue.toDisplayString($setup.totalTasks),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "flex-d" }, [
- vue.createElementVNode(
- "view",
- { class: "font-20 text-center" },
- vue.toDisplayString($setup.curTaskInfo.positionCode),
- 1
- /* TEXT */
- ),
- $setup.nextLocation ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "location-detail font-13 mt-10"
- },
- "下一库位 " + vue.toDisplayString($setup.nextLocation || "无"),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- !$setup.curTaskInfo.isValid ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: _imports_0,
- mode: "widthFix",
- style: { "width": "70rpx", "height": "70rpx" }
- })) : (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- src: _imports_1,
- mode: "widthFix",
- style: { "width": "70rpx", "height": "70rpx" }
- }))
- ]),
- vue.createCommentVNode(" 订单信息 "),
- vue.createElementVNode("view", { class: "order-info" }, [
- vue.createElementVNode(
- "view",
- { class: "info-item" },
- "订单编号:" + vue.toDisplayString($setup.curTaskInfo.orderId),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "info-item" },
- "物流单号:" + vue.toDisplayString($setup.curTaskInfo.waybillCode || "-"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "info-item" },
- "不良数量:" + vue.toDisplayString($setup.curTaskInfo.badNum),
- 1
- /* TEXT */
- )
- ]),
- vue.createCommentVNode(" 极差商品列表 "),
- vue.createElementVNode("view", { class: "bad-list" }, [
- vue.createElementVNode("view", { class: "list-title mb-6 mt-20" }, "极差"),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.badList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
- vue.createVNode($setup["BadOutCard"], { item }, null, 8, ["item"])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createCommentVNode(" 底部搜索框 "),
- vue.createElementVNode("view", {
- class: "fixed-bottom pad-20",
- style: { "background": "#ffffff" }
- }, [
- vue.createVNode(_component_u_search, {
- modelValue: $setup.searchText,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
- placeholder: "请输入订单编号/物流单号/库位号",
- "show-action": false,
- clearabled: true,
- onSearch: _cache[1] || (_cache[1] = ($event) => $setup.checkScanText($setup.searchText)),
- height: "40"
- }, null, 8, ["modelValue"]),
- vue.createVNode(_component_u_icon, {
- name: "scan",
- size: "28",
- color: "#19be6b",
- onClick: $setup.openScan
- })
- ])
- ]);
- }
- const PagesIndexWmsTaskDetail = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__scopeId", "data-v-ca763ad9"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/task-detail.vue"]]);
- const _sfc_main$i = {
- __name: "speedy-check-add",
- setup(__props, { expose: __expose }) {
- __expose();
- const location2 = vue.ref("");
- const products = vue.ref([]);
- const orderNum = vue.ref("");
- const godownName = vue.ref("");
- const getOrderByPositionCode = (positionCode) => {
- uni.$u.http.get("/app/stock/getOrderByPositionCode?positionCode=" + positionCode).then((res2) => {
- if (res2.code === 200) {
- const data = res2.data;
- orderNum.value = data.orderNum;
- godownName.value = data.godownName;
- products.value = data.godownStockLogResults || [];
- products.value.forEach((item) => {
- item.checked = false;
- });
- } else {
- uni.$u.toast(res2.msg);
- }
- });
- };
- onLoad((options) => {
- if (options.location) {
- location2.value = options.location;
- getOrderByPositionCode(options.location);
- }
- });
- const isAllSelected = vue.computed(() => {
- return products.value.length > 0 && products.value.every((item) => item.checked);
- });
- const toggleItemSelect = (item) => {
- item.checked = !item.checked;
- };
- const toggleSelectAll = () => {
- const newState = !isAllSelected.value;
- products.value.forEach((item) => {
- item.checked = newState;
- });
- };
- const onSubmit = () => {
- const selectedItems = products.value.filter((item) => item.checked);
- uni.$emit("selectedProducts", selectedItems);
- goBack();
- };
- const goBack = () => {
- uni.navigateBack({
- delta: 1
- });
- };
- const __returned__ = { location: location2, products, orderNum, godownName, getOrderByPositionCode, isAllSelected, toggleItemSelect, toggleSelectAll, onSubmit, goBack, ref: vue.ref, computed: vue.computed, get onLoad() {
- return onLoad;
- }, get onUnload() {
- return onUnload;
- }, LocationOrderItem };
- 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$f);
- const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "container",
- style: { "padding-top": "84px", "padding-bottom": "10px" }
- }, [
- vue.createVNode(_component_u_navbar, {
- title: "选择商品",
- border: false,
- fixed: "",
- "safe-area-inset-top": "",
- bgColor: "#22ac38",
- titleStyle: "font-size:36rpx;color:#fff"
- }, {
- left: vue.withCtx(() => [
- vue.createVNode(_component_u_icon, {
- name: "arrow-left",
- color: "#fff",
- size: "20",
- onClick: $setup.goBack
- })
- ]),
- right: vue.withCtx(() => [
- vue.createElementVNode("text", {
- style: { "color": "#ffffff" },
- onClick: $setup.onSubmit
- }, "确定")
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createCommentVNode(" 库位显示 "),
- vue.createElementVNode("view", { class: "location-info" }, [
- vue.createElementVNode(
- "text",
- null,
- "库位: " + vue.toDisplayString($setup.location),
- 1
- /* TEXT */
- ),
- $setup.godownName ? (vue.openBlock(), vue.createElementBlock(
- "text",
- { key: 0 },
- "仓库: " + vue.toDisplayString($setup.godownName),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- $setup.orderNum ? (vue.openBlock(), vue.createElementBlock(
- "text",
- { key: 1 },
- "订单号: " + vue.toDisplayString($setup.orderNum),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createCommentVNode(" 订单列表 "),
- vue.createElementVNode("view", { class: "product-details" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.products, (item, index2) => {
- return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
- isCheck: "",
- key: index2,
- item,
- onSelect: $setup.toggleItemSelect,
- isLink: false
- }, null, 8, ["item"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createCommentVNode(" 底部全选栏 "),
- vue.createElementVNode("view", { class: "fixed-bottom" }, [
- vue.createElementVNode("view", {
- class: "select-all",
- onClick: $setup.toggleSelectAll
- }, [
- vue.createVNode(_component_u_icon, {
- name: $setup.isAllSelected ? "checkmark-circle-fill" : "checkmark-circle",
- color: $setup.isAllSelected ? "#19be6b" : "#c8c9cc",
- size: "28"
- }, null, 8, ["name", "color"]),
- vue.createElementVNode("text", { class: "select-text" }, "全选")
- ]),
- vue.createElementVNode(
- "text",
- { class: "order-count" },
- "订单总数: " + vue.toDisplayString($setup.products.length),
- 1
- /* TEXT */
- )
- ])
- ]);
- }
- const PagesIndexWmsSpeedyCheckAdd = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-dabb4347"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/index/wms/speedy-check-add.vue"]]);
- const _sfc_main$h = {
- __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: "无"
- });
- function getUserInfo() {
- uni.$u.http.get("/app/appUser/getUserInfoById").then((res2) => {
- if (res2.code == 200) {
- userInfo.value = res2.data;
- }
- });
- }
- getUserInfo();
- function setAvatar(avatarfile) {
- uni.$u.http.post("/app/appUser/setAvatar?avatarfile=" + avatarfile).then((res2) => {
- if (res2.code == 200) {
- userInfo.value.avatar = avatarfile;
- uni.showToast({
- title: "头像设置成功",
- icon: "success"
- });
- }
- });
- }
- const handleEditAvatar = () => {
- const token = uni.getStorageSync("token");
- uni.chooseImage({
- count: 1,
- success: (res2) => {
- const filePath = res2.tempFilePaths[0];
- uni.uploadFile({
- url: `${baseUrl}/common/upload`,
- filePath,
- name: "file",
- header: {
- "Authorization": token
- },
- success: (uploadRes) => {
- const data = JSON.parse(uploadRes.data);
- if (data.code === 200) {
- setAvatar(data.url);
- } else {
- uni.showToast({
- title: "上传失败",
- icon: "none"
- });
- }
- },
- fail: () => {
- uni.showToast({
- title: "上传失败",
- icon: "none"
- });
- }
- });
- }
- });
- };
- const __returned__ = { userInfo, getUserInfo, setAvatar, handleEditAvatar, ref: vue.ref, get baseUrl() {
- return baseUrl;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$c);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- 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$4);
- 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: $setup.userInfo.avatar
- }, null, 8, ["src"]),
- 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.nickName || "无"
- }, null, 8, ["value"]),
- vue.createVNode(_component_u_cell, {
- title: "性别",
- value: $setup.userInfo.sex == 0 ? "男" : $setup.userInfo.sex == 1 ? "女" : "未知"
- }, 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.userName
- }, 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.loginDate || "--",
- 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.phonenumber
- }, 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$h, [["render", _sfc_render$g], ["__scopeId", "data-v-804eca28"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/my/page/user-info.vue"]]);
- const _sfc_main$g = {
- __name: "warehouse",
- setup(__props, { expose: __expose }) {
- __expose();
- const showPicker = vue.ref(false);
- const selectedWarehouse = vue.ref("");
- const warehouseList = vue.ref([]);
- const getWarehouseList = () => {
- uni.$u.http.post("/app/appUser/searchGodown?name=").then((res2) => {
- if (res2.code == 200) {
- warehouseList.value = res2.data.filter((v) => v.useStatus == 1).map((v) => ({
- text: v.godownName,
- value: v.id
- }));
- }
- });
- };
- onLoad(() => {
- getWarehouseList();
- getWarehouse();
- });
- getWarehouseList();
- const getWarehouse = () => {
- uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
- var _a;
- if (res2.code == 200) {
- selectedWarehouse.value = (_a = res2.data) == null ? void 0 : _a.godownName;
- }
- });
- };
- const saveWarehouse = (godownId) => {
- uni.$u.http.post("/app/appUser/bingowGodown?godownId=" + godownId).then((res2) => {
- if (res2.code == 200) {
- uni.showToast({
- title: "设置默认仓库成功",
- icon: "success"
- });
- }
- });
- };
- const onConfirm = (e) => {
- const [{
- value: value2,
- text
- }] = e.value;
- selectedWarehouse.value = text;
- showPicker.value = false;
- formatAppLog("log", "at pages/my/page/warehouse.vue:81", e, "xxxxxx");
- saveWarehouse(value2);
- };
- const __returned__ = { showPicker, selectedWarehouse, warehouseList, getWarehouseList, getWarehouse, saveWarehouse, onConfirm, ref: vue.ref, get onLoad() {
- return onLoad;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$2);
- 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$g, [["render", _sfc_render$f], ["__scopeId", "data-v-972eecda"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/my/page/warehouse.vue"]]);
- const _sfc_main$f = {
- __name: "school",
- setup(__props, { expose: __expose }) {
- __expose();
- const schoolName = vue.ref("");
- const schoolList = vue.ref([]);
- const getSchoolList = () => {
- uni.$u.http.get("/app/appConf/getPadSchoolBroadcast").then((res2) => {
- if (res2.code == 200) {
- schoolList.value = res2.data;
- }
- });
- };
- getSchoolList();
- const handleSubmit = () => {
- if (schoolList.value.length === 0) {
- uni.$u.toast("请至少添加一所学校");
- return;
- }
- uni.$u.http.post("/app/appConf/setPadSchoolBroadcast", schoolList.value).then((res2) => {
- if (res2.code == 200) {
- uni.showToast({
- title: "设置成功",
- icon: "success"
- });
- }
- });
- };
- const handleAddSchool = () => {
- if (!schoolName.value.trim()) {
- uni.$u.toast("请输入学校名称");
- return;
- }
- schoolList.value.push({
- schoolName: schoolName.value,
- id: ""
- });
- schoolName.value = "";
- };
- const handleRemoveSchool = (index2) => {
- schoolList.value.splice(index2, 1);
- };
- const __returned__ = { schoolName, schoolList, getSchoolList, handleSubmit, handleAddSchool, handleRemoveSchool, ref: vue.ref };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$f);
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
- const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- 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.schoolName,
- closable: "",
- size: "large"
- }, null, 8, ["text"])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createCommentVNode(" 底部提交按钮 "),
- vue.createElementVNode("view", { class: "fixed-bottom" }, [
- vue.createVNode(_component_u_button, {
- size: "large",
- type: "success",
- block: "",
- onClick: $setup.handleSubmit
- }, {
- default: vue.withCtx(() => [
- vue.createTextVNode("提交")
- ]),
- _: 1
- /* STABLE */
- })
- ])
- ]);
- }
- const PagesMyPageSchool = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__scopeId", "data-v-6d6c87ab"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/my/page/school.vue"]]);
- const _sfc_main$e = {
- __name: "audit-unfinished",
- setup(__props, { expose: __expose }) {
- __expose();
- const list = vue.ref([]);
- const updateList = (newList) => {
- list.value = newList;
- };
- const __returned__ = { list, updateList, orderItem, pageScroll, ref: vue.ref };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "audit-list" }, [
- vue.createVNode($setup["pageScroll"], {
- requestStr: "/app/orderinfo/myNeedCheckOrder",
- onUpdateList: $setup.updateList
- }, {
- default: vue.withCtx(() => [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($setup.list, (item, index2) => {
- return vue.openBlock(), vue.createBlock($setup["orderItem"], {
- key: index2,
- item
- }, null, 8, ["item"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- _: 1
- /* STABLE */
- })
- ]);
- }
- const PagesMyPageAuditUnfinished = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/my/page/audit-unfinished.vue"]]);
- const _sfc_main$d = {
- __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$c(_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$4);
- 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$d, [["render", _sfc_render$c], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/my/page/version.vue"]]);
- const props$1 = {
- props: {
- // 是否为加载中状态
- loading: {
- type: Boolean,
- default: props$G.switch.loading
- },
- // 是否为禁用装填
- disabled: {
- type: Boolean,
- default: props$G.switch.disabled
- },
- // 开关尺寸,单位px
- size: {
- type: [String, Number],
- default: props$G.switch.size
- },
- // 打开时的背景颜色
- activeColor: {
- type: String,
- default: props$G.switch.activeColor
- },
- // 关闭时的背景颜色
- inactiveColor: {
- type: String,
- default: props$G.switch.inactiveColor
- },
- // 通过v-model双向绑定的值
- modelValue: {
- type: [Boolean, String, Number],
- default: props$G.switch.value
- },
- // switch打开时的值
- activeValue: {
- type: [String, Number, Boolean],
- default: props$G.switch.activeValue
- },
- // switch关闭时的值
- inactiveValue: {
- type: [String, Number, Boolean],
- default: props$G.switch.inactiveValue
- },
- // 是否开启异步变更,开启后需要手动控制输入值
- asyncChange: {
- type: Boolean,
- default: props$G.switch.asyncChange
- },
- // 圆点与外边框的距离
- space: {
- type: [String, Number],
- default: props$G.switch.space
- }
- }
- };
- const _sfc_main$c = {
- name: "u-switch",
- mixins: [mpMixin, mixin, props$1],
- 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$b(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
- 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$c, [["render", _sfc_render$b], ["__scopeId", "data-v-6ab257b3"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-switch/u-switch.vue"]]);
- const props = {
- props: {
- // 最小可选值
- min: {
- type: [Number, String],
- default: props$G.slider.min
- },
- // 最大可选值
- max: {
- type: [Number, String],
- default: props$G.slider.max
- },
- // 步长,取值必须大于 0,并且可被(max - min)整除
- step: {
- type: [Number, String],
- default: props$G.slider.step
- },
- // 当前取值
- value: {
- type: [Number, String],
- default: props$G.slider.value
- },
- // 滑块右侧已选择部分的背景色
- activeColor: {
- type: String,
- default: props$G.slider.activeColor
- },
- // 滑块左侧未选择部分的背景色
- inactiveColor: {
- type: String,
- default: props$G.slider.inactiveColor
- },
- // 滑块的大小,取值范围为 12 - 28
- blockSize: {
- type: [Number, String],
- default: props$G.slider.blockSize
- },
- // 滑块的颜色
- blockColor: {
- type: String,
- default: props$G.slider.blockColor
- },
- // 禁用状态
- disabled: {
- type: Boolean,
- default: props$G.slider.disabled
- },
- // 是否显示当前的选择值
- showValue: {
- type: Boolean,
- default: props$G.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", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/uni_modules/uview-plus/components/u-slider/u-slider.vue"]]);
- class VolumeTTS {
- constructor(opts) {
- __publicField(this, "ttsParams", {
- lang: "zh-CN",
- speed: 1,
- // 将 0-10 转换为 0-1
- pitch: 1,
- // 将 0-10 转换为 0-1
- volume: 1
- });
- __publicField(this, "TTSModule");
- __publicField(this, "platform", uni.getSystemInfoSync().platform);
- let audioConfig = uni.getStorageSync("audioConfig");
- if (opts) {
- this.ttsParams = opts;
- } else if (audioConfig) {
- this.ttsParams = {
- lang: "zh-CN",
- speed: audioConfig.audioSpeed / 10,
- pitch: audioConfig.audioVolume,
- volume: 1
- };
- }
- this.init();
- }
- init() {
- this.TTSModule = requireNativePlugin("nrb-tts-plugin");
- this.TTSModule && this.TTSModule.init(
- {
- lang: "zh",
- country: "CN"
- },
- (res2) => {
- if (res2.success == 0) {
- formatAppLog("log", "at utils/VolumeTTS.js:39", "TTS初始化成功");
- }
- }
- );
- }
- //加一个text的预处理,将text中的数字替换成 零一二三四五六七八九十
- preprocessText(text) {
- const digitMap = {
- 0: "零",
- 1: "一",
- 2: "二",
- 3: "三",
- 4: "四",
- 5: "五",
- 6: "六",
- 7: "七",
- 8: "八",
- 9: "九"
- };
- return text.replace(/\d+/g, (match) => {
- return match.split("").map((digit) => digitMap[digit] || digit).join("");
- });
- }
- speak(text) {
- text = this.preprocessText(text);
- let opts = this.platform == "ios" ? {
- rate: this.ttsParams.speed,
- lang: "zh-CN",
- volume: 1
- } : {
- pitch: this.ttsParams.pitch,
- speechRate: this.ttsParams.speed,
- queueMode: 1
- };
- this.TTSModule.speak(text, opts, (e) => {
- formatAppLog("log", "at utils/VolumeTTS.js:98", e, "读取成功");
- });
- }
- stop() {
- if (this.TTSModule) {
- this.TTSModule.stop();
- }
- }
- destroy() {
- this.stop();
- this.TTSModule = null;
- this.ttsParams = {
- lang: "zh-CN",
- speed: 1,
- pitch: 1,
- volume: 1
- };
- }
- }
- const _sfc_main$a = {
- __name: "volume",
- setup(__props, { expose: __expose }) {
- __expose();
- const settings = vue.ref({
- audioStartSwitch: true,
- audioStart: "书嗨,不辜负每一个爱书的人",
- audioSpeed: 10,
- audioVolume: 5,
- audioPlay: false,
- audioClick: false
- });
- function changeSpeed(value2) {
- settings.value.audioSpeed = value2;
- }
- function changeVolume(value2) {
- settings.value.audioVolume = value2;
- }
- const getVoiceBroadcast = () => {
- uni.$u.http.get("/app/appConf/getAudioConfig").then((res2) => {
- if (res2.code == 200) {
- settings.value = res2.data;
- }
- });
- };
- getVoiceBroadcast();
- const saveVoiceBroadcast = () => {
- uni.$u.http.post("/app/appConf/setAudioConfig", settings.value).then((res2) => {
- if (res2.code == 200) {
- uni.showToast({
- title: "设置成功",
- icon: "success"
- });
- initTTS();
- }
- });
- };
- const tts = vue.ref(null);
- const initTTS = () => {
- let params = {
- speed: settings.value.audioSpeed / 10,
- // 将 0-10 转换为 0-1
- pitch: settings.value.audioVolume,
- // 将 0-10 转换为 0-1
- volume: 1
- };
- tts.value = new VolumeTTS(params);
- settings.value.audioStartSwitch && tts.value.speak(settings.value.audioStart);
- };
- function stopPlayback() {
- tts.value && tts.value.stop();
- uni.showToast({
- title: "已停止播放",
- icon: "none"
- });
- }
- function restartApp() {
- uni.showModal({
- title: "提示",
- content: "确定要重启应用吗?",
- success: function(res2) {
- if (res2.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:205", "加载设置失败:", error2);
- }
- }
- function playClickSound2() {
- if (!settings.audioClick)
- return;
- const audio = uni.createInnerAudioContext();
- audio.src = "/static/audio/click.mp3";
- audio.play();
- }
- vue.onMounted(async () => {
- loadSettings();
- });
- onUnload(() => {
- tts.value && tts.value.destroy();
- });
- const __returned__ = { settings, changeSpeed, changeVolume, getVoiceBroadcast, saveVoiceBroadcast, tts, initTTS, stopPlayback, restartApp, loadSettings, playClickSound: playClickSound2, ref: vue.ref, reactive: vue.reactive, onMounted: vue.onMounted, get VolumeTTS() {
- return VolumeTTS;
- }, get onUnload() {
- return onUnload;
- } };
- 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$4);
- const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$3);
- const _component_u_slider = resolveEasycom(vue.resolveDynamicComponent("u-slider"), __easycom_4);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- 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.audioPlay,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.settings.audioPlay = $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.audioClick,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.settings.audioClick = $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.audioStartSwitch,
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.settings.audioStartSwitch = $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.audioStart,
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.settings.audioStart = $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, {
- value: $setup.settings.audioSpeed,
- max: 20,
- min: 5,
- step: 1,
- showValue: "",
- onChange: $setup.changeSpeed
- }, null, 8, ["value"])
- ]),
- 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, {
- value: $setup.settings.audioVolume,
- max: 10,
- min: 1,
- step: 1,
- showValue: "",
- onChange: $setup.changeVolume
- }, null, 8, ["value"])
- ]),
- vue.createCommentVNode(" 操作按钮 "),
- vue.createElementVNode("view", { class: "button-group" }, [
- vue.createVNode(_component_u_button, {
- type: "primary",
- text: "保存设置并试听",
- onClick: $setup.saveVoiceBroadcast
- }),
- 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", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/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,
- showStock: false,
- showDetail: false
- });
- function loadSettings() {
- uni.$u.http.get("/app/appConf/getBookShowConfig").then((res2) => {
- if (res2.code == 200) {
- Object.assign(settings, res2.data);
- }
- });
- }
- function saveSettings() {
- uni.$u.http.post("/app/appConf/setBookShowConfig", settings).then((res2) => {
- if (res2.code == 200) {
- uni.showToast({
- title: "设置已保存",
- icon: "success"
- });
- } else {
- 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$4);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$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.showStock,
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.settings.showStock = $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.showDetail,
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.settings.showDetail = $event),
- activeColor: "#4cd964"
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- })
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_button, {
- class: "mt-40",
- type: "primary",
- onClick: $setup.saveSettings
- }, {
- default: vue.withCtx(() => [
- vue.createTextVNode("保存")
- ]),
- _: 1
- /* STABLE */
- })
- ]);
- }
- const PagesMyPageBookDisplay = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__scopeId", "data-v-30e61b0d"], ["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/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 submitForm() {
- if (!formRef.value)
- return;
- formRef.value.validate().then((valid) => {
- if (valid) {
- loading.value = true;
- uni.$u.http.post("/app/appUser/updatePwd", formData).then((res2) => {
- if (res2.code == 200) {
- uni.showModal({
- title: "提示",
- content: "密码修改成功,是否确定要退出重新登录?",
- success: (res3) => {
- if (res3.confirm) {
- uni.clearStorageSync();
- uni.reLaunch({
- url: "/pages/login/login"
- });
- } else {
- uni.navigateBack({
- delta: 1
- });
- }
- }
- });
- }
- }).finally(() => {
- loading.value = false;
- });
- }
- });
- }
- function resetForm() {
- if (!formRef.value)
- return;
- formRef.value.resetFields();
- }
- const __returned__ = { formRef, loading, showPassword, formData, rules: rules2, 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_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$e);
- const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
- const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$6);
- const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
- 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",
- "error-type": "toast"
- }, {
- 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[0] || (_cache[0] = ($event) => $setup.formData.oldPassword = $event),
- type: "password",
- placeholder: "请输入原密码",
- border: false
- }, null, 8, ["modelValue"])
- ]),
- _: 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[1] || (_cache[1] = ($event) => $setup.formData.newPassword = $event),
- type: "password",
- placeholder: "请输入新密码",
- border: false
- }, null, 8, ["modelValue"])
- ]),
- _: 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[2] || (_cache[2] = ($event) => $setup.formData.confirmPassword = $event),
- type: "password",
- placeholder: "请再次输入新密码",
- border: false
- }, null, 8, ["modelValue"])
- ]),
- _: 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", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/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", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/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", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/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", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/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", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/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", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/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", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/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", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/pages/order/stat/receive-stat.vue"]]);
- __definePage("pages/login/login", PagesLoginLogin);
- __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/scan", PagesIndexExpressScan);
- __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/isbn-order", PagesIndexAuditIsbnOrder);
- __definePage("pages/index/audit/express-order", PagesIndexAuditExpressOrder);
- __definePage("pages/index/detail/user-orders", PagesIndexDetailUserOrders);
- __definePage("pages/index/detail/index", PagesIndexDetailIndex);
- __definePage("pages/index/detail/book-audit", PagesIndexDetailBookAudit);
- __definePage("pages/index/detail/batch-audit", PagesIndexDetailBatchAudit);
- __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-out-order", PagesIndexWmsBadOutOrder);
- __definePage("pages/index/wms/bad-off", PagesIndexWmsBadOff);
- __definePage("pages/index/wms/order-query", PagesIndexWmsOrderQuery);
- __definePage("pages/index/wms/order-query-list", PagesIndexWmsOrderQueryList);
- __definePage("pages/index/wms/location-order", PagesIndexWmsLocationOrder);
- __definePage("pages/index/wms/location-order-list", PagesIndexWmsLocationOrderList);
- __definePage("pages/index/wms/location-select", PagesIndexWmsLocationSelect);
- __definePage("pages/index/wms/warehouse-select", PagesIndexWmsWarehouseSelect);
- __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/entry/commodity-scan", PagesIndexEntryCommodityScan);
- __definePage("pages/index/express/logistics-detail", PagesIndexExpressLogisticsDetail);
- __definePage("pages/index/wms/task-detail", PagesIndexWmsTaskDetail);
- __definePage("pages/index/wms/speedy-check-add", PagesIndexWmsSpeedyCheckAdd);
- __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);
- function useInit() {
- var barcodeModel = requireNativePlugin("iData-BarcodePlugin-BarcodeModule");
- barcodeModel.initScan((ret) => {
- formatAppLog("log", "at utils/useBarcodeModule.js:9", "初始化扫描", ret);
- });
- }
- const isWeakRefSupported = typeof WeakRef !== "undefined";
- const callbackRegistry = {
- activePagePath: null,
- callbacks: /* @__PURE__ */ new Map(),
- // 使用Map存储每个页面路径对应的回调函数
- pageInstances: /* @__PURE__ */ new Map()
- // 存储页面实例,用于自动清理
- };
- const globalEventHandler = function(e) {
- if (!callbackRegistry.activePagePath) {
- formatAppLog("warn", "at utils/useBarcodeModule.js:29", "收到扫描事件,但没有活跃页面");
- return;
- }
- const callback = callbackRegistry.callbacks.get(callbackRegistry.activePagePath);
- if (callback) {
- try {
- callback(e);
- } catch (error2) {
- formatAppLog("error", "at utils/useBarcodeModule.js:39", `页面 ${callbackRegistry.activePagePath} 的扫描回调执行出错:`, error2);
- }
- } else {
- formatAppLog("warn", "at utils/useBarcodeModule.js:42", `活跃页面 ${callbackRegistry.activePagePath} 没有注册扫描回调`);
- }
- };
- let isGlobalListenerInitialized = false;
- let globalEvent = null;
- function initGlobalListener() {
- if (isGlobalListenerInitialized)
- return;
- try {
- globalEvent = requireNativePlugin("globalEvent");
- globalEvent.removeEventListener("iDataBarcodeEvent", globalEventHandler);
- globalEvent.addEventListener("iDataBarcodeEvent", globalEventHandler);
- isGlobalListenerInitialized = true;
- formatAppLog("log", "at utils/useBarcodeModule.js:61", "全局扫描监听器已初始化");
- } catch (error2) {
- formatAppLog("error", "at utils/useBarcodeModule.js:63", "初始化全局扫描监听器失败:", error2);
- }
- }
- function getCurrentPagePath() {
- try {
- const pages2 = getCurrentPages();
- if (!pages2 || pages2.length === 0) {
- formatAppLog("warn", "at utils/useBarcodeModule.js:74", "getCurrentPages() 返回空数组");
- return null;
- }
- const currentPage = pages2[pages2.length - 1];
- if (!currentPage || !currentPage.route) {
- formatAppLog("warn", "at utils/useBarcodeModule.js:80", "当前页面对象或路径无效");
- return null;
- }
- return currentPage.route;
- } catch (error2) {
- formatAppLog("error", "at utils/useBarcodeModule.js:86", "获取当前页面路径失败:", error2);
- return null;
- }
- }
- function useGlobalEvent(onChange) {
- if (typeof onChange !== "function") {
- formatAppLog("error", "at utils/useBarcodeModule.js:98", "useGlobalEvent: onChange 必须是一个函数");
- return () => {
- };
- }
- initGlobalListener();
- const pagePath = getCurrentPagePath();
- if (!pagePath) {
- formatAppLog("error", "at utils/useBarcodeModule.js:108", "useGlobalEvent: 无法获取当前页面路径");
- return () => {
- };
- }
- if (callbackRegistry.callbacks.has(pagePath)) {
- formatAppLog("warn", "at utils/useBarcodeModule.js:114", `页面 ${pagePath} 已经注册过扫描回调,将覆盖之前的回调`);
- }
- callbackRegistry.activePagePath = pagePath;
- callbackRegistry.callbacks.set(pagePath, onChange);
- try {
- const pages2 = getCurrentPages();
- const currentPage = pages2[pages2.length - 1];
- if (currentPage) {
- if (isWeakRefSupported) {
- callbackRegistry.pageInstances.set(pagePath, new WeakRef(currentPage));
- } else {
- callbackRegistry.pageInstances.set(pagePath, currentPage);
- formatAppLog("warn", "at utils/useBarcodeModule.js:135", "WeakRef不支持,使用普通引用,请确保在页面卸载时手动清理");
- }
- }
- } catch (error2) {
- formatAppLog("warn", "at utils/useBarcodeModule.js:139", "无法存储页面实例引用:", error2);
- }
- formatAppLog("log", "at utils/useBarcodeModule.js:142", `页面 ${pagePath} 已注册扫描回调,当前注册页面数: ${callbackRegistry.callbacks.size}`);
- return () => {
- removePageCallback(pagePath);
- };
- }
- function updateActivePageOnShow() {
- const pagePath = getCurrentPagePath();
- if (!pagePath) {
- formatAppLog("error", "at utils/useBarcodeModule.js:158", "updateActivePageOnShow: 无法获取当前页面路径");
- return;
- }
- callbackRegistry.activePagePath = pagePath;
- formatAppLog("log", "at utils/useBarcodeModule.js:164", `当前活跃页面已更新为: ${pagePath}`);
- cleanupInvalidPageReferences();
- }
- function cleanupInvalidPageReferences() {
- const currentPages = getCurrentPages();
- const currentPagePaths = new Set(currentPages.map((page2) => page2.route));
- const pagesToRemove = [];
- for (const [pagePath, pageRef] of callbackRegistry.pageInstances) {
- let shouldRemove = false;
- if (!currentPagePaths.has(pagePath)) {
- shouldRemove = true;
- } else if (isWeakRefSupported && pageRef) {
- if (!pageRef.deref()) {
- shouldRemove = true;
- }
- }
- if (shouldRemove) {
- pagesToRemove.push(pagePath);
- }
- }
- pagesToRemove.forEach((pagePath) => {
- callbackRegistry.callbacks.delete(pagePath);
- callbackRegistry.pageInstances.delete(pagePath);
- formatAppLog("log", "at utils/useBarcodeModule.js:204", `自动清理页面 ${pagePath} 的扫描回调`);
- });
- if (pagesToRemove.length > 0) {
- formatAppLog("log", "at utils/useBarcodeModule.js:208", `自动清理了 ${pagesToRemove.length} 个无效页面的回调,当前注册页面数: ${callbackRegistry.callbacks.size}`);
- }
- }
- function useGlobalEventRemove() {
- try {
- if (globalEvent && isGlobalListenerInitialized) {
- globalEvent.removeEventListener("iDataBarcodeEvent", globalEventHandler);
- }
- isGlobalListenerInitialized = false;
- globalEvent = null;
- callbackRegistry.callbacks.clear();
- callbackRegistry.pageInstances.clear();
- callbackRegistry.activePagePath = null;
- formatAppLog("log", "at utils/useBarcodeModule.js:228", "全局扫描监听器已完全移除,所有回调已清理");
- } catch (error2) {
- formatAppLog("error", "at utils/useBarcodeModule.js:230", "移除全局扫描监听器时出错:", error2);
- }
- }
- function removePageCallback(pagePath) {
- if (!pagePath) {
- pagePath = getCurrentPagePath();
- }
- if (!pagePath) {
- formatAppLog("error", "at utils/useBarcodeModule.js:244", "removePageCallback: 无法获取页面路径");
- return;
- }
- const hasCallback = callbackRegistry.callbacks.has(pagePath);
- callbackRegistry.callbacks.delete(pagePath);
- callbackRegistry.pageInstances.delete(pagePath);
- if (callbackRegistry.activePagePath === pagePath) {
- callbackRegistry.activePagePath = null;
- }
- if (hasCallback) {
- formatAppLog("log", "at utils/useBarcodeModule.js:259", `页面 ${pagePath} 的扫描回调已移除,当前注册页面数: ${callbackRegistry.callbacks.size}`);
- } else {
- formatAppLog("warn", "at utils/useBarcodeModule.js:261", `页面 ${pagePath} 没有注册过扫描回调`);
- }
- }
- function cleanupOnPageUnload() {
- const pagePath = getCurrentPagePath();
- if (pagePath) {
- removePageCallback(pagePath);
- }
- }
- function useRouteMonitor(onChange) {
- uni.addInterceptor("navigateTo", {
- invoke(e) {
- var _a;
- const pages2 = getCurrentPages();
- const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
- onChange && onChange(e.url, from);
- formatAppLog("log", "at utils/useRouteMonitor.js:18", "navigateTo", e.url, from);
- return e;
- }
- });
- uni.addInterceptor("redirectTo", {
- invoke(e) {
- var _a;
- const pages2 = getCurrentPages();
- const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
- onChange && onChange(e.url, from);
- formatAppLog("log", "at utils/useRouteMonitor.js:28", "redirectTo", e.url, from);
- return e;
- }
- });
- uni.addInterceptor("reLaunch", {
- invoke(e) {
- var _a;
- const pages2 = getCurrentPages();
- const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
- onChange && onChange(e.url, from);
- formatAppLog("log", "at utils/useRouteMonitor.js:38", "reLaunch", e.url, from);
- return e;
- }
- });
- uni.addInterceptor("switchTab", {
- invoke(e) {
- var _a;
- const pages2 = getCurrentPages();
- const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
- onChange && onChange(e.url, from);
- formatAppLog("log", "at utils/useRouteMonitor.js:48", "switchTab", e.url, from);
- return e;
- }
- });
- }
- const audioContext = vue.ref(null);
- const initClickSound = () => {
- audioContext.value = uni.createInnerAudioContext();
- audioContext.value.src = "/static/bap.mp3";
- audioContext.value.volume = 0.8;
- };
- const playClickSound = () => {
- if (audioContext.value) {
- audioContext.value.play();
- }
- };
- const _sfc_main = {
- __name: "App",
- setup(__props, { expose: __expose }) {
- __expose();
- onLaunch(() => {
- let token = uni.getStorageSync("token");
- if (token) {
- let userInfo = uni.getStorageSync("userInfo");
- if (userInfo) {
- if (userInfo.userId) {
- store.setUserInfo(userInfo);
- }
- }
- }
- });
- onShow(() => {
- });
- const __returned__ = { get onLaunch() {
- return onLaunch;
- }, get onShow() {
- return onShow;
- }, get onHide() {
- return onHide;
- }, get onUnload() {
- return onUnload;
- }, get store() {
- return store;
- }, get useGlobalEventRemove() {
- return useGlobalEventRemove;
- }, get useInit() {
- return useInit;
- }, get updateActivePageOnShow() {
- return updateActivePageOnShow;
- }, get useRouteMonitor() {
- return useRouteMonitor;
- }, get playClickSound() {
- return playClickSound;
- } };
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
- return __returned__;
- }
- };
- const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/ylong/Documents/2025项目/书嗨/book-hi-pda/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$1(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: code$1,
- 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 res2 = operation(num1, num2);
- others.forEach((num) => {
- res2 = operation(res2, num);
- });
- return res2;
- }
- 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() {
- 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,
- 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$G,
- ...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(res2) {
- return {
- title: this.share.title,
- path: this.share.path,
- imageUrl: this.share.imageUrl
- };
- },
- //2.分享到朋友圈
- onShareTimeline(res2) {
- return {
- title: this.share.title,
- path: this.share.path,
- imageUrl: this.share.imageUrl
- };
- }
- };
- const permission = {
- // 在绑定元素的父组件挂载时调用
- mounted(el, binding) {
- const { value: value2 } = binding;
- const buttonList = uni.getStorageSync("buttonList") || [];
- const hasPermission = checkPermission(value2, buttonList);
- if (!hasPermission) {
- el.parentNode && el.parentNode.removeChild(el);
- }
- }
- };
- function checkPermission(permission2, buttonList) {
- if (!permission2 || !buttonList || buttonList.length === 0) {
- return false;
- }
- if (buttonList.includes("*:*:*")) {
- return true;
- }
- return buttonList.includes(permission2);
- }
- const permissionDirective = {
- install(app) {
- app.directive("permission", permission);
- }
- };
- initClickSound();
- let ttsModule = new VolumeTTS();
- useInit();
- uni.$u.ttsModule = ttsModule;
- uni.$u.useGlobalEvent = useGlobalEvent;
- uni.$u.updateActivePageOnShow = updateActivePageOnShow;
- uni.$u.cleanupOnPageUnload = cleanupOnPageUnload;
- uni.$u.playClickSound = playClickSound;
- function createApp() {
- const app = vue.createVueApp(App);
- initRequest();
- const pinia2 = createPinia();
- app.use(pinia2).use(uviewPlus).use(permissionDirective);
- 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);
|