app-service.js 1.1 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538
  1. var __defProp = Object.defineProperty;
  2. var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
  3. var __publicField = (obj, key, value) => {
  4. __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
  5. return value;
  6. };
  7. if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
  8. Promise.prototype.finally = function(callback) {
  9. const promise = this.constructor;
  10. return this.then(
  11. (value) => promise.resolve(callback()).then(() => value),
  12. (reason) => promise.resolve(callback()).then(() => {
  13. throw reason;
  14. })
  15. );
  16. };
  17. }
  18. ;
  19. if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
  20. const global2 = uni.requireGlobal();
  21. ArrayBuffer = global2.ArrayBuffer;
  22. Int8Array = global2.Int8Array;
  23. Uint8Array = global2.Uint8Array;
  24. Uint8ClampedArray = global2.Uint8ClampedArray;
  25. Int16Array = global2.Int16Array;
  26. Uint16Array = global2.Uint16Array;
  27. Int32Array = global2.Int32Array;
  28. Uint32Array = global2.Uint32Array;
  29. Float32Array = global2.Float32Array;
  30. Float64Array = global2.Float64Array;
  31. BigInt64Array = global2.BigInt64Array;
  32. BigUint64Array = global2.BigUint64Array;
  33. }
  34. ;
  35. if (uni.restoreGlobal) {
  36. uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
  37. }
  38. (function(vue) {
  39. "use strict";
  40. const icons$1 = {
  41. "uicon-level": "",
  42. "uicon-column-line": "",
  43. "uicon-checkbox-mark": "",
  44. "uicon-folder": "",
  45. "uicon-movie": "",
  46. "uicon-star-fill": "",
  47. "uicon-star": "",
  48. "uicon-phone-fill": "",
  49. "uicon-phone": "",
  50. "uicon-apple-fill": "",
  51. "uicon-chrome-circle-fill": "",
  52. "uicon-backspace": "",
  53. "uicon-attach": "",
  54. "uicon-cut": "",
  55. "uicon-empty-car": "",
  56. "uicon-empty-coupon": "",
  57. "uicon-empty-address": "",
  58. "uicon-empty-favor": "",
  59. "uicon-empty-permission": "",
  60. "uicon-empty-news": "",
  61. "uicon-empty-search": "",
  62. "uicon-github-circle-fill": "",
  63. "uicon-rmb": "",
  64. "uicon-person-delete-fill": "",
  65. "uicon-reload": "",
  66. "uicon-order": "",
  67. "uicon-server-man": "",
  68. "uicon-search": "",
  69. "uicon-fingerprint": "",
  70. "uicon-more-dot-fill": "",
  71. "uicon-scan": "",
  72. "uicon-share-square": "",
  73. "uicon-map": "",
  74. "uicon-map-fill": "",
  75. "uicon-tags": "",
  76. "uicon-tags-fill": "",
  77. "uicon-bookmark-fill": "",
  78. "uicon-bookmark": "",
  79. "uicon-eye": "",
  80. "uicon-eye-fill": "",
  81. "uicon-mic": "",
  82. "uicon-mic-off": "",
  83. "uicon-calendar": "",
  84. "uicon-calendar-fill": "",
  85. "uicon-trash": "",
  86. "uicon-trash-fill": "",
  87. "uicon-play-left": "",
  88. "uicon-play-right": "",
  89. "uicon-minus": "",
  90. "uicon-plus": "",
  91. "uicon-info": "",
  92. "uicon-info-circle": "",
  93. "uicon-info-circle-fill": "",
  94. "uicon-question": "",
  95. "uicon-error": "",
  96. "uicon-close": "",
  97. "uicon-checkmark": "",
  98. "uicon-android-circle-fill": "",
  99. "uicon-android-fill": "",
  100. "uicon-ie": "",
  101. "uicon-IE-circle-fill": "",
  102. "uicon-google": "",
  103. "uicon-google-circle-fill": "",
  104. "uicon-setting-fill": "",
  105. "uicon-setting": "",
  106. "uicon-minus-square-fill": "",
  107. "uicon-plus-square-fill": "",
  108. "uicon-heart": "",
  109. "uicon-heart-fill": "",
  110. "uicon-camera": "",
  111. "uicon-camera-fill": "",
  112. "uicon-more-circle": "",
  113. "uicon-more-circle-fill": "",
  114. "uicon-chat": "",
  115. "uicon-chat-fill": "",
  116. "uicon-bag-fill": "",
  117. "uicon-bag": "",
  118. "uicon-error-circle-fill": "",
  119. "uicon-error-circle": "",
  120. "uicon-close-circle": "",
  121. "uicon-close-circle-fill": "",
  122. "uicon-checkmark-circle": "",
  123. "uicon-checkmark-circle-fill": "",
  124. "uicon-question-circle-fill": "",
  125. "uicon-question-circle": "",
  126. "uicon-share": "",
  127. "uicon-share-fill": "",
  128. "uicon-shopping-cart": "",
  129. "uicon-shopping-cart-fill": "",
  130. "uicon-bell": "",
  131. "uicon-bell-fill": "",
  132. "uicon-list": "",
  133. "uicon-list-dot": "",
  134. "uicon-zhihu": "",
  135. "uicon-zhihu-circle-fill": "",
  136. "uicon-zhifubao": "",
  137. "uicon-zhifubao-circle-fill": "",
  138. "uicon-weixin-circle-fill": "",
  139. "uicon-weixin-fill": "",
  140. "uicon-twitter-circle-fill": "",
  141. "uicon-twitter": "",
  142. "uicon-taobao-circle-fill": "",
  143. "uicon-taobao": "",
  144. "uicon-weibo-circle-fill": "",
  145. "uicon-weibo": "",
  146. "uicon-qq-fill": "",
  147. "uicon-qq-circle-fill": "",
  148. "uicon-moments-circel-fill": "",
  149. "uicon-moments": "",
  150. "uicon-qzone": "",
  151. "uicon-qzone-circle-fill": "",
  152. "uicon-baidu-circle-fill": "",
  153. "uicon-baidu": "",
  154. "uicon-facebook-circle-fill": "",
  155. "uicon-facebook": "",
  156. "uicon-car": "",
  157. "uicon-car-fill": "",
  158. "uicon-warning-fill": "",
  159. "uicon-warning": "",
  160. "uicon-clock-fill": "",
  161. "uicon-clock": "",
  162. "uicon-edit-pen": "",
  163. "uicon-edit-pen-fill": "",
  164. "uicon-email": "",
  165. "uicon-email-fill": "",
  166. "uicon-minus-circle": "",
  167. "uicon-minus-circle-fill": "",
  168. "uicon-plus-circle": "",
  169. "uicon-plus-circle-fill": "",
  170. "uicon-file-text": "",
  171. "uicon-file-text-fill": "",
  172. "uicon-pushpin": "",
  173. "uicon-pushpin-fill": "",
  174. "uicon-grid": "",
  175. "uicon-grid-fill": "",
  176. "uicon-play-circle": "",
  177. "uicon-play-circle-fill": "",
  178. "uicon-pause-circle-fill": "",
  179. "uicon-pause": "",
  180. "uicon-pause-circle": "",
  181. "uicon-eye-off": "",
  182. "uicon-eye-off-outline": "",
  183. "uicon-gift-fill": "",
  184. "uicon-gift": "",
  185. "uicon-rmb-circle-fill": "",
  186. "uicon-rmb-circle": "",
  187. "uicon-kefu-ermai": "",
  188. "uicon-server-fill": "",
  189. "uicon-coupon-fill": "",
  190. "uicon-coupon": "",
  191. "uicon-integral": "",
  192. "uicon-integral-fill": "",
  193. "uicon-home-fill": "",
  194. "uicon-home": "",
  195. "uicon-hourglass-half-fill": "",
  196. "uicon-hourglass": "",
  197. "uicon-account": "",
  198. "uicon-plus-people-fill": "",
  199. "uicon-minus-people-fill": "",
  200. "uicon-account-fill": "",
  201. "uicon-thumb-down-fill": "",
  202. "uicon-thumb-down": "",
  203. "uicon-thumb-up": "",
  204. "uicon-thumb-up-fill": "",
  205. "uicon-lock-fill": "",
  206. "uicon-lock-open": "",
  207. "uicon-lock-opened-fill": "",
  208. "uicon-lock": "",
  209. "uicon-red-packet-fill": "",
  210. "uicon-photo-fill": "",
  211. "uicon-photo": "",
  212. "uicon-volume-off-fill": "",
  213. "uicon-volume-off": "",
  214. "uicon-volume-fill": "",
  215. "uicon-volume": "",
  216. "uicon-red-packet": "",
  217. "uicon-download": "",
  218. "uicon-arrow-up-fill": "",
  219. "uicon-arrow-down-fill": "",
  220. "uicon-play-left-fill": "",
  221. "uicon-play-right-fill": "",
  222. "uicon-rewind-left-fill": "",
  223. "uicon-rewind-right-fill": "",
  224. "uicon-arrow-downward": "",
  225. "uicon-arrow-leftward": "",
  226. "uicon-arrow-rightward": "",
  227. "uicon-arrow-upward": "",
  228. "uicon-arrow-down": "",
  229. "uicon-arrow-right": "",
  230. "uicon-arrow-left": "",
  231. "uicon-arrow-up": "",
  232. "uicon-skip-back-left": "",
  233. "uicon-skip-forward-right": "",
  234. "uicon-rewind-right": "",
  235. "uicon-rewind-left": "",
  236. "uicon-arrow-right-double": "",
  237. "uicon-arrow-left-double": "",
  238. "uicon-wifi-off": "",
  239. "uicon-wifi": "",
  240. "uicon-empty-data": "",
  241. "uicon-empty-history": "",
  242. "uicon-empty-list": "",
  243. "uicon-empty-page": "",
  244. "uicon-empty-order": "",
  245. "uicon-man": "",
  246. "uicon-woman": "",
  247. "uicon-man-add": "",
  248. "uicon-man-add-fill": "",
  249. "uicon-man-delete": "",
  250. "uicon-man-delete-fill": "",
  251. "uicon-zh": "",
  252. "uicon-en": ""
  253. };
  254. const ON_SHOW = "onShow";
  255. const ON_HIDE = "onHide";
  256. const ON_LAUNCH = "onLaunch";
  257. const ON_LOAD = "onLoad";
  258. const ON_UNLOAD = "onUnload";
  259. function requireNativePlugin(name) {
  260. return weex.requireModule(name);
  261. }
  262. function formatAppLog(type2, filename, ...args) {
  263. if (uni.__log__) {
  264. uni.__log__(type2, filename, ...args);
  265. } else {
  266. console[type2].apply(console, [...args, filename]);
  267. }
  268. }
  269. function resolveEasycom(component, easycom) {
  270. return typeof component === "string" ? easycom : component;
  271. }
  272. const createHook = (lifecycle) => (hook, target = vue.getCurrentInstance()) => {
  273. !vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target);
  274. };
  275. const onShow = /* @__PURE__ */ createHook(ON_SHOW);
  276. const onHide = /* @__PURE__ */ createHook(ON_HIDE);
  277. const onLaunch = /* @__PURE__ */ createHook(ON_LAUNCH);
  278. const onLoad = /* @__PURE__ */ createHook(ON_LOAD);
  279. const onUnload = /* @__PURE__ */ createHook(ON_UNLOAD);
  280. const version = "3";
  281. {
  282. formatAppLog("log", "at uni_modules/uview-plus/libs/config/config.js:5", `
  283. %c uview-plus V${version} %c https://ijry.github.io/uview-plus/
  284. `, "color: #ffffff; background: #3c9cff; padding:5px 0;", "color: #3c9cff;background: #ffffff; padding:5px 0;");
  285. }
  286. const config = {
  287. v: version,
  288. version,
  289. // 主题名称
  290. type: [
  291. "primary",
  292. "success",
  293. "info",
  294. "error",
  295. "warning"
  296. ],
  297. // 颜色部分,本来可以通过scss的:export导出供js使用,但是奈何nvue不支持
  298. color: {
  299. "u-primary": "#2979ff",
  300. "u-warning": "#ff9900",
  301. "u-success": "#19be6b",
  302. "u-error": "#fa3534",
  303. "u-info": "#909399",
  304. "u-main-color": "#303133",
  305. "u-content-color": "#606266",
  306. "u-tips-color": "#909399",
  307. "u-light-color": "#c0c4cc"
  308. },
  309. // 默认单位,可以通过配置为rpx,那么在用于传入组件大小参数为数值时,就默认为rpx
  310. unit: "px"
  311. };
  312. const ActionSheet = {
  313. // action-sheet组件
  314. actionSheet: {
  315. show: false,
  316. title: "",
  317. description: "",
  318. actions: () => [],
  319. index: "",
  320. cancelText: "",
  321. closeOnClickAction: true,
  322. safeAreaInsetBottom: true,
  323. openType: "",
  324. closeOnClickOverlay: true,
  325. round: 0
  326. }
  327. };
  328. const Album = {
  329. // album 组件
  330. album: {
  331. urls: () => [],
  332. keyName: "",
  333. singleSize: 180,
  334. multipleSize: 70,
  335. space: 6,
  336. singleMode: "scaleToFill",
  337. multipleMode: "aspectFill",
  338. maxCount: 9,
  339. previewFullImage: true,
  340. rowCount: 3,
  341. showMore: true
  342. }
  343. };
  344. const Alert = {
  345. // alert警告组件
  346. alert: {
  347. title: "",
  348. type: "warning",
  349. description: "",
  350. closable: false,
  351. showIcon: false,
  352. effect: "light",
  353. center: false,
  354. fontSize: 14
  355. }
  356. };
  357. const Avatar = {
  358. // avatar 组件
  359. avatar: {
  360. src: "",
  361. shape: "circle",
  362. size: 40,
  363. mode: "scaleToFill",
  364. text: "",
  365. bgColor: "#c0c4cc",
  366. color: "#ffffff",
  367. fontSize: 18,
  368. icon: "",
  369. mpAvatar: false,
  370. randomBgColor: false,
  371. defaultUrl: "",
  372. colorIndex: "",
  373. name: ""
  374. }
  375. };
  376. const AvatarGroup = {
  377. // avatarGroup 组件
  378. avatarGroup: {
  379. urls: () => [],
  380. maxCount: 5,
  381. shape: "circle",
  382. mode: "scaleToFill",
  383. showMore: true,
  384. size: 40,
  385. keyName: "",
  386. gap: 0.5,
  387. extraValue: 0
  388. }
  389. };
  390. const Backtop = {
  391. // backtop组件
  392. backtop: {
  393. mode: "circle",
  394. icon: "arrow-upward",
  395. text: "",
  396. duration: 100,
  397. scrollTop: 0,
  398. top: 400,
  399. bottom: 100,
  400. right: 20,
  401. zIndex: 9,
  402. iconStyle: () => ({
  403. color: "#909399",
  404. fontSize: "19px"
  405. })
  406. }
  407. };
  408. const Badge = {
  409. // 徽标数组件
  410. badge: {
  411. isDot: false,
  412. value: "",
  413. show: true,
  414. max: 999,
  415. type: "error",
  416. showZero: false,
  417. bgColor: null,
  418. color: null,
  419. shape: "circle",
  420. numberType: "overflow",
  421. offset: () => [],
  422. inverted: false,
  423. absolute: false
  424. }
  425. };
  426. const Button = {
  427. // button组件
  428. button: {
  429. hairline: false,
  430. type: "info",
  431. size: "normal",
  432. shape: "square",
  433. plain: false,
  434. disabled: false,
  435. loading: false,
  436. loadingText: "",
  437. loadingMode: "spinner",
  438. loadingSize: 15,
  439. openType: "",
  440. formType: "",
  441. appParameter: "",
  442. hoverStopPropagation: true,
  443. lang: "en",
  444. sessionFrom: "",
  445. sendMessageTitle: "",
  446. sendMessagePath: "",
  447. sendMessageImg: "",
  448. showMessageCard: false,
  449. dataName: "",
  450. throttleTime: 0,
  451. hoverStartTime: 0,
  452. hoverStayTime: 200,
  453. text: "",
  454. icon: "",
  455. iconColor: "",
  456. color: ""
  457. }
  458. };
  459. const Calendar$2 = {
  460. // calendar 组件
  461. calendar: {
  462. title: "日期选择",
  463. showTitle: true,
  464. showSubtitle: true,
  465. mode: "single",
  466. startText: "开始",
  467. endText: "结束",
  468. customList: () => [],
  469. color: "#3c9cff",
  470. minDate: 0,
  471. maxDate: 0,
  472. defaultDate: null,
  473. maxCount: Number.MAX_SAFE_INTEGER,
  474. // Infinity
  475. rowHeight: 56,
  476. formatter: null,
  477. showLunar: false,
  478. showMark: true,
  479. confirmText: "确定",
  480. confirmDisabledText: "确定",
  481. show: false,
  482. closeOnClickOverlay: false,
  483. readonly: false,
  484. showConfirm: true,
  485. maxRange: Number.MAX_SAFE_INTEGER,
  486. // Infinity
  487. rangePrompt: "",
  488. showRangePrompt: true,
  489. allowSameDay: false,
  490. round: 0,
  491. monthNum: 3
  492. }
  493. };
  494. const CarKeyboard = {
  495. // 车牌号键盘
  496. carKeyboard: {
  497. random: false
  498. }
  499. };
  500. const Cell = {
  501. // cell组件的props
  502. cell: {
  503. customClass: "",
  504. title: "",
  505. label: "",
  506. value: "",
  507. icon: "",
  508. disabled: false,
  509. border: true,
  510. center: false,
  511. url: "",
  512. linkType: "navigateTo",
  513. clickable: false,
  514. isLink: false,
  515. required: false,
  516. arrowDirection: "",
  517. iconStyle: {},
  518. rightIconStyle: {},
  519. rightIcon: "arrow-right",
  520. titleStyle: {},
  521. size: "",
  522. stop: true,
  523. name: ""
  524. }
  525. };
  526. const CellGroup = {
  527. // cell-group组件的props
  528. cellGroup: {
  529. title: "",
  530. border: true,
  531. customStyle: {}
  532. }
  533. };
  534. const Checkbox = {
  535. // checkbox组件
  536. checkbox: {
  537. name: "",
  538. shape: "",
  539. size: "",
  540. checkbox: false,
  541. disabled: "",
  542. activeColor: "",
  543. inactiveColor: "",
  544. iconSize: "",
  545. iconColor: "",
  546. label: "",
  547. labelSize: "",
  548. labelColor: "",
  549. labelDisabled: ""
  550. }
  551. };
  552. const CheckboxGroup = {
  553. // checkbox-group组件
  554. checkboxGroup: {
  555. name: "",
  556. value: () => [],
  557. shape: "square",
  558. disabled: false,
  559. activeColor: "#2979ff",
  560. inactiveColor: "#c8c9cc",
  561. size: 18,
  562. placement: "row",
  563. labelSize: 14,
  564. labelColor: "#303133",
  565. labelDisabled: false,
  566. iconColor: "#ffffff",
  567. iconSize: 12,
  568. iconPlacement: "left",
  569. borderBottom: false
  570. }
  571. };
  572. const CircleProgress = {
  573. // circleProgress 组件
  574. circleProgress: {
  575. percentage: 30
  576. }
  577. };
  578. const Code = {
  579. // code 组件
  580. code: {
  581. seconds: 60,
  582. startText: "获取验证码",
  583. changeText: "X秒重新获取",
  584. endText: "重新获取",
  585. keepRunning: false,
  586. uniqueKey: ""
  587. }
  588. };
  589. const CodeInput = {
  590. // codeInput 组件
  591. codeInput: {
  592. adjustPosition: true,
  593. maxlength: 6,
  594. dot: false,
  595. mode: "box",
  596. hairline: false,
  597. space: 10,
  598. value: "",
  599. focus: false,
  600. bold: false,
  601. color: "#606266",
  602. fontSize: 18,
  603. size: 35,
  604. disabledKeyboard: false,
  605. borderColor: "#c9cacc",
  606. disabledDot: true
  607. }
  608. };
  609. const Col = {
  610. // col 组件
  611. col: {
  612. span: 12,
  613. offset: 0,
  614. justify: "start",
  615. align: "stretch",
  616. textAlign: "left"
  617. }
  618. };
  619. const Collapse = {
  620. // collapse 组件
  621. collapse: {
  622. value: null,
  623. accordion: false,
  624. border: true
  625. }
  626. };
  627. const CollapseItem = {
  628. // collapseItem 组件
  629. collapseItem: {
  630. title: "",
  631. value: "",
  632. label: "",
  633. disabled: false,
  634. isLink: true,
  635. clickable: true,
  636. border: true,
  637. align: "left",
  638. name: "",
  639. icon: "",
  640. duration: 300
  641. }
  642. };
  643. const ColumnNotice = {
  644. // columnNotice 组件
  645. columnNotice: {
  646. text: "",
  647. icon: "volume",
  648. mode: "",
  649. color: "#f9ae3d",
  650. bgColor: "#fdf6ec",
  651. fontSize: 14,
  652. speed: 80,
  653. step: false,
  654. duration: 1500,
  655. disableTouch: true
  656. }
  657. };
  658. const CountDown = {
  659. // u-count-down 计时器组件
  660. countDown: {
  661. time: 0,
  662. format: "HH:mm:ss",
  663. autoStart: true,
  664. millisecond: false
  665. }
  666. };
  667. const CountTo = {
  668. // countTo 组件
  669. countTo: {
  670. startVal: 0,
  671. endVal: 0,
  672. duration: 2e3,
  673. autoplay: true,
  674. decimals: 0,
  675. useEasing: true,
  676. decimal: ".",
  677. color: "#606266",
  678. fontSize: 22,
  679. bold: false,
  680. separator: ""
  681. }
  682. };
  683. const DatetimePicker = {
  684. // datetimePicker 组件
  685. datetimePicker: {
  686. show: false,
  687. showToolbar: true,
  688. value: "",
  689. title: "",
  690. mode: "datetime",
  691. maxDate: new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 0, 1).getTime(),
  692. minDate: new Date((/* @__PURE__ */ new Date()).getFullYear() - 10, 0, 1).getTime(),
  693. minHour: 0,
  694. maxHour: 23,
  695. minMinute: 0,
  696. maxMinute: 59,
  697. filter: null,
  698. formatter: null,
  699. loading: false,
  700. itemHeight: 44,
  701. cancelText: "取消",
  702. confirmText: "确认",
  703. cancelColor: "#909193",
  704. confirmColor: "#3c9cff",
  705. visibleItemCount: 5,
  706. closeOnClickOverlay: false,
  707. defaultIndex: () => []
  708. }
  709. };
  710. const Divider = {
  711. // divider组件
  712. divider: {
  713. dashed: false,
  714. hairline: true,
  715. dot: false,
  716. textPosition: "center",
  717. text: "",
  718. textSize: 14,
  719. textColor: "#909399",
  720. lineColor: "#dcdfe6"
  721. }
  722. };
  723. const Empty = {
  724. // empty组件
  725. empty: {
  726. icon: "",
  727. text: "",
  728. textColor: "#c0c4cc",
  729. textSize: 14,
  730. iconColor: "#c0c4cc",
  731. iconSize: 90,
  732. mode: "data",
  733. width: 160,
  734. height: 160,
  735. show: true,
  736. marginTop: 0
  737. }
  738. };
  739. const Form = {
  740. // form 组件
  741. form: {
  742. model: () => ({}),
  743. rules: () => ({}),
  744. errorType: "message",
  745. borderBottom: true,
  746. labelPosition: "left",
  747. labelWidth: 45,
  748. labelAlign: "left",
  749. labelStyle: () => ({})
  750. }
  751. };
  752. const GormItem = {
  753. // formItem 组件
  754. formItem: {
  755. label: "",
  756. prop: "",
  757. borderBottom: "",
  758. labelWidth: "",
  759. rightIcon: "",
  760. leftIcon: "",
  761. required: false,
  762. leftIconStyle: ""
  763. }
  764. };
  765. const Gap = {
  766. // gap组件
  767. gap: {
  768. bgColor: "transparent",
  769. height: 20,
  770. marginTop: 0,
  771. marginBottom: 0,
  772. customStyle: {}
  773. }
  774. };
  775. const Grid = {
  776. // grid组件
  777. grid: {
  778. col: 3,
  779. border: false,
  780. align: "left"
  781. }
  782. };
  783. const GridItem = {
  784. // grid-item组件
  785. gridItem: {
  786. name: null,
  787. bgColor: "transparent"
  788. }
  789. };
  790. const {
  791. color: color$3
  792. } = config;
  793. const Icon = {
  794. // icon组件
  795. icon: {
  796. name: "",
  797. color: color$3["u-content-color"],
  798. size: "16px",
  799. bold: false,
  800. index: "",
  801. hoverClass: "",
  802. customPrefix: "uicon",
  803. label: "",
  804. labelPos: "right",
  805. labelSize: "15px",
  806. labelColor: color$3["u-content-color"],
  807. space: "3px",
  808. imgMode: "",
  809. width: "",
  810. height: "",
  811. top: 0,
  812. stop: false
  813. }
  814. };
  815. const Image = {
  816. // image组件
  817. image: {
  818. src: "",
  819. mode: "aspectFill",
  820. width: "300",
  821. height: "225",
  822. shape: "square",
  823. radius: 0,
  824. lazyLoad: true,
  825. showMenuByLongpress: true,
  826. loadingIcon: "photo",
  827. errorIcon: "error-circle",
  828. showLoading: true,
  829. showError: true,
  830. fade: true,
  831. webp: false,
  832. duration: 500,
  833. bgColor: "#f3f4f6"
  834. }
  835. };
  836. const IndexAnchor = {
  837. // indexAnchor 组件
  838. indexAnchor: {
  839. text: "",
  840. color: "#606266",
  841. size: 14,
  842. bgColor: "#dedede",
  843. height: 32
  844. }
  845. };
  846. const IndexList = {
  847. // indexList 组件
  848. indexList: {
  849. inactiveColor: "#606266",
  850. activeColor: "#5677fc",
  851. indexList: () => [],
  852. sticky: true,
  853. customNavHeight: 0
  854. }
  855. };
  856. const Input = {
  857. // index 组件
  858. input: {
  859. value: "",
  860. type: "text",
  861. fixed: false,
  862. disabled: false,
  863. disabledColor: "#f5f7fa",
  864. clearable: false,
  865. password: false,
  866. maxlength: -1,
  867. placeholder: null,
  868. placeholderClass: "input-placeholder",
  869. placeholderStyle: "color: #c0c4cc",
  870. showWordLimit: false,
  871. confirmType: "done",
  872. confirmHold: false,
  873. holdKeyboard: false,
  874. focus: false,
  875. autoBlur: false,
  876. disableDefaultPadding: false,
  877. cursor: -1,
  878. cursorSpacing: 30,
  879. selectionStart: -1,
  880. selectionEnd: -1,
  881. adjustPosition: true,
  882. inputAlign: "left",
  883. fontSize: "15px",
  884. color: "#303133",
  885. prefixIcon: "",
  886. prefixIconStyle: "",
  887. suffixIcon: "",
  888. suffixIconStyle: "",
  889. border: "surround",
  890. readonly: false,
  891. shape: "square",
  892. formatter: null
  893. }
  894. };
  895. const Keyboard = {
  896. // 键盘组件
  897. keyboard: {
  898. mode: "number",
  899. dotDisabled: false,
  900. tooltip: true,
  901. showTips: true,
  902. tips: "",
  903. showCancel: true,
  904. showConfirm: true,
  905. random: false,
  906. safeAreaInsetBottom: true,
  907. closeOnClickOverlay: true,
  908. show: false,
  909. overlay: true,
  910. zIndex: 10075,
  911. cancelText: "取消",
  912. confirmText: "确定",
  913. autoChange: false
  914. }
  915. };
  916. const Line = {
  917. // line组件
  918. line: {
  919. color: "#d6d7d9",
  920. length: "100%",
  921. direction: "row",
  922. hairline: true,
  923. margin: 0,
  924. dashed: false
  925. }
  926. };
  927. const LineProgress = {
  928. // lineProgress 组件
  929. lineProgress: {
  930. activeColor: "#19be6b",
  931. inactiveColor: "#ececec",
  932. percentage: 0,
  933. showText: true,
  934. height: 12
  935. }
  936. };
  937. const {
  938. color: color$2
  939. } = config;
  940. const Link = {
  941. // link超链接组件props参数
  942. link: {
  943. color: color$2["u-primary"],
  944. fontSize: 15,
  945. underLine: false,
  946. href: "",
  947. mpTips: "链接已复制,请在浏览器打开",
  948. lineColor: "",
  949. text: ""
  950. }
  951. };
  952. const List = {
  953. // list 组件
  954. list: {
  955. showScrollbar: false,
  956. lowerThreshold: 50,
  957. upperThreshold: 0,
  958. scrollTop: 0,
  959. offsetAccuracy: 10,
  960. enableFlex: false,
  961. pagingEnabled: false,
  962. scrollable: true,
  963. scrollIntoView: "",
  964. scrollWithAnimation: false,
  965. enableBackToTop: false,
  966. height: 0,
  967. width: 0,
  968. preLoadScreen: 1
  969. }
  970. };
  971. const ListItem = {
  972. // listItem 组件
  973. listItem: {
  974. anchor: ""
  975. }
  976. };
  977. const {
  978. color: color$1
  979. } = config;
  980. const LoadingIcon = {
  981. // loading-icon加载中图标组件
  982. loadingIcon: {
  983. show: true,
  984. color: color$1["u-tips-color"],
  985. textColor: color$1["u-tips-color"],
  986. vertical: false,
  987. mode: "spinner",
  988. size: 24,
  989. textSize: 15,
  990. text: "",
  991. timingFunction: "ease-in-out",
  992. duration: 1200,
  993. inactiveColor: ""
  994. }
  995. };
  996. const LoadingPage = {
  997. // loading-page组件
  998. loadingPage: {
  999. loadingText: "正在加载",
  1000. image: "",
  1001. loadingMode: "circle",
  1002. loading: false,
  1003. bgColor: "#ffffff",
  1004. color: "#C8C8C8",
  1005. fontSize: 19,
  1006. iconSize: 28,
  1007. loadingColor: "#C8C8C8"
  1008. }
  1009. };
  1010. const Loadmore = {
  1011. // loadmore 组件
  1012. loadmore: {
  1013. status: "loadmore",
  1014. bgColor: "transparent",
  1015. icon: true,
  1016. fontSize: 14,
  1017. iconSize: 17,
  1018. color: "#606266",
  1019. loadingIcon: "spinner",
  1020. loadmoreText: "加载更多",
  1021. loadingText: "正在加载...",
  1022. nomoreText: "没有更多了",
  1023. isDot: false,
  1024. iconColor: "#b7b7b7",
  1025. marginTop: 10,
  1026. marginBottom: 10,
  1027. height: "auto",
  1028. line: false,
  1029. lineColor: "#E6E8EB",
  1030. dashed: false
  1031. }
  1032. };
  1033. const Modal = {
  1034. // modal 组件
  1035. modal: {
  1036. show: false,
  1037. title: "",
  1038. content: "",
  1039. confirmText: "确认",
  1040. cancelText: "取消",
  1041. showConfirmButton: true,
  1042. showCancelButton: false,
  1043. confirmColor: "#2979ff",
  1044. cancelColor: "#606266",
  1045. buttonReverse: false,
  1046. zoom: true,
  1047. asyncClose: false,
  1048. closeOnClickOverlay: false,
  1049. negativeTop: 0,
  1050. width: "650rpx",
  1051. confirmButtonShape: ""
  1052. }
  1053. };
  1054. const color = {
  1055. primary: "#3c9cff",
  1056. info: "#909399",
  1057. default: "#909399",
  1058. warning: "#f9ae3d",
  1059. error: "#f56c6c",
  1060. success: "#5ac725",
  1061. mainColor: "#303133",
  1062. contentColor: "#606266",
  1063. tipsColor: "#909399",
  1064. lightColor: "#c0c4cc",
  1065. borderColor: "#e4e7ed"
  1066. };
  1067. const Navbar = {
  1068. // navbar 组件
  1069. navbar: {
  1070. safeAreaInsetTop: true,
  1071. placeholder: false,
  1072. fixed: true,
  1073. border: false,
  1074. leftIcon: "arrow-left",
  1075. leftText: "",
  1076. rightText: "",
  1077. rightIcon: "",
  1078. title: "",
  1079. bgColor: "#ffffff",
  1080. titleWidth: "400rpx",
  1081. height: "44px",
  1082. leftIconSize: 20,
  1083. leftIconColor: color.mainColor,
  1084. autoBack: false,
  1085. titleStyle: ""
  1086. }
  1087. };
  1088. const NoNetwork = {
  1089. // noNetwork
  1090. noNetwork: {
  1091. tips: "哎呀,网络信号丢失",
  1092. zIndex: "",
  1093. image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABLKADAAQAAAABAAABLAAAAADYYILnAABAAElEQVR4Ae29CZhkV3kefNeq6m2W7tn3nl0aCbHIAgmQPGB+sLCNzSID9g9PYrAf57d/+4+DiW0cy8QBJ06c2In/PLFDHJ78+MGCGNsYgyxwIwktwEijAc1ohtmnZ+2Z7p5eq6vu9r/vuXWrq25VdVV1V3dXVX9Hmj73nv285963vvOd75yraeIEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQaD8E9PbrkvRopSMwMBBYRs+5O/yJS68cPnzYXel4tFP/jXbqjPRFEAiCQNe6Bw/6gdFn9Oy9Q90LLG2DgBBW2wyldIQIPPPCte2a5q3jtR+4ff/4wuBuXotrDwSEsNpjHKUXQODppy+udYJMEUEZgbd94DvnNwlA7YGAEFZ7jOOK78Xp06eTTkq7sxwQhmXuf/754VXl4iSstRAQwmqt8ZLWlkHg0UcD49qYfUjXfLtMtOZ7npExJu4iqZWLl7DWQUAIq3XGSlpaAYHD77q8xwuCOSUoXw8Sl0eMux977DGzQjES3AIICGG1wCBJEysj8PXnz230XXdr5RQFMYbRvWnv6w8UhMhliyGwYghr4Pjg3oEXL34ey9zyC9tiD2ml5h47dr1LN7S6CMjz/A3PvHh1Z6UyJby5EVgRhKUe7Kz/JU0LfvrJo5f+Y3MPibSuFgQGBgasYSd9l6GDsup0WS/T/9RTp9fXmU2SNwECdQ92E7S57iaMeJnPQLK6ixkDLfjlb7546RfrLkQyNBcC3dsP6oHWMd9G+V3JgwPHh7rnm1/yLQ8CbU9Y33zp0j+nZFUMb/DHmB7+SHGY3LUKAk8cObtD00xlHDrfNge+Z2ozU3c9dvx4Yr5lSL6lR6CtCWvg6OAPw9z538ZhhZRl6XrwhW8du1KX/iNejtwvPQIDR8+vSRqJ/obU7GupjdNdh2gW0ZDypJBFR6BtB2rg2OVtuub9JcmpHIpBoK1xfffLzx4f7C0XL2HNiYDp6bs9z23Ypn1fC1Y/9PCFDc3ZW2lVHIG2JKzTp4Ok7nv/G6Q054MIvda+bNb74pEgKGtwGAdL7pcfAa8vOKEZ2kyjWuLr7uDh+/qvN6o8KWdxEWhLwroyeek/g4zuqwU6kNrhyZcu/UktaSXN8iNwuL9/RuvVXtJ9PbPQ1vhmcP6t9+47u9ByJP/SIdB2hDVw9MJHQFYfrQdCph84evFX68kjaZcPAZJWwjMXRFpJ2zr91tfuvrh8vZCa54NA2xGWrunvmg8QWCJ/N4ir7fCYDxatkOeBB7an501agXbygVdvv9IK/ZQ2FiPQdi9osGbH+zRNf7y4m9Xu9Me7N9nv0HXdr5ZS4psHgXpJC9P/wDRTx0Vn1TxjWG9LGrbaUm/Fi5meSvcrkxf/Cg/ow9XqAUk91v3qHT97r6471dJKfHMi8Oyzgx1Z03t1YAQVT2MwgsC3u+yXHzi0faQ5eyGtqgWBtpOw2Ol9+/TM+sTOn8L08MtzgQCy+tOHXr3jA0JWc6HU/HF5Scssr4jXcYqfP6V/T8iq+ceyWgvbUsKKOn38eJAYyl56TAuCEr2WYei//9Crd/5GlFb81kdASVopSFrerKRlaoZj9HR+700H10+0fg+lB21NWBxe2lhNHsUpDZr27mi4dV379R9+za4/iO7Fbx8ECknLCPTsTDJ17O33bJpqnx6u7J60PWFxeAcCbMV56dJfQKf1bkMLfuGh1+76zMoe9vbuPUnLsb2DtmOe5HSxvXsrvWtLBEhaTx29+Ma27Jx0ShAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQaEsEVoQdVluO3BJ06ptHL34b1XRjp4Ch6Rq24+kmjG4Nwwg+9uA9u/73EjRBqhAEihAoe3xwUQq5WTYEzp0b3ZnV/Ncf6O/9AvY9wlh/6dy3X7ncN512Zw9BVLXjuAP4np44vnQtkZoEgVkEhLBmsWiKqwsXpjbPBOn3gRfenwnc+7GBe+zsjclvonFDS9nA9Iy/u3x9+vAP3735VPk4CRUEFhcBIazFxbfm0k9fHD7k+v4nQFaPQIrx8Gmyx/GJ0J/t7ez7mw0b9MmaC2pQQgh0/ZSm4g5TwueWWtqLt0HuVy4CQljLPPYnB0depTn+b3t+8B4t0AdBUv93h2H9xc6da0aXs2m+r1WQsLRnl7NdUvfKRkAIa5nG//r1oGtsZvjTgev/kqYHF/TA+AXoqv4npJemOEiQU1Eo2l+G0movBK1UBBPU7s9E1+ILAkuNgKwSLjXiqO/khVtvARH8dxDBRkMzPrF/V+9/BlG5y9CUqlXinHv9mRPXtvuus88L9H3JPv2zD2yXExCqAicJBIFWRwAvv3Xqwq0/Pnn+lv/K+ZvfPH3p9p5W75O0fxaBp793ce3AwIDMWmYhafiVgNtwSMsXeHp4eNXJC8Nf0PAdRCiuf/XgrnWUqsqotcvnl9DmRkCdweX4b9N7+m/ih+mbMraLM14yJVwcXItKpT1VRve+ArC3Qqn+3gM7132jKEGZm6tXg86J7OhDfuA/iHwPUpfUZSfu2L59tXxEoQxeyxkEgjKeOnLxHb4RqC+NY5H3+2953d4XlrNN7Vq3ENYij+yZwbG9jpt9GkBPQ5H9zgP9607OVeWp87cOQtn9zwJf+xDMNFfj+jryPqXpxj8c2Nn7P+SXey70lidu4IXzb0DNB4tr9751+HV7zxSHyd1CERDCWiiCc+QPjUCnsaqmZ62O5IN7N/VUNP48ee7mAZDTf4Tt049iUG4Guv4ZfNLos9UIbo7qJWoJEHjy+bP7fNsoOcnW0A0/aacef8PdG28sQTNWTBVCWIs01OfPj66BpfqTmq732UnjgT1bei+Vq4pTv7HM8Ceg2/o1qLQug7T+FaaM3IqTLZdewpoHgYEjV9fphvOj+OShWa5V+CxvZtpzv/LwG/aNl4uXsPoRwI+4uEYjAJ2GmdG8L0FK2mYa+tsrkdXZy+P7x2ZuHdW14P+BLdank9q6Qwd3rf+ckFWjR6Tx5Q2cP58K9Jm3VCIr1ogt48lO237r3//96YofeG18y9q7RFklXITxPXV+5DchKb3ZDMy37Nu5tuxG4R9cHH6b42QfAzlds+3EPXu2rfrBIjRFilwkBIIR7SHoJDurFU89ZOd680Gke6JaWomvjoBIWNUxqivFD87fej0e0n8Fwvr0/t1rnyqX+QfnRz7g+8FX8Rv8vL3auF/IqhxKzR2WCPxXqKeq3krDTdj2ierpJEUtCIgOqxaUakwzNBR0D09yiqePHOjveyOkpxLr9VMXb73V97S/h3nDXx7Y2fdPkAYbncW1IgIDxy5vM7LZt/hgrnLtxyaBrJNxv/72N+6tuNhSLp+EVUZACKsyNnXHvHL+1qcgNf2KbSXu2bt9dcmS9qlzo/fARgcmCtpzB3b1/Vg5QiuslLowENyDWDn8cSjl98PgdBviu03N+rl9/WufLEwr18uDwLdevLTF1YK3xnVZ2HI1bUxrT7z5zTuXdRP78qCyeLUKYTUI25OXbm4JPO00TBj+6I7+db8ZL3ZwMOiYdG4dA1lN9HWte2iuI2NAVPapC8O/CGPR34Ip/AZIbIMo7yX8G9QMbcS09P+2b1vf5XgdrXaPfiYns9oeLLEd8D1/B7Dp0E1jGP042pXQj7RKf546cmGzp+tv1TRf6YQD35/QO3seP3xow5IfC9QqmM23naJ0ny9ysXwgq98BWc0kVhv/Nhalbqe8kd/Fr8MOSEr3zEVWrwyO3I29hl+E9LUHGf+nAXI6sGPdd8uV2YphIKnE5IyL6bLxk7cn3bdkHHefrpvJAExMZ1uBZmqeNzXtfzUzk/m/ens7LjV7Px+8d9e1579/44l0duZtge+Np5zEEw8c2pBu9na3YvtEwmrAqNE8IZvNHsep5//yjl3r/0O8yFOXbv0QCO05gP0JGIL+fjw+uj91YeRh/Dp/PtCDM7Zpfmjvjt6Xo7hW9ycmJjaYduf7Hdf/8HTGfa3rG9rYxLSWnsloPg7fijZV8oFM2Ja2a9t6EJd7bCztvHP7us4rrdD/r3/7ct9I99jEI4cOiQ3dIg2YEFYDgOUJDFj1e8TqX7cT4kImXuQr5279A4DeBEX8ayvprU4N3rovcALot/TH13T0fXDTJn0qXk4r3k9OTm4y7a6PzjjORzOOvn1kbEqbnEprPhRzwAKzwFLHk05hv6Yd6N+o3R6beG50aPSdr3qV6IJKkVp5ITIlXOCYn4Yexr0w/DO6YXymHFlR0e5r7tsM3fxgJbI6fW1ivTeT+SsYmr54cFff+5Cu5X+hb94Merp6/J/PusGvTE6724eGJ7RpSFOkKPCUZvBPBccoHBet3Rwe13rX9tw/PjXzZ5hKvr8SfhWKkeA2REAIa4GD6p0feRdWBnvxjv2PckVhVfBf4A29uG/X2i+Ui2eYn8n8NryuDr3jPfWSFV5k44UT137eshIP2K7/64cObbheqZ6lCp+Ydt8TBO7vTM5od1+/NR4SFVhoLpKKt410lnE8LTMzo3V2dLznxLkhYgQ9obiVjEDln7mVjEodfYcpw+MAsftg/7qSDbAnb97sCSb0Yei2fqOcbovVqKNnNO8HmAE9Cv3Wp+uoWjt27HpXNqH9WTKR+kBHKqEFbvo5y3N/avfu4g23R45f3WGa1k9ZicTd0zPTf/f6O7f8dT311Jp2fHzmgJlI/N70jPPe4bEZ6Kg4qw0lqlrLiNKBiLWerpTW25PUbkPXZViW62ecHz+4d8PXojTirzwEyhq8rTwYFtRjvpX/rlwJ+iSXugPbMuyKBOHo3geRJtuT7PujcmVUCuPJlhnL/9NUqvMD2eyM5sxMaIlE4n7XML907tyNjcxHQjty4sZv66Z1xEok/xNW5n4uZSf+8sT5m++vVO58wkEu5sR09pd9w/rWyET2vReujiqygrSopn/zKZN5qMeirotKeTyolm7p/+X06Wvr51ue5Gt9BISwFjiGsLl6N6SrvylXDNTK70D4mX071pwtF88w6Jd/DG/1E1u26NOV0pQL71y3/8PJVOcHMzPTWkcCH2YGOaTTaS2RTN6f1fQvvvDK1bdnbO2JZCr1SeRfn05Pa1PTU0gXJBKW+ecnzlxvCGndhFQ1NRP8bcY1/vjS9bF1V26MwHwsVKiXa3etYVw1TNhYJ3TDjQCO42jJVMcez7J+t9YyJF37ISCEtahjGjxkGDr2DJZ31D8h5vUQJL5RPkXlUMM07u3qSGidICvkzzuSlmlZb0olrK9hD9v9JCrPC196JoPMAolFg6CV+PPj54YeyWecx8Vk2v1Q0rSfhFT18LnBmzBRyNalp5qrSuq7kiAsh4SFa7oZ9M0wzI+cPHOjZPo9V1kS1z4ICGEt4lhiCvZrSa2jol7qzPXJPk6nIGbVbWfUvcr7hO9MP97ZVXpggOu6ajplYStj7l1XvbRMXbPAbp6HzSSBlkraNknrvfVCcPt2sHYi7f3pTDb47KUbYxuvKqkKpYBXKBnV869c3WgbDEixAck0FGFFfEzJzbIsO9C1TyrcymWWsLZGIHoW2rqTzdo5dXyykz0NC8l779i5vu4zwM+eHVntGP5jqVTq/6AkVc5NZ3wNH2lVxNWZNIukMSjiNd9z0+CHp5DXAdX4SAg203w8GB5IATtODHzdK8C15kEjhXvNS9rWA11dnfcMDY9prscss48RySakrOLWqODCoIKAgkuVgsS0urtD60haeV1YYVbbtjUn6/74HXvW/11huFy3PwKzT1r797Upe3jq4sib9u9Y+wxe+vh7W1N7jx49v6ZzbffnQD4/Cj1Pfjx54XiBls6GVuTUc9mQsOIO9mPQFdkIRlz4fy5JLm2ZMOqTcJaXIqpcqnixVe+rdbZ3dbc2OT0D0wZIibHSksmklslknvx+//q3PiKnXcTQae/b+LPQ3r1t0969cOL6G7o6E09qgZegdMJBpVQ1DbKCpyUt6oPKz/4NEJalCAuZFIuEVBJd+jgLh4rvAiFqUVGkhJZMWFp3Z0obGSu/d5gSnWmavuO6h+/cvYHSobgVgoAYjrb4QPMUiGtj1/79jBMkLBwiTlMASlYzTkhWCJyTrGAyMOFkst/BoYMmuIIyGJYcMXMMdNwHPhYN1qWS1t6ZLGaKZL8yzFXTr15BooLLMugHMBRNKgW+It8y9TEcJGt4rvcRFCCEVQbFdg0Swmrxkb0+cf2XOzq73kgdFieEXF2jdEUJKQH6SVWQrNjtZDKlpTPp38U58iUbthk/Ph7sN6zg/xudSGvD4xkq6otcnnjyF0XRRTflkyC0IIJE1JG0QbqGNpMNp5xFhRTcZDNoj66988SFm5vv3LX+WkGUXLYxAuXnCW3c4XbqGs9hwjv+a9lsuN+ahOJSCoLjNDAFvVUll0p1aNPp6adTweSflEszPO48oFn+4yOTmR+6enOshKyYhzWpf/jDuuf6x2aV/qNRaPG/1d0gUXWCA0uu7GhMmkqmerEc8KOVU0lMuyFQ+Ylut562YX9Sncmf7Ojo3BDZWbGLtMkiUVXSWTFNuMqWuYG530f7+/tnGFboxsfdd9mm8XdDo9O7rg6NFq0CFqZr5DWlK9qV0fZqGvZchSuPlevB2VmG/hOV4yWm3RAQwmrhEcW64qu4ykfJho52Vp3J8quBYQooqWDKADftBd6HD+5efyoKj/zR8ew/hWXY56/cnFh7a3RCTTGjuMX0SVB9qzu1qfQM+jO3dBW1g6uVSHv/qVNX10Vh4rc3AkJYLTy+WA/8ou9kJjo7bOh+DLVFZ64TEbCyBktxI5PJZj56R//Gx+NdH5vM4vuI+p8NXh9LjU1iw3EZhXc8TyPuuV9wDaaCfBjTM06N0hVWQmHBDzvSDZ5tvqYR7ZAymh8BIazmH6OKLbzv0KZvJEz3ZzEFnEolaEtV2XEaCLKadrIz//TQnk1/EU85NuH8th8Yf4j9gMZUOrNkZEVZCnsbtTU9KW18GqcKFyjh420sd2+j33pg3F8uTsLaDwEhrBYf04O7N/2t7/o/C2FoGnsIy/YGlvAwSfCvZzLOe+8oR1ZT3u/5uvHJC9dGtJlMrfqjslXVHwjpat2aLi2rjFFLjUSrFUjlO0juddXSSXx7ICCE1QbjiHO0/hofbPgwpnDTOR2V6hWNQqGUx34890noet5yaO+Gko3Y45PO7/uB/lvnrwxrWdha1absbgxo1FWtwplXqYSJY5Nn5lU3bLHQmGA/yko0plVSSjMjIITVzKNTR9sO7dv8RSeb/T9BWmMkKv4D+YzBXuljV7yxd+zfte6VeHGKrHTz4+cv38JWmyUmKzSGG5z7VndoE7kz3uPtq+Welvhwm39weVjOyaoFsBZPI4TV4gNY2Pw79mz8KyebeRIH+VEZTaX0sf27+v794TKmCxNTzr/2NOPj5wZBVjjdYSklq6jN69dyKuhqmWztivYob+RTSkPbe/xMdlMUJn77IiCE1W5jq+s4dYEO6mzsYAmvi/+CrH7LDYxPcBq4HGTFVcG1ULLT5orS1ULIkoSFI2cMHKG8obiXcteOCAhhtdmo6gaOh4EWWlkyYU9gvHswXfgV19d/7+LVkSWfBrItJJhObL/p7elQR8fUZnEV70XxPc01sM+xrzhU7toRgZIHuh07uZL6xA3LBaYB+Ar8rBsfz34YX1j+D5eu317QNGy2xPquSE4mDuXb2IujY2AgytNE67RiKFshzuwCR5s9ZSMlsK0QEMJqq+GkBKOF5yFzRoidK5BoFCeMjM/8mG+a//Xy0Li55KYLBRiTrGjwOQ1br4VMBQuKVJeQKVPxMLlvPwSEsNpsTEECmBLSgbHUpwD1YGwse59l2p+9fmuig4fiNZIowrqq/6Xeqm9Vh9JbjcOKvqFtACX7gV8kTVZvkaRoRQSEsFpx1OZoM2iKxxuHLtDcsZlgLzYZfv7m7XSv+r7fIm234XSP/8o5ktWqzqSyZr89PoXPYDTYkZvziw0NLluKayoEyq4iNVULpTF1IaDjHHZmoAW4aep9geN8fiLt998cGYdtVp7K6iqzXGJFUCAi7jdkuapsBJKcPBwgyP8YRyV7B04Q3dDbpY3jg6gupoMNla5U41BbUN9n0sr1ScKaHwEhrOYfo7paCAW0WiWknihhW/0Tabf/6tDtxpIVSIhGnz1dSXUkDL8fSHKi4/lWPId9Kp3Vxqegp8J/m9f14D6DQ/nmb281FwgkZ1Dj7bnSSFx7ICCE1R7jmO8FJJr8jCvjeNrIxFjDJBpKVaSlXhwDw384MyucBoLAGEfHI5ptO6n1YAq4FjorH9IWjUOnFlF3pj62aui3whbI33ZGQAir/UY3XCVEvzgdw/8NcSyGUhSlpVWQrFg2p39xp0JYLyIohaXxdZ2FGofG6yi85/QS32F0Asu8URgu1+2JgCjd22xcsVElPC85169Gaa1YTkRWJKpSqooBiQQzONvq9sRULKKxtzzAEJw1api2EFZjoW3K0oSwmnJY5tcoSD09HanEDztubnfO/IopyUWC6sUmZUpW5aSqkgwgK04DxxaZrFivacCaIdAuH9zaM1rSDgloOwSEsNpoSMenvU93dXb+EE5taFivKElRqd67qrNmsqIF+yjMF/i56MV2JqadYKxXMDXM6+4Wu04pf/kQEMJaPuwbWvPticwj4Il/NnTrdl7JrqaDC5wTUle1GmdWWVCw1+JotjA6PgnThsIdQrXknF8arkJi/+R355dbcrUaArU9ha3WqxXW3tHR9C5dN//T9eEJ3aGdUwP7T0V7F86Mr0VW4mF6o2NTS/ilaB2HDmb8wA2+08AuS1FNjIAQVhMPTi1NgwRkGKbxRxMz3uaJSRzVUkumOtLwo6Zc7aOkVdEhynN9NQ1cyuNqeEqD67mX9TXGyxXbJhFthYAQVosP58S0909czfqJqzdGODVqaG/IUbCWr2p0yukfp4FUtDfeir1yl8IPUGjPHFy/fqJyKolpJwSEsFp4NEfT6Z3YBvOp8MvMc0hAi9hHNQ1cBrJil5TUZxhfXsTuSdFNhoAQVpMNSD3NMTzzU1PZYAM/ProYkg3UV5rHT8lXmA7SwnwEq4FLLVkRI04HM+n0LdvzvlEPZpK2tREQwmrR8ZucCd7hePr7rw2N5PfxLUZXON1zHKz4kb0KnIttP6Njk8tyaimbwXPrsW/yq3v3bhoqaJZctjkCQlgtOMCYCnU4GedTI+NpQ32XbxH7QOmKG5nzdIWZJz8HNkKygqI9TmSL2JSiovGVn0A39c8WBcpN2yMghNWCQ4zPc0HRbr6GEs6chJFnmfl3knZO4/hmII1B6fiFG9br0s6qAeXPp2WUrhzHeXH/jr6n5pNf8rQuAkJYLTZ2kK7Wul7w6zeGx9DyUsZovOodOizosTg1TM9k1Wogpa7lIisOF+w48E/7E5B1Y/cgtdizsBKbK6c1tNioT6X9n3MDcyePOo7OoJqrC6S0+ZIYV+GSOHxvc18PJCxXG4ed13I727axqTp9yk9rX1jutkj9S4+ASFhLj/m8axwdDdbgELxfGsLpoZyqVXPVU1QugVJUV0dC27p+FaaBWWxknq6ceAljTNMiAf/BoUMbJpewWqmqSRAQCatJBqKWZpgJ731Zx9pJM4aK0hXe5vlKVFEbKFlxs3PvqpSSqpbzKztRm+gnEkktnU6/2GFMfa4wXK5XDgJCWC0y1iAR6/Z49iOjY7C5qkG6mk+3SFQGlEP8FFdnygrNFqBsn1OxP5+K5pGHbcBhqhT8fqu/v39mHkVIljZAQAirRQYx7Wj3Zj3tddQjVVJ4l50CMjHe8mqOTJCCvmoTyIrENXx7Uinbm4Gs2PZUqkObnp76i0N7N36tWl8kvn0RaGnCGhgILKPn3B3+xKVXDh8+nPseX3sOlpt13+P4uonv71WeDqLr1ampFB8S1JrulNaHc9rTMxltcpofOeWns0rTLkeIZUHRnpm5YibMf7kc9UudzYNAyyrd8ZLpWvfgQT8w+oyevXeo++bBtaEtQd9s1/ffRsV3I6eDJCp+nourgH04UZQnhIYfWm1o8xdUGCU8/E/bil89sH3dlQUVJplbHoGWJaxnXri2HTvd1nEEcCBS3z++MLi75UejQgcmJjL92ax/gNJPo6QekhVXAbdvXI3D+XQ1Bcxiu02zTAEjKFIdHTQS/S8Hd2/4YhQm/spFoCUJ6+mnL651gkwRQRmBt33gO+c3teNQYin/oG6aKX5rcKEukqqoWN+Ij5vy81v8UATDG0WGC21jlJ96K6wKPpWd8H8jChN/ZSPQcoR1+vTppJPS7iw3bIZl7n/++eFV5eJaOczX9Z2YvM1LPxWpocBHKv8qHHdMqSphGUqqahaThfj40ITBcbLnsDj6oXvu2bS4n96JVy73TYtASxHWo48GxrUx+5Cu+XY5RH3PMzLGxF0ktXLxrRoGNVPPfNtOolIrgElLGYH2wbZqcipdIFVFlDbfGhqfj9bskCaHHS/7gTt3r73Y+BqkxFZFoKUI6/C7Lu/Bl1jmlKB8PUhcHjHufuyxx/g5lbZw+BL7bX4EoiZqyS0T0uM0j1+82QSl+ua+bhxj7GjD2LicwWkLzaarigbKsmDJ7gcTmezMBw/t3ixntUfAiK8QaBmzhq8/f26j77pbaxo3w+jetPf1B5D2RE3pmzyR4/nH+Mti4Wx1dUrCHO0lSVGqskFUnakkpn6mhu086jgYHkWTW3Wbo4Tli6L5gqYHE47vfeDufVv+YflaIjU3KwItIWEdO3a9Szc0ElDNDqcLbHjmxas7a87QxAnX9ljfxcr+Mzs29ykpi1O8iJjoR/cm5o7dnUl89LRLW93dyWmVIip+Kp7pmlWqIvQ8Mga9Gslm3Efu3LX+K008HNK0ZUSgplnGMrZPGxgYsIKeXa/TA61jPu0w0+7xBx/cd3M+eZspD0wbDgWm+RXP13cODY/jWGKuGAb48jG+agNpilbqlKZoWDqDY2AyjtNUlupzYZlKpXgaxIVMNv0zd+/d+uxcaSVuZSPQ/IT13TN34QRvZW81n6HSDdMLUqmjh9tgd//Fi8OHEl3JL3Z2dh3MzGA7XU664llVWRz/QhLjNYmsmaWp/DjCjqIDdlaZTOZZ1/A+fGj7hjP5OLkQBMog0NSE9cSRszuswNhdpt31BRnazM3U9IuPHDrUuG+419eChqU+cvzqjp7u5P9KJpMPpqc51Zv9QntLkFQBEqZluVCw/7nhaP9i376+8YIouRQEyiLQtIQ1cPT8GjOw7vE8tyFtxBrb2MBXdh579FF99g0vC0nzB548ebNHT2l/aFmJj1BPBYyav9EFLaQ+jdPAVNL8/pZ13a8qiJLLOhAAjvrTRy/d0enbF+69d0tzHFhWR/vnk7Rple6mp+9uFFkRGF8LVj/08IUN8wGp2fIcPLh+4sCu9R+F3ucj0MLf4vaVVnChqYWmdaQS2jpY2vd0djh86Vqh7c3Yxm8dudTPxaW0lrn7yJEjZW0Tm7HdC2lT0xKW1xecgHE3FDWNcb7uDh6+r/96Y0prjlIO7ur7TOD5b3ayzt9ylY0Gl83qKFXZsCXrXdOlrV3djf2LBr556JOshLDmMWhPPXV6vav5O5jVxYLUhNl3iIbV8yiqpbI0bQcP85C2Xu0l3dczC0XUN4Pzb71339mFltOM+Q/0rzu5f2fvu1zH+QDOt3uZ0pbVRMRFouJK5qqeTkhVqyBdtdUmhGV5JI4cudrpd5kHiyp3tTU/8s6r+4rC2vCmaQmLWJO0Ep65INJK2tbpt75298U2HLuiLh3oX/95L+0/kHUyvwTieiUJHVEimVzy1UKeWMqv2pCoKEVFRNXT1aHawnBx80eAZj7TwcxdAc5Gi5fiaNnNT37nCk4xaV/X1IRF2B94YHt63qQVaCcfePX2K+07fMU9U7qtHev+xE/7r3cc70O+6w1gxuV0dHZiusgvJS/O7IskRXLs6KCxqj+B26t9a3uUREWi4plbQlTFYzXvu+7tB3EIUGel/L6e3TNw5NS8zYAqldss4YvzBC9C7559drAja3qvDoyg6pwCP+KBZaVOPPjazS1vMLpQKE9fuPnawDB+EqehPwzWuAuSl8LPg90WVxhJJPWQCUmPBAWTBEz1TFUGpqO3wYYvIPgr2az35a2b1/50V6f1e1NTlVcvEzB0xRekj67usu5FmS2/crvQcaol/zeeObfTSOj91dIq28PxiaOHDx9quy8LtQxhcZBqIS0Dhkl2l/3yA4e2j1Qb2JUUD1Iyz1waOQib0vsxKXsAFvH3wMB0JySwtZC+DBPTN5BOCEnhrI1BuKe9l6tIzsVCiD6E0DOabrwI2elZ09aP7N3aNxjheXvK+a1OENa0EFYEyYL9rz072Ju03ZpNQKj7Xd899cKhNrA9LASvZTY/s9GcHoK0XsrakLS8UklLxyl+/rj+/Qfu2367sJNyTS7SuZfneO7ffweBGScu3NwAqWgrTvTc5jjBZmw87tMCfRXYKQWOgula4OiBOQUZ7DZuhrAGdQXxV0zPuCaGnkv3VPGHOpPw7+QPR62OM5HhdNddGOeX2kmCbSnC4mDlSStVTFr4eLljdHV+702vWz9R66Cu5HS5h5hmHvz3QiOxwJTRo2BGgY06dm7OVhewYGAY6s75oD+ZDs4JPY9JyqSCQ7ABqftd5VFM3/j2Ja4mtsWpJQSq6ZXu5UZTKeJnsHpohiYPRqBn04nkS2+CQWW59BK2dAjwS0Y4IHDz2ERWG8Gnwm7iK9W3sFmbvrqGPzw6gW8eTmvTM07XmTPX28KYd7EQ3rjnvv1QFHbPt3zT9DcMPHd+13zzN1s+/hC2rKOo7NjeQdsxT5LEWrYjbdLw05eHtwWe9jl0542u62HZHZIVpalY/yIlP5X3MHYddLLZfy4fmYiBhNuB509vw+rG3tKY+kOwGHLi7W/cS91jS7v4s9TSnZHGLx8CICH9lXNDX+zpWfXuycnaBV2e3e567nAm4973qv0bzy1fD5qr5oEB7KXt0u7B3Loh7yhWVfypbOalh9+wr6U3mbfklLC5Hi1pDRE4ef7Wj+EEiZ+amqpvJT2bzWjJRLIPR3n9riA5i4DZg720DSIrlsrvHXSZ9p7ZGlrzSgirNcetqVp9/vz5FJTqj6JRejTdq6eBMzNpHP9s//QrF4bvrydfO6f1JrCX1mvcXlo98Kembjotr3wXwmrnp36J+pYNeh5JdqRem83O77gxkpxtW3bgOZ/g1HKJmt3U1Rw+3D+zrc89aunagnWzpq6PdxujLz388L4F78tdbtCEsJZ7BFq8/sHBoMPX/I9hyrGgnuDUUZzrnnz7yQu3HlxQQW2Ued++fZmJ1e5LoPB5k5ZpWCPXz+08du+99zrtAI0QVjuM4jL2YcIZeh+2+9wF49MFtYJSlgmHE0g/JlLWLJQPg7RmhtyXsJ18eja0tivsXhj6xy9ve/mRR5TRcG2ZmjyViN9NPkDN3Dz1FW5z9XM4i+s1ME1YcFNpUIrVLHzJzHnwjl0bn1twgW1UwPHjxxPXpztejR0HFTc+F3YXRwxdfdM9W08D0zrs4wtLaM5rkbCac1xaolWOvurhZIPIih0OdVm2haNTfqUlAFjCRnJP4HBn+iUqz6tVa2nGpTe/etsP2o2s2G8hrGqjL/FlEQC5GHghfplSUSMdvwaEA/9+4vjpa3c2stx2KIsfUek2dr+EuXNF2xEjSJx98w/tbFt7NiGsdniSl6EPp84O3W/Z1oPzXRms1GRKWdCJdeCIlJ+vlGYlh997r+70+EPH8NHJEtLCauCph+7bmj81ox1xEsJqx1Fdij4Zxi9AT2KSYBrtslgxhOD2gWOyz7AstFzx6zFHj1mGobYUYAgC9cHge3ddK5uhjQKFsNpoMJeqK6+8cm0X6noXiWUxHA8WxAdWNyQM45HFKL8dyiRpueM7jllmMGpnjO+1w9fNaxmXxiogaqlR0jQdAkeOBPjczrnOiQ6jw88ESSOA6KT7iQzOHEvavu1pZsLQg4QPP/DdZG9Xx/vWrOr+mfR03SvtNffdxleAQIgvTzjBT0w409Mpu2faufZy+vDhw5WPMa25dEnYqggIYbXqyNXY7i/jCyvdfmaVb5hdVsLp9LJGp43j1/1A7/RdvdMwPRzEboRnLVHe9vEvL3eXBOB4ZMta22H+TiqV2LJQ26u5u6Bju44Z3J7O/Lvp6cwPmBanOwQ4uNHRTWMK21bSvh1Mm642nTWCtKkH07rnTE72aOO0XZq7bIltVQSEsFp15HLthg5J/+aJE12m3tVjOPYq1/dW4cTjHnwMYhXOce8xDd3y/PJW6OpMdsTRVy4iK/rKMR/jwvz825VIHFzT3fkx13UW/dnhRy3GJyeeHEs7n1XNibUPFvY6vtGDw5vV9w0Vofn81qGhZfDhi3HX8SfQ/3HPMse9CWcCX0gel2OIFJIt+2fRH7qWRaYJG85NxldGzV4tGayFSLQ24+q9ULyu9gJfMU5ELTn6wUISTl03NHz1KzyiJLqmX657OLLdSJgoXTO7cBxyN172blier4YCvBsFdSNXV2dC35tKJrbzfPfFdjwvC/qs9MSMxxNRsSqmT6LhUDQHE+jUBE7UnATXTuLsrRn01K2l/x6+qItiR3TNG8V59KNB0DGSfNXGUXwJY2Gm+osNhpSvEBDCasIHgVLTt75/aQ0MnXpBNb2QgNYEntfr4wu/nBYpKQLtxtdwAh0SBX3VDe7nM/Ha5vf1Fb/CURS2bCTAWWuxR229qRsbQQQbUed61LfW14JVKKsTJ5sk8WUcHbtlNANyTOhgcmAGKH7p3m1FWpqtuZCu+LByVdKHVMjpKEQrBwIW9tnpXOIH+QTDSH/D9f0bmCLewDn1I4HmwtAypPDZ/oe9oXKf/aMPsWxSs/RR13FHrURiZE1gDR86tKHEdCDMKX+XCwEhrOVCvqBeHNaW6ui11/mWDtLQ1kEiWodXE4rwYgepAPssTPCMOjIdAk94TZ8pMZjch8HjDorGFUTUAwlkh64be0A9/ZCatiDZWtOyE7ClQmIdJICJFYhA+TRV4Fo5/QIHiUvrTEbkVRCxiJfsSBbfYk87OTExXxdazY5yUgiRKfpHQ1YSkONmAZY+gV4NIeVFfCXoLNA5h/Plb5LzWAyzF+IVXdNnvO/6GcsyhjC1vmWZ7s2pO3fdOqzriy9asnJxZREoerDLppDAhiIAEtCfO3F5rW0a6z1PX4/nf53nG5RqqrpieSnULEVh8cx4E7ugH78H8tG9eP/24oVezY+pkpA8b/abhPF8le75BqdsXUtaFeaTlTI2IByEoU1l8oq1mkokcZHElIRoWmpejMMCMyCvQXyy7JjjuUcgOl4tLCzCMpTHgFpcgkViX/dH/ax2Szf8m2Yqc/MN+1r7BM/C/rfCtRDWEozSkbMjq7NTY5t13dqE6dhG3wsSqlp+C9DDi0ifLrqmT1f6BgUaPjiHN0lJAGAfvpWcI4XjiHIMF6ocO/EjmMa9HeelQ1LT1PRpoce/sJwOTCQtc+kfGQp6Uxl+9JWtmL+jNEaJ0gKBgbsygR58B4sHfwV5aliVWg3vCHv6ymHcdG868IzrVsK6pnd71+/dsmXxbD3m3/W2ybn0T1/bQFe5I8euX+9ybuqbXMPbDA7ZCKV4uMOecyz+9OfmWvj9x9zEw6JW+JuOX298WhE6qtwLEV3TL1tb/AWj7sqwfqaro/sdmcyM+vBp2XzzDEzaBiQsNH+e+eeTjQ+ohwqnG0BYhfVzNYKrkOmpyauYYH8KvD8G6RPBszrC6Jq+ystl0ghzXEZjR5+O4+iZwTh+eG7Yqa5rq/3hGzzTSkXKn4YgIITVABjBP+ZzP7i8ydasrZCetuCHvIvFRs92SEdlpnCYE2LOQi12OA7RNf1yjrphHIyE9yOXPnfNMDg70DpdTf8DWDKs5rRvMVwChAWrUgh21HzllD0NrigqlxKVC7bKQuOOWeGiuI7OTkhb6T8C/Xw3xkel9cXxj6eIxiY3Hhx3X9dHsWJwDaa3l1+zd9Mt/F4tUk/ijWnP+/DBb8++LWqvnh0c7NDGta0pO7kl6zpb8AJzEUr91kYEFdeBRCt69Nm4+AsSl6jwjVGckY6VwPwUpLhLURx9xliWvxFHi/w+zB0SWCnLsVpxnoXesSI2ngp4zmRJXPgf/0IleGH51R6uwjeX5MR76qtITh7+8N9Cp4GF7Sm8Zl1s35pVXVomm/5c1vG+Wm284njHJeJq44/FjixUAld8w7uijW6+xo3MhW2S6+oIVHumqpewglJ87+LFtcFUcqur+1vxwPcZJqYPMOyhXw6GKI4+4/GwQpjCBhe+6XDIpFb06PM+np5hhS5eXzw9bLJ2pBLGv4Fe36BU4kA6IQGw8MUY6MJywVeqDs54Z69zrWdY7jI3G1ZtUiSV6zzDI3IqLLew/wu9jspl+yywrA1pEed5QceXPT3jBb/DLrA5ua5UHZ/4eMTbFx+fwvE3DJO8fANrjlctL7giJhRx9MrfR89R+VgJ1Y6currONuwd0FNsxwtV02mPlWGLy1TxlPHf6Hh8PH9xesvw9yRM+5PIRT2ZIgVKKZxWUY/PT8aTFPji0i3m4Ed1hDWV/7uY9bNGtiGqAyorJRWSqCgdkrQiR5KddrwPlsq8xfhG6efvx8dvtiQczDdmmPaldDBxSVYeZ3GJXxUMWzxq5d4fPz7Ym7X1HTAL2A7NqtJHEQ3qtCPjw3LoxB/v+OMZ5VVzR5aHWRuErYA+y4uu6fM+Xl9J/lh7bFvbY+vmv0bWos9tsXAWSLIiaSnyApHxJz6SbFSFuXTw8i86r5vVRW1m+6IHmUREAuI0lcREP5q2ztWPrO9/YK54xsXHI56+cePvj3qBfimZNS+J5FWMcrjptThsRd4dPX9+DcwEd5iQphwozfkCwJKaLv9ewHYKeicfSudwShcnJDBBOD3MTwGRO0cqLIj73jQTaejDBYaPHTBgJ/i5+HyYijd95sFhRzkzB7yL2IrCtGwezj9nOQVTUlfPwiicifnu5J0qHHd8mXHIG6ZD7JQqIk9kJK6QwAokMWRUhMaSeJ0vcfaiXNhs7PyuwpYV51Vh+EM/Pu2M9GckpyiOuZm2Wvtom+Y4me8xPbvIIujzPu6Wbvyt1ejL3U7Sv/v754ZHsORwaX3KGdwiJhO5pzY+Mivk/urVq52jTnIXlEc78LKu8qAMx/G8kHhyOicosz0ovM3IrIDKb15HSvDoOoqv+hMLYCOWI8ash0vmufryZVcqLz4u8fym3ov1xT/EVp4UDUTn4/iS0xW+sZTMojASmLqGp64iH4FRXJQ2TKj+lv7JVRTVxwQkm9APyaboGnGMzSVR6VR87ipsVT645ovOzi5tamb6zzB1/nqzjz+s9YetwLioZW5C8jq08K9+1IxS8yQsfF6ap1WL2BK8VOaJc6NbPcPrx7wJ++hmHQUPvOaQgMJ3ETtVlERDP0wVsQ19uPgcLQyt/Dc+p4jlL6k/1xa2qVyh5ApEzEoErm/DsPOTXV3de6anq36roFyRdYWVbVSshHJEMt98saIXfIu9koplYZL6m/hUz7kS/Jt0/PE8+Jj6X/Y6k+fv2tA1BKIvB/OC8WnGAmp5dpqx3XW36fjgYK/upXbhFd+BrRlqn16MfkrspkoC4hnirYjbUVWzs4rHx8uL3cerjwt0TA4RcBcsuX8Rn97q54okVsCKJJ9YkSvy1gJR4aOtnAr6OJP+L13d+BKBKMEzHhAfgDh6yzD+vqHjTDDvYpAxLqwEfVdbE9bpIEi6V27tdLP+LnzPrWS/XrRTnz5d4e79+LNY7r4kP+Z7Jv7z1LyPL0B4Tb+ci9cXLy+eJ54e8Rw//rqqcUR+HOrgYVprJbBl5E2w63oI64J7k8mUDZLGhmAXs19ucVkxP8gKQu4ptCxbMy2TW3KAGI4u1P207ztH3CDx/7bL+Cdse8h1Zy5ev7Dp8uHD7blJuy0J69TV8XW6l92Dl3cbLG6g98idbhDgdANcY1ZY9o2N4mpNr96GRf1Da3Wui0RW69F1bWslvp81LD2xDTOGu9DhQzBc7AcYfYlkAqo6A6ozqHNBYJTESGitTGShsp0qQSxT4AcoPJQw0LBlEPhBFakHDjoLvY+XgVIyg7WK77tG8n9pvpHXBbXL+OMBd7FN6KLu+uf27esbX9RHdIkLbxvCGhgYsDb3v2a7obt7YHakpKmYiqgE2ioqJbzIOszXcSov/DAzRRNehyJKvPx4+igv/ZLKEaCkoZxUFMYXE1I8f7Xyq/UHp9CkAlfbCF3NdlhS7IQguA0N2wiJYy1ktC5IISb1Okr5jSYruy2SGlYkIkKLSC3yy/WrUWGzSnjaTUX/QEhYQuNewLCdwBFKRkpOuAfr4sBnwwfDg6B0MHagORhBHNqHw5WxTwYav6lAt/42MBLfrYZXHO9w3Ftr/B0Hp0pY+tkD29ddAz5ln8NGjddSlNPyhHV8aKjbzAS7Dd3egRcvgRHJWyrHASw9Pyp+vlSxEluH0jWAGQF9VVZMpxHVRZ/xSKQU4PR5Xy0+/sLQZCFS9DN/XKtSeh5WrL2x+sMyZv+W67+vwz5eC7oDx12rm9pakNg639B68XL3Qh+2Bm94DySxHhg0daBHSQhiCbyyyMS9SDi8RhEHyYP1qD9qak0S4VGn5VYrSTRKEkKHWYYiHuQmCYb/YKYLqS+3H5LYckxJmz6qhSYJ5yNgzgtuclESpncBfN8Fj3lgJdCSGpHcGECoxrouMoHjzO+4evLLMB1VKxJV8Wyj8Q80Ix043jnTu32hlTdkh08Yn7UWcnio9Qs3pzZm0lN7LCOxIdIZxbuQ1+lAVFFxJB7aMeUIiPkiPRPjo2v6dPF4FVjHnxi/oQK0Az/bymf5uI7ayGLj6eM63nrbF5VNXzV7nv3HViQL3JAEaSV1z0iBNJIgJBCYkSKJYbdjEiSHw7a0BI5s6QBBbINUswMUsQ6E11UojZGccA9dcZDBdQY+TgyFTgkiEKYyIBvstAQzIRk8cBJ+A2j4gZFDFWAqjAp3V5IhQYYwwUJ57ByS0QINzMYK8FyrRxt3KNbXb2qG/UVNT5wDyCt6/A0boGbdqzPA4tD21SPquWihPy1FWHjQzYs3xnZkM95ePIZd8RccBx1xez/UPowp46I4+uVcLD9/8Plq0Gfy6Jp+uez5uqPyY+UtNN5DuVQc06drpv4bIDXsjtsMpdkOSC79QK4Xog3PzwF4IBNCBiIhpBSpoE8jioqWaM2KCRuOqwLXgIQItKIe0lCYD/lZjoqgGIo0+J++SsmMKA8eqQ21qHuUh2PfzQHN6vgG6vVK8GfmQhcbr3Yff+AEi3rtdCtNF8u/eIWD2ATXx4Mg0XH1Vr/hm7sDQw8PvyvTrriKWocEE0C6oM/kJRJHrAykgj6WGlq+JUifu6YfS6pu4/UVa6AgQcXKi78ApekhcWFBwMstEkTX9MvVHw+Lt2ex+4+Pg62CxgsHEwZbAdgWIJfA+ICkfDRYtyAwWWB7Ay8F8VT/KB0bOJ4Gx/CQfUKSwZGrJJs8iZHYgB0zMB+zk8hopQ8hEcEog2ERASIBAOL5fIrVIKLxXKtzKPZLgZUckvGf+/nH5HsK0+Uz3316zeAjj3D23Lwu90w0ZwNpiZ72UnvwfO/AXIFnXfLBxLOsHn6yiLqmr3oQ04LHX9hq6TFHI6txrlYWkHj98UT1lh8vryR/rIKq6aO204drdP8hRWF3itmLUw42QnW1CSTSA2IAIXkWOBYKLWw8wjVqNkEaFqjFwLQNJhWI4ZiFoiq6QX0SbsEo6HMoWVFCYprwjw6FP65BXCSoXJwiOwpnFK9A6yiWkQhRDwA9XAfpwLS/AqnqSKP7jwapquiznXFXMn6x8Yg/X/HySvLHKqiaPlZfvf0H6BloAM/v3tpzHkJwUx59Uxb4GE5Lfnt2ZGS16SX3+F5mq4llfegtwnaSR6J5EC8hPUV6IDaS6aDnoZ5DpYe6AtdgOr4pyhXLNPH0KKCo/DDP7N+S+mI6qHzbQr7AbdgW+iylWn0l5cf6E29ftfSN6L9lGl04x30tOtMHklmLhxpClW9BL4S1T+i2uNPRp+0FflD0AN9A9LHnmHGBBfJCE3QL9ALiguoJqiu+64gDzWGIIAlhzhaSDsMV/yjJi3BxyY9khP9BXBSzEMY/AFORGMmM1yyKZfmm+ZKuJf4uMHV1THEj+o+S864E7zYd/8Dliqp2MamvPbt9uw4dY/M4DnXTuMuXx/scK9iHLcbryzfKwvOJBSGNPl10Tb8WV0xYyMFymDdXXv46Kq+ueChJQI4WlSUqf8StOf5CNdXqr9afxe8/Gm6AoLAqGKyCGLSG350ACFzKM2FvaeOseEhFOsjItdQ2S6wYYmkOdl2+CfLBvmpIV55vYY2Qn6uAxAWC40zbhxSmWArcQj0TSIiSU37mx0kgVesgLereOSz8E5EWJa6Qzyh1hZEcO7xY4Ct9WLfNvwa+5xA2h6uGP6vMPxMsZ8WNf0Gf+cOCw9usq51a5+kNG9Sn1IjJsjoO0LI7EpVra/vxhPdFs7JyjYriohlbTAKGxO1C6oJEljseOLqmTxfPX66OucJK66OUNzuDjK7p05UIbGwX25I/vrj4BYrnD0uZ/Rtvfzz9fPsPIkgkbL0DZNMFRVEHFEY2ZCBTcwMLdfCsCCVN4SwpE9YG+ARNgD24IDHYSYB1yNCYDkLRFoC8oOUG40AKQx5IYyAmlQ6SF7dDoSof0hbJiApzqLs43aPc5UG+AvVQ/4T7nGQFQiJ5kdbAkmgH2Sz0FaWB4gLrad22v4nmuvPt/yzCc1+V4t0e4z93r8PYwDCvNANxLSthkai0jmCf5+jq6y6Y4SkjTfoKprgWufj9Dg3AozBmiK7pl3H8WDH3u0YfLY6u6c/HVS2vSvsxoygyTF2q/qNenEyjJ5NJPYGPRidME1M1/JYqwyoNq32Ihu4J0z5M+WA2DoqwEI9wfmEaEhQJzPNsKNOh0jJwrfRVJqbnNOrC6IGwQFzgHiKrpCuq2kE+FizrMXWE7IWCEKemg7hSiimOQchNIC3EchqpHlBO95TshQThkwF5TL9k+Mm/MZLGzVo3AlQdLzagDle1vCYd/wU9/5Z5ZcyZPnNow/J8ZHZZCGtsbKw3rdn7nIzTx42o0WfP1cPKuYJ6XPFs5q7p8zmKx5v8cdcxDeMPOR1fj+gh4X10TV/dukiC+nJPeLy8eH1hrtm/UVvpKxcrP2oL/dlcs1eQ9PCeo73wGcp+R2Xyvlp74vH19B9EkoA2CYKUlcQqJCQj6vkoyBjh/IurcJiy4Zxy2FMptRBO7sK3kClR0UYUZAX+wMqfC1ICiYHMYBsKSQsSFKaAUEqZLoiK00ASFsgpN0UEUWE6yOkiiArE6NmUb91OWwAAEuNJREFUszCNxA0c/uBoF04W86YOarWQAYjGmHBBEIkUiXEqib025hNmInWknv6zKo77Sh3/RvcfSx5Xl4O4yr5Y7NxiuEEQFT4uvs8yrF5VvosX28LLS185vsiRHkc9YPiJtrCbJIzHyx3gJdfpl80flZWPR6qIxJghus7xjSqj4E9UNn2VvN76Csqq6XIR+48OYEeGlcAaXhLfQwxNQcgQEI9IErOOxBUuCuDLz9Arm5iyOTaYy7Jty8hAb2VCm43ZmwnwQTbgFpAWyA4SGEKhaMdgYNpngKAcpeMCAfFjYGE4yAqco3RZ0LorUqOkxVkf6AgzvFBPFbISSsOUD+WRrWijpcwbmI4Gomj4yxAIv4bPVU+q9sfxk/EP36UlfP49N3vNWr/m9CZdX/zzjDDofAoW3XHVr9NPHdB8p2+uORl/mjFLUktMbBTtkSJbpLCRxYyD5OpJps/4+DJuvq5IIgoLqfi3pLzcRuloM7QSzKImsBSWG80LVKkxkSvOkFHaCjL5QvrPN9rwvaSVtEg2ICmQCNRQkGjwnlOpNktMxdds+GxcRFrIyCmhTQMEUJjl4qwtzPbAOVC8o0DUZroGiMmBpEUfRBZ4DvRUJC4/1GOpij1ML9XU0PJdFxIZGsOpJkkOQ0YdFh5CPodKl0WfRqQkVUhTIEf1iN4GkdJU4Rx/xsJfHkpfMv4cd+IAUJb1+YdkfSU7NXp6+/bti7qquKiEdfVq0Gl2TO2DonYzAcUTCv0slCB8FuGia/q8j7iAPl30aNIPHVKq55w+00MvjFLo05WmV8H5P9XLzydVF/H0xbGl9UGfjm226B98po2u6fO+0f3H9M7SbT1h+FoS00ybSmm+5/RZHxzbwWvVHtSvNuLRR4BKl0vPtHRhWh1SESUsNBkH0qjvNiAx4MA1JDBc4yBmTPmwJArJCFM+dA1SE5XsmFIqRTzKUrZYkMio78IUkauFoW6Mcbin1GWrOR8nqOEUEUQFmuK3ZdEw6NFg92s9j3XLp0CIsAuS8VdPkcKhCZ9/KAc81x/c3NdzFjy6KHZc0YPNh7VhDg9jYnh4co9n2dvx1nLalys7Rimx2xLGigfEJBQ0Xr149FkBVb04BQiTlPAFbTiDxRGKM1pJf5AgarPKG0sQu413N07hkCANO5m0fSebtCwziW5DqMISHTRMJCDF23inYbmsauNCHq+Vn1ta5dErzKN8psP/RiIXVpAegKJQ30Y06AQSEXdAIpdL0wbTNsLpoSIeCwRJHZYBpTusIFAIlPC0iqL5AxoCcmLPQkkLdITRCc0dSFqQD1A51g4pLOXmhZCwDMO2BpH9q6ZtDoU4oKQIy5yEynFnv+mzw+0+/q3Sf5yT4aYs89zq1alLIK7wYeQANcCpgW5AOaqIARzxcudrXrMTz+cuFAxBI1Rw06eLKz3xsnDikt+Mmr9mWBlXrbySeJAlTt8MXJImXHRNv0zx2GpWZ3r0KKqzXHlRHH26+fQf+mkbg56ADjppUuihMJl7BEhGtmnj+4Phj1lEUAzjaQcgJkzcqPPmlI/yjdJV8Trf/+hbeYyP0uMS0zSVF8SEaSELxkhR6a7IC1IVHkNMBWEkCljxYQ7YXgWKrDCHw2ohJDDKSkr5Tst3TANBp7DdgkTFKSOpxYMtV2i3hXQoJjwbBo3L4oibAajdXmSbCl01PEvi6x3PetMvwfi3cv+xHpPRk8GZvo6Oq5y5FvZlvtfqQZ5v5igfH7iRdHqrn/H24McyEb6ejCUxkCwqEATi8JDNKtWRIxI6wrLj+aOyQgIqLT/KTZ+OLYnCFGHE60PdSgzIgVmcfrbt5evjYkB97VeNyv8plx/UYoChElhYgB7KtD3PAUWRpejIVNzNAjNzyDuYRqnrMF5dIx4CkTrlAJQRps2FhZIX5lqYwfFLOygTBeSmkUhDEgNvIC7MR5ML6JhozoCpn+858G1utbH4j7BRT0Z9VlZzbTyOKJCKeCjkqYbkFBJh+DXCPVcKuXKIFURlm8WBoZSFOBCYmk6i33ioT+Kw1CegEMspcFfe+M8+rRySNum/YUwm9I7TPT04NWOBDg/nwtz16xMbEp3mPswIOuI6G7wBSlynz1pQWZEIP0smIcEEWN3QsfJDn+nj9FFSPh73wilgdE2f+eOumo4pPqWI2kI/LKu4RVXLq7H/kJopRUFhnkj4joNT9KC/BlZgAIVD1I+cwASVUBgCIsF1KEQxJLpGPKHGP5LYrAs5ikREnmJ61KF4K5cG1+REVS6HC1JauGroYYcOrLWUEp6MSF0UpoZgK5hV2dgEzeNLYbMBnRQZEUPnOwGMT6GOp57Kg/0WTCMYjnsQHpDmlJFTR5IcNt/alvV1PdF5NsKcLSpGG03L6QcjnWDpeIXqgFYb//A9wGi1+fMPDeqY7nae6uvT530KKp+JebkhHJyX6Fqz33X83tCgRr1d6gXBH+XnFtEwDmEVMBfAtbK7UvHxVTb1gGLQokbFVBZMDtUJHmT+dsPxmqSRU2nkrxkWxhfbOfEVwLov4sIaonSRr1qZy6vy8xliPbn+qPjYHxSm6mJwdB357DfaVtJ/BMLeW0/ayVQSR6TA5AB7h8kwmFeRrFBUSFYkJk7GsM+F5SuiCQmFBEriCskHYcxfEM9ozBjBS/yaKD//rBzndjD3BHswAcmqwFdhOWGugCw5owwpEt9sxMlVGWQEK4GlcAOi1XAcL6eLICfdcMFmNDnH7xdO/YTCHTkxM2B6EiSPbuXmHrZO5eJy4Iu6lfo2Gu8orFfA+PM9UMjnHpBIx9v+/Q9Wm8nMfcMTE1d7u7vP4Ec6fzy1wqOGP3xI63JHjgT2/rsy/boTbMP0pe78dVUWS5wjK0VUjIqNN3kA62ZYeIcfxofXDFNFUZBTT4W6m71mWBlXrb4yWSoEYWh0jVIUdJEmzA6o18mRDN7dCplCEkK8IiP4WRAU9OO8j5wimZB3SAhKYlJEphLkJCaSEP7PEdxsfVG5UWFxP6qPPngTlvBED6IWLN8dTPmg8ocFPPRXWBdlFWqqCEmLlhAgLRtKdLaAkpQNfRUM6DUQGOUiTimNEaT7FvRVw/F6K91XG4/mHf9KPaovvJ36jzfSS1mpc6mUdhnvhZL4a0GjZsKBKK+n0+kt0AHvztCAsIzjeeAeUKVPF1l101cBWCICxcGmcPalUeHRnyguIsJYej79fFnpKxdjrKhu+spVK69Ke+OW6SXlh7Xk/8b7D5umJKY6nUiQAEmp5ZKoD5Ay8kTFzcAsJIrL+ZREYCWAaU4ubXRNP8wfpuSuGubHMwCJhSuGPCiYJIMw5GV6xkfY0Wd+WoPiBAlEhvnzNluw3SKZYTkQHIQ5J1RQDg7Lw/QQGUIdFp4wcC9KgQ/7KkxjucEHROVmc3ZaCFfEjMxUvlPvBZ0WhT1Q1zG06hQKyGPA9qEh4bPRJuO/0p//WvoPyXpa77BPr9L1mn64QiJRT0vlP3jg1oyn0/th1dnN6VOkQyh8wVRuPpLUH9GHi+sckD4vLaj43NSHLwfv8cKjbGxdgc97JUpFpIRbpovKYHTUltkpHYkyEqNYf1gWfZU+Vn+JiMZERS4qKyTAMv1hmwoItLT/aL6OL9cn8A4mknhDkR5CUuh43ExhAXjnIQVxRQ9UwnU1JM73meHISINzlY/1Ir3jwNQBtui5IpU3K2mFZbEUEhgJiHlZhkqI8rws7hPFxBHlZ5romu1CGRSv2HyQEQiLPkwefJcSk2o0mU+F8Z46KswbKd8qvRUWiq7BsuoYlF/q+Jd839p4/KNnFHhw+Fbc819r/y3dHO7qsk9D2lLPBvEq59SLXC6CYSCq1OTk5F48g+FxLyQSvvyzhFK8taaYL1ACiYdkkSOg/HVO4irmAySLlR8+yHy5wnaWysTF7YmnRxdyecMXFDcxx3KjNCUEGUtb2r4Iixwh5qebxEG58v2Hkh0ERqlLp5kClNLkngLSyF8XExrZi089SYbFm9DRg1FCbEKyoxQE8sqFkTOgTwrDVIPCP/k8qpRcGrxMEXmxnpwjUeXbhjpgA2bBNsp0HPQWOiwNOnddw5YcNIdSFyzTlUKehEbrLDxDNn7osjCXPw5FO22qgPfKHn/pf8XxxxetvSvYlX8BxBVKCdGDmPPDhz0W+Oijjxof//jHt+Hh2oko/qKqFx4l0BJQmQIwS3RNn/fxZXqGFbq4nQzimI9tKFs+S1S1KJ9XoQkEfUQwtKg98fSzefMMwmx5F28/IqK2RLjM2b54/gX0H0v6+IiDZSVgHJogfYWNzDMUpCtsUkKg4pKIUJAsnNTlkjNWzfBCPMOhi8JAiCSqPBmyMFVQ1OdctQwLywNZ5cPCpDl80D6IhjzBASQF0sUeREpSJCyE4ceSpJXbEO2612AHepaTSRn/YrtEAD3n8xV/ntv4+S96nyGRO9gccQZmEPiBK3bRi5kPHcG+v2T32n2+53bxNY8oQyWIB0SR9OmqxMeTh5lm/8azx8srEbCQNSqTpUTX+eagwCiPqiWeQAXO/olHV2tPaYUFjWCxsQJjt7MV564K6iOB2Xj1adNGa3PqDMFl4XwSSnAQCUIibqFPlwtTwbiOkoSR+JvLx3KYv9BXaSrlLyifSegQBNMFTAWhiIeFArRZnoX+8Y2EzKhbnuNlYO9wFpZXkwoH5Kmj/6qOFTz+0n8+Y4Y/2pVIcJqY35+YJ6wjEN33ZzL9kPY3hWjx6Sv+RcByLIQAZZYQJSn2C944FRF/QkvjQ31XZDcV04GVPOGl+WdJEhVGbaNPV3d7Va7ZP83U/1ACgzTjkg4gjUFvHhGWkrPAPnnBLNeFSEKKfAbzOu9yBAUdVj6cZURpZuU3XOUILioD93x2IEnxxFGc9c6M+M93cHSNZVzHquBQDeMn4x898wQ2us7pgGvAbyU8/z5e5EupVEqtJirCgp4KHxVI7sbrQIYKHyKF3+yvIvEEX8FsQNk9qXwgBpgQwNo7p9OKrukzfdzF08+WTmYrV35YF+tU8bEpYImInGtLVH+8PkzZ8iQcVpjrawXCLOHH5uo/9JmWjbXHJMQcNhVW8bOklbsumnJw7Q+cgtVK2mJxAUNNKKncp54KHuzAwnjCE01B1UIHA1A80ik/IkdIfTj6mE8MXh2sSKZhdHUd+IcDykwFLj4eMv7Fv+il75c8/xEmeHaojD+jZ4LgbsPVVvO5iutg4oSAFCCiAqVp/jrUKRU8mzVexsube05ff3tiD0Q1wkP/ojrYgeiaftiheHsjLKL4GrudTxYvb0H9h94bpzeAwCD4cAqJf5SmlBjFH5D8ChVC1Q8KyIkrjtgbE64y4lqtINJHel5Hq4q4ZdsYzsWBWaU+rkFWtFzQbiNNnWciNbT/qD4+Hitq/FdE/3mWzmvQU+W4hZZPenQuRHRNfylcvfVjpUqz0Tj6dNE1/fm4euufTx1z5am3/hr6z6lj9A9ElneKwPJ3IYEVEpqKys0YFeUhoDBP4TV/+bjVIkfqKuu8/ixC/+tqR73111V4DYnrrb+G8a+h1tkk9dY/m7MxV7XUzwdP3ApBgCYG6Co+L6/+kcB4X0g0ERFFzwXjojBc5q8ZhqOKtWEoROmLEwSWBIHowVySyqSS5kIABEYhisRFEov8SgRWGD6K9OMgq8IwBIkTBBYXASGsxcW3pUoHgfF5iIiLPv9x+03kuLxMqaqsUj1KJL4gsFgICGEtFrJtUG6OwDhtJHHhqLOl+dBAG0AnXRAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBIGVhMD/D0fV/fpMMM+gAAAAAElFTkSuQmCC"
  1094. }
  1095. };
  1096. const NoticeBar = {
  1097. // noticeBar
  1098. noticeBar: {
  1099. text: () => [],
  1100. direction: "row",
  1101. step: false,
  1102. icon: "volume",
  1103. mode: "",
  1104. color: "#f9ae3d",
  1105. bgColor: "#fdf6ec",
  1106. speed: 80,
  1107. fontSize: 14,
  1108. duration: 2e3,
  1109. disableTouch: true,
  1110. url: "",
  1111. linkType: "navigateTo"
  1112. }
  1113. };
  1114. const Notify = {
  1115. // notify组件
  1116. notify: {
  1117. top: 0,
  1118. type: "primary",
  1119. color: "#ffffff",
  1120. bgColor: "",
  1121. message: "",
  1122. duration: 3e3,
  1123. fontSize: 15,
  1124. safeAreaInsetTop: false
  1125. }
  1126. };
  1127. const NumberBox = {
  1128. // 步进器组件
  1129. numberBox: {
  1130. name: "",
  1131. value: 0,
  1132. min: 1,
  1133. max: Number.MAX_SAFE_INTEGER,
  1134. step: 1,
  1135. integer: false,
  1136. disabled: false,
  1137. disabledInput: false,
  1138. asyncChange: false,
  1139. inputWidth: 35,
  1140. showMinus: true,
  1141. showPlus: true,
  1142. decimalLength: null,
  1143. longPress: true,
  1144. color: "#323233",
  1145. buttonSize: 30,
  1146. bgColor: "#EBECEE",
  1147. cursorSpacing: 100,
  1148. disableMinus: false,
  1149. disablePlus: false,
  1150. iconStyle: ""
  1151. }
  1152. };
  1153. const NumberKeyboard = {
  1154. // 数字键盘
  1155. numberKeyboard: {
  1156. mode: "number",
  1157. dotDisabled: false,
  1158. random: false
  1159. }
  1160. };
  1161. const Overlay = {
  1162. // overlay组件
  1163. overlay: {
  1164. show: false,
  1165. zIndex: 10070,
  1166. duration: 300,
  1167. opacity: 0.5
  1168. }
  1169. };
  1170. const Parse = {
  1171. // parse
  1172. parse: {
  1173. copyLink: true,
  1174. errorImg: "",
  1175. lazyLoad: false,
  1176. loadingImg: "",
  1177. pauseVideo: true,
  1178. previewImg: true,
  1179. setTitle: true,
  1180. showImgMenu: true
  1181. }
  1182. };
  1183. const Picker = {
  1184. // picker
  1185. picker: {
  1186. show: false,
  1187. showToolbar: true,
  1188. title: "",
  1189. columns: () => [],
  1190. loading: false,
  1191. itemHeight: 44,
  1192. cancelText: "取消",
  1193. confirmText: "确定",
  1194. cancelColor: "#909193",
  1195. confirmColor: "#3c9cff",
  1196. visibleItemCount: 5,
  1197. keyName: "text",
  1198. closeOnClickOverlay: false,
  1199. defaultIndex: () => [],
  1200. immediateChange: false
  1201. }
  1202. };
  1203. const Popup = {
  1204. // popup组件
  1205. popup: {
  1206. show: false,
  1207. overlay: true,
  1208. mode: "bottom",
  1209. duration: 300,
  1210. closeable: false,
  1211. overlayStyle: () => {
  1212. },
  1213. closeOnClickOverlay: true,
  1214. zIndex: 10075,
  1215. safeAreaInsetBottom: true,
  1216. safeAreaInsetTop: false,
  1217. closeIconPos: "top-right",
  1218. round: 0,
  1219. zoom: true,
  1220. bgColor: "",
  1221. overlayOpacity: 0.5
  1222. }
  1223. };
  1224. const Radio = {
  1225. // radio组件
  1226. radio: {
  1227. name: "",
  1228. shape: "",
  1229. disabled: "",
  1230. labelDisabled: "",
  1231. activeColor: "",
  1232. inactiveColor: "",
  1233. iconSize: "",
  1234. labelSize: "",
  1235. label: "",
  1236. labelColor: "",
  1237. size: "",
  1238. iconColor: "",
  1239. placement: ""
  1240. }
  1241. };
  1242. const RadioGroup = {
  1243. // radio-group组件
  1244. radioGroup: {
  1245. value: "",
  1246. disabled: false,
  1247. shape: "circle",
  1248. activeColor: "#2979ff",
  1249. inactiveColor: "#c8c9cc",
  1250. name: "",
  1251. size: 18,
  1252. placement: "row",
  1253. label: "",
  1254. labelColor: "#303133",
  1255. labelSize: 14,
  1256. labelDisabled: false,
  1257. iconColor: "#ffffff",
  1258. iconSize: 12,
  1259. borderBottom: false,
  1260. iconPlacement: "left"
  1261. }
  1262. };
  1263. const Rate = {
  1264. // rate组件
  1265. rate: {
  1266. value: 1,
  1267. count: 5,
  1268. disabled: false,
  1269. size: 18,
  1270. inactiveColor: "#b2b2b2",
  1271. activeColor: "#FA3534",
  1272. gutter: 4,
  1273. minCount: 1,
  1274. allowHalf: false,
  1275. activeIcon: "star-fill",
  1276. inactiveIcon: "star",
  1277. touchable: true
  1278. }
  1279. };
  1280. const ReadMore = {
  1281. // readMore
  1282. readMore: {
  1283. showHeight: 400,
  1284. toggle: false,
  1285. closeText: "展开阅读全文",
  1286. openText: "收起",
  1287. color: "#2979ff",
  1288. fontSize: 14,
  1289. textIndent: "2em",
  1290. name: ""
  1291. }
  1292. };
  1293. const Row = {
  1294. // row
  1295. row: {
  1296. gutter: 0,
  1297. justify: "start",
  1298. align: "center"
  1299. }
  1300. };
  1301. const RowNotice = {
  1302. // rowNotice
  1303. rowNotice: {
  1304. text: "",
  1305. icon: "volume",
  1306. mode: "",
  1307. color: "#f9ae3d",
  1308. bgColor: "#fdf6ec",
  1309. fontSize: 14,
  1310. speed: 80
  1311. }
  1312. };
  1313. const ScrollList = {
  1314. // scrollList
  1315. scrollList: {
  1316. indicatorWidth: 50,
  1317. indicatorBarWidth: 20,
  1318. indicator: true,
  1319. indicatorColor: "#f2f2f2",
  1320. indicatorActiveColor: "#3c9cff",
  1321. indicatorStyle: ""
  1322. }
  1323. };
  1324. const Search = {
  1325. // search
  1326. search: {
  1327. shape: "round",
  1328. bgColor: "#f2f2f2",
  1329. placeholder: "请输入关键字",
  1330. clearabled: true,
  1331. focus: false,
  1332. showAction: true,
  1333. actionStyle: () => ({}),
  1334. actionText: "搜索",
  1335. inputAlign: "left",
  1336. inputStyle: () => ({}),
  1337. disabled: false,
  1338. borderColor: "transparent",
  1339. searchIconColor: "#909399",
  1340. searchIconSize: 22,
  1341. color: "#606266",
  1342. placeholderColor: "#909399",
  1343. searchIcon: "search",
  1344. margin: "0",
  1345. animation: false,
  1346. value: "",
  1347. maxlength: "-1",
  1348. height: 32,
  1349. label: null
  1350. }
  1351. };
  1352. const Section = {
  1353. // u-section组件
  1354. section: {
  1355. title: "",
  1356. subTitle: "更多",
  1357. right: true,
  1358. fontSize: 15,
  1359. bold: true,
  1360. color: "#303133",
  1361. subColor: "#909399",
  1362. showLine: true,
  1363. lineColor: "",
  1364. arrow: true
  1365. }
  1366. };
  1367. const Skeleton = {
  1368. // skeleton
  1369. skeleton: {
  1370. loading: true,
  1371. animate: true,
  1372. rows: 0,
  1373. rowsWidth: "100%",
  1374. rowsHeight: 18,
  1375. title: true,
  1376. titleWidth: "50%",
  1377. titleHeight: 18,
  1378. avatar: false,
  1379. avatarSize: 32,
  1380. avatarShape: "circle"
  1381. }
  1382. };
  1383. const Slider = {
  1384. // slider组件
  1385. slider: {
  1386. value: 0,
  1387. blockSize: 18,
  1388. min: 0,
  1389. max: 100,
  1390. step: 1,
  1391. activeColor: "#2979ff",
  1392. inactiveColor: "#c0c4cc",
  1393. blockColor: "#ffffff",
  1394. showValue: false,
  1395. disabled: false,
  1396. blockStyle: () => {
  1397. }
  1398. }
  1399. };
  1400. const StatusBar = {
  1401. // statusBar
  1402. statusBar: {
  1403. bgColor: "transparent"
  1404. }
  1405. };
  1406. const Steps = {
  1407. // steps组件
  1408. steps: {
  1409. direction: "row",
  1410. current: 0,
  1411. activeColor: "#3c9cff",
  1412. inactiveColor: "#969799",
  1413. activeIcon: "",
  1414. inactiveIcon: "",
  1415. dot: false
  1416. }
  1417. };
  1418. const StepsItem = {
  1419. // steps-item组件
  1420. stepsItem: {
  1421. title: "",
  1422. desc: "",
  1423. iconSize: 17,
  1424. error: false
  1425. }
  1426. };
  1427. const Sticky = {
  1428. // sticky组件
  1429. sticky: {
  1430. offsetTop: 0,
  1431. customNavHeight: 0,
  1432. disabled: false,
  1433. bgColor: "transparent",
  1434. zIndex: "",
  1435. index: ""
  1436. }
  1437. };
  1438. const Subsection = {
  1439. // subsection组件
  1440. subsection: {
  1441. list: [],
  1442. current: 0,
  1443. activeColor: "#3c9cff",
  1444. inactiveColor: "#303133",
  1445. mode: "button",
  1446. fontSize: 12,
  1447. bold: true,
  1448. bgColor: "#eeeeef",
  1449. keyName: "name"
  1450. }
  1451. };
  1452. const SwipeAction = {
  1453. // swipe-action组件
  1454. swipeAction: {
  1455. autoClose: true
  1456. }
  1457. };
  1458. const SwipeActionItem = {
  1459. // swipeActionItem 组件
  1460. swipeActionItem: {
  1461. show: false,
  1462. name: "",
  1463. disabled: false,
  1464. threshold: 20,
  1465. autoClose: true,
  1466. options: [],
  1467. duration: 300
  1468. }
  1469. };
  1470. const Swiper = {
  1471. // swiper 组件
  1472. swiper: {
  1473. list: () => [],
  1474. indicator: false,
  1475. indicatorActiveColor: "#FFFFFF",
  1476. indicatorInactiveColor: "rgba(255, 255, 255, 0.35)",
  1477. indicatorStyle: "",
  1478. indicatorMode: "line",
  1479. autoplay: true,
  1480. current: 0,
  1481. currentItemId: "",
  1482. interval: 3e3,
  1483. duration: 300,
  1484. circular: false,
  1485. previousMargin: 0,
  1486. nextMargin: 0,
  1487. acceleration: false,
  1488. displayMultipleItems: 1,
  1489. easingFunction: "default",
  1490. keyName: "url",
  1491. imgMode: "aspectFill",
  1492. height: 130,
  1493. bgColor: "#f3f4f6",
  1494. radius: 4,
  1495. loading: false,
  1496. showTitle: false
  1497. }
  1498. };
  1499. const SwipterIndicator = {
  1500. // swiperIndicator 组件
  1501. swiperIndicator: {
  1502. length: 0,
  1503. current: 0,
  1504. indicatorActiveColor: "",
  1505. indicatorInactiveColor: "",
  1506. indicatorMode: "line"
  1507. }
  1508. };
  1509. const Switch = {
  1510. // switch
  1511. switch: {
  1512. loading: false,
  1513. disabled: false,
  1514. size: 25,
  1515. activeColor: "#2979ff",
  1516. inactiveColor: "#ffffff",
  1517. value: false,
  1518. activeValue: true,
  1519. inactiveValue: false,
  1520. asyncChange: false,
  1521. space: 0
  1522. }
  1523. };
  1524. const Tabbar = {
  1525. // tabbar
  1526. tabbar: {
  1527. value: null,
  1528. safeAreaInsetBottom: true,
  1529. border: true,
  1530. zIndex: 1,
  1531. activeColor: "#1989fa",
  1532. inactiveColor: "#7d7e80",
  1533. fixed: true,
  1534. placeholder: true
  1535. }
  1536. };
  1537. const TabbarItem = {
  1538. //
  1539. tabbarItem: {
  1540. name: null,
  1541. icon: "",
  1542. badge: null,
  1543. dot: false,
  1544. text: "",
  1545. badgeStyle: "top: 6px;right:2px;"
  1546. }
  1547. };
  1548. const Tabs = {
  1549. //
  1550. tabs: {
  1551. duration: 300,
  1552. list: () => [],
  1553. lineColor: "#3c9cff",
  1554. activeStyle: () => ({
  1555. color: "#303133"
  1556. }),
  1557. inactiveStyle: () => ({
  1558. color: "#606266"
  1559. }),
  1560. lineWidth: 20,
  1561. lineHeight: 3,
  1562. lineBgSize: "cover",
  1563. itemStyle: () => ({
  1564. height: "44px"
  1565. }),
  1566. scrollable: true,
  1567. current: 0,
  1568. keyName: "name"
  1569. }
  1570. };
  1571. const Tag = {
  1572. // tag 组件
  1573. tag: {
  1574. type: "primary",
  1575. disabled: false,
  1576. size: "medium",
  1577. shape: "square",
  1578. text: "",
  1579. bgColor: "",
  1580. color: "",
  1581. borderColor: "",
  1582. closeColor: "#C6C7CB",
  1583. name: "",
  1584. plainFill: false,
  1585. plain: false,
  1586. closable: false,
  1587. show: true,
  1588. icon: ""
  1589. }
  1590. };
  1591. const Text = {
  1592. // text 组件
  1593. text: {
  1594. type: "",
  1595. show: true,
  1596. text: "",
  1597. prefixIcon: "",
  1598. suffixIcon: "",
  1599. mode: "",
  1600. href: "",
  1601. format: "",
  1602. call: false,
  1603. openType: "",
  1604. bold: false,
  1605. block: false,
  1606. lines: "",
  1607. color: "#303133",
  1608. size: 15,
  1609. iconStyle: () => ({
  1610. fontSize: "15px"
  1611. }),
  1612. decoration: "none",
  1613. margin: 0,
  1614. lineHeight: "",
  1615. align: "left",
  1616. wordWrap: "normal"
  1617. }
  1618. };
  1619. const Textarea = {
  1620. // textarea 组件
  1621. textarea: {
  1622. value: "",
  1623. placeholder: "",
  1624. placeholderClass: "textarea-placeholder",
  1625. placeholderStyle: "color: #c0c4cc",
  1626. height: 70,
  1627. confirmType: "done",
  1628. disabled: false,
  1629. count: false,
  1630. focus: false,
  1631. autoHeight: false,
  1632. fixed: false,
  1633. cursorSpacing: 0,
  1634. cursor: "",
  1635. showConfirmBar: true,
  1636. selectionStart: -1,
  1637. selectionEnd: -1,
  1638. adjustPosition: true,
  1639. disableDefaultPadding: false,
  1640. holdKeyboard: false,
  1641. maxlength: 140,
  1642. border: "surround",
  1643. formatter: null
  1644. }
  1645. };
  1646. const Toast = {
  1647. // toast组件
  1648. toast: {
  1649. zIndex: 10090,
  1650. loading: false,
  1651. text: "",
  1652. icon: "",
  1653. type: "",
  1654. loadingMode: "",
  1655. show: "",
  1656. overlay: false,
  1657. position: "center",
  1658. params: () => {
  1659. },
  1660. duration: 2e3,
  1661. isTab: false,
  1662. url: "",
  1663. callback: null,
  1664. back: false
  1665. }
  1666. };
  1667. const Toolbar = {
  1668. // toolbar 组件
  1669. toolbar: {
  1670. show: true,
  1671. cancelText: "取消",
  1672. confirmText: "确认",
  1673. cancelColor: "#909193",
  1674. confirmColor: "#3c9cff",
  1675. title: ""
  1676. }
  1677. };
  1678. const Tooltip = {
  1679. // tooltip 组件
  1680. tooltip: {
  1681. text: "",
  1682. copyText: "",
  1683. size: 14,
  1684. color: "#606266",
  1685. bgColor: "transparent",
  1686. direction: "top",
  1687. zIndex: 10071,
  1688. showCopy: true,
  1689. buttons: () => [],
  1690. overlay: true,
  1691. showToast: true
  1692. }
  1693. };
  1694. const Transition = {
  1695. // transition动画组件的props
  1696. transition: {
  1697. show: false,
  1698. mode: "fade",
  1699. duration: "300",
  1700. timingFunction: "ease-out"
  1701. }
  1702. };
  1703. const Upload = {
  1704. // upload组件
  1705. upload: {
  1706. accept: "image",
  1707. capture: () => ["album", "camera"],
  1708. compressed: true,
  1709. camera: "back",
  1710. maxDuration: 60,
  1711. uploadIcon: "camera-fill",
  1712. uploadIconColor: "#D3D4D6",
  1713. useBeforeRead: false,
  1714. previewFullImage: true,
  1715. maxCount: 52,
  1716. disabled: false,
  1717. imageMode: "aspectFill",
  1718. name: "",
  1719. sizeType: () => ["original", "compressed"],
  1720. multiple: false,
  1721. deletable: true,
  1722. maxSize: Number.MAX_VALUE,
  1723. fileList: () => [],
  1724. uploadText: "",
  1725. width: 80,
  1726. height: 80,
  1727. previewImage: true
  1728. }
  1729. };
  1730. const drawer = {
  1731. // 抽屉组件
  1732. drawer: {
  1733. // 是否显示
  1734. show: false,
  1735. // 点击遮罩是否关闭
  1736. mask: true,
  1737. // // 是否显示关闭按钮
  1738. // closeBtn:true,
  1739. // 抽屉宽度
  1740. width: "40%",
  1741. // 抽屉位置
  1742. placement: "left",
  1743. // 权重
  1744. zIndex: 100
  1745. }
  1746. };
  1747. const props$E = {
  1748. ...ActionSheet,
  1749. ...Album,
  1750. ...Alert,
  1751. ...Avatar,
  1752. ...AvatarGroup,
  1753. ...Backtop,
  1754. ...Badge,
  1755. ...Button,
  1756. ...Calendar$2,
  1757. ...CarKeyboard,
  1758. ...Cell,
  1759. ...CellGroup,
  1760. ...Checkbox,
  1761. ...CheckboxGroup,
  1762. ...CircleProgress,
  1763. ...Code,
  1764. ...CodeInput,
  1765. ...Col,
  1766. ...Collapse,
  1767. ...CollapseItem,
  1768. ...ColumnNotice,
  1769. ...CountDown,
  1770. ...CountTo,
  1771. ...DatetimePicker,
  1772. ...Divider,
  1773. ...Empty,
  1774. ...Form,
  1775. ...GormItem,
  1776. ...Gap,
  1777. ...Grid,
  1778. ...GridItem,
  1779. ...Icon,
  1780. ...Image,
  1781. ...IndexAnchor,
  1782. ...IndexList,
  1783. ...Input,
  1784. ...Keyboard,
  1785. ...Line,
  1786. ...LineProgress,
  1787. ...Link,
  1788. ...List,
  1789. ...ListItem,
  1790. ...LoadingIcon,
  1791. ...LoadingPage,
  1792. ...Loadmore,
  1793. ...Modal,
  1794. ...Navbar,
  1795. ...NoNetwork,
  1796. ...NoticeBar,
  1797. ...Notify,
  1798. ...NumberBox,
  1799. ...NumberKeyboard,
  1800. ...Overlay,
  1801. ...Parse,
  1802. ...Picker,
  1803. ...Popup,
  1804. ...Radio,
  1805. ...RadioGroup,
  1806. ...Rate,
  1807. ...ReadMore,
  1808. ...Row,
  1809. ...RowNotice,
  1810. ...ScrollList,
  1811. ...Search,
  1812. ...Section,
  1813. ...Skeleton,
  1814. ...Slider,
  1815. ...StatusBar,
  1816. ...Steps,
  1817. ...StepsItem,
  1818. ...Sticky,
  1819. ...Subsection,
  1820. ...SwipeAction,
  1821. ...SwipeActionItem,
  1822. ...Swiper,
  1823. ...SwipterIndicator,
  1824. ...Switch,
  1825. ...Tabbar,
  1826. ...TabbarItem,
  1827. ...Tabs,
  1828. ...Tag,
  1829. ...Text,
  1830. ...Textarea,
  1831. ...Toast,
  1832. ...Toolbar,
  1833. ...Tooltip,
  1834. ...Transition,
  1835. ...Upload,
  1836. ...drawer
  1837. };
  1838. const props$D = {
  1839. props: {
  1840. // 图标类名
  1841. name: {
  1842. type: String,
  1843. default: props$E.icon.name
  1844. },
  1845. // 图标颜色,可接受主题色
  1846. color: {
  1847. type: String,
  1848. default: props$E.icon.color
  1849. },
  1850. // 字体大小,单位px
  1851. size: {
  1852. type: [String, Number],
  1853. default: props$E.icon.size
  1854. },
  1855. // 是否显示粗体
  1856. bold: {
  1857. type: Boolean,
  1858. default: props$E.icon.bold
  1859. },
  1860. // 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
  1861. index: {
  1862. type: [String, Number],
  1863. default: props$E.icon.index
  1864. },
  1865. // 触摸图标时的类名
  1866. hoverClass: {
  1867. type: String,
  1868. default: props$E.icon.hoverClass
  1869. },
  1870. // 自定义扩展前缀,方便用户扩展自己的图标库
  1871. customPrefix: {
  1872. type: String,
  1873. default: props$E.icon.customPrefix
  1874. },
  1875. // 图标右边或者下面的文字
  1876. label: {
  1877. type: [String, Number],
  1878. default: props$E.icon.label
  1879. },
  1880. // label的位置,只能右边或者下边
  1881. labelPos: {
  1882. type: String,
  1883. default: props$E.icon.labelPos
  1884. },
  1885. // label的大小
  1886. labelSize: {
  1887. type: [String, Number],
  1888. default: props$E.icon.labelSize
  1889. },
  1890. // label的颜色
  1891. labelColor: {
  1892. type: String,
  1893. default: props$E.icon.labelColor
  1894. },
  1895. // label与图标的距离
  1896. space: {
  1897. type: [String, Number],
  1898. default: props$E.icon.space
  1899. },
  1900. // 图片的mode
  1901. imgMode: {
  1902. type: String,
  1903. default: props$E.icon.imgMode
  1904. },
  1905. // 用于显示图片小图标时,图片的宽度
  1906. width: {
  1907. type: [String, Number],
  1908. default: props$E.icon.width
  1909. },
  1910. // 用于显示图片小图标时,图片的高度
  1911. height: {
  1912. type: [String, Number],
  1913. default: props$E.icon.height
  1914. },
  1915. // 用于解决某些情况下,让图标垂直居中的用途
  1916. top: {
  1917. type: [String, Number],
  1918. default: props$E.icon.top
  1919. },
  1920. // 是否阻止事件传播
  1921. stop: {
  1922. type: Boolean,
  1923. default: props$E.icon.stop
  1924. }
  1925. }
  1926. };
  1927. const mpMixin = {};
  1928. const mixin = {
  1929. // 定义每个组件都可能需要用到的外部样式以及类名
  1930. props: {
  1931. // 每个组件都有的父组件传递的样式,可以为字符串或者对象形式
  1932. customStyle: {
  1933. type: [Object, String],
  1934. default: () => ({})
  1935. },
  1936. customClass: {
  1937. type: String,
  1938. default: ""
  1939. },
  1940. // 跳转的页面路径
  1941. url: {
  1942. type: String,
  1943. default: ""
  1944. },
  1945. // 页面跳转的类型
  1946. linkType: {
  1947. type: String,
  1948. default: "navigateTo"
  1949. }
  1950. },
  1951. data() {
  1952. return {};
  1953. },
  1954. onLoad() {
  1955. this.$u.getRect = this.$uGetRect;
  1956. },
  1957. created() {
  1958. this.$u.getRect = this.$uGetRect;
  1959. },
  1960. computed: {
  1961. // 在2.x版本中,将会把$u挂载到uni对象下,导致在模板中无法使用uni.$u.xxx形式
  1962. // 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用uni.$u.xxx
  1963. // 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大)
  1964. $u() {
  1965. return uni.$u.deepMerge(uni.$u, {
  1966. props: void 0,
  1967. http: void 0,
  1968. mixin: void 0
  1969. });
  1970. },
  1971. /**
  1972. * 生成bem规则类名
  1973. * 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用
  1974. * 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式
  1975. * @param {String} name 组件名称
  1976. * @param {Array} fixed 一直会存在的类名
  1977. * @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名
  1978. * @returns {Array|string}
  1979. */
  1980. bem() {
  1981. return function(name, fixed, change) {
  1982. const prefix = `u-${name}--`;
  1983. const classes = {};
  1984. if (fixed) {
  1985. fixed.map((item) => {
  1986. classes[prefix + this[item]] = true;
  1987. });
  1988. }
  1989. if (change) {
  1990. change.map((item) => {
  1991. this[item] ? classes[prefix + item] = this[item] : delete classes[prefix + item];
  1992. });
  1993. }
  1994. return Object.keys(classes);
  1995. };
  1996. }
  1997. },
  1998. methods: {
  1999. // 跳转某一个页面
  2000. openPage(urlKey = "url") {
  2001. const url2 = this[urlKey];
  2002. if (url2) {
  2003. this.$u.route({ type: this.linkType, url: url2 });
  2004. }
  2005. },
  2006. // 查询节点信息
  2007. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  2008. // 解决办法为在组件根部再套一个没有任何作用的view元素
  2009. $uGetRect(selector, all) {
  2010. return new Promise((resolve) => {
  2011. uni.createSelectorQuery().in(this)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => {
  2012. if (all && Array.isArray(rect) && rect.length) {
  2013. resolve(rect);
  2014. }
  2015. if (!all && rect) {
  2016. resolve(rect);
  2017. }
  2018. }).exec();
  2019. });
  2020. },
  2021. getParentData(parentName = "") {
  2022. if (!this.parent)
  2023. this.parent = {};
  2024. this.parent = uni.$u.$parent.call(this, parentName);
  2025. if (this.parent.children) {
  2026. this.parent.children.indexOf(this) === -1 && this.parent.children.push(this);
  2027. }
  2028. if (this.parent && this.parentData) {
  2029. Object.keys(this.parentData).map((key) => {
  2030. this.parentData[key] = this.parent[key];
  2031. });
  2032. }
  2033. },
  2034. // 阻止事件冒泡
  2035. preventEvent(e) {
  2036. e && typeof e.stopPropagation === "function" && e.stopPropagation();
  2037. },
  2038. // 空操作
  2039. noop(e) {
  2040. this.preventEvent(e);
  2041. }
  2042. },
  2043. onReachBottom() {
  2044. uni.$emit("uOnReachBottom");
  2045. },
  2046. beforeDestroy() {
  2047. if (this.parent && uni.$u.test.array(this.parent.children)) {
  2048. const childrenList = this.parent.children;
  2049. childrenList.map((child, index2) => {
  2050. if (child === this) {
  2051. childrenList.splice(index2, 1);
  2052. }
  2053. });
  2054. }
  2055. }
  2056. };
  2057. const _export_sfc = (sfc, props2) => {
  2058. const target = sfc.__vccOpts || sfc;
  2059. for (const [key, val] of props2) {
  2060. target[key] = val;
  2061. }
  2062. return target;
  2063. };
  2064. const _sfc_main$25 = {
  2065. name: "u-icon",
  2066. data() {
  2067. return {};
  2068. },
  2069. emits: ["click"],
  2070. mixins: [mpMixin, mixin, props$D],
  2071. computed: {
  2072. uClasses() {
  2073. let classes = [];
  2074. classes.push(this.customPrefix + "-" + this.name);
  2075. if (this.color && uni.$u.config.type.includes(this.color))
  2076. classes.push("u-icon__icon--" + this.color);
  2077. return classes;
  2078. },
  2079. iconStyle() {
  2080. let style = {};
  2081. style = {
  2082. fontSize: uni.$u.addUnit(this.size),
  2083. lineHeight: uni.$u.addUnit(this.size),
  2084. fontWeight: this.bold ? "bold" : "normal",
  2085. // 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中
  2086. top: uni.$u.addUnit(this.top)
  2087. };
  2088. if (this.color && !uni.$u.config.type.includes(this.color))
  2089. style.color = this.color;
  2090. return style;
  2091. },
  2092. // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
  2093. isImg() {
  2094. return this.name.indexOf("/") !== -1;
  2095. },
  2096. imgStyle() {
  2097. let style = {};
  2098. style.width = this.width ? uni.$u.addUnit(this.width) : uni.$u.addUnit(this.size);
  2099. style.height = this.height ? uni.$u.addUnit(this.height) : uni.$u.addUnit(this.size);
  2100. return style;
  2101. },
  2102. // 通过图标名,查找对应的图标
  2103. icon() {
  2104. return icons$1["uicon-" + this.name] || this.name;
  2105. }
  2106. },
  2107. methods: {
  2108. clickHandler(e) {
  2109. this.$emit("click", this.index);
  2110. this.stop && this.preventEvent(e);
  2111. }
  2112. }
  2113. };
  2114. function _sfc_render$24(_ctx, _cache, $props, $setup, $data, $options) {
  2115. return vue.openBlock(), vue.createElementBlock(
  2116. "view",
  2117. {
  2118. class: vue.normalizeClass(["u-icon", ["u-icon--" + _ctx.labelPos]]),
  2119. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  2120. },
  2121. [
  2122. $options.isImg ? (vue.openBlock(), vue.createElementBlock("image", {
  2123. key: 0,
  2124. class: "u-icon__img",
  2125. src: _ctx.name,
  2126. mode: _ctx.imgMode,
  2127. style: vue.normalizeStyle([$options.imgStyle, _ctx.$u.addStyle(_ctx.customStyle)])
  2128. }, null, 12, ["src", "mode"])) : (vue.openBlock(), vue.createElementBlock("text", {
  2129. key: 1,
  2130. class: vue.normalizeClass(["u-icon__icon", $options.uClasses]),
  2131. style: vue.normalizeStyle([$options.iconStyle, _ctx.$u.addStyle(_ctx.customStyle)]),
  2132. "hover-class": _ctx.hoverClass
  2133. }, vue.toDisplayString($options.icon), 15, ["hover-class"])),
  2134. vue.createCommentVNode(' 这里进行空字符串判断,如果仅仅是v-if="label",可能会出现传递0的时候,结果也无法显示 '),
  2135. _ctx.label !== "" ? (vue.openBlock(), vue.createElementBlock(
  2136. "text",
  2137. {
  2138. key: 2,
  2139. class: "u-icon__label",
  2140. style: vue.normalizeStyle({
  2141. color: _ctx.labelColor,
  2142. fontSize: _ctx.$u.addUnit(_ctx.labelSize),
  2143. marginLeft: _ctx.labelPos == "right" ? _ctx.$u.addUnit(_ctx.space) : 0,
  2144. marginTop: _ctx.labelPos == "bottom" ? _ctx.$u.addUnit(_ctx.space) : 0,
  2145. marginRight: _ctx.labelPos == "left" ? _ctx.$u.addUnit(_ctx.space) : 0,
  2146. marginBottom: _ctx.labelPos == "top" ? _ctx.$u.addUnit(_ctx.space) : 0
  2147. })
  2148. },
  2149. vue.toDisplayString(_ctx.label),
  2150. 5
  2151. /* TEXT, STYLE */
  2152. )) : vue.createCommentVNode("v-if", true)
  2153. ],
  2154. 2
  2155. /* CLASS */
  2156. );
  2157. }
  2158. const __easycom_0$g = /* @__PURE__ */ _export_sfc(_sfc_main$25, [["render", _sfc_render$24], ["__scopeId", "data-v-ac70166d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-icon/u-icon.vue"]]);
  2159. const props$C = {
  2160. props: {
  2161. // 绑定的值
  2162. modelValue: {
  2163. type: [String, Number],
  2164. default: props$E.input.value
  2165. },
  2166. // number-数字输入键盘,app-vue下可以输入浮点数,app-nvue和小程序平台下只能输入整数
  2167. // idcard-身份证输入键盘,微信、支付宝、百度、QQ小程序
  2168. // digit-带小数点的数字键盘,App的nvue页面、微信、支付宝、百度、头条、QQ小程序
  2169. // text-文本输入键盘
  2170. type: {
  2171. type: String,
  2172. default: props$E.input.type
  2173. },
  2174. // 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true,
  2175. // 兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序
  2176. fixed: {
  2177. type: Boolean,
  2178. default: props$E.input.fixed
  2179. },
  2180. // 是否禁用输入框
  2181. disabled: {
  2182. type: Boolean,
  2183. default: props$E.input.disabled
  2184. },
  2185. // 禁用状态时的背景色
  2186. disabledColor: {
  2187. type: String,
  2188. default: props$E.input.disabledColor
  2189. },
  2190. // 是否显示清除控件
  2191. clearable: {
  2192. type: Boolean,
  2193. default: props$E.input.clearable
  2194. },
  2195. // 是否密码类型
  2196. password: {
  2197. type: Boolean,
  2198. default: props$E.input.password
  2199. },
  2200. // 最大输入长度,设置为 -1 的时候不限制最大长度
  2201. maxlength: {
  2202. type: [String, Number],
  2203. default: props$E.input.maxlength
  2204. },
  2205. // 输入框为空时的占位符
  2206. placeholder: {
  2207. type: String,
  2208. default: props$E.input.placeholder
  2209. },
  2210. // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
  2211. placeholderClass: {
  2212. type: String,
  2213. default: props$E.input.placeholderClass
  2214. },
  2215. // 指定placeholder的样式
  2216. placeholderStyle: {
  2217. type: [String, Object],
  2218. default: props$E.input.placeholderStyle
  2219. },
  2220. // 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效
  2221. showWordLimit: {
  2222. type: Boolean,
  2223. default: props$E.input.showWordLimit
  2224. },
  2225. // 设置右下角按钮的文字,有效值:send|search|next|go|done,兼容性详见uni-app文档
  2226. // https://uniapp.dcloud.io/component/input
  2227. // https://uniapp.dcloud.io/component/textarea
  2228. confirmType: {
  2229. type: String,
  2230. default: props$E.input.confirmType
  2231. },
  2232. // 点击键盘右下角按钮时是否保持键盘不收起,H5无效
  2233. confirmHold: {
  2234. type: Boolean,
  2235. default: props$E.input.confirmHold
  2236. },
  2237. // focus时,点击页面的时候不收起键盘,微信小程序有效
  2238. holdKeyboard: {
  2239. type: Boolean,
  2240. default: props$E.input.holdKeyboard
  2241. },
  2242. // 自动获取焦点
  2243. // 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点
  2244. focus: {
  2245. type: Boolean,
  2246. default: props$E.input.focus
  2247. },
  2248. // 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效
  2249. autoBlur: {
  2250. type: Boolean,
  2251. default: props$E.input.autoBlur
  2252. },
  2253. // 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效
  2254. disableDefaultPadding: {
  2255. type: Boolean,
  2256. default: props$E.input.disableDefaultPadding
  2257. },
  2258. // 指定focus时光标的位置
  2259. cursor: {
  2260. type: [String, Number],
  2261. default: props$E.input.cursor
  2262. },
  2263. // 输入框聚焦时底部与键盘的距离
  2264. cursorSpacing: {
  2265. type: [String, Number],
  2266. default: props$E.input.cursorSpacing
  2267. },
  2268. // 光标起始位置,自动聚集时有效,需与selection-end搭配使用
  2269. selectionStart: {
  2270. type: [String, Number],
  2271. default: props$E.input.selectionStart
  2272. },
  2273. // 光标结束位置,自动聚集时有效,需与selection-start搭配使用
  2274. selectionEnd: {
  2275. type: [String, Number],
  2276. default: props$E.input.selectionEnd
  2277. },
  2278. // 键盘弹起时,是否自动上推页面
  2279. adjustPosition: {
  2280. type: Boolean,
  2281. default: props$E.input.adjustPosition
  2282. },
  2283. // 输入框内容对齐方式,可选值为:left|center|right
  2284. inputAlign: {
  2285. type: String,
  2286. default: props$E.input.inputAlign
  2287. },
  2288. // 输入框字体的大小
  2289. fontSize: {
  2290. type: [String, Number],
  2291. default: "34rpx"
  2292. },
  2293. // 输入框字体颜色
  2294. color: {
  2295. type: String,
  2296. default: props$E.input.color
  2297. },
  2298. // 输入框前置图标
  2299. prefixIcon: {
  2300. type: String,
  2301. default: props$E.input.prefixIcon
  2302. },
  2303. // 前置图标样式,对象或字符串
  2304. prefixIconStyle: {
  2305. type: [String, Object],
  2306. default: props$E.input.prefixIconStyle
  2307. },
  2308. // 输入框后置图标
  2309. suffixIcon: {
  2310. type: String,
  2311. default: props$E.input.suffixIcon
  2312. },
  2313. // 后置图标样式,对象或字符串
  2314. suffixIconStyle: {
  2315. type: [String, Object],
  2316. default: props$E.input.suffixIconStyle
  2317. },
  2318. // 边框类型,surround-四周边框,bottom-底部边框,none-无边框
  2319. border: {
  2320. type: String,
  2321. default: props$E.input.border
  2322. },
  2323. // 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会
  2324. readonly: {
  2325. type: Boolean,
  2326. default: props$E.input.readonly
  2327. },
  2328. // 输入框形状,circle-圆形,square-方形
  2329. shape: {
  2330. type: String,
  2331. default: props$E.input.shape
  2332. },
  2333. // 用于处理或者过滤输入框内容的方法
  2334. formatter: {
  2335. type: [Function, null],
  2336. default: props$E.input.formatter
  2337. },
  2338. // 是否忽略组件内对文本合成系统事件的处理
  2339. ignoreCompositionEvent: {
  2340. type: Boolean,
  2341. default: true
  2342. }
  2343. }
  2344. };
  2345. const _sfc_main$24 = {
  2346. name: "u-input",
  2347. mixins: [mpMixin, mixin, props$C],
  2348. data() {
  2349. return {
  2350. // 输入框的值
  2351. innerValue: "",
  2352. // 是否处于获得焦点状态
  2353. focused: false,
  2354. // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
  2355. firstChange: true,
  2356. // value绑定值的变化是由内部还是外部引起的
  2357. changeFromInner: false,
  2358. // 过滤处理方法
  2359. innerFormatter: (value2) => value2
  2360. };
  2361. },
  2362. watch: {
  2363. modelValue: {
  2364. immediate: true,
  2365. handler(newVal, oldVal) {
  2366. this.innerValue = newVal;
  2367. this.firstChange = false;
  2368. this.changeFromInner = false;
  2369. }
  2370. }
  2371. },
  2372. computed: {
  2373. // 是否显示清除控件
  2374. isShowClear() {
  2375. const { clearable, readonly, focused, innerValue } = this;
  2376. return !!clearable && !readonly && !!focused && innerValue !== "";
  2377. },
  2378. // 组件的类名
  2379. inputClass() {
  2380. let classes = [], { border, disabled, shape } = this;
  2381. border === "surround" && (classes = classes.concat(["u-border", "u-input--radius"]));
  2382. classes.push(`u-input--${shape}`);
  2383. border === "bottom" && (classes = classes.concat([
  2384. "u-border-bottom",
  2385. "u-input--no-radius"
  2386. ]));
  2387. return classes.join(" ");
  2388. },
  2389. // 组件的样式
  2390. wrapperStyle() {
  2391. const style = {};
  2392. if (this.disabled) {
  2393. style.backgroundColor = this.disabledColor;
  2394. }
  2395. if (this.border === "none") {
  2396. style.padding = "0";
  2397. } else {
  2398. style.paddingTop = "6px";
  2399. style.paddingBottom = "6px";
  2400. style.paddingLeft = "9px";
  2401. style.paddingRight = "9px";
  2402. }
  2403. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  2404. },
  2405. // 输入框的样式
  2406. inputStyle() {
  2407. const style = {
  2408. color: this.color,
  2409. fontSize: uni.$u.addUnit(this.fontSize),
  2410. textAlign: this.inputAlign
  2411. };
  2412. return style;
  2413. }
  2414. },
  2415. emits: ["update:modelValue", "focus", "blur", "change", "confirm", "clear", "keyboardheightchange"],
  2416. methods: {
  2417. // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
  2418. setFormatter(e) {
  2419. this.innerFormatter = e;
  2420. },
  2421. // 当键盘输入时,触发input事件
  2422. onInput(e) {
  2423. let { value: value2 = "" } = e.detail || {};
  2424. const formatter = this.formatter || this.innerFormatter;
  2425. const formatValue = formatter(value2);
  2426. this.innerValue = value2;
  2427. this.$nextTick(() => {
  2428. this.innerValue = formatValue;
  2429. this.valueChange();
  2430. });
  2431. },
  2432. // 输入框失去焦点时触发
  2433. onBlur(event) {
  2434. this.$emit("blur", event.detail.value);
  2435. uni.$u.sleep(50).then(() => {
  2436. this.focused = false;
  2437. });
  2438. uni.$u.formValidate(this, "blur");
  2439. },
  2440. // 输入框聚焦时触发
  2441. onFocus(event) {
  2442. this.focused = true;
  2443. this.$emit("focus");
  2444. },
  2445. // 点击完成按钮时触发
  2446. onConfirm(event) {
  2447. this.$emit("confirm", this.innerValue);
  2448. },
  2449. // 键盘高度发生变化的时候触发此事件
  2450. // 兼容性:微信小程序2.7.0+、App 3.1.0+
  2451. onkeyboardheightchange() {
  2452. this.$emit("keyboardheightchange");
  2453. },
  2454. // 内容发生变化,进行处理
  2455. valueChange() {
  2456. const value2 = this.innerValue;
  2457. this.$nextTick(() => {
  2458. this.$emit("update:modelValue", value2);
  2459. this.changeFromInner = true;
  2460. this.$emit("change", value2);
  2461. uni.$u.formValidate(this, "change");
  2462. });
  2463. },
  2464. // 点击清除控件
  2465. onClear() {
  2466. this.innerValue = "";
  2467. this.$nextTick(() => {
  2468. this.valueChange();
  2469. this.$emit("clear");
  2470. });
  2471. },
  2472. /**
  2473. * 在安卓nvue上,事件无法冒泡
  2474. * 在某些时间,我们希望监听u-from-item的点击事件,此时会导致点击u-form-item内的u-input后
  2475. * 无法触发u-form-item的点击事件,这里通过手动调用u-form-item的方法进行触发
  2476. */
  2477. clickHandler() {
  2478. }
  2479. }
  2480. };
  2481. function _sfc_render$23(_ctx, _cache, $props, $setup, $data, $options) {
  2482. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  2483. return vue.openBlock(), vue.createElementBlock(
  2484. "view",
  2485. {
  2486. class: vue.normalizeClass(["u-input", $options.inputClass]),
  2487. style: vue.normalizeStyle([$options.wrapperStyle])
  2488. },
  2489. [
  2490. vue.createElementVNode("view", { class: "u-input__content" }, [
  2491. _ctx.prefixIcon || _ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("view", {
  2492. key: 0,
  2493. class: "u-input__content__prefix-icon"
  2494. }, [
  2495. vue.renderSlot(_ctx.$slots, "prefix", {}, () => [
  2496. vue.createVNode(_component_u_icon, {
  2497. name: _ctx.prefixIcon,
  2498. size: "18",
  2499. customStyle: _ctx.prefixIconStyle
  2500. }, null, 8, ["name", "customStyle"])
  2501. ], true)
  2502. ])) : vue.createCommentVNode("v-if", true),
  2503. vue.createElementVNode("view", {
  2504. class: "u-input__content__field-wrapper",
  2505. onClick: _cache[5] || (_cache[5] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  2506. }, [
  2507. vue.createCommentVNode(" 根据uni-app的input组件文档,H5和APP中只要声明了password参数(无论true还是false),type均失效,此时\r\n 为了防止type=number时,又存在password属性,type无效,此时需要设置password为undefined\r\n "),
  2508. vue.createElementVNode("input", {
  2509. class: "u-input__content__field-wrapper__field",
  2510. style: vue.normalizeStyle([$options.inputStyle]),
  2511. type: _ctx.type,
  2512. focus: _ctx.focus,
  2513. cursor: _ctx.cursor,
  2514. value: $data.innerValue,
  2515. "auto-blur": _ctx.autoBlur,
  2516. disabled: _ctx.disabled || _ctx.readonly,
  2517. maxlength: _ctx.maxlength,
  2518. placeholder: _ctx.placeholder,
  2519. "placeholder-style": _ctx.placeholderStyle,
  2520. "placeholder-class": _ctx.placeholderClass,
  2521. "confirm-type": _ctx.confirmType,
  2522. "confirm-hold": _ctx.confirmHold,
  2523. "hold-keyboard": _ctx.holdKeyboard,
  2524. "cursor-spacing": _ctx.cursorSpacing,
  2525. "adjust-position": _ctx.adjustPosition,
  2526. "selection-end": _ctx.selectionEnd,
  2527. "selection-start": _ctx.selectionStart,
  2528. password: _ctx.password || _ctx.type === "password" || void 0,
  2529. ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
  2530. onInput: _cache[0] || (_cache[0] = (...args) => $options.onInput && $options.onInput(...args)),
  2531. onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)),
  2532. onFocus: _cache[2] || (_cache[2] = (...args) => $options.onFocus && $options.onFocus(...args)),
  2533. onConfirm: _cache[3] || (_cache[3] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
  2534. onKeyboardheightchange: _cache[4] || (_cache[4] = (...args) => $options.onkeyboardheightchange && $options.onkeyboardheightchange(...args))
  2535. }, null, 44, ["type", "focus", "cursor", "value", "auto-blur", "disabled", "maxlength", "placeholder", "placeholder-style", "placeholder-class", "confirm-type", "confirm-hold", "hold-keyboard", "cursor-spacing", "adjust-position", "selection-end", "selection-start", "password", "ignoreCompositionEvent"])
  2536. ]),
  2537. $options.isShowClear ? (vue.openBlock(), vue.createElementBlock("view", {
  2538. key: 1,
  2539. class: "u-input__content__clear",
  2540. onClick: _cache[6] || (_cache[6] = (...args) => $options.onClear && $options.onClear(...args))
  2541. }, [
  2542. vue.createVNode(_component_u_icon, {
  2543. name: "close",
  2544. size: "11",
  2545. color: "#ffffff",
  2546. customStyle: "line-height: 12px"
  2547. })
  2548. ])) : vue.createCommentVNode("v-if", true),
  2549. _ctx.suffixIcon || _ctx.$slots.suffix ? (vue.openBlock(), vue.createElementBlock("view", {
  2550. key: 2,
  2551. class: "u-input__content__subfix-icon"
  2552. }, [
  2553. vue.renderSlot(_ctx.$slots, "suffix", {}, () => [
  2554. vue.createVNode(_component_u_icon, {
  2555. name: _ctx.suffixIcon,
  2556. size: "18",
  2557. customStyle: _ctx.suffixIconStyle
  2558. }, null, 8, ["name", "customStyle"])
  2559. ], true)
  2560. ])) : vue.createCommentVNode("v-if", true)
  2561. ])
  2562. ],
  2563. 6
  2564. /* CLASS, STYLE */
  2565. );
  2566. }
  2567. const __easycom_0$f = /* @__PURE__ */ _export_sfc(_sfc_main$24, [["render", _sfc_render$23], ["__scopeId", "data-v-df79975b"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-input/u-input.vue"]]);
  2568. const props$B = {
  2569. props: {
  2570. color: {
  2571. type: String,
  2572. default: props$E.line.color
  2573. },
  2574. // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
  2575. length: {
  2576. type: [String, Number],
  2577. default: props$E.line.length
  2578. },
  2579. // 线条方向,col-竖向,row-横向
  2580. direction: {
  2581. type: String,
  2582. default: props$E.line.direction
  2583. },
  2584. // 是否显示细边框
  2585. hairline: {
  2586. type: Boolean,
  2587. default: props$E.line.hairline
  2588. },
  2589. // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
  2590. margin: {
  2591. type: [String, Number],
  2592. default: props$E.line.margin
  2593. },
  2594. // 是否虚线,true-虚线,false-实线
  2595. dashed: {
  2596. type: Boolean,
  2597. default: props$E.line.dashed
  2598. }
  2599. }
  2600. };
  2601. const _sfc_main$23 = {
  2602. name: "u-line",
  2603. mixins: [mpMixin, mixin, props$B],
  2604. computed: {
  2605. lineStyle() {
  2606. const style = {};
  2607. style.margin = this.margin;
  2608. if (this.direction === "row") {
  2609. style.borderBottomWidth = "1px";
  2610. style.borderBottomStyle = this.dashed ? "dashed" : "solid";
  2611. style.width = uni.$u.addUnit(this.length);
  2612. if (this.hairline)
  2613. style.transform = "scaleY(0.5)";
  2614. } else {
  2615. style.borderLeftWidth = "1px";
  2616. style.borderLeftStyle = this.dashed ? "dashed" : "solid";
  2617. style.height = uni.$u.addUnit(this.length);
  2618. if (this.hairline)
  2619. style.transform = "scaleX(0.5)";
  2620. }
  2621. style.borderColor = this.color;
  2622. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  2623. }
  2624. }
  2625. };
  2626. function _sfc_render$22(_ctx, _cache, $props, $setup, $data, $options) {
  2627. return vue.openBlock(), vue.createElementBlock(
  2628. "view",
  2629. {
  2630. class: "u-line",
  2631. style: vue.normalizeStyle([$options.lineStyle])
  2632. },
  2633. null,
  2634. 4
  2635. /* STYLE */
  2636. );
  2637. }
  2638. const __easycom_0$e = /* @__PURE__ */ _export_sfc(_sfc_main$23, [["render", _sfc_render$22], ["__scopeId", "data-v-72791e59"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-line/u-line.vue"]]);
  2639. const props$A = {
  2640. props: {
  2641. // input的label提示语
  2642. label: {
  2643. type: String,
  2644. default: props$E.formItem.label
  2645. },
  2646. // 绑定的值
  2647. prop: {
  2648. type: String,
  2649. default: props$E.formItem.prop
  2650. },
  2651. // 是否显示表单域的下划线边框
  2652. borderBottom: {
  2653. type: [String, Boolean],
  2654. default: props$E.formItem.borderBottom
  2655. },
  2656. // label的宽度,单位px
  2657. labelWidth: {
  2658. type: [String, Number],
  2659. default: props$E.formItem.labelWidth
  2660. },
  2661. // 右侧图标
  2662. rightIcon: {
  2663. type: String,
  2664. default: props$E.formItem.rightIcon
  2665. },
  2666. // 左侧图标
  2667. leftIcon: {
  2668. type: String,
  2669. default: props$E.formItem.leftIcon
  2670. },
  2671. // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置
  2672. required: {
  2673. type: Boolean,
  2674. default: props$E.formItem.required
  2675. },
  2676. leftIconStyle: {
  2677. type: [String, Object],
  2678. default: props$E.formItem.leftIconStyle
  2679. }
  2680. }
  2681. };
  2682. const _sfc_main$22 = {
  2683. name: "u-form-item",
  2684. mixins: [mpMixin, mixin, props$A],
  2685. data() {
  2686. return {
  2687. // 错误提示语
  2688. message: "",
  2689. parentData: {
  2690. // 提示文本的位置
  2691. labelPosition: "left",
  2692. // 提示文本对齐方式
  2693. labelAlign: "left",
  2694. // 提示文本的样式
  2695. labelStyle: {},
  2696. // 提示文本的宽度
  2697. labelWidth: 45,
  2698. // 错误提示方式
  2699. errorType: "message"
  2700. }
  2701. };
  2702. },
  2703. // 组件创建完成时,将当前实例保存到u-form中
  2704. computed: {
  2705. propsLine() {
  2706. return uni.$u.props.line;
  2707. }
  2708. },
  2709. mounted() {
  2710. this.init();
  2711. },
  2712. methods: {
  2713. init() {
  2714. this.updateParentData();
  2715. if (!this.parent) {
  2716. uni.$u.error("u-form-item需要结合u-form组件使用");
  2717. }
  2718. },
  2719. // 获取父组件的参数
  2720. updateParentData() {
  2721. this.getParentData("u-form");
  2722. },
  2723. // 移除u-form-item的校验结果
  2724. clearValidate() {
  2725. this.message = null;
  2726. },
  2727. // 清空当前的组件的校验结果,并重置为初始值
  2728. resetField() {
  2729. const value2 = uni.$u.getProperty(this.parent.originalModel, this.prop);
  2730. uni.$u.setProperty(this.parent.model, this.prop, value2);
  2731. this.message = null;
  2732. },
  2733. // 点击组件
  2734. clickHandler() {
  2735. this.$emit("click");
  2736. }
  2737. }
  2738. };
  2739. function _sfc_render$21(_ctx, _cache, $props, $setup, $data, $options) {
  2740. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  2741. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$e);
  2742. return vue.openBlock(), vue.createElementBlock("view", { class: "u-form-item" }, [
  2743. vue.createElementVNode(
  2744. "view",
  2745. {
  2746. class: "u-form-item__body",
  2747. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)),
  2748. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), {
  2749. flexDirection: $data.parentData.labelPosition === "left" ? "row" : "column"
  2750. }])
  2751. },
  2752. [
  2753. vue.createCommentVNode(' 微信小程序中,将一个参数设置空字符串,结果会变成字符串"true" '),
  2754. vue.renderSlot(_ctx.$slots, "label", {}, () => [
  2755. vue.createCommentVNode(" {{required}} "),
  2756. _ctx.required || _ctx.leftIcon || _ctx.label ? (vue.openBlock(), vue.createElementBlock(
  2757. "view",
  2758. {
  2759. key: 0,
  2760. class: "u-form-item__body__left",
  2761. style: vue.normalizeStyle({
  2762. width: _ctx.$u.addUnit(_ctx.labelWidth || $data.parentData.labelWidth),
  2763. marginBottom: $data.parentData.labelPosition === "left" ? 0 : "5px"
  2764. })
  2765. },
  2766. [
  2767. vue.createCommentVNode(" 为了块对齐 "),
  2768. vue.createElementVNode("view", { class: "u-form-item__body__left__content" }, [
  2769. vue.createCommentVNode(" nvue不支持伪元素before "),
  2770. _ctx.required ? (vue.openBlock(), vue.createElementBlock("text", {
  2771. key: 0,
  2772. class: "u-form-item__body__left__content__required"
  2773. }, "*")) : vue.createCommentVNode("v-if", true),
  2774. _ctx.leftIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  2775. key: 1,
  2776. class: "u-form-item__body__left__content__icon"
  2777. }, [
  2778. vue.createVNode(_component_u_icon, {
  2779. name: _ctx.leftIcon,
  2780. "custom-style": _ctx.leftIconStyle
  2781. }, null, 8, ["name", "custom-style"])
  2782. ])) : vue.createCommentVNode("v-if", true),
  2783. vue.createElementVNode(
  2784. "text",
  2785. {
  2786. class: "u-form-item__body__left__content__label",
  2787. style: vue.normalizeStyle([$data.parentData.labelStyle, {
  2788. justifyContent: $data.parentData.labelAlign === "left" ? "flex-start" : $data.parentData.labelAlign === "center" ? "center" : "flex-end"
  2789. }])
  2790. },
  2791. vue.toDisplayString(_ctx.label),
  2792. 5
  2793. /* TEXT, STYLE */
  2794. )
  2795. ])
  2796. ],
  2797. 4
  2798. /* STYLE */
  2799. )) : vue.createCommentVNode("v-if", true)
  2800. ], true),
  2801. vue.createElementVNode("view", { class: "u-form-item__body__right" }, [
  2802. vue.createElementVNode("view", { class: "u-form-item__body__right__content" }, [
  2803. vue.createElementVNode("view", { class: "u-form-item__body__right__content__slot" }, [
  2804. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  2805. ]),
  2806. _ctx.$slots.right ? (vue.openBlock(), vue.createElementBlock("view", {
  2807. key: 0,
  2808. class: "item__body__right__content__icon"
  2809. }, [
  2810. vue.renderSlot(_ctx.$slots, "right", {}, void 0, true)
  2811. ])) : vue.createCommentVNode("v-if", true)
  2812. ])
  2813. ])
  2814. ],
  2815. 4
  2816. /* STYLE */
  2817. ),
  2818. vue.renderSlot(_ctx.$slots, "error", {}, () => [
  2819. !!$data.message && $data.parentData.errorType === "message" ? (vue.openBlock(), vue.createElementBlock(
  2820. "text",
  2821. {
  2822. key: 0,
  2823. class: "u-form-item__body__right__message",
  2824. style: vue.normalizeStyle({
  2825. marginLeft: _ctx.$u.addUnit($data.parentData.labelPosition === "top" ? 0 : _ctx.labelWidth || $data.parentData.labelWidth)
  2826. })
  2827. },
  2828. vue.toDisplayString($data.message),
  2829. 5
  2830. /* TEXT, STYLE */
  2831. )) : vue.createCommentVNode("v-if", true)
  2832. ], true),
  2833. _ctx.borderBottom ? (vue.openBlock(), vue.createBlock(_component_u_line, {
  2834. key: 0,
  2835. color: $data.message && $data.parentData.errorType === "border-bottom" ? _ctx.$u.color.error : $options.propsLine.color,
  2836. customStyle: `margin-top: ${$data.message && $data.parentData.errorType === "message" ? "5px" : 0}`
  2837. }, null, 8, ["color", "customStyle"])) : vue.createCommentVNode("v-if", true)
  2838. ]);
  2839. }
  2840. const __easycom_1$b = /* @__PURE__ */ _export_sfc(_sfc_main$22, [["render", _sfc_render$21], ["__scopeId", "data-v-42bac3de"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-form-item/u-form-item.vue"]]);
  2841. const props$z = {
  2842. props: {
  2843. // 是否显示组件
  2844. show: {
  2845. type: Boolean,
  2846. default: props$E.loadingIcon.show
  2847. },
  2848. // 颜色
  2849. color: {
  2850. type: String,
  2851. default: props$E.loadingIcon.color
  2852. },
  2853. // 提示文字颜色
  2854. textColor: {
  2855. type: String,
  2856. default: props$E.loadingIcon.textColor
  2857. },
  2858. // 文字和图标是否垂直排列
  2859. vertical: {
  2860. type: Boolean,
  2861. default: props$E.loadingIcon.vertical
  2862. },
  2863. // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形
  2864. mode: {
  2865. type: String,
  2866. default: props$E.loadingIcon.mode
  2867. },
  2868. // 图标大小,单位默认px
  2869. size: {
  2870. type: [String, Number],
  2871. default: props$E.loadingIcon.size
  2872. },
  2873. // 文字大小
  2874. textSize: {
  2875. type: [String, Number],
  2876. default: props$E.loadingIcon.textSize
  2877. },
  2878. // 文字内容
  2879. text: {
  2880. type: [String, Number],
  2881. default: props$E.loadingIcon.text
  2882. },
  2883. // 动画模式
  2884. timingFunction: {
  2885. type: String,
  2886. default: props$E.loadingIcon.timingFunction
  2887. },
  2888. // 动画执行周期时间
  2889. duration: {
  2890. type: [String, Number],
  2891. default: props$E.loadingIcon.duration
  2892. },
  2893. // mode=circle时的暗边颜色
  2894. inactiveColor: {
  2895. type: String,
  2896. default: props$E.loadingIcon.inactiveColor
  2897. }
  2898. }
  2899. };
  2900. const _sfc_main$21 = {
  2901. name: "u-loading-icon",
  2902. mixins: [mpMixin, mixin, props$z],
  2903. data() {
  2904. return {
  2905. // Array.form可以通过一个伪数组对象创建指定长度的数组
  2906. // https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/from
  2907. array12: Array.from({
  2908. length: 12
  2909. }),
  2910. // 这里需要设置默认值为360,否则在安卓nvue上,会延迟一个duration周期后才执行
  2911. // 在iOS nvue上,则会一开始默认执行两个周期的动画
  2912. aniAngel: 360,
  2913. // 动画旋转角度
  2914. webviewHide: false,
  2915. // 监听webview的状态,如果隐藏了页面,则停止动画,以免性能消耗
  2916. loading: false
  2917. // 是否运行中,针对nvue使用
  2918. };
  2919. },
  2920. computed: {
  2921. // 当为circle类型时,给其另外三边设置一个更轻一些的颜色
  2922. // 之所以需要这么做的原因是,比如父组件传了color为红色,那么需要另外的三个边为浅红色
  2923. // 而不能是固定的某一个其他颜色(因为这个固定的颜色可能浅蓝,导致效果没有那么细腻良好)
  2924. otherBorderColor() {
  2925. const lightColor = uni.$u.colorGradient(this.color, "#ffffff", 100)[80];
  2926. if (this.mode === "circle") {
  2927. return this.inactiveColor ? this.inactiveColor : lightColor;
  2928. } else {
  2929. return "transparent";
  2930. }
  2931. }
  2932. },
  2933. watch: {
  2934. show(n) {
  2935. }
  2936. },
  2937. mounted() {
  2938. this.init();
  2939. },
  2940. methods: {
  2941. init() {
  2942. setTimeout(() => {
  2943. this.show && this.addEventListenerToWebview();
  2944. }, 20);
  2945. },
  2946. // 监听webview的显示与隐藏
  2947. addEventListenerToWebview() {
  2948. const pages2 = getCurrentPages();
  2949. const page2 = pages2[pages2.length - 1];
  2950. const currentWebview = page2.$getAppWebview();
  2951. currentWebview.addEventListener("hide", () => {
  2952. this.webviewHide = true;
  2953. });
  2954. currentWebview.addEventListener("show", () => {
  2955. this.webviewHide = false;
  2956. });
  2957. }
  2958. }
  2959. };
  2960. function _sfc_render$20(_ctx, _cache, $props, $setup, $data, $options) {
  2961. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  2962. "view",
  2963. {
  2964. key: 0,
  2965. class: vue.normalizeClass(["u-loading-icon", [_ctx.vertical && "u-loading-icon--vertical"]]),
  2966. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  2967. },
  2968. [
  2969. !$data.webviewHide ? (vue.openBlock(), vue.createElementBlock(
  2970. "view",
  2971. {
  2972. key: 0,
  2973. class: vue.normalizeClass(["u-loading-icon__spinner", [`u-loading-icon__spinner--${_ctx.mode}`]]),
  2974. ref: "ani",
  2975. style: vue.normalizeStyle({
  2976. color: _ctx.color,
  2977. width: _ctx.$u.addUnit(_ctx.size),
  2978. height: _ctx.$u.addUnit(_ctx.size),
  2979. borderTopColor: _ctx.color,
  2980. borderBottomColor: $options.otherBorderColor,
  2981. borderLeftColor: $options.otherBorderColor,
  2982. borderRightColor: $options.otherBorderColor,
  2983. "animation-duration": `${_ctx.duration}ms`,
  2984. "animation-timing-function": _ctx.mode === "semicircle" || _ctx.mode === "circle" ? _ctx.timingFunction : ""
  2985. })
  2986. },
  2987. [
  2988. _ctx.mode === "spinner" ? (vue.openBlock(true), vue.createElementBlock(
  2989. vue.Fragment,
  2990. { key: 0 },
  2991. vue.renderList($data.array12, (item, index2) => {
  2992. return vue.openBlock(), vue.createElementBlock("view", {
  2993. key: index2,
  2994. class: "u-loading-icon__dot"
  2995. });
  2996. }),
  2997. 128
  2998. /* KEYED_FRAGMENT */
  2999. )) : vue.createCommentVNode("v-if", true)
  3000. ],
  3001. 6
  3002. /* CLASS, STYLE */
  3003. )) : vue.createCommentVNode("v-if", true),
  3004. _ctx.text ? (vue.openBlock(), vue.createElementBlock(
  3005. "text",
  3006. {
  3007. key: 1,
  3008. class: "u-loading-icon__text",
  3009. style: vue.normalizeStyle({
  3010. fontSize: _ctx.$u.addUnit(_ctx.textSize),
  3011. color: _ctx.textColor
  3012. })
  3013. },
  3014. vue.toDisplayString(_ctx.text),
  3015. 5
  3016. /* TEXT, STYLE */
  3017. )) : vue.createCommentVNode("v-if", true)
  3018. ],
  3019. 6
  3020. /* CLASS, STYLE */
  3021. )) : vue.createCommentVNode("v-if", true);
  3022. }
  3023. const __easycom_0$d = /* @__PURE__ */ _export_sfc(_sfc_main$21, [["render", _sfc_render$20], ["__scopeId", "data-v-2af81691"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.vue"]]);
  3024. const props$y = {
  3025. props: {
  3026. // 是否细边框
  3027. hairline: {
  3028. type: Boolean,
  3029. default: props$E.button.hairline
  3030. },
  3031. // 按钮的预置样式,info,primary,error,warning,success
  3032. type: {
  3033. type: String,
  3034. default: props$E.button.type
  3035. },
  3036. // 按钮尺寸,large,normal,small,mini
  3037. size: {
  3038. type: String,
  3039. default: props$E.button.size
  3040. },
  3041. // 按钮形状,circle(两边为半圆),square(带圆角)
  3042. shape: {
  3043. type: String,
  3044. default: props$E.button.shape
  3045. },
  3046. // 按钮是否镂空
  3047. plain: {
  3048. type: Boolean,
  3049. default: props$E.button.plain
  3050. },
  3051. // 是否禁止状态
  3052. disabled: {
  3053. type: Boolean,
  3054. default: props$E.button.disabled
  3055. },
  3056. // 是否加载中
  3057. loading: {
  3058. type: Boolean,
  3059. default: props$E.button.loading
  3060. },
  3061. // 加载中提示文字
  3062. loadingText: {
  3063. type: [String, Number],
  3064. default: props$E.button.loadingText
  3065. },
  3066. // 加载状态图标类型
  3067. loadingMode: {
  3068. type: String,
  3069. default: props$E.button.loadingMode
  3070. },
  3071. // 加载图标大小
  3072. loadingSize: {
  3073. type: [String, Number],
  3074. default: props$E.button.loadingSize
  3075. },
  3076. // 开放能力,具体请看uniapp稳定关于button组件部分说明
  3077. // https://uniapp.dcloud.io/component/button
  3078. openType: {
  3079. type: String,
  3080. default: props$E.button.openType
  3081. },
  3082. // 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
  3083. // 取值为submit(提交表单),reset(重置表单)
  3084. formType: {
  3085. type: String,
  3086. default: props$E.button.formType
  3087. },
  3088. // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
  3089. // 只微信小程序、QQ小程序有效
  3090. appParameter: {
  3091. type: String,
  3092. default: props$E.button.appParameter
  3093. },
  3094. // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
  3095. hoverStopPropagation: {
  3096. type: Boolean,
  3097. default: props$E.button.hoverStopPropagation
  3098. },
  3099. // 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
  3100. lang: {
  3101. type: String,
  3102. default: props$E.button.lang
  3103. },
  3104. // 会话来源,open-type="contact"时有效。只微信小程序有效
  3105. sessionFrom: {
  3106. type: String,
  3107. default: props$E.button.sessionFrom
  3108. },
  3109. // 会话内消息卡片标题,open-type="contact"时有效
  3110. // 默认当前标题,只微信小程序有效
  3111. sendMessageTitle: {
  3112. type: String,
  3113. default: props$E.button.sendMessageTitle
  3114. },
  3115. // 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
  3116. // 默认当前分享路径,只微信小程序有效
  3117. sendMessagePath: {
  3118. type: String,
  3119. default: props$E.button.sendMessagePath
  3120. },
  3121. // 会话内消息卡片图片,open-type="contact"时有效
  3122. // 默认当前页面截图,只微信小程序有效
  3123. sendMessageImg: {
  3124. type: String,
  3125. default: props$E.button.sendMessageImg
  3126. },
  3127. // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
  3128. // 用户点击后可以快速发送小程序消息,open-type="contact"时有效
  3129. showMessageCard: {
  3130. type: Boolean,
  3131. default: props$E.button.showMessageCard
  3132. },
  3133. // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
  3134. dataName: {
  3135. type: String,
  3136. default: props$E.button.dataName
  3137. },
  3138. // 节流,一定时间内只能触发一次
  3139. throttleTime: {
  3140. type: [String, Number],
  3141. default: props$E.button.throttleTime
  3142. },
  3143. // 按住后多久出现点击态,单位毫秒
  3144. hoverStartTime: {
  3145. type: [String, Number],
  3146. default: props$E.button.hoverStartTime
  3147. },
  3148. // 手指松开后点击态保留时间,单位毫秒
  3149. hoverStayTime: {
  3150. type: [String, Number],
  3151. default: props$E.button.hoverStayTime
  3152. },
  3153. // 按钮文字,之所以通过props传入,是因为slot传入的话
  3154. // nvue中无法控制文字的样式
  3155. text: {
  3156. type: [String, Number],
  3157. default: props$E.button.text
  3158. },
  3159. // 按钮图标
  3160. icon: {
  3161. type: String,
  3162. default: props$E.button.icon
  3163. },
  3164. // 按钮图标
  3165. iconColor: {
  3166. type: String,
  3167. default: props$E.button.icon
  3168. },
  3169. // 按钮颜色,支持传入linear-gradient渐变色
  3170. color: {
  3171. type: String,
  3172. default: props$E.button.color
  3173. }
  3174. }
  3175. };
  3176. const _sfc_main$20 = {
  3177. name: "u-button",
  3178. mixins: [mpMixin, mixin, props$y],
  3179. data() {
  3180. return {};
  3181. },
  3182. computed: {
  3183. // 生成bem风格的类名
  3184. bemClass() {
  3185. if (!this.color) {
  3186. return this.bem(
  3187. "button",
  3188. ["type", "shape", "size"],
  3189. ["disabled", "plain", "hairline"]
  3190. );
  3191. } else {
  3192. return this.bem(
  3193. "button",
  3194. ["shape", "size"],
  3195. ["disabled", "plain", "hairline"]
  3196. );
  3197. }
  3198. },
  3199. loadingColor() {
  3200. if (this.plain) {
  3201. return this.color ? this.color : uni.$u.config.color[`u-${this.type}`];
  3202. }
  3203. if (this.type === "info") {
  3204. return "#c9c9c9";
  3205. }
  3206. return "rgb(200, 200, 200)";
  3207. },
  3208. iconColorCom() {
  3209. if (this.iconColor)
  3210. return this.iconColor;
  3211. if (this.plain) {
  3212. return this.color ? this.color : this.type;
  3213. } else {
  3214. return this.type === "info" ? "#000000" : "#ffffff";
  3215. }
  3216. },
  3217. baseColor() {
  3218. let style = {};
  3219. if (this.color) {
  3220. style.color = this.plain ? this.color : "white";
  3221. if (!this.plain) {
  3222. style["background-color"] = this.color;
  3223. }
  3224. if (this.color.indexOf("gradient") !== -1) {
  3225. style.borderTopWidth = 0;
  3226. style.borderRightWidth = 0;
  3227. style.borderBottomWidth = 0;
  3228. style.borderLeftWidth = 0;
  3229. if (!this.plain) {
  3230. style.backgroundImage = this.color;
  3231. }
  3232. } else {
  3233. style.borderColor = this.color;
  3234. style.borderWidth = "1px";
  3235. style.borderStyle = "solid";
  3236. }
  3237. }
  3238. return style;
  3239. },
  3240. // nvue版本按钮的字体不会继承父组件的颜色,需要对每一个text组件进行单独的设置
  3241. nvueTextStyle() {
  3242. let style = {};
  3243. if (this.type === "info") {
  3244. style.color = "#323233";
  3245. }
  3246. if (this.color) {
  3247. style.color = this.plain ? this.color : "white";
  3248. }
  3249. style.fontSize = this.textSize + "px";
  3250. return style;
  3251. },
  3252. // 字体大小
  3253. textSize() {
  3254. let fontSize = 16, { size } = this;
  3255. if (size === "large")
  3256. fontSize = 20;
  3257. if (size === "normal")
  3258. fontSize = 16;
  3259. if (size === "small")
  3260. fontSize = 14;
  3261. if (size === "mini")
  3262. fontSize = 12;
  3263. return fontSize;
  3264. }
  3265. },
  3266. emits: [
  3267. "click",
  3268. "getphonenumber",
  3269. "getuserinfo",
  3270. "error",
  3271. "opensetting",
  3272. "launchapp"
  3273. ],
  3274. methods: {
  3275. clickHandler() {
  3276. if (!this.disabled && !this.loading) {
  3277. uni.$u.throttle(() => {
  3278. this.$emit("click");
  3279. }, this.throttleTime);
  3280. }
  3281. },
  3282. // 下面为对接uniapp官方按钮开放能力事件回调的对接
  3283. getphonenumber(res2) {
  3284. this.$emit("getphonenumber", res2);
  3285. },
  3286. getuserinfo(res2) {
  3287. this.$emit("getuserinfo", res2);
  3288. },
  3289. error(res2) {
  3290. this.$emit("error", res2);
  3291. },
  3292. opensetting(res2) {
  3293. this.$emit("opensetting", res2);
  3294. },
  3295. launchapp(res2) {
  3296. this.$emit("launchapp", res2);
  3297. }
  3298. }
  3299. };
  3300. function _sfc_render$1$(_ctx, _cache, $props, $setup, $data, $options) {
  3301. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  3302. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  3303. return vue.openBlock(), vue.createElementBlock("button", {
  3304. "hover-start-time": Number(_ctx.hoverStartTime),
  3305. "hover-stay-time": Number(_ctx.hoverStayTime),
  3306. "form-type": _ctx.formType,
  3307. "open-type": _ctx.openType,
  3308. "app-parameter": _ctx.appParameter,
  3309. "hover-stop-propagation": _ctx.hoverStopPropagation,
  3310. "send-message-title": _ctx.sendMessageTitle,
  3311. "send-message-path": _ctx.sendMessagePath,
  3312. lang: _ctx.lang,
  3313. "data-name": _ctx.dataName,
  3314. "session-from": _ctx.sessionFrom,
  3315. "send-message-img": _ctx.sendMessageImg,
  3316. "show-message-card": _ctx.showMessageCard,
  3317. onGetphonenumber: _cache[0] || (_cache[0] = (...args) => $options.getphonenumber && $options.getphonenumber(...args)),
  3318. onGetuserinfo: _cache[1] || (_cache[1] = (...args) => $options.getuserinfo && $options.getuserinfo(...args)),
  3319. onError: _cache[2] || (_cache[2] = (...args) => $options.error && $options.error(...args)),
  3320. onOpensetting: _cache[3] || (_cache[3] = (...args) => $options.opensetting && $options.opensetting(...args)),
  3321. onLaunchapp: _cache[4] || (_cache[4] = (...args) => $options.launchapp && $options.launchapp(...args)),
  3322. "hover-class": !_ctx.disabled && !_ctx.loading ? "u-button--active" : "",
  3323. class: vue.normalizeClass(["u-button u-reset-button", $options.bemClass]),
  3324. style: vue.normalizeStyle([$options.baseColor, _ctx.$u.addStyle(_ctx.customStyle)]),
  3325. onClick: _cache[5] || (_cache[5] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  3326. }, [
  3327. _ctx.loading ? (vue.openBlock(), vue.createElementBlock(
  3328. vue.Fragment,
  3329. { key: 0 },
  3330. [
  3331. vue.createVNode(_component_u_loading_icon, {
  3332. mode: _ctx.loadingMode,
  3333. size: _ctx.loadingSize * 1.15,
  3334. color: $options.loadingColor
  3335. }, null, 8, ["mode", "size", "color"]),
  3336. vue.createElementVNode(
  3337. "text",
  3338. {
  3339. class: "u-button__loading-text",
  3340. style: vue.normalizeStyle([{ fontSize: $options.textSize + "px" }])
  3341. },
  3342. vue.toDisplayString(_ctx.loadingText || _ctx.text),
  3343. 5
  3344. /* TEXT, STYLE */
  3345. )
  3346. ],
  3347. 64
  3348. /* STABLE_FRAGMENT */
  3349. )) : (vue.openBlock(), vue.createElementBlock(
  3350. vue.Fragment,
  3351. { key: 1 },
  3352. [
  3353. _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  3354. key: 0,
  3355. name: _ctx.icon,
  3356. color: $options.iconColorCom,
  3357. size: $options.textSize * 1.35,
  3358. customStyle: { marginRight: "2px" }
  3359. }, null, 8, ["name", "color", "size"])) : vue.createCommentVNode("v-if", true),
  3360. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  3361. vue.createElementVNode(
  3362. "text",
  3363. {
  3364. class: "u-button__text",
  3365. style: vue.normalizeStyle([{ fontSize: $options.textSize + "px" }])
  3366. },
  3367. vue.toDisplayString(_ctx.text),
  3368. 5
  3369. /* TEXT, STYLE */
  3370. )
  3371. ], true)
  3372. ],
  3373. 64
  3374. /* STABLE_FRAGMENT */
  3375. ))
  3376. ], 46, ["hover-start-time", "hover-stay-time", "form-type", "open-type", "app-parameter", "hover-stop-propagation", "send-message-title", "send-message-path", "lang", "data-name", "session-from", "send-message-img", "show-message-card", "hover-class"]);
  3377. }
  3378. const __easycom_3$5 = /* @__PURE__ */ _export_sfc(_sfc_main$20, [["render", _sfc_render$1$], ["__scopeId", "data-v-5ce41ee6"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-button/u-button.vue"]]);
  3379. const props$x = {
  3380. props: {
  3381. // 当前form的需要验证字段的集合
  3382. model: {
  3383. type: Object,
  3384. default: props$E.form.model
  3385. },
  3386. // 验证规则
  3387. rules: {
  3388. type: [Object, Function, Array],
  3389. default: props$E.form.rules
  3390. },
  3391. // 有错误时的提示方式,message-提示信息,toast-进行toast提示
  3392. // border-bottom-下边框呈现红色,none-无提示
  3393. errorType: {
  3394. type: String,
  3395. default: props$E.form.errorType
  3396. },
  3397. // 是否显示表单域的下划线边框
  3398. borderBottom: {
  3399. type: Boolean,
  3400. default: props$E.form.borderBottom
  3401. },
  3402. // label的位置,left-左边,top-上边
  3403. labelPosition: {
  3404. type: String,
  3405. default: props$E.form.labelPosition
  3406. },
  3407. // label的宽度,单位px
  3408. labelWidth: {
  3409. type: [String, Number],
  3410. default: props$E.form.labelWidth
  3411. },
  3412. // lable字体的对齐方式
  3413. labelAlign: {
  3414. type: String,
  3415. default: props$E.form.labelAlign
  3416. },
  3417. // lable的样式,对象形式
  3418. labelStyle: {
  3419. type: Object,
  3420. default: props$E.form.labelStyle
  3421. }
  3422. }
  3423. };
  3424. var define_process_env_default = {};
  3425. const formatRegExp = /%[sdj%]/g;
  3426. let warning = function warning2() {
  3427. };
  3428. if (typeof process !== "undefined" && define_process_env_default && true && typeof window !== "undefined" && typeof document !== "undefined") {
  3429. warning = function warning3(type2, errors) {
  3430. if (typeof console !== "undefined" && console.warn) {
  3431. if (errors.every((e) => typeof e === "string")) {
  3432. formatAppLog("warn", "at uni_modules/uview-plus/libs/util/async-validator.js:28", type2, errors);
  3433. }
  3434. }
  3435. };
  3436. }
  3437. function convertFieldsError(errors) {
  3438. if (!errors || !errors.length)
  3439. return null;
  3440. const fields = {};
  3441. errors.forEach((error2) => {
  3442. const { field } = error2;
  3443. fields[field] = fields[field] || [];
  3444. fields[field].push(error2);
  3445. });
  3446. return fields;
  3447. }
  3448. function format() {
  3449. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  3450. args[_key] = arguments[_key];
  3451. }
  3452. let i = 1;
  3453. const f = args[0];
  3454. const len = args.length;
  3455. if (typeof f === "function") {
  3456. return f.apply(null, args.slice(1));
  3457. }
  3458. if (typeof f === "string") {
  3459. let str = String(f).replace(formatRegExp, (x) => {
  3460. if (x === "%%") {
  3461. return "%";
  3462. }
  3463. if (i >= len) {
  3464. return x;
  3465. }
  3466. switch (x) {
  3467. case "%s":
  3468. return String(args[i++]);
  3469. case "%d":
  3470. return Number(args[i++]);
  3471. case "%j":
  3472. try {
  3473. return JSON.stringify(args[i++]);
  3474. } catch (_) {
  3475. return "[Circular]";
  3476. }
  3477. break;
  3478. default:
  3479. return x;
  3480. }
  3481. });
  3482. for (let arg = args[i]; i < len; arg = args[++i]) {
  3483. str += ` ${arg}`;
  3484. }
  3485. return str;
  3486. }
  3487. return f;
  3488. }
  3489. function isNativeStringType(type2) {
  3490. return type2 === "string" || type2 === "url" || type2 === "hex" || type2 === "email" || type2 === "pattern";
  3491. }
  3492. function isEmptyValue(value2, type2) {
  3493. if (value2 === void 0 || value2 === null) {
  3494. return true;
  3495. }
  3496. if (type2 === "array" && Array.isArray(value2) && !value2.length) {
  3497. return true;
  3498. }
  3499. if (isNativeStringType(type2) && typeof value2 === "string" && !value2) {
  3500. return true;
  3501. }
  3502. return false;
  3503. }
  3504. function asyncParallelArray(arr, func2, callback) {
  3505. const results = [];
  3506. let total = 0;
  3507. const arrLength = arr.length;
  3508. function count(errors) {
  3509. results.push.apply(results, errors);
  3510. total++;
  3511. if (total === arrLength) {
  3512. callback(results);
  3513. }
  3514. }
  3515. arr.forEach((a) => {
  3516. func2(a, count);
  3517. });
  3518. }
  3519. function asyncSerialArray(arr, func2, callback) {
  3520. let index2 = 0;
  3521. const arrLength = arr.length;
  3522. function next(errors) {
  3523. if (errors && errors.length) {
  3524. callback(errors);
  3525. return;
  3526. }
  3527. const original = index2;
  3528. index2 += 1;
  3529. if (original < arrLength) {
  3530. func2(arr[original], next);
  3531. } else {
  3532. callback([]);
  3533. }
  3534. }
  3535. next([]);
  3536. }
  3537. function flattenObjArr(objArr) {
  3538. const ret = [];
  3539. Object.keys(objArr).forEach((k) => {
  3540. ret.push.apply(ret, objArr[k]);
  3541. });
  3542. return ret;
  3543. }
  3544. function asyncMap(objArr, option, func2, callback) {
  3545. if (option.first) {
  3546. const _pending = new Promise((resolve, reject) => {
  3547. const next = function next2(errors) {
  3548. callback(errors);
  3549. return errors.length ? reject({
  3550. errors,
  3551. fields: convertFieldsError(errors)
  3552. }) : resolve();
  3553. };
  3554. const flattenArr = flattenObjArr(objArr);
  3555. asyncSerialArray(flattenArr, func2, next);
  3556. });
  3557. _pending.catch((e) => e);
  3558. return _pending;
  3559. }
  3560. let firstFields = option.firstFields || [];
  3561. if (firstFields === true) {
  3562. firstFields = Object.keys(objArr);
  3563. }
  3564. const objArrKeys = Object.keys(objArr);
  3565. const objArrLength = objArrKeys.length;
  3566. let total = 0;
  3567. const results = [];
  3568. const pending = new Promise((resolve, reject) => {
  3569. const next = function next2(errors) {
  3570. results.push.apply(results, errors);
  3571. total++;
  3572. if (total === objArrLength) {
  3573. callback(results);
  3574. return results.length ? reject({
  3575. errors: results,
  3576. fields: convertFieldsError(results)
  3577. }) : resolve();
  3578. }
  3579. };
  3580. if (!objArrKeys.length) {
  3581. callback(results);
  3582. resolve();
  3583. }
  3584. objArrKeys.forEach((key) => {
  3585. const arr = objArr[key];
  3586. if (firstFields.indexOf(key) !== -1) {
  3587. asyncSerialArray(arr, func2, next);
  3588. } else {
  3589. asyncParallelArray(arr, func2, next);
  3590. }
  3591. });
  3592. });
  3593. pending.catch((e) => e);
  3594. return pending;
  3595. }
  3596. function complementError(rule) {
  3597. return function(oe) {
  3598. if (oe && oe.message) {
  3599. oe.field = oe.field || rule.fullField;
  3600. return oe;
  3601. }
  3602. return {
  3603. message: typeof oe === "function" ? oe() : oe,
  3604. field: oe.field || rule.fullField
  3605. };
  3606. };
  3607. }
  3608. function deepMerge$2(target, source) {
  3609. if (source) {
  3610. for (const s in source) {
  3611. if (source.hasOwnProperty(s)) {
  3612. const value2 = source[s];
  3613. if (typeof value2 === "object" && typeof target[s] === "object") {
  3614. target[s] = { ...target[s], ...value2 };
  3615. } else {
  3616. target[s] = value2;
  3617. }
  3618. }
  3619. }
  3620. }
  3621. return target;
  3622. }
  3623. function required(rule, value2, source, errors, options, type2) {
  3624. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value2, type2 || rule.type))) {
  3625. errors.push(format(options.messages.required, rule.fullField));
  3626. }
  3627. }
  3628. function whitespace(rule, value2, source, errors, options) {
  3629. if (/^\s+$/.test(value2) || value2 === "") {
  3630. errors.push(format(options.messages.whitespace, rule.fullField));
  3631. }
  3632. }
  3633. const pattern = {
  3634. // http://emailregex.com/
  3635. email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
  3636. url: new RegExp(
  3637. "^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$",
  3638. "i"
  3639. ),
  3640. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  3641. };
  3642. var types = {
  3643. integer: function integer(value2) {
  3644. return /^(-)?\d+$/.test(value2);
  3645. },
  3646. float: function float(value2) {
  3647. return /^(-)?\d+(\.\d+)?$/.test(value2);
  3648. },
  3649. array: function array3(value2) {
  3650. return Array.isArray(value2);
  3651. },
  3652. regexp: function regexp(value2) {
  3653. if (value2 instanceof RegExp) {
  3654. return true;
  3655. }
  3656. try {
  3657. return !!new RegExp(value2);
  3658. } catch (e) {
  3659. return false;
  3660. }
  3661. },
  3662. date: function date3(value2) {
  3663. return typeof value2.getTime === "function" && typeof value2.getMonth === "function" && typeof value2.getYear === "function";
  3664. },
  3665. number: function number3(value2) {
  3666. if (isNaN(value2)) {
  3667. return false;
  3668. }
  3669. return typeof +value2 === "number";
  3670. },
  3671. object: function object3(value2) {
  3672. return typeof value2 === "object" && !types.array(value2);
  3673. },
  3674. method: function method(value2) {
  3675. return typeof value2 === "function";
  3676. },
  3677. email: function email2(value2) {
  3678. return typeof value2 === "string" && !!value2.match(pattern.email) && value2.length < 255;
  3679. },
  3680. url: function url2(value2) {
  3681. return typeof value2 === "string" && !!value2.match(pattern.url);
  3682. },
  3683. hex: function hex(value2) {
  3684. return typeof value2 === "string" && !!value2.match(pattern.hex);
  3685. }
  3686. };
  3687. function type(rule, value2, source, errors, options) {
  3688. if (rule.required && value2 === void 0) {
  3689. required(rule, value2, source, errors, options);
  3690. return;
  3691. }
  3692. const custom = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"];
  3693. const ruleType = rule.type;
  3694. if (custom.indexOf(ruleType) > -1) {
  3695. if (!types[ruleType](value2)) {
  3696. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  3697. }
  3698. } else if (ruleType && typeof value2 !== rule.type) {
  3699. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  3700. }
  3701. }
  3702. function range$2(rule, value2, source, errors, options) {
  3703. const len = typeof rule.len === "number";
  3704. const min = typeof rule.min === "number";
  3705. const max = typeof rule.max === "number";
  3706. const spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  3707. let val = value2;
  3708. let key = null;
  3709. const num = typeof value2 === "number";
  3710. const str = typeof value2 === "string";
  3711. const arr = Array.isArray(value2);
  3712. if (num) {
  3713. key = "number";
  3714. } else if (str) {
  3715. key = "string";
  3716. } else if (arr) {
  3717. key = "array";
  3718. }
  3719. if (!key) {
  3720. return false;
  3721. }
  3722. if (arr) {
  3723. val = value2.length;
  3724. }
  3725. if (str) {
  3726. val = value2.replace(spRegexp, "_").length;
  3727. }
  3728. if (len) {
  3729. if (val !== rule.len) {
  3730. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  3731. }
  3732. } else if (min && !max && val < rule.min) {
  3733. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  3734. } else if (max && !min && val > rule.max) {
  3735. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  3736. } else if (min && max && (val < rule.min || val > rule.max)) {
  3737. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  3738. }
  3739. }
  3740. const ENUM = "enum";
  3741. function enumerable(rule, value2, source, errors, options) {
  3742. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  3743. if (rule[ENUM].indexOf(value2) === -1) {
  3744. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(", ")));
  3745. }
  3746. }
  3747. function pattern$1(rule, value2, source, errors, options) {
  3748. if (rule.pattern) {
  3749. if (rule.pattern instanceof RegExp) {
  3750. rule.pattern.lastIndex = 0;
  3751. if (!rule.pattern.test(value2)) {
  3752. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value2, rule.pattern));
  3753. }
  3754. } else if (typeof rule.pattern === "string") {
  3755. const _pattern = new RegExp(rule.pattern);
  3756. if (!_pattern.test(value2)) {
  3757. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value2, rule.pattern));
  3758. }
  3759. }
  3760. }
  3761. }
  3762. const rules = {
  3763. required,
  3764. whitespace,
  3765. type,
  3766. range: range$2,
  3767. enum: enumerable,
  3768. pattern: pattern$1
  3769. };
  3770. function string$1(rule, value2, callback, source, options) {
  3771. const errors = [];
  3772. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3773. if (validate2) {
  3774. if (isEmptyValue(value2, "string") && !rule.required) {
  3775. return callback();
  3776. }
  3777. rules.required(rule, value2, source, errors, options, "string");
  3778. if (!isEmptyValue(value2, "string")) {
  3779. rules.type(rule, value2, source, errors, options);
  3780. rules.range(rule, value2, source, errors, options);
  3781. rules.pattern(rule, value2, source, errors, options);
  3782. if (rule.whitespace === true) {
  3783. rules.whitespace(rule, value2, source, errors, options);
  3784. }
  3785. }
  3786. }
  3787. callback(errors);
  3788. }
  3789. function method2(rule, value2, callback, source, options) {
  3790. const errors = [];
  3791. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3792. if (validate2) {
  3793. if (isEmptyValue(value2) && !rule.required) {
  3794. return callback();
  3795. }
  3796. rules.required(rule, value2, source, errors, options);
  3797. if (value2 !== void 0) {
  3798. rules.type(rule, value2, source, errors, options);
  3799. }
  3800. }
  3801. callback(errors);
  3802. }
  3803. function number2(rule, value2, callback, source, options) {
  3804. const errors = [];
  3805. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3806. if (validate2) {
  3807. if (value2 === "") {
  3808. value2 = void 0;
  3809. }
  3810. if (isEmptyValue(value2) && !rule.required) {
  3811. return callback();
  3812. }
  3813. rules.required(rule, value2, source, errors, options);
  3814. if (value2 !== void 0) {
  3815. rules.type(rule, value2, source, errors, options);
  3816. rules.range(rule, value2, source, errors, options);
  3817. }
  3818. }
  3819. callback(errors);
  3820. }
  3821. function _boolean(rule, value2, callback, source, options) {
  3822. const errors = [];
  3823. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3824. if (validate2) {
  3825. if (isEmptyValue(value2) && !rule.required) {
  3826. return callback();
  3827. }
  3828. rules.required(rule, value2, source, errors, options);
  3829. if (value2 !== void 0) {
  3830. rules.type(rule, value2, source, errors, options);
  3831. }
  3832. }
  3833. callback(errors);
  3834. }
  3835. function regexp2(rule, value2, callback, source, options) {
  3836. const errors = [];
  3837. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3838. if (validate2) {
  3839. if (isEmptyValue(value2) && !rule.required) {
  3840. return callback();
  3841. }
  3842. rules.required(rule, value2, source, errors, options);
  3843. if (!isEmptyValue(value2)) {
  3844. rules.type(rule, value2, source, errors, options);
  3845. }
  3846. }
  3847. callback(errors);
  3848. }
  3849. function integer2(rule, value2, callback, source, options) {
  3850. const errors = [];
  3851. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3852. if (validate2) {
  3853. if (isEmptyValue(value2) && !rule.required) {
  3854. return callback();
  3855. }
  3856. rules.required(rule, value2, source, errors, options);
  3857. if (value2 !== void 0) {
  3858. rules.type(rule, value2, source, errors, options);
  3859. rules.range(rule, value2, source, errors, options);
  3860. }
  3861. }
  3862. callback(errors);
  3863. }
  3864. function floatFn(rule, value2, callback, source, options) {
  3865. const errors = [];
  3866. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3867. if (validate2) {
  3868. if (isEmptyValue(value2) && !rule.required) {
  3869. return callback();
  3870. }
  3871. rules.required(rule, value2, source, errors, options);
  3872. if (value2 !== void 0) {
  3873. rules.type(rule, value2, source, errors, options);
  3874. rules.range(rule, value2, source, errors, options);
  3875. }
  3876. }
  3877. callback(errors);
  3878. }
  3879. function array2(rule, value2, callback, source, options) {
  3880. const errors = [];
  3881. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3882. if (validate2) {
  3883. if (isEmptyValue(value2, "array") && !rule.required) {
  3884. return callback();
  3885. }
  3886. rules.required(rule, value2, source, errors, options, "array");
  3887. if (!isEmptyValue(value2, "array")) {
  3888. rules.type(rule, value2, source, errors, options);
  3889. rules.range(rule, value2, source, errors, options);
  3890. }
  3891. }
  3892. callback(errors);
  3893. }
  3894. function object2(rule, value2, callback, source, options) {
  3895. const errors = [];
  3896. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3897. if (validate2) {
  3898. if (isEmptyValue(value2) && !rule.required) {
  3899. return callback();
  3900. }
  3901. rules.required(rule, value2, source, errors, options);
  3902. if (value2 !== void 0) {
  3903. rules.type(rule, value2, source, errors, options);
  3904. }
  3905. }
  3906. callback(errors);
  3907. }
  3908. const ENUM$1 = "enum";
  3909. function enumerable$1(rule, value2, callback, source, options) {
  3910. const errors = [];
  3911. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3912. if (validate2) {
  3913. if (isEmptyValue(value2) && !rule.required) {
  3914. return callback();
  3915. }
  3916. rules.required(rule, value2, source, errors, options);
  3917. if (value2 !== void 0) {
  3918. rules[ENUM$1](rule, value2, source, errors, options);
  3919. }
  3920. }
  3921. callback(errors);
  3922. }
  3923. function pattern$2(rule, value2, callback, source, options) {
  3924. const errors = [];
  3925. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3926. if (validate2) {
  3927. if (isEmptyValue(value2, "string") && !rule.required) {
  3928. return callback();
  3929. }
  3930. rules.required(rule, value2, source, errors, options);
  3931. if (!isEmptyValue(value2, "string")) {
  3932. rules.pattern(rule, value2, source, errors, options);
  3933. }
  3934. }
  3935. callback(errors);
  3936. }
  3937. function date2(rule, value2, callback, source, options) {
  3938. const errors = [];
  3939. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3940. if (validate2) {
  3941. if (isEmptyValue(value2) && !rule.required) {
  3942. return callback();
  3943. }
  3944. rules.required(rule, value2, source, errors, options);
  3945. if (!isEmptyValue(value2)) {
  3946. let dateObject;
  3947. if (typeof value2 === "number") {
  3948. dateObject = new Date(value2);
  3949. } else {
  3950. dateObject = value2;
  3951. }
  3952. rules.type(rule, dateObject, source, errors, options);
  3953. if (dateObject) {
  3954. rules.range(rule, dateObject.getTime(), source, errors, options);
  3955. }
  3956. }
  3957. }
  3958. callback(errors);
  3959. }
  3960. function required$1(rule, value2, callback, source, options) {
  3961. const errors = [];
  3962. const type2 = Array.isArray(value2) ? "array" : typeof value2;
  3963. rules.required(rule, value2, source, errors, options, type2);
  3964. callback(errors);
  3965. }
  3966. function type$1(rule, value2, callback, source, options) {
  3967. const ruleType = rule.type;
  3968. const errors = [];
  3969. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3970. if (validate2) {
  3971. if (isEmptyValue(value2, ruleType) && !rule.required) {
  3972. return callback();
  3973. }
  3974. rules.required(rule, value2, source, errors, options, ruleType);
  3975. if (!isEmptyValue(value2, ruleType)) {
  3976. rules.type(rule, value2, source, errors, options);
  3977. }
  3978. }
  3979. callback(errors);
  3980. }
  3981. function any(rule, value2, callback, source, options) {
  3982. const errors = [];
  3983. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  3984. if (validate2) {
  3985. if (isEmptyValue(value2) && !rule.required) {
  3986. return callback();
  3987. }
  3988. rules.required(rule, value2, source, errors, options);
  3989. }
  3990. callback(errors);
  3991. }
  3992. const validators = {
  3993. string: string$1,
  3994. method: method2,
  3995. number: number2,
  3996. boolean: _boolean,
  3997. regexp: regexp2,
  3998. integer: integer2,
  3999. float: floatFn,
  4000. array: array2,
  4001. object: object2,
  4002. enum: enumerable$1,
  4003. pattern: pattern$2,
  4004. date: date2,
  4005. url: type$1,
  4006. hex: type$1,
  4007. email: type$1,
  4008. required: required$1,
  4009. any
  4010. };
  4011. function newMessages() {
  4012. return {
  4013. default: "Validation error on field %s",
  4014. required: "%s is required",
  4015. enum: "%s must be one of %s",
  4016. whitespace: "%s cannot be empty",
  4017. date: {
  4018. format: "%s date %s is invalid for format %s",
  4019. parse: "%s date could not be parsed, %s is invalid ",
  4020. invalid: "%s date %s is invalid"
  4021. },
  4022. types: {
  4023. string: "%s is not a %s",
  4024. method: "%s is not a %s (function)",
  4025. array: "%s is not an %s",
  4026. object: "%s is not an %s",
  4027. number: "%s is not a %s",
  4028. date: "%s is not a %s",
  4029. boolean: "%s is not a %s",
  4030. integer: "%s is not an %s",
  4031. float: "%s is not a %s",
  4032. regexp: "%s is not a valid %s",
  4033. email: "%s is not a valid %s",
  4034. url: "%s is not a valid %s",
  4035. hex: "%s is not a valid %s"
  4036. },
  4037. string: {
  4038. len: "%s must be exactly %s characters",
  4039. min: "%s must be at least %s characters",
  4040. max: "%s cannot be longer than %s characters",
  4041. range: "%s must be between %s and %s characters"
  4042. },
  4043. number: {
  4044. len: "%s must equal %s",
  4045. min: "%s cannot be less than %s",
  4046. max: "%s cannot be greater than %s",
  4047. range: "%s must be between %s and %s"
  4048. },
  4049. array: {
  4050. len: "%s must be exactly %s in length",
  4051. min: "%s cannot be less than %s in length",
  4052. max: "%s cannot be greater than %s in length",
  4053. range: "%s must be between %s and %s in length"
  4054. },
  4055. pattern: {
  4056. mismatch: "%s value %s does not match pattern %s"
  4057. },
  4058. clone: function clone2() {
  4059. const cloned = JSON.parse(JSON.stringify(this));
  4060. cloned.clone = this.clone;
  4061. return cloned;
  4062. }
  4063. };
  4064. }
  4065. const messages = newMessages();
  4066. function Schema(descriptor) {
  4067. this.rules = null;
  4068. this._messages = messages;
  4069. this.define(descriptor);
  4070. }
  4071. Schema.prototype = {
  4072. messages: function messages2(_messages) {
  4073. if (_messages) {
  4074. this._messages = deepMerge$2(newMessages(), _messages);
  4075. }
  4076. return this._messages;
  4077. },
  4078. define: function define(rules2) {
  4079. if (!rules2) {
  4080. throw new Error("Cannot configure a schema with no rules");
  4081. }
  4082. if (typeof rules2 !== "object" || Array.isArray(rules2)) {
  4083. throw new Error("Rules must be an object");
  4084. }
  4085. this.rules = {};
  4086. let z;
  4087. let item;
  4088. for (z in rules2) {
  4089. if (rules2.hasOwnProperty(z)) {
  4090. item = rules2[z];
  4091. this.rules[z] = Array.isArray(item) ? item : [item];
  4092. }
  4093. }
  4094. },
  4095. validate: function validate(source_, o, oc) {
  4096. const _this = this;
  4097. if (o === void 0) {
  4098. o = {};
  4099. }
  4100. if (oc === void 0) {
  4101. oc = function oc2() {
  4102. };
  4103. }
  4104. let source = source_;
  4105. let options = o;
  4106. let callback = oc;
  4107. if (typeof options === "function") {
  4108. callback = options;
  4109. options = {};
  4110. }
  4111. if (!this.rules || Object.keys(this.rules).length === 0) {
  4112. if (callback) {
  4113. callback();
  4114. }
  4115. return Promise.resolve();
  4116. }
  4117. function complete(results) {
  4118. let i;
  4119. let errors = [];
  4120. let fields = {};
  4121. function add(e) {
  4122. if (Array.isArray(e)) {
  4123. let _errors;
  4124. errors = (_errors = errors).concat.apply(_errors, e);
  4125. } else {
  4126. errors.push(e);
  4127. }
  4128. }
  4129. for (i = 0; i < results.length; i++) {
  4130. add(results[i]);
  4131. }
  4132. if (!errors.length) {
  4133. errors = null;
  4134. fields = null;
  4135. } else {
  4136. fields = convertFieldsError(errors);
  4137. }
  4138. callback(errors, fields);
  4139. }
  4140. if (options.messages) {
  4141. let messages$1 = this.messages();
  4142. if (messages$1 === messages) {
  4143. messages$1 = newMessages();
  4144. }
  4145. deepMerge$2(messages$1, options.messages);
  4146. options.messages = messages$1;
  4147. } else {
  4148. options.messages = this.messages();
  4149. }
  4150. let arr;
  4151. let value2;
  4152. const series = {};
  4153. const keys = options.keys || Object.keys(this.rules);
  4154. keys.forEach((z) => {
  4155. arr = _this.rules[z];
  4156. value2 = source[z];
  4157. arr.forEach((r) => {
  4158. let rule = r;
  4159. if (typeof rule.transform === "function") {
  4160. if (source === source_) {
  4161. source = { ...source };
  4162. }
  4163. value2 = source[z] = rule.transform(value2);
  4164. }
  4165. if (typeof rule === "function") {
  4166. rule = {
  4167. validator: rule
  4168. };
  4169. } else {
  4170. rule = { ...rule };
  4171. }
  4172. rule.validator = _this.getValidationMethod(rule);
  4173. rule.field = z;
  4174. rule.fullField = rule.fullField || z;
  4175. rule.type = _this.getType(rule);
  4176. if (!rule.validator) {
  4177. return;
  4178. }
  4179. series[z] = series[z] || [];
  4180. series[z].push({
  4181. rule,
  4182. value: value2,
  4183. source,
  4184. field: z
  4185. });
  4186. });
  4187. });
  4188. const errorFields = {};
  4189. return asyncMap(series, options, (data, doIt) => {
  4190. const { rule } = data;
  4191. let deep = (rule.type === "object" || rule.type === "array") && (typeof rule.fields === "object" || typeof rule.defaultField === "object");
  4192. deep = deep && (rule.required || !rule.required && data.value);
  4193. rule.field = data.field;
  4194. function addFullfield(key, schema) {
  4195. return { ...schema, fullField: `${rule.fullField}.${key}` };
  4196. }
  4197. function cb(e) {
  4198. if (e === void 0) {
  4199. e = [];
  4200. }
  4201. let errors = e;
  4202. if (!Array.isArray(errors)) {
  4203. errors = [errors];
  4204. }
  4205. if (!options.suppressWarning && errors.length) {
  4206. Schema.warning("async-validator:", errors);
  4207. }
  4208. if (errors.length && rule.message) {
  4209. errors = [].concat(rule.message);
  4210. }
  4211. errors = errors.map(complementError(rule));
  4212. if (options.first && errors.length) {
  4213. errorFields[rule.field] = 1;
  4214. return doIt(errors);
  4215. }
  4216. if (!deep) {
  4217. doIt(errors);
  4218. } else {
  4219. if (rule.required && !data.value) {
  4220. if (rule.message) {
  4221. errors = [].concat(rule.message).map(complementError(rule));
  4222. } else if (options.error) {
  4223. errors = [options.error(rule, format(options.messages.required, rule.field))];
  4224. } else {
  4225. errors = [];
  4226. }
  4227. return doIt(errors);
  4228. }
  4229. let fieldsSchema = {};
  4230. if (rule.defaultField) {
  4231. for (const k in data.value) {
  4232. if (data.value.hasOwnProperty(k)) {
  4233. fieldsSchema[k] = rule.defaultField;
  4234. }
  4235. }
  4236. }
  4237. fieldsSchema = { ...fieldsSchema, ...data.rule.fields };
  4238. for (const f in fieldsSchema) {
  4239. if (fieldsSchema.hasOwnProperty(f)) {
  4240. const fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
  4241. fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
  4242. }
  4243. }
  4244. const schema = new Schema(fieldsSchema);
  4245. schema.messages(options.messages);
  4246. if (data.rule.options) {
  4247. data.rule.options.messages = options.messages;
  4248. data.rule.options.error = options.error;
  4249. }
  4250. schema.validate(data.value, data.rule.options || options, (errs) => {
  4251. const finalErrors = [];
  4252. if (errors && errors.length) {
  4253. finalErrors.push.apply(finalErrors, errors);
  4254. }
  4255. if (errs && errs.length) {
  4256. finalErrors.push.apply(finalErrors, errs);
  4257. }
  4258. doIt(finalErrors.length ? finalErrors : null);
  4259. });
  4260. }
  4261. }
  4262. let res2;
  4263. if (rule.asyncValidator) {
  4264. res2 = rule.asyncValidator(rule, data.value, cb, data.source, options);
  4265. } else if (rule.validator) {
  4266. res2 = rule.validator(rule, data.value, cb, data.source, options);
  4267. if (res2 === true) {
  4268. cb();
  4269. } else if (res2 === false) {
  4270. cb(rule.message || `${rule.field} fails`);
  4271. } else if (res2 instanceof Array) {
  4272. cb(res2);
  4273. } else if (res2 instanceof Error) {
  4274. cb(res2.message);
  4275. }
  4276. }
  4277. if (res2 && res2.then) {
  4278. res2.then(() => cb(), (e) => cb(e));
  4279. }
  4280. }, (results) => {
  4281. complete(results);
  4282. });
  4283. },
  4284. getType: function getType(rule) {
  4285. if (rule.type === void 0 && rule.pattern instanceof RegExp) {
  4286. rule.type = "pattern";
  4287. }
  4288. if (typeof rule.validator !== "function" && rule.type && !validators.hasOwnProperty(rule.type)) {
  4289. throw new Error(format("Unknown rule type %s", rule.type));
  4290. }
  4291. return rule.type || "string";
  4292. },
  4293. getValidationMethod: function getValidationMethod(rule) {
  4294. if (typeof rule.validator === "function") {
  4295. return rule.validator;
  4296. }
  4297. const keys = Object.keys(rule);
  4298. const messageIndex = keys.indexOf("message");
  4299. if (messageIndex !== -1) {
  4300. keys.splice(messageIndex, 1);
  4301. }
  4302. if (keys.length === 1 && keys[0] === "required") {
  4303. return validators.required;
  4304. }
  4305. return validators[this.getType(rule)] || false;
  4306. }
  4307. };
  4308. Schema.register = function register(type2, validator) {
  4309. if (typeof validator !== "function") {
  4310. throw new Error("Cannot register a validator by type, validator is not a function");
  4311. }
  4312. validators[type2] = validator;
  4313. };
  4314. Schema.warning = warning;
  4315. Schema.messages = messages;
  4316. Schema.warning = function() {
  4317. };
  4318. const _sfc_main$1$ = {
  4319. name: "u-form",
  4320. mixins: [mpMixin, mixin, props$x],
  4321. provide() {
  4322. return {
  4323. uForm: this
  4324. };
  4325. },
  4326. data() {
  4327. return {
  4328. formRules: {},
  4329. // 规则校验器
  4330. validator: {},
  4331. // 原始的model快照,用于resetFields方法重置表单时使用
  4332. originalModel: null
  4333. };
  4334. },
  4335. watch: {
  4336. // 监听规则的变化
  4337. rules: {
  4338. immediate: true,
  4339. handler(n) {
  4340. this.setRules(n);
  4341. }
  4342. },
  4343. // 监听属性的变化,通知子组件u-form-item重新获取信息
  4344. propsChange(n) {
  4345. var _a;
  4346. if ((_a = this.children) == null ? void 0 : _a.length) {
  4347. this.children.map((child) => {
  4348. typeof child.updateParentData == "function" && child.updateParentData();
  4349. });
  4350. }
  4351. },
  4352. // 监听model的初始值作为重置表单的快照
  4353. model: {
  4354. immediate: true,
  4355. handler(n) {
  4356. if (!this.originalModel) {
  4357. this.originalModel = uni.$u.deepClone(n);
  4358. }
  4359. }
  4360. }
  4361. },
  4362. computed: {
  4363. propsChange() {
  4364. return [
  4365. this.errorType,
  4366. this.borderBottom,
  4367. this.labelPosition,
  4368. this.labelWidth,
  4369. this.labelAlign,
  4370. this.labelStyle
  4371. ];
  4372. }
  4373. },
  4374. created() {
  4375. this.children = [];
  4376. },
  4377. methods: {
  4378. // 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则
  4379. setRules(rules2) {
  4380. if (Object.keys(rules2).length === 0)
  4381. return;
  4382. if (Object.keys(this.model).length === 0) {
  4383. uni.$u.error("设置rules,model必须设置!如果已经设置,请刷新页面。");
  4384. return;
  4385. }
  4386. this.formRules = rules2;
  4387. this.validator = new Schema(rules2);
  4388. },
  4389. // 清空所有u-form-item组件的内容,本质上是调用了u-form-item组件中的resetField()方法
  4390. resetFields() {
  4391. this.resetModel();
  4392. },
  4393. // 重置model为初始值的快照
  4394. resetModel(obj) {
  4395. this.children.map((child) => {
  4396. const prop = child == null ? void 0 : child.prop;
  4397. const value2 = uni.$u.getProperty(this.originalModel, prop);
  4398. uni.$u.setProperty(this.model, prop, value2);
  4399. });
  4400. },
  4401. // 清空校验结果
  4402. clearValidate(props2) {
  4403. props2 = [].concat(props2);
  4404. this.children.map((child) => {
  4405. if (props2[0] === void 0 || props2.includes(child.prop)) {
  4406. child.message = null;
  4407. }
  4408. });
  4409. },
  4410. // 对部分表单字段进行校验
  4411. async validateField(value2, callback, event = null) {
  4412. this.$nextTick(() => {
  4413. const errorsRes = [];
  4414. value2 = [].concat(value2);
  4415. this.children.map((child) => {
  4416. const childErrors = [];
  4417. if (value2.includes(child.prop)) {
  4418. const propertyVal = uni.$u.getProperty(
  4419. this.model,
  4420. child.prop
  4421. );
  4422. const propertyChain = child.prop.split(".");
  4423. const propertyName = propertyChain[propertyChain.length - 1];
  4424. const rule = this.formRules[child.prop];
  4425. if (!rule)
  4426. return;
  4427. const rules2 = [].concat(rule);
  4428. for (let i = 0; i < rules2.length; i++) {
  4429. const ruleItem = rules2[i];
  4430. const trigger = [].concat(ruleItem == null ? void 0 : ruleItem.trigger);
  4431. if (event && !trigger.includes(event))
  4432. continue;
  4433. const validator = new Schema({
  4434. [propertyName]: ruleItem
  4435. });
  4436. validator.validate(
  4437. {
  4438. [propertyName]: propertyVal
  4439. },
  4440. (errors, fields) => {
  4441. var _a;
  4442. if (uni.$u.test.array(errors)) {
  4443. errorsRes.push(...errors);
  4444. childErrors.push(...errors);
  4445. }
  4446. child.message = ((_a = childErrors[0]) == null ? void 0 : _a.message) ?? null;
  4447. }
  4448. );
  4449. }
  4450. }
  4451. });
  4452. typeof callback === "function" && callback(errorsRes);
  4453. });
  4454. },
  4455. // 校验全部数据
  4456. validate(callback) {
  4457. if (Object.keys(this.formRules).length === 0) {
  4458. uni.$u.error("未设置rules,请看文档说明!如果已经设置,请刷新页面。");
  4459. return;
  4460. }
  4461. return new Promise((resolve, reject) => {
  4462. this.$nextTick(() => {
  4463. const formItemProps = this.children.map(
  4464. (item) => item.prop
  4465. );
  4466. this.validateField(formItemProps, (errors) => {
  4467. if (errors.length) {
  4468. this.errorType === "toast" && uni.$u.toast(errors[0].message);
  4469. reject(errors);
  4470. } else {
  4471. resolve(true);
  4472. }
  4473. });
  4474. });
  4475. });
  4476. }
  4477. }
  4478. };
  4479. function _sfc_render$1_(_ctx, _cache, $props, $setup, $data, $options) {
  4480. return vue.openBlock(), vue.createElementBlock("view", { class: "u-form" }, [
  4481. vue.renderSlot(_ctx.$slots, "default")
  4482. ]);
  4483. }
  4484. const __easycom_2$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1$, [["render", _sfc_render$1_], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-form/u-form.vue"]]);
  4485. const _sfc_main$1_ = {
  4486. name: "u--form",
  4487. mixins: [mpMixin, props$x, mixin],
  4488. components: {
  4489. uvForm: __easycom_2$6
  4490. },
  4491. created() {
  4492. this.children = [];
  4493. },
  4494. methods: {
  4495. // 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则
  4496. setRules(rules2) {
  4497. this.$refs.uForm.setRules(rules2);
  4498. },
  4499. validate() {
  4500. return this.$refs.uForm.validate();
  4501. },
  4502. validateField(value2, callback) {
  4503. return this.$refs.uForm.validateField(value2, callback);
  4504. },
  4505. resetFields() {
  4506. return this.$refs.uForm.resetFields();
  4507. },
  4508. clearValidate(props2) {
  4509. return this.$refs.uForm.clearValidate(props2);
  4510. },
  4511. setMpData() {
  4512. this.$refs.uForm.children = this.children;
  4513. }
  4514. }
  4515. };
  4516. function _sfc_render$1Z(_ctx, _cache, $props, $setup, $data, $options) {
  4517. const _component_uvForm = vue.resolveComponent("uvForm");
  4518. return vue.openBlock(), vue.createBlock(_component_uvForm, {
  4519. ref: "uForm",
  4520. model: _ctx.model,
  4521. rules: _ctx.rules,
  4522. errorType: _ctx.errorType,
  4523. borderBottom: _ctx.borderBottom,
  4524. labelPosition: _ctx.labelPosition,
  4525. labelWidth: _ctx.labelWidth,
  4526. labelAlign: _ctx.labelAlign,
  4527. labelStyle: _ctx.labelStyle,
  4528. customStyle: _ctx.customStyle
  4529. }, {
  4530. default: vue.withCtx(() => [
  4531. vue.renderSlot(_ctx.$slots, "default")
  4532. ]),
  4533. _: 3
  4534. /* FORWARDED */
  4535. }, 8, ["model", "rules", "errorType", "borderBottom", "labelPosition", "labelWidth", "labelAlign", "labelStyle", "customStyle"]);
  4536. }
  4537. const __easycom_2$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1_, [["render", _sfc_render$1Z], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u--form/u--form.vue"]]);
  4538. const _imports_0$3 = "/static/img/logo.png";
  4539. const prefixIconStyle = "font-size:50rpx";
  4540. const placeholderStyle$4 = "font-size:32rpx";
  4541. const _sfc_main$1Z = {
  4542. __name: "login",
  4543. setup(__props, { expose: __expose }) {
  4544. __expose();
  4545. const customStyle = vue.reactive({
  4546. "font-size": "40rpx",
  4547. height: "90rpx"
  4548. });
  4549. let { proxy } = vue.getCurrentInstance();
  4550. const formData = vue.reactive({
  4551. username: "",
  4552. password: "",
  4553. code: ""
  4554. });
  4555. const uForm = vue.ref(null);
  4556. const isCountingDown = vue.ref(false);
  4557. const countdown = vue.ref(60);
  4558. const countDownText = vue.ref("获取验证码");
  4559. const startCountDown = () => {
  4560. isCountingDown.value = true;
  4561. countdown.value = 60;
  4562. countDownText.value = `${countdown.value}秒重发`;
  4563. const timer = setInterval(() => {
  4564. countdown.value--;
  4565. countDownText.value = `${countdown.value}秒重发`;
  4566. if (countdown.value <= 0) {
  4567. clearInterval(timer);
  4568. isCountingDown.value = false;
  4569. countDownText.value = "重新发送";
  4570. }
  4571. }, 1e3);
  4572. };
  4573. const getVerifyCode = () => {
  4574. if (isCountingDown.value)
  4575. return;
  4576. if (!formData.username)
  4577. return uni.$u.toast("请输入用户名");
  4578. if (!formData.password)
  4579. return uni.$u.toast("请输入密码");
  4580. let data = {
  4581. username: formData.username,
  4582. password: formData.password
  4583. };
  4584. uni.showLoading({
  4585. mask: true,
  4586. title: "发送中..."
  4587. });
  4588. uni.$u.http.post("/app/appUser/sendMobileCode", data).then((res2) => {
  4589. if (res2.code == 200) {
  4590. uni.showToast({
  4591. title: "验证码发送成功,请注意查收",
  4592. icon: "none"
  4593. });
  4594. startCountDown();
  4595. } else {
  4596. uni.$u.toast(res2.msg);
  4597. }
  4598. }).finally(() => uni.hideLoading());
  4599. };
  4600. const handleLogin = () => {
  4601. if (!formData.username)
  4602. return uni.$u.toast("请输入用户名");
  4603. if (!formData.password)
  4604. return uni.$u.toast("请输入密码");
  4605. uni.showLoading({
  4606. mask: true,
  4607. title: "登录中..."
  4608. });
  4609. uni.$u.http.post("/app/appUser/login", formData).then((res2) => {
  4610. if (res2.code == 200) {
  4611. uni.setStorageSync("token", res2.data);
  4612. setTimeout(() => {
  4613. getUserInfo();
  4614. uni.$u.http.get("/app/appUser/getRouters").then((resp) => {
  4615. if (resp.code == 200) {
  4616. uni.setStorageSync("menuList", resp.data);
  4617. uni.$u.toast("登录成功");
  4618. uni.switchTab({
  4619. url: "/pages/index/index"
  4620. });
  4621. uni.$u.ttsModule.speak("书嗨,不辜负每一个爱书的人");
  4622. } else {
  4623. uni.$u.toast(resp.msg);
  4624. }
  4625. });
  4626. }, 50);
  4627. } else {
  4628. uni.$u.toast(res2.msg);
  4629. }
  4630. }).catch((error2) => {
  4631. uni.showModal({
  4632. title: "登录失败",
  4633. content: JSON.stringify(error2),
  4634. showCancel: false
  4635. });
  4636. }).finally(() => uni.hideLoading());
  4637. };
  4638. function getUserInfo() {
  4639. uni.$u.http.get("/app/appUser/getUserInfoById").then((res2) => {
  4640. if (res2.code == 200) {
  4641. uni.setStorageSync("userInfo", res2.data);
  4642. }
  4643. });
  4644. }
  4645. function checkToken() {
  4646. uni.showLoading({
  4647. title: "检测登录状态..."
  4648. });
  4649. uni.$u.http.get("/app/appUser/checkToken").then((res2) => {
  4650. if (res2.code == 200) {
  4651. uni.$u.toast("登录成功");
  4652. uni.switchTab({
  4653. url: "/pages/index/index"
  4654. });
  4655. } else {
  4656. uni.$u.toast("请先登录");
  4657. }
  4658. }).finally(() => uni.hideLoading());
  4659. }
  4660. onLoad(() => {
  4661. let token = uni.getStorageSync("token");
  4662. if (token) {
  4663. checkToken();
  4664. }
  4665. });
  4666. const __returned__ = { prefixIconStyle, placeholderStyle: placeholderStyle$4, customStyle, get proxy() {
  4667. return proxy;
  4668. }, set proxy(v) {
  4669. proxy = v;
  4670. }, formData, uForm, isCountingDown, countdown, countDownText, startCountDown, getVerifyCode, handleLogin, getUserInfo, checkToken, ref: vue.ref, reactive: vue.reactive, getCurrentInstance: vue.getCurrentInstance, get onLoad() {
  4671. return onLoad;
  4672. } };
  4673. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  4674. return __returned__;
  4675. }
  4676. };
  4677. function _sfc_render$1Y(_ctx, _cache, $props, $setup, $data, $options) {
  4678. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  4679. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  4680. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  4681. const _component_u__form = resolveEasycom(vue.resolveDynamicComponent("u--form"), __easycom_2$5);
  4682. return vue.openBlock(), vue.createElementBlock("view", { class: "login-container" }, [
  4683. vue.createCommentVNode(" Logo和标题区域 "),
  4684. vue.createElementVNode("view", { class: "logo-section" }, [
  4685. vue.createElementVNode("image", {
  4686. class: "logo",
  4687. src: _imports_0$3,
  4688. mode: "aspectFit"
  4689. })
  4690. ]),
  4691. vue.createCommentVNode(" 表单区域 "),
  4692. vue.createElementVNode("view", { class: "form-section" }, [
  4693. vue.createVNode(_component_u__form, {
  4694. model: $setup.formData,
  4695. ref: "uForm"
  4696. }, {
  4697. default: vue.withCtx(() => [
  4698. vue.createVNode(_component_u_form_item, null, {
  4699. default: vue.withCtx(() => [
  4700. vue.createVNode(_component_u_input, {
  4701. prefixIconStyle: $setup.prefixIconStyle,
  4702. "placeholder-style": $setup.placeholderStyle,
  4703. "custom-style": $setup.customStyle,
  4704. modelValue: $setup.formData.username,
  4705. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.username = $event),
  4706. placeholder: "请输入用户名",
  4707. prefixIcon: "account"
  4708. }, null, 8, ["custom-style", "modelValue"])
  4709. ]),
  4710. _: 1
  4711. /* STABLE */
  4712. }),
  4713. vue.createVNode(_component_u_form_item, null, {
  4714. default: vue.withCtx(() => [
  4715. vue.createVNode(_component_u_input, {
  4716. prefixIconStyle: $setup.prefixIconStyle,
  4717. "placeholder-style": $setup.placeholderStyle,
  4718. "custom-style": $setup.customStyle,
  4719. modelValue: $setup.formData.password,
  4720. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.password = $event),
  4721. type: "password",
  4722. placeholder: "请输入密码",
  4723. prefixIcon: "lock"
  4724. }, null, 8, ["custom-style", "modelValue"])
  4725. ]),
  4726. _: 1
  4727. /* STABLE */
  4728. }),
  4729. vue.createVNode(_component_u_form_item, null, {
  4730. default: vue.withCtx(() => [
  4731. vue.createVNode(_component_u_input, {
  4732. prefixIconStyle: $setup.prefixIconStyle,
  4733. "placeholder-style": $setup.placeholderStyle,
  4734. "custom-style": $setup.customStyle,
  4735. modelValue: $setup.formData.code,
  4736. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.code = $event),
  4737. placeholder: "请输入验证码",
  4738. prefixIcon: "chat"
  4739. }, {
  4740. suffix: vue.withCtx(() => [
  4741. vue.createVNode(_component_u_button, {
  4742. "custom-style": "width:200rpx",
  4743. color: "#22ac38",
  4744. size: "small",
  4745. onClick: $setup.getVerifyCode,
  4746. disabled: $setup.isCountingDown
  4747. }, {
  4748. default: vue.withCtx(() => [
  4749. vue.createTextVNode(
  4750. vue.toDisplayString($setup.countDownText),
  4751. 1
  4752. /* TEXT */
  4753. )
  4754. ]),
  4755. _: 1
  4756. /* STABLE */
  4757. }, 8, ["disabled"])
  4758. ]),
  4759. _: 1
  4760. /* STABLE */
  4761. }, 8, ["custom-style", "modelValue"])
  4762. ]),
  4763. _: 1
  4764. /* STABLE */
  4765. })
  4766. ]),
  4767. _: 1
  4768. /* STABLE */
  4769. }, 8, ["model"]),
  4770. vue.createVNode(_component_u_button, {
  4771. "custom-style": "margin-top:5%",
  4772. type: "primary",
  4773. block: "",
  4774. onClick: $setup.handleLogin,
  4775. color: "#22ac38",
  4776. shape: "circle"
  4777. }, {
  4778. default: vue.withCtx(() => [
  4779. vue.createTextVNode("登录")
  4780. ]),
  4781. _: 1
  4782. /* STABLE */
  4783. })
  4784. ])
  4785. ]);
  4786. }
  4787. const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$1Z, [["render", _sfc_render$1Y], ["__scopeId", "data-v-e4e4508d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/login/login.vue"]]);
  4788. const _sfc_main$1Y = {
  4789. __name: "index",
  4790. setup(__props, { expose: __expose }) {
  4791. __expose();
  4792. function playGlobalSound() {
  4793. uni.$u.playClickSound();
  4794. }
  4795. const menuData = vue.ref([]);
  4796. let menuPromise = null;
  4797. async function getMenuList() {
  4798. if (menuData.value && menuData.value.length > 0) {
  4799. return menuData.value;
  4800. }
  4801. if (menuPromise) {
  4802. return menuPromise;
  4803. }
  4804. menuPromise = uni.$u.http.get("/app/appUser/getRouters").then((res2) => {
  4805. const data = res2.data;
  4806. menuData.value = data.map((item) => {
  4807. item.children = item.children.map((child) => {
  4808. child.query = child.query ? JSON.parse(child.query) : {};
  4809. return child;
  4810. });
  4811. return item;
  4812. });
  4813. return data;
  4814. }).catch((err) => {
  4815. formatAppLog("error", "at pages/index/index.vue:64", "获取菜单数据失败", err);
  4816. return [];
  4817. }).finally(() => {
  4818. menuPromise = null;
  4819. });
  4820. return menuPromise;
  4821. }
  4822. function getButtonList() {
  4823. uni.$u.http.get("/app/appUser/getInfo").then((res2) => {
  4824. if (res2.code == 200) {
  4825. uni.setStorageSync("buttonList", res2.permissions);
  4826. }
  4827. });
  4828. }
  4829. function getAudioConfig() {
  4830. uni.$u.http.get("/app/appConf/getAudioConfig").then((res2) => {
  4831. if (res2.code == 200) {
  4832. uni.setStorageSync("audioConfig", res2.data);
  4833. }
  4834. });
  4835. }
  4836. onLoad(() => {
  4837. uni.showLoading({
  4838. title: "加载中...",
  4839. mask: true
  4840. });
  4841. Promise.all([getMenuList(), getButtonList()]).finally(() => {
  4842. uni.hideLoading();
  4843. });
  4844. getAudioConfig();
  4845. });
  4846. const formatName = (name) => {
  4847. if (!name)
  4848. return "";
  4849. let result = name;
  4850. if (result.includes("\\n\\r")) {
  4851. result = result.replace(/\\n\\r/g, "\n");
  4852. }
  4853. return result;
  4854. };
  4855. const expressOperations = vue.ref([
  4856. {
  4857. name: "中转\n\r签收",
  4858. path: "/pages/index/express/transfer-sign",
  4859. type: "primary"
  4860. },
  4861. {
  4862. name: "到仓\n\r签收",
  4863. path: "/pages/index/express/warehouse-sign",
  4864. type: "warning"
  4865. },
  4866. {
  4867. name: "重量\n\r修改",
  4868. path: "/pages/index/express/weight-modify",
  4869. type: "primary"
  4870. },
  4871. {
  4872. name: "快递\n\r验收",
  4873. path: "/pages/index/express/quick-check",
  4874. type: "warning"
  4875. },
  4876. {
  4877. name: "路由签收\n\r异常",
  4878. path: "/pages/index/express/route-exception",
  4879. type: "primary"
  4880. },
  4881. {
  4882. name: "快递\n\r拆包",
  4883. path: "/pages/index/express/quick-unpack",
  4884. type: "warning"
  4885. }
  4886. ]);
  4887. const auditOperations = vue.ref([
  4888. {
  4889. name: "确认\n\r收货",
  4890. path: "/pages/index/audit/confirm-receipt",
  4891. type: "primary"
  4892. },
  4893. {
  4894. name: "扫书\n\r查单",
  4895. path: "/pages/index/audit/scan-order",
  4896. type: "warning"
  4897. },
  4898. {
  4899. name: "根据快递单\n\r或订单",
  4900. path: "/pages/index/audit/express-order",
  4901. type: "warning"
  4902. },
  4903. {
  4904. name: "根据\n\r发件人",
  4905. path: "/pages/index/audit/sender",
  4906. type: "primary"
  4907. }
  4908. ]);
  4909. const wmsOperations = vue.ref([
  4910. {
  4911. name: "中等\n\r入库",
  4912. path: "/pages/index/wms/medium-in",
  4913. type: "primary"
  4914. },
  4915. {
  4916. name: "良品\n\r入库",
  4917. path: "/pages/index/wms/good-in",
  4918. type: "warning"
  4919. },
  4920. {
  4921. name: "次品\n\r入库",
  4922. path: "/pages/index/wms/secondary-in",
  4923. type: "primary"
  4924. },
  4925. {
  4926. name: "不良\n\r入库",
  4927. path: "/pages/index/wms/bad-in",
  4928. type: "warning"
  4929. },
  4930. {
  4931. name: "不良\n\r出库",
  4932. path: "/pages/index/wms/bad-out",
  4933. type: "primary"
  4934. },
  4935. {
  4936. name: "不良\n\r下架",
  4937. path: "/pages/index/wms/bad-off",
  4938. type: "warning"
  4939. },
  4940. {
  4941. name: "订单\n\r查询",
  4942. path: "/pages/index/wms/order-query",
  4943. type: "primary"
  4944. },
  4945. {
  4946. name: "库位\n\r订单",
  4947. path: "/pages/index/wms/location-order",
  4948. type: "warning"
  4949. },
  4950. {
  4951. name: "快速盘点",
  4952. path: "/pages/index/wms/speedy-check",
  4953. type: "primary",
  4954. span: 24
  4955. }
  4956. ]);
  4957. const statisticsOperations = vue.ref([
  4958. {
  4959. name: "审核统计",
  4960. path: "/pages/index/statistic/audit",
  4961. type: "warning",
  4962. span: 24
  4963. },
  4964. {
  4965. name: "售后\n\r统计",
  4966. path: "/pages/index/statistic/after-sale",
  4967. type: "primary"
  4968. },
  4969. {
  4970. name: "打包\n\r统计",
  4971. path: "/pages/index/statistic/package",
  4972. type: "warning"
  4973. }
  4974. ]);
  4975. const offlineOperations = vue.ref([
  4976. {
  4977. name: "线下\n\r核单",
  4978. path: "/pages/index/offline/check-order",
  4979. type: "primary"
  4980. },
  4981. {
  4982. name: "核单\n\r记录",
  4983. path: "/pages/index/offline/check-record",
  4984. type: "warning"
  4985. }
  4986. ]);
  4987. const entryOperations = vue.ref([
  4988. {
  4989. name: "扫码\n\r查书",
  4990. path: "/pages/index/entry/scan-book",
  4991. type: "primary"
  4992. },
  4993. {
  4994. name: "录入\n\r书籍重量",
  4995. path: "/pages/index/entry/book-weight",
  4996. type: "warning"
  4997. },
  4998. {
  4999. name: "商品档案扫码",
  5000. path: "/pages/index/entry/commodity-scan",
  5001. type: "primary",
  5002. span: 24
  5003. }
  5004. ]);
  5005. const handleNavigation = (path) => {
  5006. uni.navigateTo({
  5007. url: path,
  5008. fail: () => {
  5009. uni.showToast({
  5010. title: "页面跳转失败",
  5011. icon: "none"
  5012. });
  5013. }
  5014. });
  5015. };
  5016. const __returned__ = { playGlobalSound, menuData, get menuPromise() {
  5017. return menuPromise;
  5018. }, set menuPromise(v) {
  5019. menuPromise = v;
  5020. }, getMenuList, getButtonList, getAudioConfig, formatName, expressOperations, auditOperations, wmsOperations, statisticsOperations, offlineOperations, entryOperations, handleNavigation, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, get onLoad() {
  5021. return onLoad;
  5022. } };
  5023. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  5024. return __returned__;
  5025. }
  5026. };
  5027. function _sfc_render$1X(_ctx, _cache, $props, $setup, $data, $options) {
  5028. return vue.openBlock(), vue.createElementBlock("view", {
  5029. class: "operation-container",
  5030. onClick: $setup.playGlobalSound
  5031. }, [
  5032. vue.createCommentVNode(" 直接循环 "),
  5033. (vue.openBlock(true), vue.createElementBlock(
  5034. vue.Fragment,
  5035. null,
  5036. vue.renderList($setup.menuData, (item) => {
  5037. return vue.openBlock(), vue.createElementBlock("view", {
  5038. class: "section",
  5039. key: item.path
  5040. }, [
  5041. vue.createElementVNode(
  5042. "view",
  5043. { class: "section-title" },
  5044. vue.toDisplayString(item.meta.title),
  5045. 1
  5046. /* TEXT */
  5047. ),
  5048. vue.createElementVNode("view", { class: "grid-container" }, [
  5049. (vue.openBlock(true), vue.createElementBlock(
  5050. vue.Fragment,
  5051. null,
  5052. vue.renderList(item.children, (child) => {
  5053. return vue.openBlock(), vue.createElementBlock("view", {
  5054. class: vue.normalizeClass(["grid-item", child.query.type]),
  5055. style: vue.normalizeStyle({ gridColumn: child.query.span ? "span 2" : "span 1" }),
  5056. key: child.path,
  5057. onClick: ($event) => $setup.handleNavigation(child.path)
  5058. }, vue.toDisplayString($setup.formatName(child.meta.title)), 15, ["onClick"]);
  5059. }),
  5060. 128
  5061. /* KEYED_FRAGMENT */
  5062. ))
  5063. ])
  5064. ]);
  5065. }),
  5066. 128
  5067. /* KEYED_FRAGMENT */
  5068. ))
  5069. ]);
  5070. }
  5071. const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1Y, [["render", _sfc_render$1X], ["__scopeId", "data-v-1cf27b2a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/index.vue"]]);
  5072. const props$w = {
  5073. props: {
  5074. // 文字颜色
  5075. color: {
  5076. type: String,
  5077. default: props$E.link.color
  5078. },
  5079. // 字体大小,单位px
  5080. fontSize: {
  5081. type: [String, Number],
  5082. default: props$E.link.fontSize
  5083. },
  5084. // 是否显示下划线
  5085. underLine: {
  5086. type: Boolean,
  5087. default: props$E.link.underLine
  5088. },
  5089. // 要跳转的链接
  5090. href: {
  5091. type: String,
  5092. default: props$E.link.href
  5093. },
  5094. // 小程序中复制到粘贴板的提示语
  5095. mpTips: {
  5096. type: String,
  5097. default: props$E.link.mpTips
  5098. },
  5099. // 下划线颜色
  5100. lineColor: {
  5101. type: String,
  5102. default: props$E.link.lineColor
  5103. },
  5104. // 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
  5105. text: {
  5106. type: String,
  5107. default: props$E.link.text
  5108. }
  5109. }
  5110. };
  5111. const _sfc_main$1X = {
  5112. name: "u-link",
  5113. mixins: [mpMixin, mixin, props$w],
  5114. computed: {
  5115. linkStyle() {
  5116. const style = {
  5117. color: this.color,
  5118. fontSize: uni.$u.addUnit(this.fontSize),
  5119. // line-height设置为比字体大小多2px
  5120. lineHeight: uni.$u.addUnit(uni.$u.getPx(this.fontSize) + 2),
  5121. textDecoration: this.underLine ? "underline" : "none"
  5122. };
  5123. return style;
  5124. }
  5125. },
  5126. methods: {
  5127. openLink() {
  5128. plus.runtime.openURL(this.href);
  5129. this.$emit("click");
  5130. }
  5131. }
  5132. };
  5133. function _sfc_render$1W(_ctx, _cache, $props, $setup, $data, $options) {
  5134. return vue.openBlock(), vue.createElementBlock(
  5135. "text",
  5136. {
  5137. class: "u-link",
  5138. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.openLink && $options.openLink(...args), ["stop"])),
  5139. style: vue.normalizeStyle([$options.linkStyle, _ctx.$u.addStyle(_ctx.customStyle)])
  5140. },
  5141. vue.toDisplayString(_ctx.text),
  5142. 5
  5143. /* TEXT, STYLE */
  5144. );
  5145. }
  5146. const __easycom_1$a = /* @__PURE__ */ _export_sfc(_sfc_main$1X, [["render", _sfc_render$1W], ["__scopeId", "data-v-12f6646d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-link/u-link.vue"]]);
  5147. const value = {
  5148. computed: {
  5149. // 经处理后需要显示的值
  5150. value() {
  5151. const {
  5152. text,
  5153. mode,
  5154. format: format2,
  5155. href
  5156. } = this;
  5157. if (mode === "price") {
  5158. if (!/^\d+(\.\d+)?$/.test(text)) {
  5159. uni.$u.error("金额模式下,text参数需要为金额格式");
  5160. }
  5161. if (uni.$u.test.func(format2)) {
  5162. return format2(text);
  5163. }
  5164. return uni.$u.priceFormat(text, 2);
  5165. }
  5166. if (mode === "date") {
  5167. !uni.$u.test.date(text) && uni.$u.error("日期模式下,text参数需要为日期或时间戳格式");
  5168. if (uni.$u.test.func(format2)) {
  5169. return format2(text);
  5170. }
  5171. if (format2) {
  5172. return uni.$u.timeFormat(text, format2);
  5173. }
  5174. return uni.$u.timeFormat(text, "yyyy-mm-dd");
  5175. }
  5176. if (mode === "phone") {
  5177. if (uni.$u.test.func(format2)) {
  5178. return format2(text);
  5179. }
  5180. if (format2 === "encrypt") {
  5181. return `${text.substr(0, 3)}****${text.substr(7)}`;
  5182. }
  5183. return text;
  5184. }
  5185. if (mode === "name") {
  5186. !(typeof text === "string") && uni.$u.error("姓名模式下,text参数需要为字符串格式");
  5187. if (uni.$u.test.func(format2)) {
  5188. return format2(text);
  5189. }
  5190. if (format2 === "encrypt") {
  5191. return this.formatName(text);
  5192. }
  5193. return text;
  5194. }
  5195. if (mode === "link") {
  5196. !uni.$u.test.url(href) && uni.$u.error("超链接模式下,href参数需要为URL格式");
  5197. return text;
  5198. }
  5199. return text;
  5200. }
  5201. },
  5202. methods: {
  5203. // 默认的姓名脱敏规则
  5204. formatName(name) {
  5205. let value2 = "";
  5206. if (name.length === 2) {
  5207. value2 = name.substr(0, 1) + "*";
  5208. } else if (name.length > 2) {
  5209. let char = "";
  5210. for (let i = 0, len = name.length - 2; i < len; i++) {
  5211. char += "*";
  5212. }
  5213. value2 = name.substr(0, 1) + char + name.substr(-1, 1);
  5214. } else {
  5215. value2 = name;
  5216. }
  5217. return value2;
  5218. }
  5219. }
  5220. };
  5221. const props$v = {
  5222. props: {
  5223. // 主题颜色
  5224. type: {
  5225. type: String,
  5226. default: props$E.text.type
  5227. },
  5228. // 是否显示
  5229. show: {
  5230. type: Boolean,
  5231. default: props$E.text.show
  5232. },
  5233. // 显示的值
  5234. text: {
  5235. type: [String, Number],
  5236. default: props$E.text.text
  5237. },
  5238. // 前置图标
  5239. prefixIcon: {
  5240. type: String,
  5241. default: props$E.text.prefixIcon
  5242. },
  5243. // 后置图标
  5244. suffixIcon: {
  5245. type: String,
  5246. default: props$E.text.suffixIcon
  5247. },
  5248. // 文本处理的匹配模式
  5249. // text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
  5250. mode: {
  5251. type: String,
  5252. default: props$E.text.mode
  5253. },
  5254. // mode=link下,配置的链接
  5255. href: {
  5256. type: String,
  5257. default: props$E.text.href
  5258. },
  5259. // 格式化规则
  5260. format: {
  5261. type: [String, Function],
  5262. default: props$E.text.format
  5263. },
  5264. // mode=phone时,点击文本是否拨打电话
  5265. call: {
  5266. type: Boolean,
  5267. default: props$E.text.call
  5268. },
  5269. // 小程序的打开方式
  5270. openType: {
  5271. type: String,
  5272. default: props$E.text.openType
  5273. },
  5274. // 是否粗体,默认normal
  5275. bold: {
  5276. type: Boolean,
  5277. default: props$E.text.bold
  5278. },
  5279. // 是否块状
  5280. block: {
  5281. type: Boolean,
  5282. default: props$E.text.block
  5283. },
  5284. // 文本显示的行数,如果设置,超出此行数,将会显示省略号
  5285. lines: {
  5286. type: [String, Number],
  5287. default: props$E.text.lines
  5288. },
  5289. // 文本颜色
  5290. color: {
  5291. type: String,
  5292. default: props$E.text.color
  5293. },
  5294. // 字体大小
  5295. size: {
  5296. type: [String, Number],
  5297. default: props$E.text.size
  5298. },
  5299. // 图标的样式
  5300. iconStyle: {
  5301. type: [Object, String],
  5302. default: props$E.text.iconStyle
  5303. },
  5304. // 文字装饰,下划线,中划线等,可选值 none|underline|line-through
  5305. decoration: {
  5306. tepe: String,
  5307. default: props$E.text.decoration
  5308. },
  5309. // 外边距,对象、字符串,数值形式均可
  5310. margin: {
  5311. type: [Object, String, Number],
  5312. default: props$E.text.margin
  5313. },
  5314. // 文本行高
  5315. lineHeight: {
  5316. type: [String, Number],
  5317. default: props$E.text.lineHeight
  5318. },
  5319. // 文本对齐方式,可选值left|center|right
  5320. align: {
  5321. type: String,
  5322. default: props$E.text.align
  5323. },
  5324. // 文字换行,可选值break-word|normal|anywhere
  5325. wordWrap: {
  5326. type: String,
  5327. default: props$E.text.wordWrap
  5328. }
  5329. }
  5330. };
  5331. const _sfc_main$1W = {
  5332. name: "u--text",
  5333. mixins: [mpMixin, mixin, value, props$v],
  5334. emits: ["click"],
  5335. computed: {
  5336. valueStyle() {
  5337. const style = {
  5338. textDecoration: this.decoration,
  5339. fontWeight: this.bold ? "bold" : "normal",
  5340. wordWrap: this.wordWrap,
  5341. fontSize: uni.$u.addUnit(this.size)
  5342. };
  5343. !this.type && (style.color = this.color);
  5344. this.isNvue && this.lines && (style.lines = this.lines);
  5345. this.lineHeight && (style.lineHeight = uni.$u.addUnit(this.lineHeight));
  5346. !this.isNvue && this.block && (style.display = "block");
  5347. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  5348. },
  5349. isNvue() {
  5350. let nvue = false;
  5351. return nvue;
  5352. },
  5353. isMp() {
  5354. let mp = false;
  5355. return mp;
  5356. }
  5357. },
  5358. data() {
  5359. return {};
  5360. },
  5361. methods: {
  5362. clickHandler() {
  5363. if (this.call && this.mode === "phone") {
  5364. uni.makePhoneCall({
  5365. phoneNumber: this.text
  5366. });
  5367. }
  5368. this.$emit("click");
  5369. }
  5370. }
  5371. };
  5372. function _sfc_render$1V(_ctx, _cache, $props, $setup, $data, $options) {
  5373. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  5374. const _component_u_link = resolveEasycom(vue.resolveDynamicComponent("u-link"), __easycom_1$a);
  5375. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  5376. "view",
  5377. {
  5378. key: 0,
  5379. class: vue.normalizeClass(["u-text", []]),
  5380. style: vue.normalizeStyle({
  5381. margin: _ctx.margin,
  5382. justifyContent: _ctx.align === "left" ? "flex-start" : _ctx.align === "center" ? "center" : "flex-end"
  5383. }),
  5384. onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  5385. },
  5386. [
  5387. _ctx.mode === "price" ? (vue.openBlock(), vue.createElementBlock(
  5388. "text",
  5389. {
  5390. key: 0,
  5391. class: vue.normalizeClass(["u-text__price", _ctx.type && `u-text__value--${_ctx.type}`]),
  5392. style: vue.normalizeStyle([$options.valueStyle])
  5393. },
  5394. "¥",
  5395. 6
  5396. /* CLASS, STYLE */
  5397. )) : vue.createCommentVNode("v-if", true),
  5398. _ctx.prefixIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  5399. key: 1,
  5400. class: "u-text__prefix-icon"
  5401. }, [
  5402. vue.createVNode(_component_u_icon, {
  5403. name: _ctx.prefixIcon,
  5404. customStyle: _ctx.$u.addStyle(_ctx.iconStyle)
  5405. }, null, 8, ["name", "customStyle"])
  5406. ])) : vue.createCommentVNode("v-if", true),
  5407. _ctx.mode === "link" ? (vue.openBlock(), vue.createBlock(_component_u_link, {
  5408. key: 2,
  5409. text: _ctx.value,
  5410. href: _ctx.href,
  5411. underLine: ""
  5412. }, null, 8, ["text", "href"])) : _ctx.openType && $options.isMp ? (vue.openBlock(), vue.createElementBlock("button", {
  5413. key: 3,
  5414. class: "u-reset-button u-text__value",
  5415. style: vue.normalizeStyle([$options.valueStyle]),
  5416. "data-index": _ctx.index,
  5417. openType: _ctx.openType,
  5418. onGetuserinfo: _cache[0] || (_cache[0] = (...args) => _ctx.onGetUserInfo && _ctx.onGetUserInfo(...args)),
  5419. onContact: _cache[1] || (_cache[1] = (...args) => _ctx.onContact && _ctx.onContact(...args)),
  5420. onGetphonenumber: _cache[2] || (_cache[2] = (...args) => _ctx.onGetPhoneNumber && _ctx.onGetPhoneNumber(...args)),
  5421. onError: _cache[3] || (_cache[3] = (...args) => _ctx.onError && _ctx.onError(...args)),
  5422. onLaunchapp: _cache[4] || (_cache[4] = (...args) => _ctx.onLaunchApp && _ctx.onLaunchApp(...args)),
  5423. onOpensetting: _cache[5] || (_cache[5] = (...args) => _ctx.onOpenSetting && _ctx.onOpenSetting(...args)),
  5424. lang: _ctx.lang,
  5425. "session-from": _ctx.sessionFrom,
  5426. "send-message-title": _ctx.sendMessageTitle,
  5427. "send-message-path": _ctx.sendMessagePath,
  5428. "send-message-img": _ctx.sendMessageImg,
  5429. "show-message-card": _ctx.showMessageCard,
  5430. "app-parameter": _ctx.appParameter
  5431. }, 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(
  5432. "text",
  5433. {
  5434. key: 4,
  5435. class: vue.normalizeClass(["u-text__value", [
  5436. _ctx.type && `u-text__value--${_ctx.type}`,
  5437. _ctx.lines && `u-line-${_ctx.lines}`
  5438. ]]),
  5439. style: vue.normalizeStyle([$options.valueStyle])
  5440. },
  5441. vue.toDisplayString(_ctx.value),
  5442. 7
  5443. /* TEXT, CLASS, STYLE */
  5444. )),
  5445. _ctx.suffixIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  5446. key: 5,
  5447. class: "u-text__suffix-icon"
  5448. }, [
  5449. vue.createVNode(_component_u_icon, {
  5450. name: _ctx.suffixIcon,
  5451. customStyle: _ctx.$u.addStyle(_ctx.iconStyle)
  5452. }, null, 8, ["name", "customStyle"])
  5453. ])) : vue.createCommentVNode("v-if", true)
  5454. ],
  5455. 4
  5456. /* STYLE */
  5457. )) : vue.createCommentVNode("v-if", true);
  5458. }
  5459. const __easycom_1$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1W, [["render", _sfc_render$1V], ["__scopeId", "data-v-0a574502"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-text/u-text.vue"]]);
  5460. const _sfc_main$1V = {
  5461. name: "u--text",
  5462. mixins: [mpMixin, mixin, props$v],
  5463. components: {
  5464. uvText: __easycom_1$9
  5465. }
  5466. };
  5467. function _sfc_render$1U(_ctx, _cache, $props, $setup, $data, $options) {
  5468. const _component_uvText = vue.resolveComponent("uvText");
  5469. return vue.openBlock(), vue.createBlock(_component_uvText, {
  5470. type: _ctx.type,
  5471. show: _ctx.show,
  5472. text: _ctx.text,
  5473. prefixIcon: _ctx.prefixIcon,
  5474. suffixIcon: _ctx.suffixIcon,
  5475. mode: _ctx.mode,
  5476. href: _ctx.href,
  5477. format: _ctx.format,
  5478. call: _ctx.call,
  5479. openType: _ctx.openType,
  5480. bold: _ctx.bold,
  5481. block: _ctx.block,
  5482. lines: _ctx.lines,
  5483. color: _ctx.color,
  5484. decoration: _ctx.decoration,
  5485. size: _ctx.size,
  5486. iconStyle: _ctx.iconStyle,
  5487. margin: _ctx.margin,
  5488. lineHeight: _ctx.lineHeight,
  5489. align: _ctx.align,
  5490. wordWrap: _ctx.wordWrap,
  5491. customStyle: _ctx.customStyle
  5492. }, null, 8, ["type", "show", "text", "prefixIcon", "suffixIcon", "mode", "href", "format", "call", "openType", "bold", "block", "lines", "color", "decoration", "size", "iconStyle", "margin", "lineHeight", "align", "wordWrap", "customStyle"]);
  5493. }
  5494. const __easycom_1$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1V, [["render", _sfc_render$1U], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u--text/u--text.vue"]]);
  5495. const props$u = {
  5496. props: {
  5497. // 头像图片路径(不能为相对路径)
  5498. src: {
  5499. type: String,
  5500. default: props$E.avatar.src
  5501. },
  5502. // 头像形状,circle-圆形,square-方形
  5503. shape: {
  5504. type: String,
  5505. default: props$E.avatar.shape
  5506. },
  5507. // 头像尺寸
  5508. size: {
  5509. type: [String, Number],
  5510. default: props$E.avatar.size
  5511. },
  5512. // 裁剪模式
  5513. mode: {
  5514. type: String,
  5515. default: props$E.avatar.mode
  5516. },
  5517. // 显示的文字
  5518. text: {
  5519. type: String,
  5520. default: props$E.avatar.text
  5521. },
  5522. // 背景色
  5523. bgColor: {
  5524. type: String,
  5525. default: props$E.avatar.bgColor
  5526. },
  5527. // 文字颜色
  5528. color: {
  5529. type: String,
  5530. default: props$E.avatar.color
  5531. },
  5532. // 文字大小
  5533. fontSize: {
  5534. type: [String, Number],
  5535. default: props$E.avatar.fontSize
  5536. },
  5537. // 显示的图标
  5538. icon: {
  5539. type: String,
  5540. default: props$E.avatar.icon
  5541. },
  5542. // 显示小程序头像,只对百度,微信,QQ小程序有效
  5543. mpAvatar: {
  5544. type: Boolean,
  5545. default: props$E.avatar.mpAvatar
  5546. },
  5547. // 是否使用随机背景色
  5548. randomBgColor: {
  5549. type: Boolean,
  5550. default: props$E.avatar.randomBgColor
  5551. },
  5552. // 加载失败的默认头像(组件有内置默认图片)
  5553. defaultUrl: {
  5554. type: String,
  5555. default: props$E.avatar.defaultUrl
  5556. },
  5557. // 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间
  5558. colorIndex: {
  5559. type: [String, Number],
  5560. // 校验参数规则,索引在0-19之间
  5561. validator(n) {
  5562. return uni.$u.test.range(n, [0, 19]) || n === "";
  5563. },
  5564. default: props$E.avatar.colorIndex
  5565. },
  5566. // 组件标识符
  5567. name: {
  5568. type: String,
  5569. default: props$E.avatar.name
  5570. }
  5571. }
  5572. };
  5573. 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";
  5574. const _sfc_main$1U = {
  5575. name: "u-avatar",
  5576. mixins: [mpMixin, mixin, props$u],
  5577. data() {
  5578. return {
  5579. // 如果配置randomBgColor参数为true,在图标或者文字的模式下,会随机从中取出一个颜色值当做背景色
  5580. colors: [
  5581. "#ffb34b",
  5582. "#f2bba9",
  5583. "#f7a196",
  5584. "#f18080",
  5585. "#88a867",
  5586. "#bfbf39",
  5587. "#89c152",
  5588. "#94d554",
  5589. "#f19ec2",
  5590. "#afaae4",
  5591. "#e1b0df",
  5592. "#c38cc1",
  5593. "#72dcdc",
  5594. "#9acdcb",
  5595. "#77b1cc",
  5596. "#448aca",
  5597. "#86cefa",
  5598. "#98d1ee",
  5599. "#73d1f1",
  5600. "#80a7dc"
  5601. ],
  5602. avatarUrl: this.src,
  5603. allowMp: false
  5604. };
  5605. },
  5606. watch: {
  5607. // 监听头像src的变化,赋值给内部的avatarUrl变量,因为图片加载失败时,需要修改图片的src为默认值
  5608. // 而组件内部不能直接修改props的值,所以需要一个中间变量
  5609. src: {
  5610. immediate: true,
  5611. handler(newVal) {
  5612. this.avatarUrl = newVal;
  5613. if (!newVal) {
  5614. this.errorHandler();
  5615. }
  5616. }
  5617. }
  5618. },
  5619. computed: {
  5620. imageStyle() {
  5621. const style = {};
  5622. return style;
  5623. }
  5624. },
  5625. created() {
  5626. this.init();
  5627. },
  5628. methods: {
  5629. init() {
  5630. },
  5631. // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
  5632. isImg() {
  5633. return this.src.indexOf("/") !== -1;
  5634. },
  5635. // 图片加载时失败时触发
  5636. errorHandler() {
  5637. this.avatarUrl = this.defaultUrl || base64Avatar;
  5638. },
  5639. clickHandler() {
  5640. this.$emit("click", this.name);
  5641. }
  5642. }
  5643. };
  5644. function _sfc_render$1T(_ctx, _cache, $props, $setup, $data, $options) {
  5645. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  5646. const _component_u__text = resolveEasycom(vue.resolveDynamicComponent("u--text"), __easycom_1$8);
  5647. return vue.openBlock(), vue.createElementBlock(
  5648. "view",
  5649. {
  5650. class: vue.normalizeClass(["u-avatar", [`u-avatar--${_ctx.shape}`]]),
  5651. style: vue.normalizeStyle([{
  5652. backgroundColor: _ctx.text || _ctx.icon ? _ctx.randomBgColor ? $data.colors[_ctx.colorIndex !== "" ? _ctx.colorIndex : _ctx.$u.random(0, 19)] : _ctx.bgColor : "transparent",
  5653. width: _ctx.$u.addUnit(_ctx.size),
  5654. height: _ctx.$u.addUnit(_ctx.size)
  5655. }, _ctx.$u.addStyle(_ctx.customStyle)]),
  5656. onClick: _cache[1] || (_cache[1] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  5657. },
  5658. [
  5659. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  5660. _ctx.mpAvatar && $data.allowMp ? (vue.openBlock(), vue.createElementBlock(
  5661. vue.Fragment,
  5662. { key: 0 },
  5663. [],
  5664. 64
  5665. /* STABLE_FRAGMENT */
  5666. )) : _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  5667. key: 1,
  5668. name: _ctx.icon,
  5669. size: _ctx.fontSize,
  5670. color: _ctx.color
  5671. }, null, 8, ["name", "size", "color"])) : _ctx.text ? (vue.openBlock(), vue.createBlock(_component_u__text, {
  5672. key: 2,
  5673. text: _ctx.text,
  5674. size: _ctx.fontSize,
  5675. color: _ctx.color,
  5676. align: "center",
  5677. customStyle: "justify-content: center"
  5678. }, null, 8, ["text", "size", "color"])) : (vue.openBlock(), vue.createElementBlock("image", {
  5679. key: 3,
  5680. class: vue.normalizeClass(["u-avatar__image", [`u-avatar__image--${_ctx.shape}`]]),
  5681. src: $data.avatarUrl || _ctx.defaultUrl,
  5682. mode: _ctx.mode,
  5683. onError: _cache[0] || (_cache[0] = (...args) => $options.errorHandler && $options.errorHandler(...args)),
  5684. style: vue.normalizeStyle([{
  5685. width: _ctx.$u.addUnit(_ctx.size),
  5686. height: _ctx.$u.addUnit(_ctx.size)
  5687. }])
  5688. }, null, 46, ["src", "mode"]))
  5689. ], true)
  5690. ],
  5691. 6
  5692. /* CLASS, STYLE */
  5693. );
  5694. }
  5695. const __easycom_0$c = /* @__PURE__ */ _export_sfc(_sfc_main$1U, [["render", _sfc_render$1T], ["__scopeId", "data-v-34d954f9"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-avatar/u-avatar.vue"]]);
  5696. const props$t = {
  5697. props: {
  5698. // 标题
  5699. title: {
  5700. type: [String, Number],
  5701. default: props$E.cell.title
  5702. },
  5703. // 标题下方的描述信息
  5704. label: {
  5705. type: [String, Number],
  5706. default: props$E.cell.label
  5707. },
  5708. // 右侧的内容
  5709. value: {
  5710. type: [String, Number],
  5711. default: props$E.cell.value
  5712. },
  5713. // 左侧图标名称,或者图片链接(本地文件建议使用绝对地址)
  5714. icon: {
  5715. type: String,
  5716. default: props$E.cell.icon
  5717. },
  5718. // 是否禁用cell
  5719. disabled: {
  5720. type: Boolean,
  5721. default: props$E.cell.disabled
  5722. },
  5723. // 是否显示下边框
  5724. border: {
  5725. type: Boolean,
  5726. default: props$E.cell.border
  5727. },
  5728. // 内容是否垂直居中(主要是针对右侧的value部分)
  5729. center: {
  5730. type: Boolean,
  5731. default: props$E.cell.center
  5732. },
  5733. // 点击后跳转的URL地址
  5734. url: {
  5735. type: String,
  5736. default: props$E.cell.url
  5737. },
  5738. // 链接跳转的方式,内部使用的是uView封装的route方法,可能会进行拦截操作
  5739. linkType: {
  5740. type: String,
  5741. default: props$E.cell.linkType
  5742. },
  5743. // 是否开启点击反馈(表现为点击时加上灰色背景)
  5744. clickable: {
  5745. type: Boolean,
  5746. default: props$E.cell.clickable
  5747. },
  5748. // 是否展示右侧箭头并开启点击反馈
  5749. isLink: {
  5750. type: Boolean,
  5751. default: props$E.cell.isLink
  5752. },
  5753. // 是否显示表单状态下的必填星号(此组件可能会内嵌入input组件)
  5754. required: {
  5755. type: Boolean,
  5756. default: props$E.cell.required
  5757. },
  5758. // 右侧的图标箭头
  5759. rightIcon: {
  5760. type: String,
  5761. default: props$E.cell.rightIcon
  5762. },
  5763. // 右侧箭头的方向,可选值为:left,up,down
  5764. arrowDirection: {
  5765. type: String,
  5766. default: props$E.cell.arrowDirection
  5767. },
  5768. // 左侧图标样式
  5769. iconStyle: {
  5770. type: [Object, String],
  5771. default: () => {
  5772. return uni.$u.props.cell.iconStyle;
  5773. }
  5774. },
  5775. // 右侧箭头图标的样式
  5776. rightIconStyle: {
  5777. type: [Object, String],
  5778. default: () => {
  5779. return uni.$u.props.cell.rightIconStyle;
  5780. }
  5781. },
  5782. // 标题的样式
  5783. titleStyle: {
  5784. type: [Object, String],
  5785. default: () => {
  5786. return uni.$u.props.cell.titleStyle;
  5787. }
  5788. },
  5789. // 单位元的大小,可选值为large
  5790. size: {
  5791. type: String,
  5792. default: props$E.cell.size
  5793. },
  5794. // 点击cell是否阻止事件传播
  5795. stop: {
  5796. type: Boolean,
  5797. default: props$E.cell.stop
  5798. },
  5799. // 标识符,cell被点击时返回
  5800. name: {
  5801. type: [Number, String],
  5802. default: props$E.cell.name
  5803. }
  5804. }
  5805. };
  5806. const _sfc_main$1T = {
  5807. name: "u-cell",
  5808. data() {
  5809. return {};
  5810. },
  5811. mixins: [mpMixin, mixin, props$t],
  5812. computed: {
  5813. titleTextStyle() {
  5814. return uni.$u.addStyle(this.titleStyle);
  5815. }
  5816. },
  5817. emits: ["click"],
  5818. methods: {
  5819. // 点击cell
  5820. clickHandler(e) {
  5821. if (this.disabled)
  5822. return;
  5823. this.$emit("click", {
  5824. name: this.name
  5825. });
  5826. this.openPage();
  5827. this.stop && this.preventEvent(e);
  5828. }
  5829. }
  5830. };
  5831. function _sfc_render$1S(_ctx, _cache, $props, $setup, $data, $options) {
  5832. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  5833. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$e);
  5834. return vue.openBlock(), vue.createElementBlock("view", {
  5835. class: vue.normalizeClass(["u-cell", [_ctx.customClass]]),
  5836. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
  5837. "hover-class": !_ctx.disabled && (_ctx.clickable || _ctx.isLink) ? "u-cell--clickable" : "",
  5838. "hover-stay-time": 250,
  5839. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  5840. }, [
  5841. vue.createElementVNode(
  5842. "view",
  5843. {
  5844. class: vue.normalizeClass(["u-cell__body", [_ctx.center && "u-cell--center", _ctx.size === "large" && "u-cell__body--large"]])
  5845. },
  5846. [
  5847. vue.createElementVNode("view", { class: "u-cell__body__content" }, [
  5848. vue.createElementVNode("view", { class: "u-cell__left-icon-wrap" }, [
  5849. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  5850. _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  5851. key: 0,
  5852. name: _ctx.icon,
  5853. "custom-style": _ctx.iconStyle,
  5854. size: _ctx.size === "large" ? 22 : 18
  5855. }, null, 8, ["name", "custom-style", "size"])) : vue.createCommentVNode("v-if", true)
  5856. ], true)
  5857. ]),
  5858. vue.createElementVNode("view", { class: "u-cell__title" }, [
  5859. vue.renderSlot(_ctx.$slots, "title", {}, () => [
  5860. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  5861. "text",
  5862. {
  5863. key: 0,
  5864. class: vue.normalizeClass(["u-cell__title-text", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__title-text--large"]]),
  5865. style: vue.normalizeStyle([$options.titleTextStyle])
  5866. },
  5867. vue.toDisplayString(_ctx.title),
  5868. 7
  5869. /* TEXT, CLASS, STYLE */
  5870. )) : vue.createCommentVNode("v-if", true)
  5871. ], true),
  5872. vue.renderSlot(_ctx.$slots, "label", {}, () => [
  5873. _ctx.label ? (vue.openBlock(), vue.createElementBlock(
  5874. "text",
  5875. {
  5876. key: 0,
  5877. class: vue.normalizeClass(["u-cell__label", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__label--large"]])
  5878. },
  5879. vue.toDisplayString(_ctx.label),
  5880. 3
  5881. /* TEXT, CLASS */
  5882. )) : vue.createCommentVNode("v-if", true)
  5883. ], true)
  5884. ])
  5885. ]),
  5886. vue.renderSlot(_ctx.$slots, "value", {}, () => [
  5887. !_ctx.$u.test.empty(_ctx.value) ? (vue.openBlock(), vue.createElementBlock(
  5888. "text",
  5889. {
  5890. key: 0,
  5891. class: vue.normalizeClass(["u-cell__value", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__value--large"]])
  5892. },
  5893. vue.toDisplayString(_ctx.value),
  5894. 3
  5895. /* TEXT, CLASS */
  5896. )) : vue.createCommentVNode("v-if", true)
  5897. ], true),
  5898. vue.createElementVNode(
  5899. "view",
  5900. {
  5901. class: vue.normalizeClass(["u-cell__right-icon-wrap", [`u-cell__right-icon-wrap--${_ctx.arrowDirection}`]])
  5902. },
  5903. [
  5904. vue.renderSlot(_ctx.$slots, "right-icon", {}, () => [
  5905. _ctx.isLink ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  5906. key: 0,
  5907. name: _ctx.rightIcon,
  5908. "custom-style": _ctx.rightIconStyle,
  5909. color: _ctx.disabled ? "#c8c9cc" : "info",
  5910. size: _ctx.size === "large" ? 18 : 16
  5911. }, null, 8, ["name", "custom-style", "color", "size"])) : vue.createCommentVNode("v-if", true)
  5912. ], true)
  5913. ],
  5914. 2
  5915. /* CLASS */
  5916. )
  5917. ],
  5918. 2
  5919. /* CLASS */
  5920. ),
  5921. _ctx.border ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true)
  5922. ], 14, ["hover-class"]);
  5923. }
  5924. const __easycom_1$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1T, [["render", _sfc_render$1S], ["__scopeId", "data-v-3fd6feca"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-cell/u-cell.vue"]]);
  5925. const props$s = {
  5926. props: {
  5927. // 分组标题
  5928. title: {
  5929. type: String,
  5930. default: props$E.cellGroup.title
  5931. },
  5932. // 是否显示外边框
  5933. border: {
  5934. type: Boolean,
  5935. default: props$E.cellGroup.border
  5936. }
  5937. }
  5938. };
  5939. const _sfc_main$1S = {
  5940. name: "u-cell-group",
  5941. mixins: [mpMixin, mixin, props$s]
  5942. };
  5943. function _sfc_render$1R(_ctx, _cache, $props, $setup, $data, $options) {
  5944. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$e);
  5945. return vue.openBlock(), vue.createElementBlock(
  5946. "view",
  5947. {
  5948. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
  5949. class: vue.normalizeClass([[_ctx.customClass], "u-cell-group"])
  5950. },
  5951. [
  5952. _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", {
  5953. key: 0,
  5954. class: "u-cell-group__title"
  5955. }, [
  5956. vue.renderSlot(_ctx.$slots, "title", {}, () => [
  5957. vue.createElementVNode(
  5958. "text",
  5959. { class: "u-cell-group__title__text" },
  5960. vue.toDisplayString(_ctx.title),
  5961. 1
  5962. /* TEXT */
  5963. )
  5964. ], true)
  5965. ])) : vue.createCommentVNode("v-if", true),
  5966. vue.createElementVNode("view", { class: "u-cell-group__wrapper" }, [
  5967. _ctx.border ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true),
  5968. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  5969. ])
  5970. ],
  5971. 6
  5972. /* CLASS, STYLE */
  5973. );
  5974. }
  5975. const __easycom_2$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1S, [["render", _sfc_render$1R], ["__scopeId", "data-v-014d39dc"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-cell-group/u-cell-group.vue"]]);
  5976. const _sfc_main$1R = {
  5977. __name: "my",
  5978. setup(__props, { expose: __expose }) {
  5979. __expose();
  5980. function playGlobalSound() {
  5981. uni.$u.playClickSound();
  5982. }
  5983. let defaultAvatar = "https://img20.360buyimg.com/da/jfs/t1/141592/25/8861/261559/5f68d8c1E33ed78ab/698ad655bfcfbaed.png";
  5984. const settingsList = vue.ref([
  5985. {
  5986. title: "用户信息",
  5987. path: "/pages/my/page/user-info"
  5988. },
  5989. {
  5990. title: "默认仓库",
  5991. path: "/pages/my/page/warehouse"
  5992. },
  5993. {
  5994. title: "学校设置",
  5995. path: "/pages/my/page/school"
  5996. },
  5997. {
  5998. title: "审核未完成",
  5999. path: "/pages/my/page/audit-unfinished"
  6000. },
  6001. {
  6002. title: "版本设置",
  6003. path: "/pages/my/page/version",
  6004. icon: "tags"
  6005. },
  6006. {
  6007. title: "音频设置",
  6008. path: "/pages/my/page/volume"
  6009. },
  6010. {
  6011. title: "图书显示设置",
  6012. path: "/pages/my/page/book-display"
  6013. },
  6014. {
  6015. title: "修改密码",
  6016. icon: "lock",
  6017. path: "/pages/my/page/password"
  6018. },
  6019. {
  6020. title: "退出账号",
  6021. path: "/pages/my/page/logout",
  6022. type: "logout"
  6023. }
  6024. ]);
  6025. const greeting = vue.ref("");
  6026. const updateGreeting = () => {
  6027. const hour = (/* @__PURE__ */ new Date()).getHours();
  6028. if (hour >= 5 && hour < 12) {
  6029. greeting.value = "早上好";
  6030. } else if (hour >= 12 && hour < 14) {
  6031. greeting.value = "中午好";
  6032. } else if (hour >= 14 && hour < 18) {
  6033. greeting.value = "下午好";
  6034. } else if (hour >= 18 && hour < 22) {
  6035. greeting.value = "晚上好";
  6036. } else {
  6037. greeting.value = "夜深了";
  6038. }
  6039. };
  6040. const userName = vue.ref("-");
  6041. const avatar = vue.ref("");
  6042. function getUserInfo() {
  6043. uni.$u.http.get("/app/appUser/getUserInfoById").then((res2) => {
  6044. if (res2.code == 200) {
  6045. userName.value = res2.data.userName;
  6046. avatar.value = res2.data.avatar;
  6047. }
  6048. });
  6049. }
  6050. onLoad(() => {
  6051. updateGreeting();
  6052. setInterval(updateGreeting, 60 * 60 * 1e3);
  6053. getUserInfo();
  6054. });
  6055. const handleClick = (item) => {
  6056. if (item.type === "logout") {
  6057. uni.showModal({
  6058. title: "提示",
  6059. content: "确定要退出登录吗?",
  6060. success: (res2) => {
  6061. if (res2.confirm) {
  6062. uni.clearStorageSync();
  6063. uni.reLaunch({
  6064. url: "/pages/login/login"
  6065. });
  6066. }
  6067. }
  6068. });
  6069. return;
  6070. }
  6071. uni.navigateTo({
  6072. url: item.path
  6073. });
  6074. };
  6075. const __returned__ = { playGlobalSound, get defaultAvatar() {
  6076. return defaultAvatar;
  6077. }, set defaultAvatar(v) {
  6078. defaultAvatar = v;
  6079. }, settingsList, greeting, updateGreeting, userName, avatar, getUserInfo, handleClick, ref: vue.ref, onMounted: vue.onMounted, get onLoad() {
  6080. return onLoad;
  6081. } };
  6082. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  6083. return __returned__;
  6084. }
  6085. };
  6086. function _sfc_render$1Q(_ctx, _cache, $props, $setup, $data, $options) {
  6087. const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$c);
  6088. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  6089. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  6090. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  6091. return vue.openBlock(), vue.createElementBlock("view", {
  6092. class: "settings-page",
  6093. onClick: $setup.playGlobalSound
  6094. }, [
  6095. vue.createCommentVNode(" 顶部用户信息 "),
  6096. vue.createElementVNode("view", { class: "user-header" }, [
  6097. vue.createElementVNode("view", { class: "user-info" }, [
  6098. vue.createVNode(_component_u_avatar, {
  6099. size: 60,
  6100. src: $setup.avatar || $setup.defaultAvatar
  6101. }, null, 8, ["src"]),
  6102. vue.createElementVNode("view", { class: "greeting" }, [
  6103. vue.createElementVNode(
  6104. "text",
  6105. { class: "time" },
  6106. vue.toDisplayString($setup.greeting) + "!",
  6107. 1
  6108. /* TEXT */
  6109. ),
  6110. vue.createElementVNode(
  6111. "text",
  6112. { class: "name" },
  6113. vue.toDisplayString($setup.userName),
  6114. 1
  6115. /* TEXT */
  6116. )
  6117. ])
  6118. ])
  6119. ]),
  6120. vue.createCommentVNode(" 设置列表 "),
  6121. vue.createElementVNode("view", { class: "settings-list" }, [
  6122. vue.createVNode(_component_u_cell_group, { border: false }, {
  6123. default: vue.withCtx(() => [
  6124. (vue.openBlock(true), vue.createElementBlock(
  6125. vue.Fragment,
  6126. null,
  6127. vue.renderList($setup.settingsList, (item, index2) => {
  6128. return vue.openBlock(), vue.createBlock(_component_u_cell, {
  6129. key: index2,
  6130. title: item.title,
  6131. isLink: true,
  6132. onClick: ($event) => $setup.handleClick(item),
  6133. border: index2 == $setup.settingsList.length - 1 ? false : true
  6134. }, {
  6135. icon: vue.withCtx(() => [
  6136. vue.createElementVNode("view", { class: "cell-icon" }, [
  6137. vue.createVNode(_component_u_icon, {
  6138. name: item.icon || "setting",
  6139. size: "22",
  6140. color: "#333"
  6141. }, null, 8, ["name"])
  6142. ])
  6143. ]),
  6144. _: 2
  6145. /* DYNAMIC */
  6146. }, 1032, ["title", "onClick", "border"]);
  6147. }),
  6148. 128
  6149. /* KEYED_FRAGMENT */
  6150. ))
  6151. ]),
  6152. _: 1
  6153. /* STABLE */
  6154. })
  6155. ])
  6156. ]);
  6157. }
  6158. const PagesMyMy = /* @__PURE__ */ _export_sfc(_sfc_main$1R, [["render", _sfc_render$1Q], ["__scopeId", "data-v-2f1ef635"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/my.vue"]]);
  6159. const GlobalOption = {
  6160. down: {
  6161. // 其他down的配置参数也可以写,这里只展示了常用的配置:
  6162. offset: 80,
  6163. // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
  6164. native: false
  6165. // 是否使用系统自带的下拉刷新; 默认false; 仅在mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  6166. },
  6167. up: {
  6168. // 其他up的配置参数也可以写,这里只展示了常用的配置:
  6169. offset: 150,
  6170. // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
  6171. toTop: {
  6172. // 回到顶部按钮,需配置src才显示
  6173. src: "https://www.mescroll.com/img/mescroll-totop.png",
  6174. // 图片路径 (建议放入static目录, 如 /static/img/mescroll-totop.png )
  6175. offset: 1e3,
  6176. // 列表滚动多少距离才显示回到顶部按钮,默认1000px
  6177. right: 20,
  6178. // 到右边的距离, 默认20 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  6179. bottom: 120,
  6180. // 到底部的距离, 默认120 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  6181. width: 72
  6182. // 回到顶部图标的宽度, 默认72 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  6183. },
  6184. empty: {
  6185. use: true,
  6186. // 是否显示空布局
  6187. icon: "https://www.mescroll.com/img/mescroll-empty.png"
  6188. // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
  6189. }
  6190. },
  6191. // 国际化配置
  6192. i18n: {
  6193. // 中文
  6194. zh: {
  6195. down: {
  6196. textInOffset: "下拉刷新",
  6197. // 下拉的距离在offset范围内的提示文本
  6198. textOutOffset: "释放更新",
  6199. // 下拉的距离大于offset范围的提示文本
  6200. textLoading: "加载中 ...",
  6201. // 加载中的提示文本
  6202. textSuccess: "加载成功",
  6203. // 加载成功的文本
  6204. textErr: "加载失败"
  6205. // 加载失败的文本
  6206. },
  6207. up: {
  6208. textLoading: "加载中 ...",
  6209. // 加载中的提示文本
  6210. textNoMore: "-- END --",
  6211. // 没有更多数据的提示文本
  6212. empty: {
  6213. tip: "暂无数据"
  6214. // 空提示
  6215. }
  6216. }
  6217. },
  6218. // 英文
  6219. en: {
  6220. down: {
  6221. textInOffset: "drop down refresh",
  6222. textOutOffset: "release updates",
  6223. textLoading: "loading ...",
  6224. textSuccess: "loaded successfully",
  6225. textErr: "loading failed"
  6226. },
  6227. up: {
  6228. textLoading: "loading ...",
  6229. textNoMore: "-- END --",
  6230. empty: {
  6231. tip: "~ absolutely empty ~"
  6232. }
  6233. }
  6234. }
  6235. }
  6236. };
  6237. const mescrollI18n = {
  6238. // 默认语言
  6239. def: "zh",
  6240. // 获取当前语言类型
  6241. getType() {
  6242. return uni.getStorageSync("mescroll-i18n") || this.def;
  6243. },
  6244. // 设置当前语言类型
  6245. setType(type2) {
  6246. uni.setStorageSync("mescroll-i18n", type2);
  6247. }
  6248. };
  6249. const _imports_0$2 = "/assets/no-result.6af066e5.png";
  6250. const _sfc_main$1Q = {
  6251. props: {
  6252. // empty的配置项: 默认为GlobalOption.up.empty
  6253. option: {
  6254. type: Object,
  6255. default() {
  6256. return {};
  6257. }
  6258. }
  6259. },
  6260. // 使用computed获取配置,用于支持option的动态配置
  6261. computed: {
  6262. // 图标
  6263. icon() {
  6264. if (this.option.icon != null) {
  6265. return this.option.icon;
  6266. } else {
  6267. let i18nType = mescrollI18n.getType();
  6268. if (this.option.i18n) {
  6269. return this.option.i18n[i18nType].icon;
  6270. } else {
  6271. return GlobalOption.i18n[i18nType].up.empty.icon || GlobalOption.up.empty.icon;
  6272. }
  6273. }
  6274. },
  6275. // 文本提示
  6276. tip() {
  6277. if (this.option.tip != null) {
  6278. return this.option.tip;
  6279. } else {
  6280. let i18nType = mescrollI18n.getType();
  6281. if (this.option.i18n) {
  6282. return this.option.i18n[i18nType].tip;
  6283. } else {
  6284. return GlobalOption.i18n[i18nType].up.empty.tip || GlobalOption.up.empty.tip;
  6285. }
  6286. }
  6287. },
  6288. // 按钮文本
  6289. btnText() {
  6290. if (this.option.i18n) {
  6291. let i18nType = mescrollI18n.getType();
  6292. return this.option.i18n[i18nType].btnText;
  6293. } else {
  6294. return this.option.btnText;
  6295. }
  6296. }
  6297. },
  6298. methods: {
  6299. // 点击按钮
  6300. emptyClick() {
  6301. this.$emit("emptyclick");
  6302. }
  6303. }
  6304. };
  6305. function _sfc_render$1P(_ctx, _cache, $props, $setup, $data, $options) {
  6306. return vue.openBlock(), vue.createElementBlock(
  6307. "view",
  6308. {
  6309. class: vue.normalizeClass(["mescroll-empty", { "empty-fixed": $props.option.fixed }]),
  6310. style: vue.normalizeStyle({ "z-index": $props.option.zIndex, top: $props.option.top })
  6311. },
  6312. [
  6313. vue.createCommentVNode(' <view> <image v-if="icon" class="empty-icon" :src="icon" mode="widthFix" /> </view> '),
  6314. vue.createElementVNode("view", null, [
  6315. $options.icon ? (vue.openBlock(), vue.createElementBlock("image", {
  6316. key: 0,
  6317. class: "empty-icon",
  6318. src: _imports_0$2,
  6319. mode: "widthFix"
  6320. })) : vue.createCommentVNode("v-if", true)
  6321. ]),
  6322. $options.tip ? (vue.openBlock(), vue.createElementBlock(
  6323. "view",
  6324. {
  6325. key: 0,
  6326. class: "empty-tip"
  6327. },
  6328. vue.toDisplayString($options.tip),
  6329. 1
  6330. /* TEXT */
  6331. )) : vue.createCommentVNode("v-if", true),
  6332. $options.btnText ? (vue.openBlock(), vue.createElementBlock(
  6333. "view",
  6334. {
  6335. key: 1,
  6336. class: "empty-btn",
  6337. onClick: _cache[0] || (_cache[0] = (...args) => $options.emptyClick && $options.emptyClick(...args))
  6338. },
  6339. vue.toDisplayString($options.btnText),
  6340. 1
  6341. /* TEXT */
  6342. )) : vue.createCommentVNode("v-if", true)
  6343. ],
  6344. 6
  6345. /* CLASS, STYLE */
  6346. );
  6347. }
  6348. const __easycom_0$b = /* @__PURE__ */ _export_sfc(_sfc_main$1Q, [["render", _sfc_render$1P], ["__scopeId", "data-v-7cefd855"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/mescroll-uni/components/mescroll-empty/mescroll-empty.vue"]]);
  6349. function MeScroll(options, isScrollBody) {
  6350. let me = this;
  6351. me.version = "1.3.7";
  6352. me.options = options || {};
  6353. me.isScrollBody = isScrollBody || false;
  6354. me.isDownScrolling = false;
  6355. me.isUpScrolling = false;
  6356. let hasDownCallback = me.options.down && me.options.down.callback;
  6357. me.initDownScroll();
  6358. me.initUpScroll();
  6359. setTimeout(function() {
  6360. if ((me.optDown.use || me.optDown.native) && me.optDown.auto && hasDownCallback) {
  6361. if (me.optDown.autoShowLoading) {
  6362. me.triggerDownScroll();
  6363. } else {
  6364. me.optDown.callback && me.optDown.callback(me);
  6365. }
  6366. }
  6367. if (!me.isUpAutoLoad) {
  6368. setTimeout(function() {
  6369. me.optUp.use && me.optUp.auto && !me.isUpAutoLoad && me.triggerUpScroll();
  6370. }, 100);
  6371. }
  6372. }, 30);
  6373. }
  6374. MeScroll.prototype.extendDownScroll = function(optDown) {
  6375. MeScroll.extend(optDown, {
  6376. use: true,
  6377. // 是否启用下拉刷新; 默认true
  6378. auto: true,
  6379. // 是否在初始化完毕之后自动执行下拉刷新的回调; 默认true
  6380. native: false,
  6381. // 是否使用系统自带的下拉刷新; 默认false; 仅mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  6382. autoShowLoading: false,
  6383. // 如果设置auto=true(在初始化完毕之后自动执行下拉刷新的回调),那么是否显示下拉刷新的进度; 默认false
  6384. isLock: false,
  6385. // 是否锁定下拉刷新,默认false;
  6386. offset: 80,
  6387. // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
  6388. startTop: 100,
  6389. // scroll-view快速滚动到顶部时,此时的scroll-top可能大于0, 此值用于控制最大的误差
  6390. inOffsetRate: 1,
  6391. // 在列表顶部,下拉的距离小于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
  6392. outOffsetRate: 0.2,
  6393. // 在列表顶部,下拉的距离大于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
  6394. bottomOffset: 20,
  6395. // 当手指touchmove位置在距离body底部20px范围内的时候结束上拉刷新,避免Webview嵌套导致touchend事件不执行
  6396. minAngle: 45,
  6397. // 向下滑动最少偏移的角度,取值区间 [0,90];默认45度,即向下滑动的角度大于45度则触发下拉;而小于45度,将不触发下拉,避免与左右滑动的轮播等组件冲突;
  6398. textInOffset: "下拉刷新",
  6399. // 下拉的距离在offset范围内的提示文本
  6400. textOutOffset: "释放更新",
  6401. // 下拉的距离大于offset范围的提示文本
  6402. textLoading: "加载中 ...",
  6403. // 加载中的提示文本
  6404. textSuccess: "加载成功",
  6405. // 加载成功的文本
  6406. textErr: "加载失败",
  6407. // 加载失败的文本
  6408. beforeEndDelay: 0,
  6409. // 延时结束的时长 (显示加载成功/失败的时长, android小程序设置此项结束下拉会卡顿, 配置后请注意测试)
  6410. bgColor: "transparent",
  6411. // 背景颜色 (建议在pages.json中再设置一下backgroundColorTop)
  6412. textColor: "gray",
  6413. // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
  6414. inited: null,
  6415. // 下拉刷新初始化完毕的回调
  6416. inOffset: null,
  6417. // 下拉的距离进入offset范围内那一刻的回调
  6418. outOffset: null,
  6419. // 下拉的距离大于offset那一刻的回调
  6420. onMoving: null,
  6421. // 下拉过程中的回调,滑动过程一直在执行; rate下拉区域当前高度与指定距离的比值(inOffset: rate<1; outOffset: rate>=1); downHight当前下拉区域的高度
  6422. beforeLoading: null,
  6423. // 准备触发下拉刷新的回调: 如果return true,将不触发showLoading和callback回调; 常用来完全自定义下拉刷新, 参考案例【淘宝 v6.8.0】
  6424. showLoading: null,
  6425. // 显示下拉刷新进度的回调
  6426. afterLoading: null,
  6427. // 显示下拉刷新进度的回调之后,马上要执行的代码 (如: 在wxs中使用)
  6428. beforeEndDownScroll: null,
  6429. // 准备结束下拉的回调. 返回结束下拉的延时执行时间,默认0ms; 常用于结束下拉之前再显示另外一小段动画,才去隐藏下拉刷新的场景, 参考案例【dotJump】
  6430. endDownScroll: null,
  6431. // 结束下拉刷新的回调
  6432. afterEndDownScroll: null,
  6433. // 结束下拉刷新的回调,马上要执行的代码 (如: 在wxs中使用)
  6434. callback: function(mescroll) {
  6435. mescroll.resetUpScroll();
  6436. }
  6437. });
  6438. };
  6439. MeScroll.prototype.extendUpScroll = function(optUp) {
  6440. MeScroll.extend(optUp, {
  6441. use: true,
  6442. // 是否启用上拉加载; 默认true
  6443. auto: true,
  6444. // 是否在初始化完毕之后自动执行上拉加载的回调; 默认true
  6445. isLock: false,
  6446. // 是否锁定上拉加载,默认false;
  6447. isBoth: true,
  6448. // 上拉加载时,如果滑动到列表顶部是否可以同时触发下拉刷新;默认true,两者可同时触发;
  6449. callback: null,
  6450. // 上拉加载的回调;function(page,mescroll){ }
  6451. page: {
  6452. num: 0,
  6453. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  6454. size: 10,
  6455. // 每页数据的数量
  6456. time: null
  6457. // 加载第一页数据服务器返回的时间; 防止用户翻页时,后台新增了数据从而导致下一页数据重复;
  6458. },
  6459. noMoreSize: 5,
  6460. // 如果列表已无数据,可设置列表的总数量要大于等于5条才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看
  6461. offset: 150,
  6462. // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
  6463. textLoading: "加载中 ...",
  6464. // 加载中的提示文本
  6465. textNoMore: "-- END --",
  6466. // 没有更多数据的提示文本
  6467. bgColor: "transparent",
  6468. // 背景颜色 (建议在pages.json中再设置一下backgroundColorBottom)
  6469. textColor: "gray",
  6470. // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
  6471. inited: null,
  6472. // 初始化完毕的回调
  6473. showLoading: null,
  6474. // 显示加载中的回调
  6475. showNoMore: null,
  6476. // 显示无更多数据的回调
  6477. hideUpScroll: null,
  6478. // 隐藏上拉加载的回调
  6479. errDistance: 60,
  6480. // endErr的时候需往上滑动一段距离,使其往下滑动时再次触发onReachBottom,仅mescroll-body生效
  6481. toTop: {
  6482. // 回到顶部按钮,需配置src才显示
  6483. src: null,
  6484. // 图片路径,默认null (绝对路径或网络图)
  6485. offset: 1e3,
  6486. // 列表滚动多少距离才显示回到顶部按钮,默认1000
  6487. duration: 300,
  6488. // 回到顶部的动画时长,默认300ms (当值为0或300则使用系统自带回到顶部,更流畅; 其他值则通过step模拟,部分机型可能不够流畅,所以非特殊情况不建议修改此项)
  6489. btnClick: null,
  6490. // 点击按钮的回调
  6491. onShow: null,
  6492. // 是否显示的回调
  6493. zIndex: 9990,
  6494. // fixed定位z-index值
  6495. left: null,
  6496. // 到左边的距离, 默认null. 此项有值时,right不生效. (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  6497. right: 20,
  6498. // 到右边的距离, 默认20 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  6499. bottom: 120,
  6500. // 到底部的距离, 默认120 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  6501. safearea: false,
  6502. // bottom的偏移量是否加上底部安全区的距离, 默认false, 需要适配iPhoneX时使用 (具体的界面如果不配置此项,则取本vue的safearea值)
  6503. width: 72,
  6504. // 回到顶部图标的宽度, 默认72 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  6505. radius: "50%"
  6506. // 圆角, 默认"50%" (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  6507. },
  6508. empty: {
  6509. use: true,
  6510. // 是否显示空布局
  6511. icon: null,
  6512. // 图标路径
  6513. tip: "~ 暂无相关数据 ~",
  6514. // 提示
  6515. btnText: "",
  6516. // 按钮
  6517. btnClick: null,
  6518. // 点击按钮的回调
  6519. onShow: null,
  6520. // 是否显示的回调
  6521. fixed: false,
  6522. // 是否使用fixed定位,默认false; 配置fixed为true,以下的top和zIndex才生效 (transform会使fixed失效,最终会降级为absolute)
  6523. top: "100rpx",
  6524. // fixed定位的top值 (完整的单位值,如 "10%"; "100rpx")
  6525. zIndex: 99
  6526. // fixed定位z-index值
  6527. },
  6528. onScroll: false
  6529. // 是否监听滚动事件
  6530. });
  6531. };
  6532. MeScroll.extend = function(userOption, defaultOption) {
  6533. if (!userOption)
  6534. return defaultOption;
  6535. for (let key in defaultOption) {
  6536. if (userOption[key] == null) {
  6537. let def = defaultOption[key];
  6538. if (def != null && typeof def === "object") {
  6539. userOption[key] = MeScroll.extend({}, def);
  6540. } else {
  6541. userOption[key] = def;
  6542. }
  6543. } else if (typeof userOption[key] === "object") {
  6544. MeScroll.extend(userOption[key], defaultOption[key]);
  6545. }
  6546. }
  6547. return userOption;
  6548. };
  6549. MeScroll.prototype.hasColor = function(color2) {
  6550. if (!color2)
  6551. return false;
  6552. let c = color2.toLowerCase();
  6553. return c != "#fff" && c != "#ffffff" && c != "transparent" && c != "white";
  6554. };
  6555. MeScroll.prototype.initDownScroll = function() {
  6556. let me = this;
  6557. me.optDown = me.options.down || {};
  6558. if (!me.optDown.textColor && me.hasColor(me.optDown.bgColor))
  6559. me.optDown.textColor = "#fff";
  6560. me.extendDownScroll(me.optDown);
  6561. if (me.isScrollBody && me.optDown.native) {
  6562. me.optDown.use = false;
  6563. } else {
  6564. me.optDown.native = false;
  6565. }
  6566. me.downHight = 0;
  6567. if (me.optDown.use && me.optDown.inited) {
  6568. setTimeout(function() {
  6569. me.optDown.inited(me);
  6570. }, 0);
  6571. }
  6572. };
  6573. MeScroll.prototype.touchstartEvent = function(e) {
  6574. if (!this.optDown.use)
  6575. return;
  6576. this.startPoint = this.getPoint(e);
  6577. this.startTop = this.getScrollTop();
  6578. this.startAngle = 0;
  6579. this.lastPoint = this.startPoint;
  6580. this.maxTouchmoveY = this.getBodyHeight() - this.optDown.bottomOffset;
  6581. this.inTouchend = false;
  6582. };
  6583. MeScroll.prototype.touchmoveEvent = function(e) {
  6584. if (!this.optDown.use)
  6585. return;
  6586. let me = this;
  6587. let scrollTop = me.getScrollTop();
  6588. let curPoint = me.getPoint(e);
  6589. let moveY = curPoint.y - me.startPoint.y;
  6590. if (moveY > 0 && (me.isScrollBody && scrollTop <= 0 || !me.isScrollBody && (scrollTop <= 0 || scrollTop <= me.optDown.startTop && scrollTop === me.startTop))) {
  6591. if (!me.inTouchend && !me.isDownScrolling && !me.optDown.isLock && (!me.isUpScrolling || me.isUpScrolling && me.optUp.isBoth)) {
  6592. if (!me.startAngle)
  6593. me.startAngle = me.getAngle(me.lastPoint, curPoint);
  6594. if (me.startAngle < me.optDown.minAngle)
  6595. return;
  6596. if (me.maxTouchmoveY > 0 && curPoint.y >= me.maxTouchmoveY) {
  6597. me.inTouchend = true;
  6598. me.touchendEvent();
  6599. return;
  6600. }
  6601. me.preventDefault(e);
  6602. let diff = curPoint.y - me.lastPoint.y;
  6603. if (me.downHight < me.optDown.offset) {
  6604. if (me.movetype !== 1) {
  6605. me.movetype = 1;
  6606. me.isDownEndSuccess = null;
  6607. me.optDown.inOffset && me.optDown.inOffset(me);
  6608. me.isMoveDown = true;
  6609. }
  6610. me.downHight += diff * me.optDown.inOffsetRate;
  6611. } else {
  6612. if (me.movetype !== 2) {
  6613. me.movetype = 2;
  6614. me.optDown.outOffset && me.optDown.outOffset(me);
  6615. me.isMoveDown = true;
  6616. }
  6617. if (diff > 0) {
  6618. me.downHight += diff * me.optDown.outOffsetRate;
  6619. } else {
  6620. me.downHight += diff;
  6621. }
  6622. }
  6623. me.downHight = Math.round(me.downHight);
  6624. let rate = me.downHight / me.optDown.offset;
  6625. me.optDown.onMoving && me.optDown.onMoving(me, rate, me.downHight);
  6626. }
  6627. }
  6628. me.lastPoint = curPoint;
  6629. };
  6630. MeScroll.prototype.touchendEvent = function(e) {
  6631. if (!this.optDown.use)
  6632. return;
  6633. if (this.isMoveDown) {
  6634. if (this.downHight >= this.optDown.offset) {
  6635. this.triggerDownScroll();
  6636. } else {
  6637. this.downHight = 0;
  6638. this.endDownScrollCall(this);
  6639. }
  6640. this.movetype = 0;
  6641. this.isMoveDown = false;
  6642. } else if (!this.isScrollBody && this.getScrollTop() === this.startTop) {
  6643. let isScrollUp = this.getPoint(e).y - this.startPoint.y < 0;
  6644. if (isScrollUp) {
  6645. let angle = this.getAngle(this.getPoint(e), this.startPoint);
  6646. if (angle > 80) {
  6647. this.triggerUpScroll(true);
  6648. }
  6649. }
  6650. }
  6651. };
  6652. MeScroll.prototype.getPoint = function(e) {
  6653. if (!e) {
  6654. return {
  6655. x: 0,
  6656. y: 0
  6657. };
  6658. }
  6659. if (e.touches && e.touches[0]) {
  6660. return {
  6661. x: e.touches[0].pageX,
  6662. y: e.touches[0].pageY
  6663. };
  6664. } else if (e.changedTouches && e.changedTouches[0]) {
  6665. return {
  6666. x: e.changedTouches[0].pageX,
  6667. y: e.changedTouches[0].pageY
  6668. };
  6669. } else {
  6670. return {
  6671. x: e.clientX,
  6672. y: e.clientY
  6673. };
  6674. }
  6675. };
  6676. MeScroll.prototype.getAngle = function(p1, p2) {
  6677. let x = Math.abs(p1.x - p2.x);
  6678. let y = Math.abs(p1.y - p2.y);
  6679. let z = Math.sqrt(x * x + y * y);
  6680. let angle = 0;
  6681. if (z !== 0) {
  6682. angle = Math.asin(y / z) / Math.PI * 180;
  6683. }
  6684. return angle;
  6685. };
  6686. MeScroll.prototype.triggerDownScroll = function() {
  6687. if (this.optDown.beforeLoading && this.optDown.beforeLoading(this))
  6688. ;
  6689. else {
  6690. this.showDownScroll();
  6691. !this.optDown.native && this.optDown.callback && this.optDown.callback(this);
  6692. }
  6693. };
  6694. MeScroll.prototype.showDownScroll = function() {
  6695. this.isDownScrolling = true;
  6696. if (this.optDown.native) {
  6697. uni.startPullDownRefresh();
  6698. this.showDownLoadingCall(0);
  6699. } else {
  6700. this.downHight = this.optDown.offset;
  6701. this.showDownLoadingCall(this.downHight);
  6702. }
  6703. };
  6704. MeScroll.prototype.showDownLoadingCall = function(downHight) {
  6705. this.optDown.showLoading && this.optDown.showLoading(this, downHight);
  6706. this.optDown.afterLoading && this.optDown.afterLoading(this, downHight);
  6707. };
  6708. MeScroll.prototype.onPullDownRefresh = function() {
  6709. this.isDownScrolling = true;
  6710. this.showDownLoadingCall(0);
  6711. this.optDown.callback && this.optDown.callback(this);
  6712. };
  6713. MeScroll.prototype.endDownScroll = function() {
  6714. if (this.optDown.native) {
  6715. this.isDownScrolling = false;
  6716. this.endDownScrollCall(this);
  6717. uni.stopPullDownRefresh();
  6718. return;
  6719. }
  6720. let me = this;
  6721. let endScroll = function() {
  6722. me.downHight = 0;
  6723. me.isDownScrolling = false;
  6724. me.endDownScrollCall(me);
  6725. if (!me.isScrollBody) {
  6726. me.setScrollHeight(0);
  6727. me.scrollTo(0, 0);
  6728. }
  6729. };
  6730. let delay = 0;
  6731. if (me.optDown.beforeEndDownScroll) {
  6732. delay = me.optDown.beforeEndDownScroll(me);
  6733. if (me.isDownEndSuccess == null)
  6734. delay = 0;
  6735. }
  6736. if (typeof delay === "number" && delay > 0) {
  6737. setTimeout(endScroll, delay);
  6738. } else {
  6739. endScroll();
  6740. }
  6741. };
  6742. MeScroll.prototype.endDownScrollCall = function() {
  6743. this.optDown.endDownScroll && this.optDown.endDownScroll(this);
  6744. this.optDown.afterEndDownScroll && this.optDown.afterEndDownScroll(this);
  6745. };
  6746. MeScroll.prototype.lockDownScroll = function(isLock) {
  6747. if (isLock == null)
  6748. isLock = true;
  6749. this.optDown.isLock = isLock;
  6750. };
  6751. MeScroll.prototype.lockUpScroll = function(isLock) {
  6752. if (isLock == null)
  6753. isLock = true;
  6754. this.optUp.isLock = isLock;
  6755. };
  6756. MeScroll.prototype.initUpScroll = function() {
  6757. let me = this;
  6758. me.optUp = me.options.up || { use: false };
  6759. if (!me.optUp.textColor && me.hasColor(me.optUp.bgColor))
  6760. me.optUp.textColor = "#fff";
  6761. me.extendUpScroll(me.optUp);
  6762. if (me.optUp.use === false)
  6763. return;
  6764. me.optUp.hasNext = true;
  6765. me.startNum = me.optUp.page.num + 1;
  6766. if (me.optUp.inited) {
  6767. setTimeout(function() {
  6768. me.optUp.inited(me);
  6769. }, 0);
  6770. }
  6771. };
  6772. MeScroll.prototype.onReachBottom = function() {
  6773. if (this.isScrollBody && !this.isUpScrolling) {
  6774. if (!this.optUp.isLock && this.optUp.hasNext) {
  6775. this.triggerUpScroll();
  6776. }
  6777. }
  6778. };
  6779. MeScroll.prototype.onPageScroll = function(e) {
  6780. if (!this.isScrollBody)
  6781. return;
  6782. this.setScrollTop(e.scrollTop);
  6783. if (e.scrollTop >= this.optUp.toTop.offset) {
  6784. this.showTopBtn();
  6785. } else {
  6786. this.hideTopBtn();
  6787. }
  6788. };
  6789. MeScroll.prototype.scroll = function(e, onScroll) {
  6790. this.setScrollTop(e.scrollTop);
  6791. this.setScrollHeight(e.scrollHeight);
  6792. if (this.preScrollY == null)
  6793. this.preScrollY = 0;
  6794. this.isScrollUp = e.scrollTop - this.preScrollY > 0;
  6795. this.preScrollY = e.scrollTop;
  6796. this.isScrollUp && this.triggerUpScroll(true);
  6797. if (e.scrollTop >= this.optUp.toTop.offset) {
  6798. this.showTopBtn();
  6799. } else {
  6800. this.hideTopBtn();
  6801. }
  6802. this.optUp.onScroll && onScroll && onScroll();
  6803. };
  6804. MeScroll.prototype.triggerUpScroll = function(isCheck) {
  6805. if (!this.isUpScrolling && this.optUp.use && this.optUp.callback) {
  6806. if (isCheck === true) {
  6807. let canUp = false;
  6808. if (this.optUp.hasNext && !this.optUp.isLock && !this.isDownScrolling) {
  6809. if (this.getScrollBottom() <= this.optUp.offset) {
  6810. canUp = true;
  6811. }
  6812. }
  6813. if (canUp === false)
  6814. return;
  6815. }
  6816. this.showUpScroll();
  6817. this.optUp.page.num++;
  6818. this.isUpAutoLoad = true;
  6819. this.num = this.optUp.page.num;
  6820. this.size = this.optUp.page.size;
  6821. this.time = this.optUp.page.time;
  6822. this.optUp.callback(this);
  6823. }
  6824. };
  6825. MeScroll.prototype.showUpScroll = function() {
  6826. this.isUpScrolling = true;
  6827. this.optUp.showLoading && this.optUp.showLoading(this);
  6828. };
  6829. MeScroll.prototype.showNoMore = function() {
  6830. this.optUp.hasNext = false;
  6831. this.optUp.showNoMore && this.optUp.showNoMore(this);
  6832. };
  6833. MeScroll.prototype.hideUpScroll = function() {
  6834. this.optUp.hideUpScroll && this.optUp.hideUpScroll(this);
  6835. };
  6836. MeScroll.prototype.endUpScroll = function(isShowNoMore) {
  6837. if (isShowNoMore != null) {
  6838. if (isShowNoMore) {
  6839. this.showNoMore();
  6840. } else {
  6841. this.hideUpScroll();
  6842. }
  6843. }
  6844. this.isUpScrolling = false;
  6845. };
  6846. MeScroll.prototype.resetUpScroll = function(isShowLoading) {
  6847. if (this.optUp && this.optUp.use) {
  6848. let page2 = this.optUp.page;
  6849. this.prePageNum = page2.num;
  6850. this.prePageTime = page2.time;
  6851. page2.num = this.startNum;
  6852. page2.time = null;
  6853. if (!this.isDownScrolling && isShowLoading !== false) {
  6854. if (isShowLoading == null) {
  6855. this.removeEmpty();
  6856. this.showUpScroll();
  6857. } else {
  6858. this.showDownScroll();
  6859. }
  6860. }
  6861. this.isUpAutoLoad = true;
  6862. this.num = page2.num;
  6863. this.size = page2.size;
  6864. this.time = page2.time;
  6865. this.optUp.callback && this.optUp.callback(this);
  6866. }
  6867. };
  6868. MeScroll.prototype.setPageNum = function(num) {
  6869. this.optUp.page.num = num - 1;
  6870. };
  6871. MeScroll.prototype.setPageSize = function(size) {
  6872. this.optUp.page.size = size;
  6873. };
  6874. MeScroll.prototype.endByPage = function(dataSize, totalPage, systime) {
  6875. let hasNext;
  6876. if (this.optUp.use && totalPage != null)
  6877. hasNext = this.optUp.page.num < totalPage;
  6878. this.endSuccess(dataSize, hasNext, systime);
  6879. };
  6880. MeScroll.prototype.endBySize = function(dataSize, totalSize, systime) {
  6881. let hasNext;
  6882. if (this.optUp.use && totalSize != null) {
  6883. let loadSize = (this.optUp.page.num - 1) * this.optUp.page.size + dataSize;
  6884. hasNext = loadSize < totalSize;
  6885. }
  6886. this.endSuccess(dataSize, hasNext, systime);
  6887. };
  6888. MeScroll.prototype.endSuccess = function(dataSize, hasNext, systime) {
  6889. let me = this;
  6890. if (me.isDownScrolling) {
  6891. me.isDownEndSuccess = true;
  6892. me.endDownScroll();
  6893. }
  6894. if (me.optUp.use) {
  6895. let isShowNoMore;
  6896. if (dataSize != null) {
  6897. let pageNum = me.optUp.page.num;
  6898. let pageSize = me.optUp.page.size;
  6899. if (pageNum === 1) {
  6900. if (systime)
  6901. me.optUp.page.time = systime;
  6902. }
  6903. if (dataSize < pageSize || hasNext === false) {
  6904. me.optUp.hasNext = false;
  6905. if (dataSize === 0 && pageNum === 1) {
  6906. isShowNoMore = false;
  6907. me.showEmpty();
  6908. } else {
  6909. let allDataSize = (pageNum - 1) * pageSize + dataSize;
  6910. if (allDataSize < me.optUp.noMoreSize) {
  6911. isShowNoMore = false;
  6912. } else {
  6913. isShowNoMore = true;
  6914. }
  6915. me.removeEmpty();
  6916. }
  6917. } else {
  6918. isShowNoMore = false;
  6919. me.optUp.hasNext = true;
  6920. me.removeEmpty();
  6921. }
  6922. }
  6923. me.endUpScroll(isShowNoMore);
  6924. }
  6925. };
  6926. MeScroll.prototype.endErr = function(errDistance) {
  6927. if (this.isDownScrolling) {
  6928. this.isDownEndSuccess = false;
  6929. let page2 = this.optUp.page;
  6930. if (page2 && this.prePageNum) {
  6931. page2.num = this.prePageNum;
  6932. page2.time = this.prePageTime;
  6933. }
  6934. this.endDownScroll();
  6935. }
  6936. if (this.isUpScrolling) {
  6937. this.optUp.page.num--;
  6938. this.endUpScroll(false);
  6939. if (this.isScrollBody && errDistance !== 0) {
  6940. if (!errDistance)
  6941. errDistance = this.optUp.errDistance;
  6942. this.scrollTo(this.getScrollTop() - errDistance, 0);
  6943. }
  6944. }
  6945. };
  6946. MeScroll.prototype.showEmpty = function() {
  6947. this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(true);
  6948. };
  6949. MeScroll.prototype.removeEmpty = function() {
  6950. this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(false);
  6951. };
  6952. MeScroll.prototype.showTopBtn = function() {
  6953. if (!this.topBtnShow) {
  6954. this.topBtnShow = true;
  6955. this.optUp.toTop.onShow && this.optUp.toTop.onShow(true);
  6956. }
  6957. };
  6958. MeScroll.prototype.hideTopBtn = function() {
  6959. if (this.topBtnShow) {
  6960. this.topBtnShow = false;
  6961. this.optUp.toTop.onShow && this.optUp.toTop.onShow(false);
  6962. }
  6963. };
  6964. MeScroll.prototype.getScrollTop = function() {
  6965. return this.scrollTop || 0;
  6966. };
  6967. MeScroll.prototype.setScrollTop = function(y) {
  6968. this.scrollTop = y;
  6969. };
  6970. MeScroll.prototype.scrollTo = function(y, t2) {
  6971. this.myScrollTo && this.myScrollTo(y, t2);
  6972. };
  6973. MeScroll.prototype.resetScrollTo = function(myScrollTo) {
  6974. this.myScrollTo = myScrollTo;
  6975. };
  6976. MeScroll.prototype.getScrollBottom = function() {
  6977. return this.getScrollHeight() - this.getClientHeight() - this.getScrollTop();
  6978. };
  6979. MeScroll.prototype.getStep = function(star, end, callback, t2, rate) {
  6980. let diff = end - star;
  6981. if (t2 === 0 || diff === 0) {
  6982. callback && callback(end);
  6983. return;
  6984. }
  6985. t2 = t2 || 300;
  6986. rate = rate || 30;
  6987. let count = t2 / rate;
  6988. let step = diff / count;
  6989. let i = 0;
  6990. let timer = setInterval(function() {
  6991. if (i < count - 1) {
  6992. star += step;
  6993. callback && callback(star, timer);
  6994. i++;
  6995. } else {
  6996. callback && callback(end, timer);
  6997. clearInterval(timer);
  6998. }
  6999. }, rate);
  7000. };
  7001. MeScroll.prototype.getClientHeight = function(isReal) {
  7002. let h = this.clientHeight || 0;
  7003. if (h === 0 && isReal !== true) {
  7004. h = this.getBodyHeight();
  7005. }
  7006. return h;
  7007. };
  7008. MeScroll.prototype.setClientHeight = function(h) {
  7009. this.clientHeight = h;
  7010. };
  7011. MeScroll.prototype.getScrollHeight = function() {
  7012. return this.scrollHeight || 0;
  7013. };
  7014. MeScroll.prototype.setScrollHeight = function(h) {
  7015. this.scrollHeight = h;
  7016. };
  7017. MeScroll.prototype.getBodyHeight = function() {
  7018. return this.bodyHeight || 0;
  7019. };
  7020. MeScroll.prototype.setBodyHeight = function(h) {
  7021. this.bodyHeight = h;
  7022. };
  7023. MeScroll.prototype.preventDefault = function(e) {
  7024. if (e && e.cancelable && !e.defaultPrevented)
  7025. e.preventDefault();
  7026. };
  7027. const _sfc_main$1P = {
  7028. props: {
  7029. // up.toTop的配置项
  7030. option: {
  7031. type: Object,
  7032. default() {
  7033. return {};
  7034. }
  7035. },
  7036. // 是否显示
  7037. value: false,
  7038. // vue2
  7039. modelValue: false
  7040. // vue3
  7041. },
  7042. computed: {
  7043. // 优先显示左边
  7044. left() {
  7045. return this.option.left ? this.addUnit(this.option.left) : "auto";
  7046. },
  7047. // 右边距离 (优先显示左边)
  7048. right() {
  7049. return this.option.left ? "auto" : this.addUnit(this.option.right);
  7050. },
  7051. // 是否显示
  7052. isShow() {
  7053. return this.modelValue;
  7054. }
  7055. },
  7056. methods: {
  7057. addUnit(num) {
  7058. if (!num)
  7059. return 0;
  7060. if (typeof num === "number")
  7061. return num + "rpx";
  7062. return num;
  7063. },
  7064. toTopClick() {
  7065. this.$emit("update:modelValue", false);
  7066. this.$emit("click");
  7067. }
  7068. }
  7069. };
  7070. function _sfc_render$1O(_ctx, _cache, $props, $setup, $data, $options) {
  7071. return $props.option.src ? (vue.openBlock(), vue.createElementBlock("image", {
  7072. key: 0,
  7073. class: vue.normalizeClass(["mescroll-totop", [$options.isShow ? "mescroll-totop-in" : "mescroll-totop-out", { "mescroll-totop-safearea": $props.option.safearea }]]),
  7074. 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) }),
  7075. src: $props.option.src,
  7076. mode: "widthFix",
  7077. onClick: _cache[0] || (_cache[0] = (...args) => $options.toTopClick && $options.toTopClick(...args))
  7078. }, null, 14, ["src"])) : vue.createCommentVNode("v-if", true);
  7079. }
  7080. const MescrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$1P, [["render", _sfc_render$1O], ["__scopeId", "data-v-49fff3a8"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/mescroll-uni/components/mescroll-uni/components/mescroll-top.vue"]]);
  7081. const WxsMixin = {
  7082. data() {
  7083. return {
  7084. // 传入wxs视图层的数据 (响应式)
  7085. wxsProp: {
  7086. optDown: {},
  7087. // 下拉刷新的配置
  7088. scrollTop: 0,
  7089. // 滚动条的距离
  7090. bodyHeight: 0,
  7091. // body的高度
  7092. isDownScrolling: false,
  7093. // 是否正在下拉刷新中
  7094. isUpScrolling: false,
  7095. // 是否正在上拉加载中
  7096. isScrollBody: true,
  7097. // 是否为mescroll-body滚动
  7098. isUpBoth: true,
  7099. // 上拉加载时,是否同时可以下拉刷新
  7100. t: 0
  7101. // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
  7102. },
  7103. // 标记调用wxs视图层的方法
  7104. callProp: {
  7105. callType: "",
  7106. // 方法名
  7107. t: 0
  7108. // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
  7109. }
  7110. // 不用wxs的平台使用此处的wxsBiz对象,抹平wxs的写法 (微信小程序和APP使用的wxsBiz对象是./wxs/wxs.wxs)
  7111. // 不用renderjs的平台使用此处的renderBiz对象,抹平renderjs的写法 (app 和 h5 使用的renderBiz对象是./wxs/renderjs.js)
  7112. };
  7113. },
  7114. methods: {
  7115. // wxs视图层调用逻辑层的回调
  7116. wxsCall(msg) {
  7117. if (msg.type === "setWxsProp") {
  7118. this.wxsProp = {
  7119. optDown: this.mescroll.optDown,
  7120. scrollTop: this.mescroll.getScrollTop(),
  7121. bodyHeight: this.mescroll.getBodyHeight(),
  7122. isDownScrolling: this.mescroll.isDownScrolling,
  7123. isUpScrolling: this.mescroll.isUpScrolling,
  7124. isUpBoth: this.mescroll.optUp.isBoth,
  7125. isScrollBody: this.mescroll.isScrollBody,
  7126. t: Date.now()
  7127. };
  7128. } else if (msg.type === "setLoadType") {
  7129. this.downLoadType = msg.downLoadType;
  7130. this.$set(this.mescroll, "downLoadType", this.downLoadType);
  7131. this.$set(this.mescroll, "isDownEndSuccess", null);
  7132. } else if (msg.type === "triggerDownScroll") {
  7133. this.mescroll.triggerDownScroll();
  7134. } else if (msg.type === "endDownScroll") {
  7135. this.mescroll.endDownScroll();
  7136. } else if (msg.type === "triggerUpScroll") {
  7137. this.mescroll.triggerUpScroll(true);
  7138. }
  7139. }
  7140. },
  7141. mounted() {
  7142. this.mescroll.optDown.afterLoading = () => {
  7143. this.callProp = { callType: "showLoading", t: Date.now() };
  7144. };
  7145. this.mescroll.optDown.afterEndDownScroll = () => {
  7146. this.callProp = { callType: "endDownScroll", t: Date.now() };
  7147. let delay = 300 + (this.mescroll.optDown.beforeEndDelay || 0);
  7148. setTimeout(() => {
  7149. if (this.downLoadType === 4 || this.downLoadType === 0) {
  7150. this.callProp = { callType: "clearTransform", t: Date.now() };
  7151. }
  7152. this.$set(this.mescroll, "downLoadType", this.downLoadType);
  7153. }, delay);
  7154. };
  7155. this.wxsCall({ type: "setWxsProp" });
  7156. }
  7157. };
  7158. const block0$1 = (Comp) => {
  7159. (Comp.$wxs || (Comp.$wxs = [])).push("wxsBiz");
  7160. (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxsBiz"] = "30f4e25a";
  7161. };
  7162. const block1 = (Comp) => {
  7163. (Comp.$renderjs || (Comp.$renderjs = [])).push("renderBiz");
  7164. (Comp.$renderjsModules || (Comp.$renderjsModules = {}))["renderBiz"] = "5a9dc23f";
  7165. };
  7166. const _sfc_main$1O = {
  7167. name: "mescroll-uni",
  7168. mixins: [WxsMixin],
  7169. components: {
  7170. MescrollTop
  7171. },
  7172. props: {
  7173. down: Object,
  7174. up: Object,
  7175. i18n: Object,
  7176. top: [String, Number],
  7177. topbar: [Boolean, String],
  7178. bottom: [String, Number],
  7179. safearea: Boolean,
  7180. fixed: {
  7181. type: Boolean,
  7182. default: true
  7183. },
  7184. height: [String, Number],
  7185. bottombar: {
  7186. type: Boolean,
  7187. default: true
  7188. },
  7189. disableScroll: Boolean
  7190. },
  7191. data() {
  7192. return {
  7193. mescroll: { optDown: {}, optUp: {} },
  7194. // mescroll实例
  7195. viewId: "id_" + Math.random().toString(36).substr(2, 16),
  7196. // 随机生成mescroll的id(不能数字开头,否则找不到元素)
  7197. downHight: 0,
  7198. //下拉刷新: 容器高度
  7199. downRate: 0,
  7200. // 下拉比率(inOffset: rate<1; outOffset: rate>=1)
  7201. downLoadType: 0,
  7202. // 下拉刷新状态: 0(loading前), 1(inOffset), 2(outOffset), 3(showLoading), 4(endDownScroll)
  7203. upLoadType: 0,
  7204. // 上拉加载状态: 0(loading前), 1loading中, 2没有更多了,显示END文本提示, 3(没有更多了,不显示END文本提示)
  7205. isShowEmpty: false,
  7206. // 是否显示空布局
  7207. isShowToTop: false,
  7208. // 是否显示回到顶部按钮
  7209. scrollTop: 0,
  7210. // 滚动条的位置
  7211. scrollAnim: false,
  7212. // 是否开启滚动动画
  7213. windowTop: 0,
  7214. // 可使用窗口的顶部位置
  7215. windowBottom: 0,
  7216. // 可使用窗口的底部位置
  7217. windowHeight: 0,
  7218. // 可使用窗口的高度
  7219. statusBarHeight: 0
  7220. // 状态栏高度
  7221. };
  7222. },
  7223. watch: {
  7224. height() {
  7225. this.setClientHeight();
  7226. }
  7227. },
  7228. computed: {
  7229. // 是否使用fixed定位 (当height有值,则不使用)
  7230. isFixed() {
  7231. return !this.height && this.fixed;
  7232. },
  7233. // mescroll的高度
  7234. scrollHeight() {
  7235. if (this.isFixed) {
  7236. return "auto";
  7237. } else if (this.height) {
  7238. return this.toPx(this.height) + "px";
  7239. } else {
  7240. return "100%";
  7241. }
  7242. },
  7243. // 下拉布局往下偏移的距离 (px)
  7244. numTop() {
  7245. return this.toPx(this.top);
  7246. },
  7247. fixedTop() {
  7248. return this.isFixed ? this.numTop + this.windowTop + "px" : 0;
  7249. },
  7250. padTop() {
  7251. return !this.isFixed ? this.numTop + "px" : 0;
  7252. },
  7253. // 上拉布局往上偏移 (px)
  7254. numBottom() {
  7255. return this.toPx(this.bottom);
  7256. },
  7257. fixedBottom() {
  7258. return this.isFixed ? this.numBottom + this.windowBottom + "px" : 0;
  7259. },
  7260. padBottom() {
  7261. return !this.isFixed ? this.numBottom + "px" : 0;
  7262. },
  7263. // 是否为重置下拉的状态
  7264. isDownReset() {
  7265. return this.downLoadType === 3 || this.downLoadType === 4;
  7266. },
  7267. // 过渡
  7268. transition() {
  7269. return this.isDownReset ? "transform 300ms" : "";
  7270. },
  7271. translateY() {
  7272. return this.downHight > 0 ? "translateY(" + this.downHight + "px)" : "";
  7273. },
  7274. // 列表是否可滑动
  7275. scrollable() {
  7276. if (this.disableScroll)
  7277. return false;
  7278. return this.downLoadType === 0 || this.isDownReset;
  7279. },
  7280. // 是否在加载中
  7281. isDownLoading() {
  7282. return this.downLoadType === 3;
  7283. },
  7284. // 旋转的角度
  7285. downRotate() {
  7286. return "rotate(" + 360 * this.downRate + "deg)";
  7287. },
  7288. // 文本提示
  7289. downText() {
  7290. if (!this.mescroll)
  7291. return "";
  7292. switch (this.downLoadType) {
  7293. case 1:
  7294. return this.mescroll.optDown.textInOffset;
  7295. case 2:
  7296. return this.mescroll.optDown.textOutOffset;
  7297. case 3:
  7298. return this.mescroll.optDown.textLoading;
  7299. case 4:
  7300. return this.mescroll.isDownEndSuccess ? this.mescroll.optDown.textSuccess : this.mescroll.isDownEndSuccess == false ? this.mescroll.optDown.textErr : this.mescroll.optDown.textInOffset;
  7301. default:
  7302. return this.mescroll.optDown.textInOffset;
  7303. }
  7304. }
  7305. },
  7306. methods: {
  7307. //number,rpx,upx,px,% --> px的数值
  7308. toPx(num) {
  7309. if (typeof num === "string") {
  7310. if (num.indexOf("px") !== -1) {
  7311. if (num.indexOf("rpx") !== -1) {
  7312. num = num.replace("rpx", "");
  7313. } else if (num.indexOf("upx") !== -1) {
  7314. num = num.replace("upx", "");
  7315. } else {
  7316. return Number(num.replace("px", ""));
  7317. }
  7318. } else if (num.indexOf("%") !== -1) {
  7319. let rate = Number(num.replace("%", "")) / 100;
  7320. return this.windowHeight * rate;
  7321. }
  7322. }
  7323. return num ? uni.upx2px(Number(num)) : 0;
  7324. },
  7325. //注册列表滚动事件,用于下拉刷新和上拉加载
  7326. scroll(e) {
  7327. this.mescroll.scroll(e.detail, () => {
  7328. this.$emit("scroll", this.mescroll);
  7329. });
  7330. },
  7331. // 点击空布局的按钮回调
  7332. emptyClick() {
  7333. this.$emit("emptyclick", this.mescroll);
  7334. },
  7335. // 点击回到顶部的按钮回调
  7336. toTopClick() {
  7337. this.mescroll.scrollTo(0, this.mescroll.optUp.toTop.duration);
  7338. this.$emit("topclick", this.mescroll);
  7339. },
  7340. // 更新滚动区域的高度 (使内容不满屏和到底,都可继续翻页)
  7341. setClientHeight() {
  7342. if (!this.isExec) {
  7343. this.isExec = true;
  7344. this.$nextTick(() => {
  7345. this.getClientInfo((data) => {
  7346. this.isExec = false;
  7347. if (data) {
  7348. this.mescroll.setClientHeight(data.height);
  7349. } else if (this.clientNum != 3) {
  7350. this.clientNum = this.clientNum == null ? 1 : this.clientNum + 1;
  7351. setTimeout(() => {
  7352. this.setClientHeight();
  7353. }, this.clientNum * 100);
  7354. }
  7355. });
  7356. });
  7357. }
  7358. },
  7359. // 获取滚动区域的信息
  7360. getClientInfo(success) {
  7361. let query = uni.createSelectorQuery().in(this);
  7362. let view = query.select("#" + this.viewId);
  7363. view.boundingClientRect((data) => {
  7364. success(data);
  7365. }).exec();
  7366. }
  7367. },
  7368. // 使用created初始化mescroll对象; 如果用mounted部分css样式编译到H5会失效
  7369. created() {
  7370. let vm = this;
  7371. let diyOption = {
  7372. // 下拉刷新的配置
  7373. down: {
  7374. inOffset() {
  7375. vm.downLoadType = 1;
  7376. },
  7377. outOffset() {
  7378. vm.downLoadType = 2;
  7379. },
  7380. onMoving(mescroll, rate, downHight) {
  7381. vm.downHight = downHight;
  7382. vm.downRate = rate;
  7383. },
  7384. showLoading(mescroll, downHight) {
  7385. vm.downLoadType = 3;
  7386. vm.downHight = downHight;
  7387. },
  7388. beforeEndDownScroll(mescroll) {
  7389. vm.downLoadType = 4;
  7390. return mescroll.optDown.beforeEndDelay;
  7391. },
  7392. endDownScroll() {
  7393. vm.downLoadType = 4;
  7394. vm.downHight = 0;
  7395. vm.downResetTimer && clearTimeout(vm.downResetTimer);
  7396. vm.downResetTimer = setTimeout(() => {
  7397. if (vm.downLoadType === 4)
  7398. vm.downLoadType = 0;
  7399. }, 300);
  7400. },
  7401. // 派发下拉刷新的回调
  7402. callback: function(mescroll) {
  7403. vm.$emit("down", mescroll);
  7404. }
  7405. },
  7406. // 上拉加载的配置
  7407. up: {
  7408. // 显示加载中的回调
  7409. showLoading() {
  7410. vm.upLoadType = 1;
  7411. },
  7412. // 显示无更多数据的回调
  7413. showNoMore() {
  7414. vm.upLoadType = 2;
  7415. },
  7416. // 隐藏上拉加载的回调
  7417. hideUpScroll(mescroll) {
  7418. vm.upLoadType = mescroll.optUp.hasNext ? 0 : 3;
  7419. },
  7420. // 空布局
  7421. empty: {
  7422. onShow(isShow) {
  7423. vm.isShowEmpty = isShow;
  7424. }
  7425. },
  7426. // 回到顶部
  7427. toTop: {
  7428. onShow(isShow) {
  7429. vm.isShowToTop = isShow;
  7430. }
  7431. },
  7432. // 派发上拉加载的回调
  7433. callback: function(mescroll) {
  7434. vm.$emit("up", mescroll);
  7435. vm.setClientHeight();
  7436. }
  7437. }
  7438. };
  7439. let i18nType = mescrollI18n.getType();
  7440. let i18nOption = { type: i18nType };
  7441. MeScroll.extend(i18nOption, vm.i18n);
  7442. MeScroll.extend(i18nOption, GlobalOption.i18n);
  7443. MeScroll.extend(diyOption, i18nOption[i18nType]);
  7444. MeScroll.extend(diyOption, { down: GlobalOption.down, up: GlobalOption.up });
  7445. let myOption = JSON.parse(JSON.stringify({ "down": vm.down, "up": vm.up }));
  7446. MeScroll.extend(myOption, diyOption);
  7447. vm.mescroll = new MeScroll(myOption);
  7448. vm.mescroll.viewId = vm.viewId;
  7449. vm.mescroll.i18n = i18nOption;
  7450. vm.$emit("init", vm.mescroll);
  7451. const sys2 = uni.getSystemInfoSync();
  7452. if (sys2.windowTop)
  7453. vm.windowTop = sys2.windowTop;
  7454. if (sys2.windowBottom)
  7455. vm.windowBottom = sys2.windowBottom;
  7456. if (sys2.windowHeight)
  7457. vm.windowHeight = sys2.windowHeight;
  7458. if (sys2.statusBarHeight)
  7459. vm.statusBarHeight = sys2.statusBarHeight;
  7460. vm.mescroll.setBodyHeight(sys2.windowHeight);
  7461. vm.mescroll.resetScrollTo((y, t2) => {
  7462. vm.scrollAnim = t2 !== 0;
  7463. if (typeof y === "string") {
  7464. vm.getClientInfo(function(rect) {
  7465. let mescrollTop = rect.top;
  7466. let selector;
  7467. if (y.indexOf("#") == -1 && y.indexOf(".") == -1) {
  7468. selector = "#" + y;
  7469. } else {
  7470. selector = y;
  7471. if (y.indexOf(">>>") != -1) {
  7472. selector = y.split(">>>")[1].trim();
  7473. }
  7474. }
  7475. uni.createSelectorQuery().select(selector).boundingClientRect(function(rect2) {
  7476. if (rect2) {
  7477. let curY2 = vm.mescroll.getScrollTop();
  7478. let top = rect2.top - mescrollTop;
  7479. top += curY2;
  7480. if (!vm.isFixed)
  7481. top -= vm.numTop;
  7482. vm.scrollTop = curY2;
  7483. vm.$nextTick(function() {
  7484. vm.scrollTop = top;
  7485. });
  7486. } else {
  7487. formatAppLog("error", "at uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.vue:422", selector + " does not exist");
  7488. }
  7489. }).exec();
  7490. });
  7491. return;
  7492. }
  7493. let curY = vm.mescroll.getScrollTop();
  7494. if (t2 === 0 || t2 === 300) {
  7495. vm.scrollTop = curY;
  7496. vm.$nextTick(function() {
  7497. vm.scrollTop = y;
  7498. });
  7499. } else {
  7500. vm.mescroll.getStep(curY, y, (step) => {
  7501. vm.scrollTop = step;
  7502. }, t2);
  7503. }
  7504. });
  7505. if (vm.up && vm.up.toTop && vm.up.toTop.safearea != null)
  7506. ;
  7507. else {
  7508. vm.mescroll.optUp.toTop.safearea = vm.safearea;
  7509. }
  7510. uni.$on("setMescrollGlobalOption", (options) => {
  7511. if (!options)
  7512. return;
  7513. let i18nType2 = options.i18n ? options.i18n.type : null;
  7514. if (i18nType2 && vm.mescroll.i18n.type != i18nType2) {
  7515. vm.mescroll.i18n.type = i18nType2;
  7516. mescrollI18n.setType(i18nType2);
  7517. MeScroll.extend(options, vm.mescroll.i18n[i18nType2]);
  7518. }
  7519. if (options.down) {
  7520. let down = MeScroll.extend({}, options.down);
  7521. vm.mescroll.optDown = MeScroll.extend(down, vm.mescroll.optDown);
  7522. }
  7523. if (options.up) {
  7524. let up = MeScroll.extend({}, options.up);
  7525. vm.mescroll.optUp = MeScroll.extend(up, vm.mescroll.optUp);
  7526. }
  7527. });
  7528. },
  7529. mounted() {
  7530. this.setClientHeight();
  7531. },
  7532. destroyed() {
  7533. uni.$off("setMescrollGlobalOption");
  7534. }
  7535. };
  7536. function _sfc_render$1N(_ctx, _cache, $props, $setup, $data, $options) {
  7537. const _component_mescroll_empty = resolveEasycom(vue.resolveDynamicComponent("mescroll-empty"), __easycom_0$b);
  7538. const _component_mescroll_top = vue.resolveComponent("mescroll-top");
  7539. return vue.openBlock(), vue.createElementBlock("view", { class: "mescroll-uni-warp" }, [
  7540. vue.createElementVNode("scroll-view", {
  7541. id: $data.viewId,
  7542. class: vue.normalizeClass(["mescroll-uni", { "mescroll-uni-fixed": $options.isFixed }]),
  7543. style: vue.normalizeStyle({ "height": $options.scrollHeight, "padding-top": $options.padTop, "padding-bottom": $options.padBottom, "top": $options.fixedTop, "bottom": $options.fixedBottom }),
  7544. "scroll-top": $data.scrollTop,
  7545. "scroll-with-animation": $data.scrollAnim,
  7546. onScroll: _cache[4] || (_cache[4] = (...args) => $options.scroll && $options.scroll(...args)),
  7547. "scroll-y": $options.scrollable,
  7548. "enable-back-to-top": true,
  7549. throttle: false
  7550. }, [
  7551. vue.createElementVNode("view", {
  7552. class: "mescroll-uni-content mescroll-render-touch",
  7553. onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.wxsBiz.touchstartEvent && _ctx.wxsBiz.touchstartEvent(...args)),
  7554. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.wxsBiz.touchmoveEvent && _ctx.wxsBiz.touchmoveEvent(...args)),
  7555. onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.wxsBiz.touchendEvent && _ctx.wxsBiz.touchendEvent(...args)),
  7556. onTouchcancel: _cache[3] || (_cache[3] = (...args) => _ctx.wxsBiz.touchendEvent && _ctx.wxsBiz.touchendEvent(...args)),
  7557. "change:prop": _ctx.wxsBiz.propObserver,
  7558. prop: vue.wp(_ctx.wxsProp)
  7559. }, [
  7560. vue.createCommentVNode(" 状态栏 "),
  7561. $props.topbar && $data.statusBarHeight ? (vue.openBlock(), vue.createElementBlock(
  7562. "view",
  7563. {
  7564. key: 0,
  7565. class: "mescroll-topbar",
  7566. style: vue.normalizeStyle({ height: $data.statusBarHeight + "px", background: $props.topbar })
  7567. },
  7568. null,
  7569. 4
  7570. /* STYLE */
  7571. )) : vue.createCommentVNode("v-if", true),
  7572. vue.createElementVNode("view", {
  7573. class: "mescroll-wxs-content",
  7574. style: vue.normalizeStyle({ "transform": $options.translateY, "transition": $options.transition }),
  7575. "change:prop": _ctx.wxsBiz.callObserver,
  7576. prop: vue.wp(_ctx.callProp)
  7577. }, [
  7578. vue.createCommentVNode(" 下拉加载区域 (支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-down组件实现)"),
  7579. vue.createCommentVNode(' <mescroll-down :option="mescroll.optDown" :type="downLoadType" :rate="downRate"></mescroll-down> '),
  7580. $data.mescroll.optDown.use ? (vue.openBlock(), vue.createElementBlock(
  7581. "view",
  7582. {
  7583. key: 0,
  7584. class: "mescroll-downwarp",
  7585. style: vue.normalizeStyle({ "background": $data.mescroll.optDown.bgColor, "color": $data.mescroll.optDown.textColor })
  7586. },
  7587. [
  7588. vue.createElementVNode("view", { class: "downwarp-content" }, [
  7589. vue.createElementVNode(
  7590. "view",
  7591. {
  7592. class: vue.normalizeClass(["downwarp-progress mescroll-wxs-progress", { "mescroll-rotate": $options.isDownLoading }]),
  7593. style: vue.normalizeStyle({ "border-color": $data.mescroll.optDown.textColor, "transform": $options.downRotate })
  7594. },
  7595. null,
  7596. 6
  7597. /* CLASS, STYLE */
  7598. ),
  7599. vue.createElementVNode(
  7600. "view",
  7601. { class: "downwarp-tip" },
  7602. vue.toDisplayString($options.downText),
  7603. 1
  7604. /* TEXT */
  7605. )
  7606. ])
  7607. ],
  7608. 4
  7609. /* STYLE */
  7610. )) : vue.createCommentVNode("v-if", true),
  7611. vue.createCommentVNode(" 列表内容 "),
  7612. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  7613. vue.createCommentVNode(" 空布局 "),
  7614. $data.isShowEmpty ? (vue.openBlock(), vue.createBlock(_component_mescroll_empty, {
  7615. key: 1,
  7616. option: $data.mescroll.optUp.empty,
  7617. onEmptyclick: $options.emptyClick
  7618. }, null, 8, ["option", "onEmptyclick"])) : vue.createCommentVNode("v-if", true),
  7619. vue.createCommentVNode(" 上拉加载区域 (下拉刷新时不显示, 支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-up组件实现)"),
  7620. vue.createCommentVNode(' <mescroll-up v-if="mescroll.optUp.use && !isDownLoading && upLoadType!==3" :option="mescroll.optUp" :type="upLoadType"></mescroll-up> '),
  7621. $data.mescroll.optUp.use && !$options.isDownLoading && $data.upLoadType !== 3 ? (vue.openBlock(), vue.createElementBlock(
  7622. "view",
  7623. {
  7624. key: 2,
  7625. class: "mescroll-upwarp",
  7626. style: vue.normalizeStyle({ "background": $data.mescroll.optUp.bgColor, "color": $data.mescroll.optUp.textColor })
  7627. },
  7628. [
  7629. vue.createCommentVNode(" 加载中 (此处不能用v-if,否则android小程序快速上拉可能会不断触发上拉回调) "),
  7630. vue.withDirectives(vue.createElementVNode(
  7631. "view",
  7632. null,
  7633. [
  7634. vue.createElementVNode(
  7635. "view",
  7636. {
  7637. class: "upwarp-progress mescroll-rotate",
  7638. style: vue.normalizeStyle({ "border-color": $data.mescroll.optUp.textColor })
  7639. },
  7640. null,
  7641. 4
  7642. /* STYLE */
  7643. ),
  7644. vue.createElementVNode(
  7645. "view",
  7646. { class: "upwarp-tip" },
  7647. vue.toDisplayString($data.mescroll.optUp.textLoading),
  7648. 1
  7649. /* TEXT */
  7650. )
  7651. ],
  7652. 512
  7653. /* NEED_PATCH */
  7654. ), [
  7655. [vue.vShow, $data.upLoadType === 1]
  7656. ]),
  7657. vue.createCommentVNode(" 无数据 "),
  7658. $data.upLoadType === 2 ? (vue.openBlock(), vue.createElementBlock(
  7659. "view",
  7660. {
  7661. key: 0,
  7662. class: "upwarp-nodata"
  7663. },
  7664. vue.toDisplayString($data.mescroll.optUp.textNoMore),
  7665. 1
  7666. /* TEXT */
  7667. )) : vue.createCommentVNode("v-if", true)
  7668. ],
  7669. 4
  7670. /* STYLE */
  7671. )) : vue.createCommentVNode("v-if", true)
  7672. ], 12, ["change:prop", "prop"]),
  7673. vue.createCommentVNode(" 底部是否偏移TabBar的高度(默认仅在H5端的tab页生效) "),
  7674. vue.createCommentVNode(" 适配iPhoneX "),
  7675. $props.safearea ? (vue.openBlock(), vue.createElementBlock("view", {
  7676. key: 1,
  7677. class: "mescroll-safearea"
  7678. })) : vue.createCommentVNode("v-if", true)
  7679. ], 40, ["change:prop", "prop"])
  7680. ], 46, ["id", "scroll-top", "scroll-with-animation", "scroll-y"]),
  7681. vue.createCommentVNode(" 回到顶部按钮 (fixed元素,需写在scroll-view外面,防止滚动的时候抖动)"),
  7682. vue.createVNode(_component_mescroll_top, {
  7683. modelValue: $data.isShowToTop,
  7684. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.isShowToTop = $event),
  7685. option: $data.mescroll.optUp.toTop,
  7686. onClick: $options.toTopClick
  7687. }, null, 8, ["modelValue", "option", "onClick"]),
  7688. vue.createCommentVNode(" renderjs的数据载体,不可写在mescroll-downwarp内部,避免use为false时,载体丢失,无法更新数据 "),
  7689. vue.createElementVNode("view", {
  7690. "change:prop": _ctx.renderBiz.propObserver,
  7691. prop: vue.wp(_ctx.wxsProp)
  7692. }, null, 8, ["change:prop", "prop"])
  7693. ]);
  7694. }
  7695. if (typeof block0$1 === "function")
  7696. block0$1(_sfc_main$1O);
  7697. if (typeof block1 === "function")
  7698. block1(_sfc_main$1O);
  7699. const __easycom_0$a = /* @__PURE__ */ _export_sfc(_sfc_main$1O, [["render", _sfc_render$1N], ["__scopeId", "data-v-97b1664c"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.vue"]]);
  7700. function useMescroll(onPageScroll, onReachBottom, onPullDownRefresh) {
  7701. let mescroll = null;
  7702. const mescrollInit = (e) => {
  7703. mescroll = e;
  7704. };
  7705. const getMescroll = () => {
  7706. return mescroll;
  7707. };
  7708. const downCallback = () => {
  7709. if (mescroll.optUp.use) {
  7710. mescroll.resetUpScroll();
  7711. } else {
  7712. setTimeout(() => {
  7713. mescroll.endSuccess();
  7714. }, 500);
  7715. }
  7716. };
  7717. const upCallback = () => {
  7718. setTimeout(() => {
  7719. mescroll.endErr();
  7720. }, 500);
  7721. };
  7722. onPullDownRefresh && onPullDownRefresh(() => {
  7723. mescroll && mescroll.onPullDownRefresh();
  7724. });
  7725. onPageScroll && onPageScroll((e) => {
  7726. mescroll && mescroll.onPageScroll(e);
  7727. });
  7728. onReachBottom && onReachBottom(() => {
  7729. mescroll && mescroll.onReachBottom();
  7730. });
  7731. return {
  7732. getMescroll,
  7733. mescrollInit,
  7734. downCallback,
  7735. upCallback
  7736. };
  7737. }
  7738. var isVue2 = false;
  7739. function set(target, key, val) {
  7740. if (Array.isArray(target)) {
  7741. target.length = Math.max(target.length, key);
  7742. target.splice(key, 1, val);
  7743. return val;
  7744. }
  7745. target[key] = val;
  7746. return val;
  7747. }
  7748. function del(target, key) {
  7749. if (Array.isArray(target)) {
  7750. target.splice(key, 1);
  7751. return;
  7752. }
  7753. delete target[key];
  7754. }
  7755. function getDevtoolsGlobalHook() {
  7756. return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;
  7757. }
  7758. function getTarget() {
  7759. return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
  7760. }
  7761. const isProxyAvailable = typeof Proxy === "function";
  7762. const HOOK_SETUP = "devtools-plugin:setup";
  7763. const HOOK_PLUGIN_SETTINGS_SET = "plugin:settings:set";
  7764. let supported;
  7765. let perf;
  7766. function isPerformanceSupported() {
  7767. var _a;
  7768. if (supported !== void 0) {
  7769. return supported;
  7770. }
  7771. if (typeof window !== "undefined" && window.performance) {
  7772. supported = true;
  7773. perf = window.performance;
  7774. } else if (typeof global !== "undefined" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {
  7775. supported = true;
  7776. perf = global.perf_hooks.performance;
  7777. } else {
  7778. supported = false;
  7779. }
  7780. return supported;
  7781. }
  7782. function now() {
  7783. return isPerformanceSupported() ? perf.now() : Date.now();
  7784. }
  7785. class ApiProxy {
  7786. constructor(plugin, hook) {
  7787. this.target = null;
  7788. this.targetQueue = [];
  7789. this.onQueue = [];
  7790. this.plugin = plugin;
  7791. this.hook = hook;
  7792. const defaultSettings = {};
  7793. if (plugin.settings) {
  7794. for (const id in plugin.settings) {
  7795. const item = plugin.settings[id];
  7796. defaultSettings[id] = item.defaultValue;
  7797. }
  7798. }
  7799. const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;
  7800. let currentSettings = Object.assign({}, defaultSettings);
  7801. try {
  7802. const raw = localStorage.getItem(localSettingsSaveId);
  7803. const data = JSON.parse(raw);
  7804. Object.assign(currentSettings, data);
  7805. } catch (e) {
  7806. }
  7807. this.fallbacks = {
  7808. getSettings() {
  7809. return currentSettings;
  7810. },
  7811. setSettings(value2) {
  7812. try {
  7813. localStorage.setItem(localSettingsSaveId, JSON.stringify(value2));
  7814. } catch (e) {
  7815. }
  7816. currentSettings = value2;
  7817. },
  7818. now() {
  7819. return now();
  7820. }
  7821. };
  7822. if (hook) {
  7823. hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value2) => {
  7824. if (pluginId === this.plugin.id) {
  7825. this.fallbacks.setSettings(value2);
  7826. }
  7827. });
  7828. }
  7829. this.proxiedOn = new Proxy({}, {
  7830. get: (_target, prop) => {
  7831. if (this.target) {
  7832. return this.target.on[prop];
  7833. } else {
  7834. return (...args) => {
  7835. this.onQueue.push({
  7836. method: prop,
  7837. args
  7838. });
  7839. };
  7840. }
  7841. }
  7842. });
  7843. this.proxiedTarget = new Proxy({}, {
  7844. get: (_target, prop) => {
  7845. if (this.target) {
  7846. return this.target[prop];
  7847. } else if (prop === "on") {
  7848. return this.proxiedOn;
  7849. } else if (Object.keys(this.fallbacks).includes(prop)) {
  7850. return (...args) => {
  7851. this.targetQueue.push({
  7852. method: prop,
  7853. args,
  7854. resolve: () => {
  7855. }
  7856. });
  7857. return this.fallbacks[prop](...args);
  7858. };
  7859. } else {
  7860. return (...args) => {
  7861. return new Promise((resolve) => {
  7862. this.targetQueue.push({
  7863. method: prop,
  7864. args,
  7865. resolve
  7866. });
  7867. });
  7868. };
  7869. }
  7870. }
  7871. });
  7872. }
  7873. async setRealTarget(target) {
  7874. this.target = target;
  7875. for (const item of this.onQueue) {
  7876. this.target.on[item.method](...item.args);
  7877. }
  7878. for (const item of this.targetQueue) {
  7879. item.resolve(await this.target[item.method](...item.args));
  7880. }
  7881. }
  7882. }
  7883. function setupDevtoolsPlugin(pluginDescriptor, setupFn) {
  7884. const descriptor = pluginDescriptor;
  7885. const target = getTarget();
  7886. const hook = getDevtoolsGlobalHook();
  7887. const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;
  7888. if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {
  7889. hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);
  7890. } else {
  7891. const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null;
  7892. const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];
  7893. list.push({
  7894. pluginDescriptor: descriptor,
  7895. setupFn,
  7896. proxy
  7897. });
  7898. if (proxy)
  7899. setupFn(proxy.proxiedTarget);
  7900. }
  7901. }
  7902. /*!
  7903. * pinia v2.1.7
  7904. * (c) 2023 Eduardo San Martin Morote
  7905. * @license MIT
  7906. */
  7907. let activePinia;
  7908. const setActivePinia = (pinia2) => activePinia = pinia2;
  7909. const piniaSymbol = Symbol("pinia");
  7910. function isPlainObject$1(o) {
  7911. return o && typeof o === "object" && Object.prototype.toString.call(o) === "[object Object]" && typeof o.toJSON !== "function";
  7912. }
  7913. var MutationType;
  7914. (function(MutationType2) {
  7915. MutationType2["direct"] = "direct";
  7916. MutationType2["patchObject"] = "patch object";
  7917. MutationType2["patchFunction"] = "patch function";
  7918. })(MutationType || (MutationType = {}));
  7919. const IS_CLIENT = typeof window !== "undefined";
  7920. const USE_DEVTOOLS = IS_CLIENT;
  7921. 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 })();
  7922. function bom(blob, { autoBom = false } = {}) {
  7923. if (autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
  7924. return new Blob([String.fromCharCode(65279), blob], { type: blob.type });
  7925. }
  7926. return blob;
  7927. }
  7928. function download(url2, name, opts) {
  7929. const xhr = new XMLHttpRequest();
  7930. xhr.open("GET", url2);
  7931. xhr.responseType = "blob";
  7932. xhr.onload = function() {
  7933. saveAs(xhr.response, name, opts);
  7934. };
  7935. xhr.onerror = function() {
  7936. console.error("could not download file");
  7937. };
  7938. xhr.send();
  7939. }
  7940. function corsEnabled(url2) {
  7941. const xhr = new XMLHttpRequest();
  7942. xhr.open("HEAD", url2, false);
  7943. try {
  7944. xhr.send();
  7945. } catch (e) {
  7946. }
  7947. return xhr.status >= 200 && xhr.status <= 299;
  7948. }
  7949. function click(node) {
  7950. try {
  7951. node.dispatchEvent(new MouseEvent("click"));
  7952. } catch (e) {
  7953. const evt = document.createEvent("MouseEvents");
  7954. evt.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);
  7955. node.dispatchEvent(evt);
  7956. }
  7957. }
  7958. const _navigator = typeof navigator === "object" ? navigator : { userAgent: "" };
  7959. const isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))();
  7960. const saveAs = !IS_CLIENT ? () => {
  7961. } : (
  7962. // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
  7963. typeof HTMLAnchorElement !== "undefined" && "download" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : (
  7964. // Use msSaveOrOpenBlob as a second approach
  7965. "msSaveOrOpenBlob" in _navigator ? msSaveAs : (
  7966. // Fallback to using FileReader and a popup
  7967. fileSaverSaveAs
  7968. )
  7969. )
  7970. );
  7971. function downloadSaveAs(blob, name = "download", opts) {
  7972. const a = document.createElement("a");
  7973. a.download = name;
  7974. a.rel = "noopener";
  7975. if (typeof blob === "string") {
  7976. a.href = blob;
  7977. if (a.origin !== location.origin) {
  7978. if (corsEnabled(a.href)) {
  7979. download(blob, name, opts);
  7980. } else {
  7981. a.target = "_blank";
  7982. click(a);
  7983. }
  7984. } else {
  7985. click(a);
  7986. }
  7987. } else {
  7988. a.href = URL.createObjectURL(blob);
  7989. setTimeout(function() {
  7990. URL.revokeObjectURL(a.href);
  7991. }, 4e4);
  7992. setTimeout(function() {
  7993. click(a);
  7994. }, 0);
  7995. }
  7996. }
  7997. function msSaveAs(blob, name = "download", opts) {
  7998. if (typeof blob === "string") {
  7999. if (corsEnabled(blob)) {
  8000. download(blob, name, opts);
  8001. } else {
  8002. const a = document.createElement("a");
  8003. a.href = blob;
  8004. a.target = "_blank";
  8005. setTimeout(function() {
  8006. click(a);
  8007. });
  8008. }
  8009. } else {
  8010. navigator.msSaveOrOpenBlob(bom(blob, opts), name);
  8011. }
  8012. }
  8013. function fileSaverSaveAs(blob, name, opts, popup) {
  8014. popup = popup || open("", "_blank");
  8015. if (popup) {
  8016. popup.document.title = popup.document.body.innerText = "downloading...";
  8017. }
  8018. if (typeof blob === "string")
  8019. return download(blob, name, opts);
  8020. const force = blob.type === "application/octet-stream";
  8021. const isSafari = /constructor/i.test(String(_global.HTMLElement)) || "safari" in _global;
  8022. const isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent);
  8023. if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== "undefined") {
  8024. const reader = new FileReader();
  8025. reader.onloadend = function() {
  8026. let url2 = reader.result;
  8027. if (typeof url2 !== "string") {
  8028. popup = null;
  8029. throw new Error("Wrong reader.result type");
  8030. }
  8031. url2 = isChromeIOS ? url2 : url2.replace(/^data:[^;]*;/, "data:attachment/file;");
  8032. if (popup) {
  8033. popup.location.href = url2;
  8034. } else {
  8035. location.assign(url2);
  8036. }
  8037. popup = null;
  8038. };
  8039. reader.readAsDataURL(blob);
  8040. } else {
  8041. const url2 = URL.createObjectURL(blob);
  8042. if (popup)
  8043. popup.location.assign(url2);
  8044. else
  8045. location.href = url2;
  8046. popup = null;
  8047. setTimeout(function() {
  8048. URL.revokeObjectURL(url2);
  8049. }, 4e4);
  8050. }
  8051. }
  8052. function toastMessage(message, type2) {
  8053. const piniaMessage = "🍍 " + message;
  8054. if (typeof __VUE_DEVTOOLS_TOAST__ === "function") {
  8055. __VUE_DEVTOOLS_TOAST__(piniaMessage, type2);
  8056. } else if (type2 === "error") {
  8057. console.error(piniaMessage);
  8058. } else if (type2 === "warn") {
  8059. console.warn(piniaMessage);
  8060. } else {
  8061. console.log(piniaMessage);
  8062. }
  8063. }
  8064. function isPinia(o) {
  8065. return "_a" in o && "install" in o;
  8066. }
  8067. function checkClipboardAccess() {
  8068. if (!("clipboard" in navigator)) {
  8069. toastMessage(`Your browser doesn't support the Clipboard API`, "error");
  8070. return true;
  8071. }
  8072. }
  8073. function checkNotFocusedError(error2) {
  8074. if (error2 instanceof Error && error2.message.toLowerCase().includes("document is not focused")) {
  8075. toastMessage('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn");
  8076. return true;
  8077. }
  8078. return false;
  8079. }
  8080. async function actionGlobalCopyState(pinia2) {
  8081. if (checkClipboardAccess())
  8082. return;
  8083. try {
  8084. await navigator.clipboard.writeText(JSON.stringify(pinia2.state.value));
  8085. toastMessage("Global state copied to clipboard.");
  8086. } catch (error2) {
  8087. if (checkNotFocusedError(error2))
  8088. return;
  8089. toastMessage(`Failed to serialize the state. Check the console for more details.`, "error");
  8090. console.error(error2);
  8091. }
  8092. }
  8093. async function actionGlobalPasteState(pinia2) {
  8094. if (checkClipboardAccess())
  8095. return;
  8096. try {
  8097. loadStoresState(pinia2, JSON.parse(await navigator.clipboard.readText()));
  8098. toastMessage("Global state pasted from clipboard.");
  8099. } catch (error2) {
  8100. if (checkNotFocusedError(error2))
  8101. return;
  8102. toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, "error");
  8103. console.error(error2);
  8104. }
  8105. }
  8106. async function actionGlobalSaveState(pinia2) {
  8107. try {
  8108. saveAs(new Blob([JSON.stringify(pinia2.state.value)], {
  8109. type: "text/plain;charset=utf-8"
  8110. }), "pinia-state.json");
  8111. } catch (error2) {
  8112. toastMessage(`Failed to export the state as JSON. Check the console for more details.`, "error");
  8113. console.error(error2);
  8114. }
  8115. }
  8116. let fileInput;
  8117. function getFileOpener() {
  8118. if (!fileInput) {
  8119. fileInput = document.createElement("input");
  8120. fileInput.type = "file";
  8121. fileInput.accept = ".json";
  8122. }
  8123. function openFile() {
  8124. return new Promise((resolve, reject) => {
  8125. fileInput.onchange = async () => {
  8126. const files = fileInput.files;
  8127. if (!files)
  8128. return resolve(null);
  8129. const file = files.item(0);
  8130. if (!file)
  8131. return resolve(null);
  8132. return resolve({ text: await file.text(), file });
  8133. };
  8134. fileInput.oncancel = () => resolve(null);
  8135. fileInput.onerror = reject;
  8136. fileInput.click();
  8137. });
  8138. }
  8139. return openFile;
  8140. }
  8141. async function actionGlobalOpenStateFile(pinia2) {
  8142. try {
  8143. const open2 = getFileOpener();
  8144. const result = await open2();
  8145. if (!result)
  8146. return;
  8147. const { text, file } = result;
  8148. loadStoresState(pinia2, JSON.parse(text));
  8149. toastMessage(`Global state imported from "${file.name}".`);
  8150. } catch (error2) {
  8151. toastMessage(`Failed to import the state from JSON. Check the console for more details.`, "error");
  8152. console.error(error2);
  8153. }
  8154. }
  8155. function loadStoresState(pinia2, state) {
  8156. for (const key in state) {
  8157. const storeState = pinia2.state.value[key];
  8158. if (storeState) {
  8159. Object.assign(storeState, state[key]);
  8160. } else {
  8161. pinia2.state.value[key] = state[key];
  8162. }
  8163. }
  8164. }
  8165. function formatDisplay(display) {
  8166. return {
  8167. _custom: {
  8168. display
  8169. }
  8170. };
  8171. }
  8172. const PINIA_ROOT_LABEL = "🍍 Pinia (root)";
  8173. const PINIA_ROOT_ID = "_root";
  8174. function formatStoreForInspectorTree(store2) {
  8175. return isPinia(store2) ? {
  8176. id: PINIA_ROOT_ID,
  8177. label: PINIA_ROOT_LABEL
  8178. } : {
  8179. id: store2.$id,
  8180. label: store2.$id
  8181. };
  8182. }
  8183. function formatStoreForInspectorState(store2) {
  8184. if (isPinia(store2)) {
  8185. const storeNames = Array.from(store2._s.keys());
  8186. const storeMap = store2._s;
  8187. const state2 = {
  8188. state: storeNames.map((storeId) => ({
  8189. editable: true,
  8190. key: storeId,
  8191. value: store2.state.value[storeId]
  8192. })),
  8193. getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => {
  8194. const store22 = storeMap.get(id);
  8195. return {
  8196. editable: false,
  8197. key: id,
  8198. value: store22._getters.reduce((getters, key) => {
  8199. getters[key] = store22[key];
  8200. return getters;
  8201. }, {})
  8202. };
  8203. })
  8204. };
  8205. return state2;
  8206. }
  8207. const state = {
  8208. state: Object.keys(store2.$state).map((key) => ({
  8209. editable: true,
  8210. key,
  8211. value: store2.$state[key]
  8212. }))
  8213. };
  8214. if (store2._getters && store2._getters.length) {
  8215. state.getters = store2._getters.map((getterName) => ({
  8216. editable: false,
  8217. key: getterName,
  8218. value: store2[getterName]
  8219. }));
  8220. }
  8221. if (store2._customProperties.size) {
  8222. state.customProperties = Array.from(store2._customProperties).map((key) => ({
  8223. editable: true,
  8224. key,
  8225. value: store2[key]
  8226. }));
  8227. }
  8228. return state;
  8229. }
  8230. function formatEventData(events) {
  8231. if (!events)
  8232. return {};
  8233. if (Array.isArray(events)) {
  8234. return events.reduce((data, event) => {
  8235. data.keys.push(event.key);
  8236. data.operations.push(event.type);
  8237. data.oldValue[event.key] = event.oldValue;
  8238. data.newValue[event.key] = event.newValue;
  8239. return data;
  8240. }, {
  8241. oldValue: {},
  8242. keys: [],
  8243. operations: [],
  8244. newValue: {}
  8245. });
  8246. } else {
  8247. return {
  8248. operation: formatDisplay(events.type),
  8249. key: formatDisplay(events.key),
  8250. oldValue: events.oldValue,
  8251. newValue: events.newValue
  8252. };
  8253. }
  8254. }
  8255. function formatMutationType(type2) {
  8256. switch (type2) {
  8257. case MutationType.direct:
  8258. return "mutation";
  8259. case MutationType.patchFunction:
  8260. return "$patch";
  8261. case MutationType.patchObject:
  8262. return "$patch";
  8263. default:
  8264. return "unknown";
  8265. }
  8266. }
  8267. let isTimelineActive = true;
  8268. const componentStateTypes = [];
  8269. const MUTATIONS_LAYER_ID = "pinia:mutations";
  8270. const INSPECTOR_ID = "pinia";
  8271. const { assign: assign$1 } = Object;
  8272. const getStoreType = (id) => "🍍 " + id;
  8273. function registerPiniaDevtools(app, pinia2) {
  8274. setupDevtoolsPlugin({
  8275. id: "dev.esm.pinia",
  8276. label: "Pinia 🍍",
  8277. logo: "https://pinia.vuejs.org/logo.svg",
  8278. packageName: "pinia",
  8279. homepage: "https://pinia.vuejs.org",
  8280. componentStateTypes,
  8281. app
  8282. }, (api) => {
  8283. if (typeof api.now !== "function") {
  8284. 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.");
  8285. }
  8286. api.addTimelineLayer({
  8287. id: MUTATIONS_LAYER_ID,
  8288. label: `Pinia 🍍`,
  8289. color: 15064968
  8290. });
  8291. api.addInspector({
  8292. id: INSPECTOR_ID,
  8293. label: "Pinia 🍍",
  8294. icon: "storage",
  8295. treeFilterPlaceholder: "Search stores",
  8296. actions: [
  8297. {
  8298. icon: "content_copy",
  8299. action: () => {
  8300. actionGlobalCopyState(pinia2);
  8301. },
  8302. tooltip: "Serialize and copy the state"
  8303. },
  8304. {
  8305. icon: "content_paste",
  8306. action: async () => {
  8307. await actionGlobalPasteState(pinia2);
  8308. api.sendInspectorTree(INSPECTOR_ID);
  8309. api.sendInspectorState(INSPECTOR_ID);
  8310. },
  8311. tooltip: "Replace the state with the content of your clipboard"
  8312. },
  8313. {
  8314. icon: "save",
  8315. action: () => {
  8316. actionGlobalSaveState(pinia2);
  8317. },
  8318. tooltip: "Save the state as a JSON file"
  8319. },
  8320. {
  8321. icon: "folder_open",
  8322. action: async () => {
  8323. await actionGlobalOpenStateFile(pinia2);
  8324. api.sendInspectorTree(INSPECTOR_ID);
  8325. api.sendInspectorState(INSPECTOR_ID);
  8326. },
  8327. tooltip: "Import the state from a JSON file"
  8328. }
  8329. ],
  8330. nodeActions: [
  8331. {
  8332. icon: "restore",
  8333. tooltip: 'Reset the state (with "$reset")',
  8334. action: (nodeId) => {
  8335. const store2 = pinia2._s.get(nodeId);
  8336. if (!store2) {
  8337. toastMessage(`Cannot reset "${nodeId}" store because it wasn't found.`, "warn");
  8338. } else if (typeof store2.$reset !== "function") {
  8339. toastMessage(`Cannot reset "${nodeId}" store because it doesn't have a "$reset" method implemented.`, "warn");
  8340. } else {
  8341. store2.$reset();
  8342. toastMessage(`Store "${nodeId}" reset.`);
  8343. }
  8344. }
  8345. }
  8346. ]
  8347. });
  8348. api.on.inspectComponent((payload, ctx) => {
  8349. const proxy = payload.componentInstance && payload.componentInstance.proxy;
  8350. if (proxy && proxy._pStores) {
  8351. const piniaStores = payload.componentInstance.proxy._pStores;
  8352. Object.values(piniaStores).forEach((store2) => {
  8353. payload.instanceData.state.push({
  8354. type: getStoreType(store2.$id),
  8355. key: "state",
  8356. editable: true,
  8357. value: store2._isOptionsAPI ? {
  8358. _custom: {
  8359. value: vue.toRaw(store2.$state),
  8360. actions: [
  8361. {
  8362. icon: "restore",
  8363. tooltip: "Reset the state of this store",
  8364. action: () => store2.$reset()
  8365. }
  8366. ]
  8367. }
  8368. } : (
  8369. // NOTE: workaround to unwrap transferred refs
  8370. Object.keys(store2.$state).reduce((state, key) => {
  8371. state[key] = store2.$state[key];
  8372. return state;
  8373. }, {})
  8374. )
  8375. });
  8376. if (store2._getters && store2._getters.length) {
  8377. payload.instanceData.state.push({
  8378. type: getStoreType(store2.$id),
  8379. key: "getters",
  8380. editable: false,
  8381. value: store2._getters.reduce((getters, key) => {
  8382. try {
  8383. getters[key] = store2[key];
  8384. } catch (error2) {
  8385. getters[key] = error2;
  8386. }
  8387. return getters;
  8388. }, {})
  8389. });
  8390. }
  8391. });
  8392. }
  8393. });
  8394. api.on.getInspectorTree((payload) => {
  8395. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  8396. let stores = [pinia2];
  8397. stores = stores.concat(Array.from(pinia2._s.values()));
  8398. 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);
  8399. }
  8400. });
  8401. api.on.getInspectorState((payload) => {
  8402. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  8403. const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);
  8404. if (!inspectedStore) {
  8405. return;
  8406. }
  8407. if (inspectedStore) {
  8408. payload.state = formatStoreForInspectorState(inspectedStore);
  8409. }
  8410. }
  8411. });
  8412. api.on.editInspectorState((payload, ctx) => {
  8413. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  8414. const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);
  8415. if (!inspectedStore) {
  8416. return toastMessage(`store "${payload.nodeId}" not found`, "error");
  8417. }
  8418. const { path } = payload;
  8419. if (!isPinia(inspectedStore)) {
  8420. if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) {
  8421. path.unshift("$state");
  8422. }
  8423. } else {
  8424. path.unshift("state");
  8425. }
  8426. isTimelineActive = false;
  8427. payload.set(inspectedStore, path, payload.state.value);
  8428. isTimelineActive = true;
  8429. }
  8430. });
  8431. api.on.editComponentState((payload) => {
  8432. if (payload.type.startsWith("🍍")) {
  8433. const storeId = payload.type.replace(/^🍍\s*/, "");
  8434. const store2 = pinia2._s.get(storeId);
  8435. if (!store2) {
  8436. return toastMessage(`store "${storeId}" not found`, "error");
  8437. }
  8438. const { path } = payload;
  8439. if (path[0] !== "state") {
  8440. return toastMessage(`Invalid path for store "${storeId}":
  8441. ${path}
  8442. Only state can be modified.`);
  8443. }
  8444. path[0] = "$state";
  8445. isTimelineActive = false;
  8446. payload.set(store2, path, payload.state.value);
  8447. isTimelineActive = true;
  8448. }
  8449. });
  8450. });
  8451. }
  8452. function addStoreToDevtools(app, store2) {
  8453. if (!componentStateTypes.includes(getStoreType(store2.$id))) {
  8454. componentStateTypes.push(getStoreType(store2.$id));
  8455. }
  8456. setupDevtoolsPlugin({
  8457. id: "dev.esm.pinia",
  8458. label: "Pinia 🍍",
  8459. logo: "https://pinia.vuejs.org/logo.svg",
  8460. packageName: "pinia",
  8461. homepage: "https://pinia.vuejs.org",
  8462. componentStateTypes,
  8463. app,
  8464. settings: {
  8465. logStoreChanges: {
  8466. label: "Notify about new/deleted stores",
  8467. type: "boolean",
  8468. defaultValue: true
  8469. }
  8470. // useEmojis: {
  8471. // label: 'Use emojis in messages ⚡️',
  8472. // type: 'boolean',
  8473. // defaultValue: true,
  8474. // },
  8475. }
  8476. }, (api) => {
  8477. const now2 = typeof api.now === "function" ? api.now.bind(api) : Date.now;
  8478. store2.$onAction(({ after, onError, name, args }) => {
  8479. const groupId = runningActionId++;
  8480. api.addTimelineEvent({
  8481. layerId: MUTATIONS_LAYER_ID,
  8482. event: {
  8483. time: now2(),
  8484. title: "🛫 " + name,
  8485. subtitle: "start",
  8486. data: {
  8487. store: formatDisplay(store2.$id),
  8488. action: formatDisplay(name),
  8489. args
  8490. },
  8491. groupId
  8492. }
  8493. });
  8494. after((result) => {
  8495. activeAction = void 0;
  8496. api.addTimelineEvent({
  8497. layerId: MUTATIONS_LAYER_ID,
  8498. event: {
  8499. time: now2(),
  8500. title: "🛬 " + name,
  8501. subtitle: "end",
  8502. data: {
  8503. store: formatDisplay(store2.$id),
  8504. action: formatDisplay(name),
  8505. args,
  8506. result
  8507. },
  8508. groupId
  8509. }
  8510. });
  8511. });
  8512. onError((error2) => {
  8513. activeAction = void 0;
  8514. api.addTimelineEvent({
  8515. layerId: MUTATIONS_LAYER_ID,
  8516. event: {
  8517. time: now2(),
  8518. logType: "error",
  8519. title: "💥 " + name,
  8520. subtitle: "end",
  8521. data: {
  8522. store: formatDisplay(store2.$id),
  8523. action: formatDisplay(name),
  8524. args,
  8525. error: error2
  8526. },
  8527. groupId
  8528. }
  8529. });
  8530. });
  8531. }, true);
  8532. store2._customProperties.forEach((name) => {
  8533. vue.watch(() => vue.unref(store2[name]), (newValue, oldValue) => {
  8534. api.notifyComponentUpdate();
  8535. api.sendInspectorState(INSPECTOR_ID);
  8536. if (isTimelineActive) {
  8537. api.addTimelineEvent({
  8538. layerId: MUTATIONS_LAYER_ID,
  8539. event: {
  8540. time: now2(),
  8541. title: "Change",
  8542. subtitle: name,
  8543. data: {
  8544. newValue,
  8545. oldValue
  8546. },
  8547. groupId: activeAction
  8548. }
  8549. });
  8550. }
  8551. }, { deep: true });
  8552. });
  8553. store2.$subscribe(({ events, type: type2 }, state) => {
  8554. api.notifyComponentUpdate();
  8555. api.sendInspectorState(INSPECTOR_ID);
  8556. if (!isTimelineActive)
  8557. return;
  8558. const eventData = {
  8559. time: now2(),
  8560. title: formatMutationType(type2),
  8561. data: assign$1({ store: formatDisplay(store2.$id) }, formatEventData(events)),
  8562. groupId: activeAction
  8563. };
  8564. if (type2 === MutationType.patchFunction) {
  8565. eventData.subtitle = "⤵️";
  8566. } else if (type2 === MutationType.patchObject) {
  8567. eventData.subtitle = "🧩";
  8568. } else if (events && !Array.isArray(events)) {
  8569. eventData.subtitle = events.type;
  8570. }
  8571. if (events) {
  8572. eventData.data["rawEvent(s)"] = {
  8573. _custom: {
  8574. display: "DebuggerEvent",
  8575. type: "object",
  8576. tooltip: "raw DebuggerEvent[]",
  8577. value: events
  8578. }
  8579. };
  8580. }
  8581. api.addTimelineEvent({
  8582. layerId: MUTATIONS_LAYER_ID,
  8583. event: eventData
  8584. });
  8585. }, { detached: true, flush: "sync" });
  8586. const hotUpdate = store2._hotUpdate;
  8587. store2._hotUpdate = vue.markRaw((newStore) => {
  8588. hotUpdate(newStore);
  8589. api.addTimelineEvent({
  8590. layerId: MUTATIONS_LAYER_ID,
  8591. event: {
  8592. time: now2(),
  8593. title: "🔥 " + store2.$id,
  8594. subtitle: "HMR update",
  8595. data: {
  8596. store: formatDisplay(store2.$id),
  8597. info: formatDisplay(`HMR update`)
  8598. }
  8599. }
  8600. });
  8601. api.notifyComponentUpdate();
  8602. api.sendInspectorTree(INSPECTOR_ID);
  8603. api.sendInspectorState(INSPECTOR_ID);
  8604. });
  8605. const { $dispose } = store2;
  8606. store2.$dispose = () => {
  8607. $dispose();
  8608. api.notifyComponentUpdate();
  8609. api.sendInspectorTree(INSPECTOR_ID);
  8610. api.sendInspectorState(INSPECTOR_ID);
  8611. api.getSettings().logStoreChanges && toastMessage(`Disposed "${store2.$id}" store 🗑`);
  8612. };
  8613. api.notifyComponentUpdate();
  8614. api.sendInspectorTree(INSPECTOR_ID);
  8615. api.sendInspectorState(INSPECTOR_ID);
  8616. api.getSettings().logStoreChanges && toastMessage(`"${store2.$id}" store installed 🆕`);
  8617. });
  8618. }
  8619. let runningActionId = 0;
  8620. let activeAction;
  8621. function patchActionForGrouping(store2, actionNames, wrapWithProxy) {
  8622. const actions = actionNames.reduce((storeActions, actionName) => {
  8623. storeActions[actionName] = vue.toRaw(store2)[actionName];
  8624. return storeActions;
  8625. }, {});
  8626. for (const actionName in actions) {
  8627. store2[actionName] = function() {
  8628. const _actionId = runningActionId;
  8629. const trackedStore = wrapWithProxy ? new Proxy(store2, {
  8630. get(...args) {
  8631. activeAction = _actionId;
  8632. return Reflect.get(...args);
  8633. },
  8634. set(...args) {
  8635. activeAction = _actionId;
  8636. return Reflect.set(...args);
  8637. }
  8638. }) : store2;
  8639. activeAction = _actionId;
  8640. const retValue = actions[actionName].apply(trackedStore, arguments);
  8641. activeAction = void 0;
  8642. return retValue;
  8643. };
  8644. }
  8645. }
  8646. function devtoolsPlugin({ app, store: store2, options }) {
  8647. if (store2.$id.startsWith("__hot:")) {
  8648. return;
  8649. }
  8650. store2._isOptionsAPI = !!options.state;
  8651. patchActionForGrouping(store2, Object.keys(options.actions), store2._isOptionsAPI);
  8652. const originalHotUpdate = store2._hotUpdate;
  8653. vue.toRaw(store2)._hotUpdate = function(newStore) {
  8654. originalHotUpdate.apply(this, arguments);
  8655. patchActionForGrouping(store2, Object.keys(newStore._hmrPayload.actions), !!store2._isOptionsAPI);
  8656. };
  8657. addStoreToDevtools(
  8658. app,
  8659. // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
  8660. store2
  8661. );
  8662. }
  8663. function createPinia() {
  8664. const scope = vue.effectScope(true);
  8665. const state = scope.run(() => vue.ref({}));
  8666. let _p = [];
  8667. let toBeInstalled = [];
  8668. const pinia2 = vue.markRaw({
  8669. install(app) {
  8670. setActivePinia(pinia2);
  8671. {
  8672. pinia2._a = app;
  8673. app.provide(piniaSymbol, pinia2);
  8674. app.config.globalProperties.$pinia = pinia2;
  8675. if (USE_DEVTOOLS) {
  8676. registerPiniaDevtools(app, pinia2);
  8677. }
  8678. toBeInstalled.forEach((plugin) => _p.push(plugin));
  8679. toBeInstalled = [];
  8680. }
  8681. },
  8682. use(plugin) {
  8683. if (!this._a && !isVue2) {
  8684. toBeInstalled.push(plugin);
  8685. } else {
  8686. _p.push(plugin);
  8687. }
  8688. return this;
  8689. },
  8690. _p,
  8691. // it's actually undefined here
  8692. // @ts-expect-error
  8693. _a: null,
  8694. _e: scope,
  8695. _s: /* @__PURE__ */ new Map(),
  8696. state
  8697. });
  8698. if (USE_DEVTOOLS && typeof Proxy !== "undefined") {
  8699. pinia2.use(devtoolsPlugin);
  8700. }
  8701. return pinia2;
  8702. }
  8703. function patchObject(newState, oldState) {
  8704. for (const key in oldState) {
  8705. const subPatch = oldState[key];
  8706. if (!(key in newState)) {
  8707. continue;
  8708. }
  8709. const targetValue = newState[key];
  8710. if (isPlainObject$1(targetValue) && isPlainObject$1(subPatch) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) {
  8711. newState[key] = patchObject(targetValue, subPatch);
  8712. } else {
  8713. {
  8714. newState[key] = subPatch;
  8715. }
  8716. }
  8717. }
  8718. return newState;
  8719. }
  8720. const noop = () => {
  8721. };
  8722. function addSubscription(subscriptions, callback, detached, onCleanup = noop) {
  8723. subscriptions.push(callback);
  8724. const removeSubscription = () => {
  8725. const idx = subscriptions.indexOf(callback);
  8726. if (idx > -1) {
  8727. subscriptions.splice(idx, 1);
  8728. onCleanup();
  8729. }
  8730. };
  8731. if (!detached && vue.getCurrentScope()) {
  8732. vue.onScopeDispose(removeSubscription);
  8733. }
  8734. return removeSubscription;
  8735. }
  8736. function triggerSubscriptions(subscriptions, ...args) {
  8737. subscriptions.slice().forEach((callback) => {
  8738. callback(...args);
  8739. });
  8740. }
  8741. const fallbackRunWithContext = (fn) => fn();
  8742. function mergeReactiveObjects(target, patchToApply) {
  8743. if (target instanceof Map && patchToApply instanceof Map) {
  8744. patchToApply.forEach((value2, key) => target.set(key, value2));
  8745. }
  8746. if (target instanceof Set && patchToApply instanceof Set) {
  8747. patchToApply.forEach(target.add, target);
  8748. }
  8749. for (const key in patchToApply) {
  8750. if (!patchToApply.hasOwnProperty(key))
  8751. continue;
  8752. const subPatch = patchToApply[key];
  8753. const targetValue = target[key];
  8754. if (isPlainObject$1(targetValue) && isPlainObject$1(subPatch) && target.hasOwnProperty(key) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) {
  8755. target[key] = mergeReactiveObjects(targetValue, subPatch);
  8756. } else {
  8757. target[key] = subPatch;
  8758. }
  8759. }
  8760. return target;
  8761. }
  8762. const skipHydrateSymbol = Symbol("pinia:skipHydration");
  8763. function shouldHydrate(obj) {
  8764. return !isPlainObject$1(obj) || !obj.hasOwnProperty(skipHydrateSymbol);
  8765. }
  8766. const { assign } = Object;
  8767. function isComputed(o) {
  8768. return !!(vue.isRef(o) && o.effect);
  8769. }
  8770. function createOptionsStore(id, options, pinia2, hot) {
  8771. const { state, actions, getters } = options;
  8772. const initialState = pinia2.state.value[id];
  8773. let store2;
  8774. function setup() {
  8775. if (!initialState && !hot) {
  8776. {
  8777. pinia2.state.value[id] = state ? state() : {};
  8778. }
  8779. }
  8780. const localState = hot ? (
  8781. // use ref() to unwrap refs inside state TODO: check if this is still necessary
  8782. vue.toRefs(vue.ref(state ? state() : {}).value)
  8783. ) : vue.toRefs(pinia2.state.value[id]);
  8784. return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {
  8785. if (name in localState) {
  8786. console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${name}" in store "${id}".`);
  8787. }
  8788. computedGetters[name] = vue.markRaw(vue.computed(() => {
  8789. setActivePinia(pinia2);
  8790. const store22 = pinia2._s.get(id);
  8791. return getters[name].call(store22, store22);
  8792. }));
  8793. return computedGetters;
  8794. }, {}));
  8795. }
  8796. store2 = createSetupStore(id, setup, options, pinia2, hot, true);
  8797. return store2;
  8798. }
  8799. function createSetupStore($id, setup, options = {}, pinia2, hot, isOptionsStore) {
  8800. let scope;
  8801. const optionsForPlugin = assign({ actions: {} }, options);
  8802. if (!pinia2._e.active) {
  8803. throw new Error("Pinia destroyed");
  8804. }
  8805. const $subscribeOptions = {
  8806. deep: true
  8807. // flush: 'post',
  8808. };
  8809. {
  8810. $subscribeOptions.onTrigger = (event) => {
  8811. if (isListening) {
  8812. debuggerEvents = event;
  8813. } else if (isListening == false && !store2._hotUpdating) {
  8814. if (Array.isArray(debuggerEvents)) {
  8815. debuggerEvents.push(event);
  8816. } else {
  8817. console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.");
  8818. }
  8819. }
  8820. };
  8821. }
  8822. let isListening;
  8823. let isSyncListening;
  8824. let subscriptions = [];
  8825. let actionSubscriptions = [];
  8826. let debuggerEvents;
  8827. const initialState = pinia2.state.value[$id];
  8828. if (!isOptionsStore && !initialState && !hot) {
  8829. {
  8830. pinia2.state.value[$id] = {};
  8831. }
  8832. }
  8833. const hotState = vue.ref({});
  8834. let activeListener;
  8835. function $patch(partialStateOrMutator) {
  8836. let subscriptionMutation;
  8837. isListening = isSyncListening = false;
  8838. {
  8839. debuggerEvents = [];
  8840. }
  8841. if (typeof partialStateOrMutator === "function") {
  8842. partialStateOrMutator(pinia2.state.value[$id]);
  8843. subscriptionMutation = {
  8844. type: MutationType.patchFunction,
  8845. storeId: $id,
  8846. events: debuggerEvents
  8847. };
  8848. } else {
  8849. mergeReactiveObjects(pinia2.state.value[$id], partialStateOrMutator);
  8850. subscriptionMutation = {
  8851. type: MutationType.patchObject,
  8852. payload: partialStateOrMutator,
  8853. storeId: $id,
  8854. events: debuggerEvents
  8855. };
  8856. }
  8857. const myListenerId = activeListener = Symbol();
  8858. vue.nextTick().then(() => {
  8859. if (activeListener === myListenerId) {
  8860. isListening = true;
  8861. }
  8862. });
  8863. isSyncListening = true;
  8864. triggerSubscriptions(subscriptions, subscriptionMutation, pinia2.state.value[$id]);
  8865. }
  8866. const $reset = isOptionsStore ? function $reset2() {
  8867. const { state } = options;
  8868. const newState = state ? state() : {};
  8869. this.$patch(($state) => {
  8870. assign($state, newState);
  8871. });
  8872. } : (
  8873. /* istanbul ignore next */
  8874. () => {
  8875. throw new Error(`🍍: Store "${$id}" is built using the setup syntax and does not implement $reset().`);
  8876. }
  8877. );
  8878. function $dispose() {
  8879. scope.stop();
  8880. subscriptions = [];
  8881. actionSubscriptions = [];
  8882. pinia2._s.delete($id);
  8883. }
  8884. function wrapAction(name, action) {
  8885. return function() {
  8886. setActivePinia(pinia2);
  8887. const args = Array.from(arguments);
  8888. const afterCallbackList = [];
  8889. const onErrorCallbackList = [];
  8890. function after(callback) {
  8891. afterCallbackList.push(callback);
  8892. }
  8893. function onError(callback) {
  8894. onErrorCallbackList.push(callback);
  8895. }
  8896. triggerSubscriptions(actionSubscriptions, {
  8897. args,
  8898. name,
  8899. store: store2,
  8900. after,
  8901. onError
  8902. });
  8903. let ret;
  8904. try {
  8905. ret = action.apply(this && this.$id === $id ? this : store2, args);
  8906. } catch (error2) {
  8907. triggerSubscriptions(onErrorCallbackList, error2);
  8908. throw error2;
  8909. }
  8910. if (ret instanceof Promise) {
  8911. return ret.then((value2) => {
  8912. triggerSubscriptions(afterCallbackList, value2);
  8913. return value2;
  8914. }).catch((error2) => {
  8915. triggerSubscriptions(onErrorCallbackList, error2);
  8916. return Promise.reject(error2);
  8917. });
  8918. }
  8919. triggerSubscriptions(afterCallbackList, ret);
  8920. return ret;
  8921. };
  8922. }
  8923. const _hmrPayload = /* @__PURE__ */ vue.markRaw({
  8924. actions: {},
  8925. getters: {},
  8926. state: [],
  8927. hotState
  8928. });
  8929. const partialStore = {
  8930. _p: pinia2,
  8931. // _s: scope,
  8932. $id,
  8933. $onAction: addSubscription.bind(null, actionSubscriptions),
  8934. $patch,
  8935. $reset,
  8936. $subscribe(callback, options2 = {}) {
  8937. const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());
  8938. const stopWatcher = scope.run(() => vue.watch(() => pinia2.state.value[$id], (state) => {
  8939. if (options2.flush === "sync" ? isSyncListening : isListening) {
  8940. callback({
  8941. storeId: $id,
  8942. type: MutationType.direct,
  8943. events: debuggerEvents
  8944. }, state);
  8945. }
  8946. }, assign({}, $subscribeOptions, options2)));
  8947. return removeSubscription;
  8948. },
  8949. $dispose
  8950. };
  8951. const store2 = vue.reactive(assign(
  8952. {
  8953. _hmrPayload,
  8954. _customProperties: vue.markRaw(/* @__PURE__ */ new Set())
  8955. // devtools custom properties
  8956. },
  8957. partialStore
  8958. // must be added later
  8959. // setupStore
  8960. ));
  8961. pinia2._s.set($id, store2);
  8962. const runWithContext = pinia2._a && pinia2._a.runWithContext || fallbackRunWithContext;
  8963. const setupStore = runWithContext(() => pinia2._e.run(() => (scope = vue.effectScope()).run(setup)));
  8964. for (const key in setupStore) {
  8965. const prop = setupStore[key];
  8966. if (vue.isRef(prop) && !isComputed(prop) || vue.isReactive(prop)) {
  8967. if (hot) {
  8968. set(hotState.value, key, vue.toRef(setupStore, key));
  8969. } else if (!isOptionsStore) {
  8970. if (initialState && shouldHydrate(prop)) {
  8971. if (vue.isRef(prop)) {
  8972. prop.value = initialState[key];
  8973. } else {
  8974. mergeReactiveObjects(prop, initialState[key]);
  8975. }
  8976. }
  8977. {
  8978. pinia2.state.value[$id][key] = prop;
  8979. }
  8980. }
  8981. {
  8982. _hmrPayload.state.push(key);
  8983. }
  8984. } else if (typeof prop === "function") {
  8985. const actionValue = hot ? prop : wrapAction(key, prop);
  8986. {
  8987. setupStore[key] = actionValue;
  8988. }
  8989. {
  8990. _hmrPayload.actions[key] = prop;
  8991. }
  8992. optionsForPlugin.actions[key] = prop;
  8993. } else {
  8994. if (isComputed(prop)) {
  8995. _hmrPayload.getters[key] = isOptionsStore ? (
  8996. // @ts-expect-error
  8997. options.getters[key]
  8998. ) : prop;
  8999. if (IS_CLIENT) {
  9000. const getters = setupStore._getters || // @ts-expect-error: same
  9001. (setupStore._getters = vue.markRaw([]));
  9002. getters.push(key);
  9003. }
  9004. }
  9005. }
  9006. }
  9007. {
  9008. assign(store2, setupStore);
  9009. assign(vue.toRaw(store2), setupStore);
  9010. }
  9011. Object.defineProperty(store2, "$state", {
  9012. get: () => hot ? hotState.value : pinia2.state.value[$id],
  9013. set: (state) => {
  9014. if (hot) {
  9015. throw new Error("cannot set hotState");
  9016. }
  9017. $patch(($state) => {
  9018. assign($state, state);
  9019. });
  9020. }
  9021. });
  9022. {
  9023. store2._hotUpdate = vue.markRaw((newStore) => {
  9024. store2._hotUpdating = true;
  9025. newStore._hmrPayload.state.forEach((stateKey) => {
  9026. if (stateKey in store2.$state) {
  9027. const newStateTarget = newStore.$state[stateKey];
  9028. const oldStateSource = store2.$state[stateKey];
  9029. if (typeof newStateTarget === "object" && isPlainObject$1(newStateTarget) && isPlainObject$1(oldStateSource)) {
  9030. patchObject(newStateTarget, oldStateSource);
  9031. } else {
  9032. newStore.$state[stateKey] = oldStateSource;
  9033. }
  9034. }
  9035. set(store2, stateKey, vue.toRef(newStore.$state, stateKey));
  9036. });
  9037. Object.keys(store2.$state).forEach((stateKey) => {
  9038. if (!(stateKey in newStore.$state)) {
  9039. del(store2, stateKey);
  9040. }
  9041. });
  9042. isListening = false;
  9043. isSyncListening = false;
  9044. pinia2.state.value[$id] = vue.toRef(newStore._hmrPayload, "hotState");
  9045. isSyncListening = true;
  9046. vue.nextTick().then(() => {
  9047. isListening = true;
  9048. });
  9049. for (const actionName in newStore._hmrPayload.actions) {
  9050. const action = newStore[actionName];
  9051. set(store2, actionName, wrapAction(actionName, action));
  9052. }
  9053. for (const getterName in newStore._hmrPayload.getters) {
  9054. const getter = newStore._hmrPayload.getters[getterName];
  9055. const getterValue = isOptionsStore ? (
  9056. // special handling of options api
  9057. vue.computed(() => {
  9058. setActivePinia(pinia2);
  9059. return getter.call(store2, store2);
  9060. })
  9061. ) : getter;
  9062. set(store2, getterName, getterValue);
  9063. }
  9064. Object.keys(store2._hmrPayload.getters).forEach((key) => {
  9065. if (!(key in newStore._hmrPayload.getters)) {
  9066. del(store2, key);
  9067. }
  9068. });
  9069. Object.keys(store2._hmrPayload.actions).forEach((key) => {
  9070. if (!(key in newStore._hmrPayload.actions)) {
  9071. del(store2, key);
  9072. }
  9073. });
  9074. store2._hmrPayload = newStore._hmrPayload;
  9075. store2._getters = newStore._getters;
  9076. store2._hotUpdating = false;
  9077. });
  9078. }
  9079. if (USE_DEVTOOLS) {
  9080. const nonEnumerable = {
  9081. writable: true,
  9082. configurable: true,
  9083. // avoid warning on devtools trying to display this property
  9084. enumerable: false
  9085. };
  9086. ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((p) => {
  9087. Object.defineProperty(store2, p, assign({ value: store2[p] }, nonEnumerable));
  9088. });
  9089. }
  9090. pinia2._p.forEach((extender) => {
  9091. if (USE_DEVTOOLS) {
  9092. const extensions = scope.run(() => extender({
  9093. store: store2,
  9094. app: pinia2._a,
  9095. pinia: pinia2,
  9096. options: optionsForPlugin
  9097. }));
  9098. Object.keys(extensions || {}).forEach((key) => store2._customProperties.add(key));
  9099. assign(store2, extensions);
  9100. } else {
  9101. assign(store2, scope.run(() => extender({
  9102. store: store2,
  9103. app: pinia2._a,
  9104. pinia: pinia2,
  9105. options: optionsForPlugin
  9106. })));
  9107. }
  9108. });
  9109. if (store2.$state && typeof store2.$state === "object" && typeof store2.$state.constructor === "function" && !store2.$state.constructor.toString().includes("[native code]")) {
  9110. console.warn(`[🍍]: The "state" must be a plain object. It cannot be
  9111. state: () => new MyClass()
  9112. Found in store "${store2.$id}".`);
  9113. }
  9114. if (initialState && isOptionsStore && options.hydrate) {
  9115. options.hydrate(store2.$state, initialState);
  9116. }
  9117. isListening = true;
  9118. isSyncListening = true;
  9119. return store2;
  9120. }
  9121. function defineStore(idOrOptions, setup, setupOptions) {
  9122. let id;
  9123. let options;
  9124. const isSetupStore = typeof setup === "function";
  9125. if (typeof idOrOptions === "string") {
  9126. id = idOrOptions;
  9127. options = isSetupStore ? setupOptions : setup;
  9128. } else {
  9129. options = idOrOptions;
  9130. id = idOrOptions.id;
  9131. if (typeof id !== "string") {
  9132. throw new Error(`[🍍]: "defineStore()" must be passed a store id as its first argument.`);
  9133. }
  9134. }
  9135. function useStore2(pinia2, hot) {
  9136. const hasContext = vue.hasInjectionContext();
  9137. pinia2 = // in test mode, ignore the argument provided as we can always retrieve a
  9138. // pinia instance with getActivePinia()
  9139. pinia2 || (hasContext ? vue.inject(piniaSymbol, null) : null);
  9140. if (pinia2)
  9141. setActivePinia(pinia2);
  9142. if (!activePinia) {
  9143. throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
  9144. See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
  9145. This will fail in production.`);
  9146. }
  9147. pinia2 = activePinia;
  9148. if (!pinia2._s.has(id)) {
  9149. if (isSetupStore) {
  9150. createSetupStore(id, setup, options, pinia2);
  9151. } else {
  9152. createOptionsStore(id, options, pinia2);
  9153. }
  9154. {
  9155. useStore2._pinia = pinia2;
  9156. }
  9157. }
  9158. const store2 = pinia2._s.get(id);
  9159. if (hot) {
  9160. const hotId = "__hot:" + id;
  9161. const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia2, true) : createOptionsStore(hotId, assign({}, options), pinia2, true);
  9162. hot._hotUpdate(newStore);
  9163. delete pinia2.state.value[hotId];
  9164. pinia2._s.delete(hotId);
  9165. }
  9166. if (IS_CLIENT) {
  9167. const currentInstance = vue.getCurrentInstance();
  9168. if (currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement
  9169. !hot) {
  9170. const vm = currentInstance.proxy;
  9171. const cache = "_pStores" in vm ? vm._pStores : vm._pStores = {};
  9172. cache[id] = store2;
  9173. }
  9174. }
  9175. return store2;
  9176. }
  9177. useStore2.$id = id;
  9178. return useStore2;
  9179. }
  9180. const useStore = defineStore("user", {
  9181. state: () => ({
  9182. userInfo: {},
  9183. // 用户信息
  9184. token: "",
  9185. // uploadUrl: 'http://192.168.1.3:8080/ai-file/upload/oss', // 上传资源的服务器网址
  9186. uploadUrl: "https://gc.sdzcq.com/prod-api/ai-file/upload/oss"
  9187. // 上传资源的服务器网址
  9188. }),
  9189. getters: {},
  9190. actions: {
  9191. setUserInfo(data) {
  9192. if (data.userId) {
  9193. formatAppLog("log", "at store/uses.js:16", "更新全局的用户信息-也更新本地存储", data);
  9194. this.userInfo = data;
  9195. uni.setStorageSync("userInfo", data);
  9196. } else {
  9197. uni.removeStorageSync("userInfo");
  9198. }
  9199. },
  9200. setToken(token) {
  9201. if (token) {
  9202. formatAppLog("log", "at store/uses.js:25", "更新全局的 token -也更新本地存储", token);
  9203. this.token = token;
  9204. uni.setStorageSync("token", token);
  9205. } else {
  9206. uni.removeStorageSync("token");
  9207. }
  9208. }
  9209. }
  9210. });
  9211. const pinia = createPinia();
  9212. const store = useStore(pinia);
  9213. const _sfc_main$1N = {
  9214. __name: "index",
  9215. props: {
  9216. request: {
  9217. type: Function
  9218. },
  9219. requestStr: {
  9220. type: String
  9221. },
  9222. isRefresh: {
  9223. type: [Number, Boolean],
  9224. default: 0
  9225. },
  9226. height: {
  9227. type: [String, Number]
  9228. },
  9229. total: {
  9230. type: [Number],
  9231. default: 0
  9232. },
  9233. otherParams: {
  9234. type: Object,
  9235. default: () => ({})
  9236. },
  9237. diffHeight: {
  9238. type: Number,
  9239. default: 0
  9240. },
  9241. immediate: {
  9242. type: Boolean,
  9243. default: false
  9244. },
  9245. method: {
  9246. type: String,
  9247. default: "get"
  9248. },
  9249. isUpAutoLoad: {
  9250. type: Boolean,
  9251. default: true
  9252. }
  9253. },
  9254. emits: ["updateList", "update:total"],
  9255. setup(__props, { expose: __expose, emit: __emit }) {
  9256. const {
  9257. mescrollInit,
  9258. downCallback,
  9259. getMescroll
  9260. } = useMescroll();
  9261. const windowHeight = vue.computed(() => {
  9262. return store.clientHeight - props2.diffHeight;
  9263. });
  9264. const emit2 = __emit;
  9265. const props2 = __props;
  9266. const list = vue.ref([]);
  9267. const getList = (mescroll) => {
  9268. return new Promise((resolve, reject) => {
  9269. let params = {
  9270. pageNum: mescroll.num,
  9271. pageSize: mescroll.size,
  9272. ...props2.otherParams
  9273. };
  9274. let methods = props2.method == "post" ? uni.$u.http.post(props2.requestStr, params) : uni.$u.http.get(props2.requestStr, {
  9275. params
  9276. });
  9277. methods.then((res2) => {
  9278. emit2("update:total", res2.total);
  9279. resolve(res2);
  9280. });
  9281. });
  9282. };
  9283. const upCallback = (mescroll) => {
  9284. formatAppLog("log", "at components/pageScroll/index.vue:99", mescroll, "mescroll");
  9285. if (!props2.requestStr)
  9286. return;
  9287. getList(mescroll).then((res2) => {
  9288. const curPageData = res2.rows || res2.data || [];
  9289. if (mescroll.num == 1)
  9290. list.value = [];
  9291. list.value = list.value.concat(curPageData);
  9292. emit2("updateList", list.value, mescroll.num);
  9293. mescroll.endBySize(curPageData.length, res2.total);
  9294. }).catch(() => {
  9295. mescroll.endErr();
  9296. });
  9297. };
  9298. const resetUpScroll = () => {
  9299. setTimeout(() => {
  9300. getMescroll().resetUpScroll();
  9301. }, 100);
  9302. };
  9303. const scroll = (e) => {
  9304. emit2("scroll", e);
  9305. };
  9306. __expose({
  9307. resetUpScroll
  9308. });
  9309. 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() {
  9310. return onShow;
  9311. }, get useMescroll() {
  9312. return useMescroll;
  9313. }, get store() {
  9314. return store;
  9315. } };
  9316. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  9317. return __returned__;
  9318. }
  9319. };
  9320. function _sfc_render$1M(_ctx, _cache, $props, $setup, $data, $options) {
  9321. const _component_mescroll_uni = resolveEasycom(vue.resolveDynamicComponent("mescroll-uni"), __easycom_0$a);
  9322. return vue.openBlock(), vue.createBlock(_component_mescroll_uni, {
  9323. onInit: $setup.mescrollInit,
  9324. onDown: $setup.downCallback,
  9325. onUp: $setup.upCallback,
  9326. height: $props.height || $setup.windowHeight + "px",
  9327. up: { textNoMore: "-- 没有更多了 --", auto: $props.isUpAutoLoad },
  9328. down: { auto: $props.isUpAutoLoad }
  9329. }, {
  9330. default: vue.withCtx(() => [
  9331. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  9332. ]),
  9333. _: 3
  9334. /* FORWARDED */
  9335. }, 8, ["onInit", "onDown", "height", "up", "down"]);
  9336. }
  9337. const pageScroll = /* @__PURE__ */ _export_sfc(_sfc_main$1N, [["render", _sfc_render$1M], ["__scopeId", "data-v-30bc23e1"], ["__file", "E:/书嗨项目/shuhi-app-fornt/components/pageScroll/index.vue"]]);
  9338. const _sfc_main$1M = {
  9339. __name: "index",
  9340. setup(__props, { expose: __expose }) {
  9341. __expose();
  9342. const statusList = vue.ref([
  9343. {
  9344. label: "待初审",
  9345. value: "1361",
  9346. path: "/pages/order/stat/pending-review"
  9347. },
  9348. {
  9349. label: "待拣件",
  9350. value: "1361",
  9351. path: "/pages/order/stat/pending-pick"
  9352. },
  9353. {
  9354. label: "已拣件待签收",
  9355. value: "1361",
  9356. path: "/pages/order/stat/pending-sign"
  9357. },
  9358. {
  9359. label: "待确认收货",
  9360. value: "1361",
  9361. path: "/pages/order/stat/pending-confirm"
  9362. },
  9363. {
  9364. label: "已到货待审核",
  9365. value: "1361",
  9366. path: "/pages/order/stat/pending-audit"
  9367. },
  9368. {
  9369. label: "待付款",
  9370. value: "1361",
  9371. path: "/pages/order/stat/pending-payment"
  9372. }
  9373. ]);
  9374. const navigateToDetail = (path) => {
  9375. uni.navigateTo({
  9376. url: path
  9377. });
  9378. };
  9379. const __returned__ = { statusList, navigateToDetail, PageScroll: pageScroll, ref: vue.ref };
  9380. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  9381. return __returned__;
  9382. }
  9383. };
  9384. function _sfc_render$1L(_ctx, _cache, $props, $setup, $data, $options) {
  9385. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  9386. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  9387. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  9388. return vue.openBlock(), vue.createElementBlock("view", { class: "order-statistics" }, [
  9389. vue.createCommentVNode(" 顶部统计卡片 "),
  9390. vue.createElementVNode("view", { class: "overview-card" }, [
  9391. vue.createElementVNode("view", { class: "overview-grid" }, [
  9392. vue.createElementVNode("view", { class: "grid-item" }, [
  9393. vue.createElementVNode("text", { class: "item-label" }, "今日订单"),
  9394. vue.createElementVNode("text", { class: "item-value" }, "1361")
  9395. ]),
  9396. vue.createElementVNode("view", { class: "grid-item" }, [
  9397. vue.createElementVNode("text", { class: "item-label" }, "昨日订单"),
  9398. vue.createElementVNode("text", { class: "item-value" }, "1361")
  9399. ]),
  9400. vue.createElementVNode("view", { class: "grid-item" }, [
  9401. vue.createElementVNode("text", { class: "item-label" }, "本月订单"),
  9402. vue.createElementVNode("text", { class: "item-value" }, [
  9403. vue.createTextVNode("2.77"),
  9404. vue.createElementVNode("text", { class: "unit" }, "万")
  9405. ])
  9406. ])
  9407. ])
  9408. ]),
  9409. vue.createCommentVNode(" 订单状态网格 "),
  9410. vue.createElementVNode("view", { class: "status-grid" }, [
  9411. (vue.openBlock(true), vue.createElementBlock(
  9412. vue.Fragment,
  9413. null,
  9414. vue.renderList($setup.statusList, (item, index2) => {
  9415. return vue.openBlock(), vue.createElementBlock("view", {
  9416. key: index2,
  9417. class: "status-item",
  9418. onClick: ($event) => $setup.navigateToDetail(item.path)
  9419. }, [
  9420. vue.createElementVNode("view", { class: "status-content" }, [
  9421. vue.createElementVNode(
  9422. "text",
  9423. { class: "status-label" },
  9424. vue.toDisplayString(item.label),
  9425. 1
  9426. /* TEXT */
  9427. ),
  9428. vue.createElementVNode("view", { class: "status-value-wrap" }, [
  9429. vue.createElementVNode(
  9430. "text",
  9431. { class: "status-value" },
  9432. vue.toDisplayString(item.value),
  9433. 1
  9434. /* TEXT */
  9435. ),
  9436. vue.createVNode(_component_u_icon, {
  9437. name: "arrow-right",
  9438. color: "#999",
  9439. size: "14"
  9440. })
  9441. ])
  9442. ])
  9443. ], 8, ["onClick"]);
  9444. }),
  9445. 128
  9446. /* KEYED_FRAGMENT */
  9447. ))
  9448. ]),
  9449. vue.createCommentVNode(" 底部操作项 "),
  9450. vue.createElementVNode("view", { class: "bottom-actions" }, [
  9451. vue.createVNode(_component_u_cell_group, { border: false }, {
  9452. default: vue.withCtx(() => [
  9453. vue.createVNode(_component_u_cell, {
  9454. title: "收货统计",
  9455. isLink: "",
  9456. onClick: _cache[0] || (_cache[0] = ($event) => $setup.navigateToDetail("/pages/statistics/receive"))
  9457. }),
  9458. vue.createVNode(_component_u_cell, {
  9459. title: "全部订单",
  9460. isLink: "",
  9461. onClick: _cache[1] || (_cache[1] = ($event) => $setup.navigateToDetail("/pages/order/stat/all")),
  9462. border: false
  9463. })
  9464. ]),
  9465. _: 1
  9466. /* STABLE */
  9467. })
  9468. ])
  9469. ]);
  9470. }
  9471. const PagesOrderIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1M, [["render", _sfc_render$1L], ["__scopeId", "data-v-17a44f9d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/index.vue"]]);
  9472. const props$r = {
  9473. props: {
  9474. // 搜索框形状,round-圆形,square-方形
  9475. shape: {
  9476. type: String,
  9477. default: props$E.search.shape
  9478. },
  9479. // 搜索框背景色,默认值#f2f2f2
  9480. bgColor: {
  9481. type: String,
  9482. default: props$E.search.bgColor
  9483. },
  9484. // 占位提示文字
  9485. placeholder: {
  9486. type: String,
  9487. default: props$E.search.placeholder
  9488. },
  9489. // 是否启用清除控件
  9490. clearabled: {
  9491. type: Boolean,
  9492. default: props$E.search.clearabled
  9493. },
  9494. // 是否自动聚焦
  9495. focus: {
  9496. type: Boolean,
  9497. default: props$E.search.focus
  9498. },
  9499. // 是否在搜索框右侧显示取消按钮
  9500. showAction: {
  9501. type: Boolean,
  9502. default: props$E.search.showAction
  9503. },
  9504. // 右边控件的样式
  9505. actionStyle: {
  9506. type: Object,
  9507. default: props$E.search.actionStyle
  9508. },
  9509. // 取消按钮文字
  9510. actionText: {
  9511. type: String,
  9512. default: props$E.search.actionText
  9513. },
  9514. // 输入框内容对齐方式,可选值为 left|center|right
  9515. inputAlign: {
  9516. type: String,
  9517. default: props$E.search.inputAlign
  9518. },
  9519. // input输入框的样式,可以定义文字颜色,大小等,对象形式
  9520. inputStyle: {
  9521. type: Object,
  9522. default: props$E.search.inputStyle
  9523. },
  9524. // 是否启用输入框
  9525. disabled: {
  9526. type: Boolean,
  9527. default: props$E.search.disabled
  9528. },
  9529. // 边框颜色
  9530. borderColor: {
  9531. type: String,
  9532. default: props$E.search.borderColor
  9533. },
  9534. // 搜索图标的颜色,默认同输入框字体颜色
  9535. searchIconColor: {
  9536. type: String,
  9537. default: props$E.search.searchIconColor
  9538. },
  9539. // 输入框字体颜色
  9540. color: {
  9541. type: String,
  9542. default: props$E.search.color
  9543. },
  9544. // placeholder的颜色
  9545. placeholderColor: {
  9546. type: String,
  9547. default: props$E.search.placeholderColor
  9548. },
  9549. // 左边输入框的图标,可以为uView图标名称或图片路径
  9550. searchIcon: {
  9551. type: String,
  9552. default: props$E.search.searchIcon
  9553. },
  9554. searchIconSize: {
  9555. type: [Number, String],
  9556. default: props$E.search.searchIconSize
  9557. },
  9558. // 组件与其他上下左右元素之间的距离,带单位的字符串形式,如"30px"、"30px 20px"等写法
  9559. margin: {
  9560. type: String,
  9561. default: props$E.search.margin
  9562. },
  9563. // 开启showAction时,是否在input获取焦点时才显示
  9564. animation: {
  9565. type: Boolean,
  9566. default: props$E.search.animation
  9567. },
  9568. // 输入框的初始化内容
  9569. modelValue: {
  9570. type: String,
  9571. default: props$E.search.value
  9572. },
  9573. value: {
  9574. type: String,
  9575. default: props$E.search.value
  9576. },
  9577. // 输入框最大能输入的长度,-1为不限制长度(来自uniapp文档)
  9578. maxlength: {
  9579. type: [String, Number],
  9580. default: props$E.search.maxlength
  9581. },
  9582. // 搜索框高度,单位px
  9583. height: {
  9584. type: [String, Number],
  9585. default: props$E.search.height
  9586. },
  9587. // 搜索框左侧文本
  9588. label: {
  9589. type: [String, Number, null],
  9590. default: props$E.search.label
  9591. }
  9592. }
  9593. };
  9594. const _sfc_main$1L = {
  9595. name: "u-search",
  9596. mixins: [mpMixin, mixin, props$r],
  9597. data() {
  9598. return {
  9599. keyword: "",
  9600. showClear: false,
  9601. // 是否显示右边的清除图标
  9602. show: false,
  9603. // 标记input当前状态是否处于聚焦中,如果是,才会显示右侧的清除控件
  9604. focused: this.focus
  9605. // 绑定输入框的值
  9606. // inputValue: this.value
  9607. };
  9608. },
  9609. watch: {
  9610. keyword(nVal) {
  9611. this.$emit("update:modelValue", nVal);
  9612. this.$emit("change", nVal);
  9613. },
  9614. modelValue: {
  9615. immediate: true,
  9616. handler(nVal) {
  9617. this.keyword = nVal;
  9618. }
  9619. }
  9620. },
  9621. computed: {
  9622. showActionBtn() {
  9623. return !this.animation && this.showAction;
  9624. }
  9625. },
  9626. emits: ["clear", "search", "custom", "focus", "blur", "click", "clickIcon", "update:modelValue", "change"],
  9627. methods: {
  9628. // 目前HX2.6.9 v-model双向绑定无效,故监听input事件获取输入框内容的变化
  9629. inputChange(e) {
  9630. this.keyword = e.detail.value;
  9631. },
  9632. // 清空输入
  9633. // 也可以作为用户通过this.$refs形式调用清空输入框内容
  9634. clear() {
  9635. this.keyword = "";
  9636. this.$nextTick(() => {
  9637. this.$emit("clear");
  9638. });
  9639. },
  9640. // 确定搜索
  9641. search(e) {
  9642. this.$emit("search", e.detail.value);
  9643. try {
  9644. uni.hideKeyboard();
  9645. } catch (e2) {
  9646. }
  9647. },
  9648. // 点击右边自定义按钮的事件
  9649. custom() {
  9650. this.$emit("custom", this.keyword);
  9651. try {
  9652. uni.hideKeyboard();
  9653. } catch (e) {
  9654. }
  9655. },
  9656. // 获取焦点
  9657. getFocus() {
  9658. this.focused = true;
  9659. if (this.animation && this.showAction)
  9660. this.show = true;
  9661. this.$emit("focus", this.keyword);
  9662. },
  9663. // 失去焦点
  9664. blur() {
  9665. setTimeout(() => {
  9666. this.focused = false;
  9667. }, 100);
  9668. this.show = false;
  9669. this.$emit("blur", this.keyword);
  9670. },
  9671. // 点击搜索框,只有disabled=true时才发出事件,因为禁止了输入,意味着是想跳转真正的搜索页
  9672. clickHandler() {
  9673. if (this.disabled)
  9674. this.$emit("click");
  9675. },
  9676. // 点击左边图标
  9677. clickIcon() {
  9678. this.$emit("clickIcon");
  9679. }
  9680. }
  9681. };
  9682. function _sfc_render$1K(_ctx, _cache, $props, $setup, $data, $options) {
  9683. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  9684. return vue.openBlock(), vue.createElementBlock(
  9685. "view",
  9686. {
  9687. class: "u-search",
  9688. onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args)),
  9689. style: vue.normalizeStyle([{
  9690. margin: _ctx.margin
  9691. }, _ctx.$u.addStyle(_ctx.customStyle)])
  9692. },
  9693. [
  9694. vue.createElementVNode(
  9695. "view",
  9696. {
  9697. class: "u-search__content",
  9698. style: vue.normalizeStyle({
  9699. backgroundColor: _ctx.bgColor,
  9700. borderRadius: _ctx.shape == "round" ? "100px" : "4px",
  9701. borderColor: _ctx.borderColor
  9702. })
  9703. },
  9704. [
  9705. _ctx.$slots.label || _ctx.label !== null ? vue.renderSlot(_ctx.$slots, "label", { key: 0 }, () => [
  9706. vue.createElementVNode(
  9707. "text",
  9708. { class: "u-search__content__label" },
  9709. vue.toDisplayString(_ctx.label),
  9710. 1
  9711. /* TEXT */
  9712. )
  9713. ], true) : vue.createCommentVNode("v-if", true),
  9714. vue.createElementVNode("view", { class: "u-search__content__icon" }, [
  9715. vue.createVNode(_component_u_icon, {
  9716. onClick: $options.clickIcon,
  9717. size: _ctx.searchIconSize,
  9718. name: _ctx.searchIcon,
  9719. color: _ctx.searchIconColor ? _ctx.searchIconColor : _ctx.color
  9720. }, null, 8, ["onClick", "size", "name", "color"])
  9721. ]),
  9722. vue.createElementVNode("input", {
  9723. "confirm-type": "search",
  9724. onBlur: _cache[0] || (_cache[0] = (...args) => $options.blur && $options.blur(...args)),
  9725. value: $data.keyword,
  9726. onConfirm: _cache[1] || (_cache[1] = (...args) => $options.search && $options.search(...args)),
  9727. onInput: _cache[2] || (_cache[2] = (...args) => $options.inputChange && $options.inputChange(...args)),
  9728. disabled: _ctx.disabled,
  9729. onFocus: _cache[3] || (_cache[3] = (...args) => $options.getFocus && $options.getFocus(...args)),
  9730. focus: _ctx.focus,
  9731. maxlength: _ctx.maxlength,
  9732. "placeholder-class": "u-search__content__input--placeholder",
  9733. placeholder: _ctx.placeholder,
  9734. "placeholder-style": `color: ${_ctx.placeholderColor}`,
  9735. class: "u-search__content__input",
  9736. type: "text",
  9737. style: vue.normalizeStyle([{
  9738. textAlign: _ctx.inputAlign,
  9739. color: _ctx.color,
  9740. backgroundColor: _ctx.bgColor,
  9741. height: _ctx.$u.addUnit(_ctx.height)
  9742. }, _ctx.inputStyle])
  9743. }, null, 44, ["value", "disabled", "focus", "maxlength", "placeholder", "placeholder-style"]),
  9744. $data.keyword && _ctx.clearabled && $data.focused ? (vue.openBlock(), vue.createElementBlock("view", {
  9745. key: 1,
  9746. class: "u-search__content__icon u-search__content__close",
  9747. onClick: _cache[4] || (_cache[4] = (...args) => $options.clear && $options.clear(...args))
  9748. }, [
  9749. vue.createVNode(_component_u_icon, {
  9750. name: "close",
  9751. size: "11",
  9752. color: "#ffffff",
  9753. customStyle: "line-height: 12px"
  9754. })
  9755. ])) : vue.createCommentVNode("v-if", true)
  9756. ],
  9757. 4
  9758. /* STYLE */
  9759. ),
  9760. vue.createElementVNode(
  9761. "text",
  9762. {
  9763. style: vue.normalizeStyle([_ctx.actionStyle]),
  9764. class: vue.normalizeClass(["u-search__action", [($options.showActionBtn || $data.show) && "u-search__action--active"]]),
  9765. onClick: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.custom && $options.custom(...args), ["stop", "prevent"]))
  9766. },
  9767. vue.toDisplayString(_ctx.actionText),
  9768. 7
  9769. /* TEXT, CLASS, STYLE */
  9770. )
  9771. ],
  9772. 4
  9773. /* STYLE */
  9774. );
  9775. }
  9776. const __easycom_4$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1L, [["render", _sfc_render$1K], ["__scopeId", "data-v-e082a34a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-search/u-search.vue"]]);
  9777. const props$q = {
  9778. props: {
  9779. // 是否展示组件
  9780. show: {
  9781. type: Boolean,
  9782. default: props$E.transition.show
  9783. },
  9784. // 使用的动画模式
  9785. mode: {
  9786. type: String,
  9787. default: props$E.transition.mode
  9788. },
  9789. // 动画的执行时间,单位ms
  9790. duration: {
  9791. type: [String, Number],
  9792. default: props$E.transition.duration
  9793. },
  9794. // 使用的动画过渡函数
  9795. timingFunction: {
  9796. type: String,
  9797. default: props$E.transition.timingFunction
  9798. }
  9799. }
  9800. };
  9801. const getClassNames = (name) => ({
  9802. enter: `u-${name}-enter u-${name}-enter-active`,
  9803. "enter-to": `u-${name}-enter-to u-${name}-enter-active`,
  9804. leave: `u-${name}-leave u-${name}-leave-active`,
  9805. "leave-to": `u-${name}-leave-to u-${name}-leave-active`
  9806. });
  9807. const transition = {
  9808. methods: {
  9809. // 组件被点击发出事件
  9810. clickHandler() {
  9811. this.$emit("click");
  9812. },
  9813. // vue版本的组件进场处理
  9814. vueEnter() {
  9815. const classNames = getClassNames(this.mode);
  9816. this.status = "enter";
  9817. this.$emit("beforeEnter");
  9818. this.inited = true;
  9819. this.display = true;
  9820. this.classes = classNames.enter;
  9821. this.$nextTick(async () => {
  9822. this.$emit("enter");
  9823. this.transitionEnded = false;
  9824. this.$emit("afterEnter");
  9825. this.classes = classNames["enter-to"];
  9826. });
  9827. },
  9828. // 动画离场处理
  9829. vueLeave() {
  9830. if (!this.display)
  9831. return;
  9832. const classNames = getClassNames(this.mode);
  9833. this.status = "leave";
  9834. this.$emit("beforeLeave");
  9835. this.classes = classNames.leave;
  9836. this.$nextTick(() => {
  9837. this.transitionEnded = false;
  9838. this.$emit("leave");
  9839. setTimeout(this.onTransitionEnd, this.duration);
  9840. this.classes = classNames["leave-to"];
  9841. });
  9842. },
  9843. // 完成过渡后触发
  9844. onTransitionEnd() {
  9845. if (this.transitionEnded)
  9846. return;
  9847. this.transitionEnded = true;
  9848. this.$emit(this.status === "leave" ? "afterLeave" : "afterEnter");
  9849. if (!this.show && this.display) {
  9850. this.display = false;
  9851. this.inited = false;
  9852. }
  9853. }
  9854. }
  9855. };
  9856. const _sfc_main$1K = {
  9857. name: "u-transition",
  9858. data() {
  9859. return {
  9860. inited: false,
  9861. // 是否显示/隐藏组件
  9862. viewStyle: {},
  9863. // 组件内部的样式
  9864. status: "",
  9865. // 记录组件动画的状态
  9866. transitionEnded: false,
  9867. // 组件是否结束的标记
  9868. display: false,
  9869. // 组件是否展示
  9870. classes: ""
  9871. // 应用的类名
  9872. };
  9873. },
  9874. computed: {
  9875. mergeStyle() {
  9876. const { viewStyle, customStyle } = this;
  9877. return {
  9878. transitionDuration: `${this.duration}ms`,
  9879. // display: `${this.display ? '' : 'none'}`,
  9880. transitionTimingFunction: this.timingFunction,
  9881. // 避免自定义样式影响到动画属性,所以写在viewStyle前面
  9882. ...uni.$u.addStyle(customStyle),
  9883. ...viewStyle
  9884. };
  9885. }
  9886. },
  9887. // 将mixin挂在到组件中,uni.$u.mixin实际上为一个vue格式对象
  9888. mixins: [mpMixin, mixin, transition, props$q],
  9889. watch: {
  9890. show: {
  9891. handler(newVal) {
  9892. newVal ? this.vueEnter() : this.vueLeave();
  9893. },
  9894. // 表示同时监听初始化时的props的show的意思
  9895. immediate: true
  9896. }
  9897. }
  9898. };
  9899. function _sfc_render$1J(_ctx, _cache, $props, $setup, $data, $options) {
  9900. return $data.inited ? (vue.openBlock(), vue.createElementBlock(
  9901. "view",
  9902. {
  9903. key: 0,
  9904. class: vue.normalizeClass(["u-transition", $data.classes]),
  9905. ref: "u-transition",
  9906. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clickHandler && _ctx.clickHandler(...args)),
  9907. style: vue.normalizeStyle([$options.mergeStyle]),
  9908. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.noop && _ctx.noop(...args))
  9909. },
  9910. [
  9911. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  9912. ],
  9913. 38
  9914. /* CLASS, STYLE, NEED_HYDRATION */
  9915. )) : vue.createCommentVNode("v-if", true);
  9916. }
  9917. const __easycom_1$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1K, [["render", _sfc_render$1J], ["__scopeId", "data-v-5cec8177"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-transition/u-transition.vue"]]);
  9918. const props$p = {
  9919. props: {
  9920. // 是否显示遮罩
  9921. show: {
  9922. type: Boolean,
  9923. default: props$E.overlay.show
  9924. },
  9925. // 层级z-index
  9926. zIndex: {
  9927. type: [String, Number],
  9928. default: props$E.overlay.zIndex
  9929. },
  9930. // 遮罩的过渡时间,单位为ms
  9931. duration: {
  9932. type: [String, Number],
  9933. default: props$E.overlay.duration
  9934. },
  9935. // 不透明度值,当做rgba的第四个参数
  9936. opacity: {
  9937. type: [String, Number],
  9938. default: props$E.overlay.opacity
  9939. }
  9940. }
  9941. };
  9942. const _sfc_main$1J = {
  9943. name: "u-overlay",
  9944. mixins: [mpMixin, mixin, props$p],
  9945. computed: {
  9946. overlayStyle() {
  9947. const style = {
  9948. position: "fixed",
  9949. top: 0,
  9950. left: 0,
  9951. right: 0,
  9952. zIndex: this.zIndex,
  9953. bottom: 0,
  9954. "background-color": `rgba(0, 0, 0, ${this.opacity})`
  9955. };
  9956. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  9957. }
  9958. },
  9959. methods: {
  9960. clickHandler() {
  9961. this.$emit("click");
  9962. }
  9963. }
  9964. };
  9965. function _sfc_render$1I(_ctx, _cache, $props, $setup, $data, $options) {
  9966. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
  9967. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  9968. show: _ctx.show,
  9969. "custom-class": "u-overlay",
  9970. duration: _ctx.duration,
  9971. "custom-style": $options.overlayStyle,
  9972. onClick: $options.clickHandler
  9973. }, {
  9974. default: vue.withCtx(() => [
  9975. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  9976. ]),
  9977. _: 3
  9978. /* FORWARDED */
  9979. }, 8, ["show", "duration", "custom-style", "onClick"]);
  9980. }
  9981. const __easycom_0$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1J, [["render", _sfc_render$1I], ["__scopeId", "data-v-9112bed9"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-overlay/u-overlay.vue"]]);
  9982. const props$o = {
  9983. props: {
  9984. bgColor: {
  9985. type: String,
  9986. default: props$E.statusBar.bgColor
  9987. }
  9988. }
  9989. };
  9990. const _sfc_main$1I = {
  9991. name: "u-status-bar",
  9992. mixins: [mpMixin, mixin, props$o],
  9993. data() {
  9994. return {};
  9995. },
  9996. computed: {
  9997. style() {
  9998. const style = {};
  9999. style.height = uni.$u.addUnit(uni.$u.sys().statusBarHeight, "px");
  10000. style.backgroundColor = this.bgColor;
  10001. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  10002. }
  10003. }
  10004. };
  10005. function _sfc_render$1H(_ctx, _cache, $props, $setup, $data, $options) {
  10006. return vue.openBlock(), vue.createElementBlock(
  10007. "view",
  10008. {
  10009. style: vue.normalizeStyle([$options.style]),
  10010. class: "u-status-bar"
  10011. },
  10012. [
  10013. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  10014. ],
  10015. 4
  10016. /* STYLE */
  10017. );
  10018. }
  10019. const __easycom_0$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1I, [["render", _sfc_render$1H], ["__scopeId", "data-v-eb8e0cdd"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-status-bar/u-status-bar.vue"]]);
  10020. const props$n = {
  10021. props: {}
  10022. };
  10023. const _sfc_main$1H = {
  10024. name: "u-safe-bottom",
  10025. mixins: [mpMixin, mixin, props$n],
  10026. data() {
  10027. return {
  10028. safeAreaBottomHeight: 0,
  10029. isNvue: false
  10030. };
  10031. },
  10032. computed: {
  10033. style() {
  10034. const style = {};
  10035. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  10036. }
  10037. },
  10038. mounted() {
  10039. }
  10040. };
  10041. function _sfc_render$1G(_ctx, _cache, $props, $setup, $data, $options) {
  10042. return vue.openBlock(), vue.createElementBlock(
  10043. "view",
  10044. {
  10045. class: vue.normalizeClass(["u-safe-bottom", [!$data.isNvue && "u-safe-area-inset-bottom"]]),
  10046. style: vue.normalizeStyle([$options.style])
  10047. },
  10048. null,
  10049. 6
  10050. /* CLASS, STYLE */
  10051. );
  10052. }
  10053. const __easycom_3$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1H, [["render", _sfc_render$1G], ["__scopeId", "data-v-f3d22cfe"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.vue"]]);
  10054. const props$m = {
  10055. props: {
  10056. // 是否展示弹窗
  10057. show: {
  10058. type: Boolean,
  10059. default: props$E.popup.show
  10060. },
  10061. // 是否显示遮罩
  10062. overlay: {
  10063. type: Boolean,
  10064. default: props$E.popup.overlay
  10065. },
  10066. // 弹出的方向,可选值为 top bottom right left center
  10067. mode: {
  10068. type: String,
  10069. default: props$E.popup.mode
  10070. },
  10071. // 动画时长,单位ms
  10072. duration: {
  10073. type: [String, Number],
  10074. default: props$E.popup.duration
  10075. },
  10076. // 是否显示关闭图标
  10077. closeable: {
  10078. type: Boolean,
  10079. default: props$E.popup.closeable
  10080. },
  10081. // 自定义遮罩的样式
  10082. overlayStyle: {
  10083. type: [Object, String],
  10084. default: props$E.popup.overlayStyle
  10085. },
  10086. // 点击遮罩是否关闭弹窗
  10087. closeOnClickOverlay: {
  10088. type: Boolean,
  10089. default: props$E.popup.closeOnClickOverlay
  10090. },
  10091. // 层级
  10092. zIndex: {
  10093. type: [String, Number],
  10094. default: props$E.popup.zIndex
  10095. },
  10096. // 是否为iPhoneX留出底部安全距离
  10097. safeAreaInsetBottom: {
  10098. type: Boolean,
  10099. default: props$E.popup.safeAreaInsetBottom
  10100. },
  10101. // 是否留出顶部安全距离(状态栏高度)
  10102. safeAreaInsetTop: {
  10103. type: Boolean,
  10104. default: props$E.popup.safeAreaInsetTop
  10105. },
  10106. // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角
  10107. closeIconPos: {
  10108. type: String,
  10109. default: props$E.popup.closeIconPos
  10110. },
  10111. // 是否显示圆角
  10112. round: {
  10113. type: [Boolean, String, Number],
  10114. default: props$E.popup.round
  10115. },
  10116. // mode=center,也即中部弹出时,是否使用缩放模式
  10117. zoom: {
  10118. type: Boolean,
  10119. default: props$E.popup.zoom
  10120. },
  10121. // 弹窗背景色,设置为transparent可去除白色背景
  10122. bgColor: {
  10123. type: String,
  10124. default: props$E.popup.bgColor
  10125. },
  10126. // 遮罩的透明度,0-1之间
  10127. overlayOpacity: {
  10128. type: [Number, String],
  10129. default: props$E.popup.overlayOpacity
  10130. }
  10131. }
  10132. };
  10133. const _sfc_main$1G = {
  10134. name: "u-popup",
  10135. mixins: [mpMixin, mixin, props$m],
  10136. data() {
  10137. return {
  10138. overlayDuration: this.duration + 50
  10139. };
  10140. },
  10141. watch: {
  10142. show(newValue, oldValue) {
  10143. }
  10144. },
  10145. computed: {
  10146. transitionStyle() {
  10147. const style = {
  10148. zIndex: this.zIndex,
  10149. position: "fixed",
  10150. display: "flex"
  10151. };
  10152. style[this.mode] = 0;
  10153. if (this.mode === "left") {
  10154. return uni.$u.deepMerge(style, {
  10155. bottom: 0,
  10156. top: 0
  10157. });
  10158. } else if (this.mode === "right") {
  10159. return uni.$u.deepMerge(style, {
  10160. bottom: 0,
  10161. top: 0
  10162. });
  10163. } else if (this.mode === "top") {
  10164. return uni.$u.deepMerge(style, {
  10165. left: 0,
  10166. right: 0
  10167. });
  10168. } else if (this.mode === "bottom") {
  10169. return uni.$u.deepMerge(style, {
  10170. left: 0,
  10171. right: 0
  10172. });
  10173. } else if (this.mode === "center") {
  10174. return uni.$u.deepMerge(style, {
  10175. alignItems: "center",
  10176. "justify-content": "center",
  10177. top: 0,
  10178. left: 0,
  10179. right: 0,
  10180. bottom: 0
  10181. });
  10182. }
  10183. },
  10184. contentStyle() {
  10185. const style = {};
  10186. uni.$u.sys();
  10187. if (this.mode !== "center") {
  10188. style.flex = 1;
  10189. }
  10190. if (this.bgColor) {
  10191. style.backgroundColor = this.bgColor;
  10192. }
  10193. if (this.round) {
  10194. const value2 = uni.$u.addUnit(this.round);
  10195. if (this.mode === "top") {
  10196. style.borderBottomLeftRadius = value2;
  10197. style.borderBottomRightRadius = value2;
  10198. } else if (this.mode === "bottom") {
  10199. style.borderTopLeftRadius = value2;
  10200. style.borderTopRightRadius = value2;
  10201. } else if (this.mode === "center") {
  10202. style.borderRadius = value2;
  10203. }
  10204. }
  10205. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  10206. },
  10207. position() {
  10208. if (this.mode === "center") {
  10209. return this.zoom ? "fade-zoom" : "fade";
  10210. }
  10211. if (this.mode === "left") {
  10212. return "slide-left";
  10213. }
  10214. if (this.mode === "right") {
  10215. return "slide-right";
  10216. }
  10217. if (this.mode === "bottom") {
  10218. return "slide-up";
  10219. }
  10220. if (this.mode === "top") {
  10221. return "slide-down";
  10222. }
  10223. }
  10224. },
  10225. methods: {
  10226. // 点击遮罩
  10227. overlayClick() {
  10228. if (this.closeOnClickOverlay) {
  10229. this.$emit("close");
  10230. }
  10231. },
  10232. close(e) {
  10233. this.$emit("close");
  10234. },
  10235. afterEnter() {
  10236. this.$emit("open");
  10237. },
  10238. clickHandler() {
  10239. if (this.mode === "center") {
  10240. this.overlayClick();
  10241. }
  10242. this.$emit("click");
  10243. }
  10244. }
  10245. };
  10246. function _sfc_render$1F(_ctx, _cache, $props, $setup, $data, $options) {
  10247. const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$9);
  10248. const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$8);
  10249. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  10250. const _component_u_safe_bottom = resolveEasycom(vue.resolveDynamicComponent("u-safe-bottom"), __easycom_3$4);
  10251. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
  10252. return vue.openBlock(), vue.createElementBlock("view", { class: "u-popup" }, [
  10253. _ctx.overlay ? (vue.openBlock(), vue.createBlock(_component_u_overlay, {
  10254. key: 0,
  10255. show: _ctx.show,
  10256. onClick: $options.overlayClick,
  10257. duration: $data.overlayDuration,
  10258. customStyle: _ctx.overlayStyle,
  10259. opacity: _ctx.overlayOpacity
  10260. }, null, 8, ["show", "onClick", "duration", "customStyle", "opacity"])) : vue.createCommentVNode("v-if", true),
  10261. vue.createVNode(_component_u_transition, {
  10262. show: _ctx.show,
  10263. customStyle: $options.transitionStyle,
  10264. mode: $options.position,
  10265. duration: _ctx.duration,
  10266. onAfterEnter: $options.afterEnter,
  10267. onClick: $options.clickHandler
  10268. }, {
  10269. default: vue.withCtx(() => [
  10270. vue.createElementVNode(
  10271. "view",
  10272. {
  10273. class: "u-popup__content",
  10274. style: vue.normalizeStyle([$options.contentStyle]),
  10275. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop"]))
  10276. },
  10277. [
  10278. _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true),
  10279. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  10280. _ctx.closeable ? (vue.openBlock(), vue.createElementBlock(
  10281. "view",
  10282. {
  10283. key: 1,
  10284. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.close && $options.close(...args), ["stop"])),
  10285. class: vue.normalizeClass(["u-popup__content__close", ["u-popup__content__close--" + _ctx.closeIconPos]]),
  10286. "hover-class": "u-popup__content__close--hover",
  10287. "hover-stay-time": "150"
  10288. },
  10289. [
  10290. vue.createVNode(_component_u_icon, {
  10291. name: "close",
  10292. color: "#909399",
  10293. size: "18",
  10294. bold: ""
  10295. })
  10296. ],
  10297. 2
  10298. /* CLASS */
  10299. )) : vue.createCommentVNode("v-if", true),
  10300. _ctx.safeAreaInsetBottom ? (vue.openBlock(), vue.createBlock(_component_u_safe_bottom, { key: 2 })) : vue.createCommentVNode("v-if", true)
  10301. ],
  10302. 4
  10303. /* STYLE */
  10304. )
  10305. ]),
  10306. _: 3
  10307. /* FORWARDED */
  10308. }, 8, ["show", "customStyle", "mode", "duration", "onAfterEnter", "onClick"])
  10309. ]);
  10310. }
  10311. const __easycom_7 = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["render", _sfc_render$1F], ["__scopeId", "data-v-05c24e9b"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-popup/u-popup.vue"]]);
  10312. function pickExclude(obj, keys) {
  10313. if (!["[object Object]", "[object File]"].includes(Object.prototype.toString.call(obj))) {
  10314. return {};
  10315. }
  10316. return Object.keys(obj).reduce((prev, key) => {
  10317. if (!keys.includes(key)) {
  10318. prev[key] = obj[key];
  10319. }
  10320. return prev;
  10321. }, {});
  10322. }
  10323. function formatImage(res2) {
  10324. return res2.tempFiles.map((item) => ({
  10325. ...pickExclude(item, ["path"]),
  10326. type: "image",
  10327. url: item.path,
  10328. thumb: item.path,
  10329. size: item.size
  10330. }));
  10331. }
  10332. function formatVideo(res2) {
  10333. return [
  10334. {
  10335. ...pickExclude(res2, ["tempFilePath", "thumbTempFilePath", "errMsg"]),
  10336. type: "video",
  10337. url: res2.tempFilePath,
  10338. thumb: res2.thumbTempFilePath,
  10339. size: res2.size
  10340. }
  10341. ];
  10342. }
  10343. function chooseFile({
  10344. accept,
  10345. multiple,
  10346. capture,
  10347. compressed,
  10348. maxDuration,
  10349. sizeType,
  10350. camera,
  10351. maxCount
  10352. }) {
  10353. return new Promise((resolve, reject) => {
  10354. switch (accept) {
  10355. case "image":
  10356. uni.chooseImage({
  10357. count: multiple ? Math.min(maxCount, 9) : 1,
  10358. sourceType: capture,
  10359. sizeType,
  10360. success: (res2) => resolve(formatImage(res2)),
  10361. fail: reject
  10362. });
  10363. break;
  10364. case "video":
  10365. uni.chooseVideo({
  10366. sourceType: capture,
  10367. compressed,
  10368. maxDuration,
  10369. camera,
  10370. success: (res2) => resolve(formatVideo(res2)),
  10371. fail: reject
  10372. });
  10373. break;
  10374. }
  10375. });
  10376. }
  10377. const mixinUp = {
  10378. watch: {
  10379. // 监听accept的变化,判断是否符合个平台要求
  10380. // 只有微信小程序才支持选择媒体,文件类型,所以这里做一个判断提示
  10381. accept: {
  10382. immediate: true,
  10383. handler(val) {
  10384. if (val === "all" || val === "media") {
  10385. uni.$u.error("只有微信小程序才支持把accept配置为all、media之一");
  10386. }
  10387. if (val === "file") {
  10388. uni.$u.error("只有微信小程序和H5(HX2.9.9)才支持把accept配置为file");
  10389. }
  10390. }
  10391. }
  10392. }
  10393. };
  10394. const props$l = {
  10395. props: {
  10396. // 接受的文件类型, 可选值为all media image file video
  10397. accept: {
  10398. type: String,
  10399. default: props$E.upload.accept
  10400. },
  10401. // 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头
  10402. capture: {
  10403. type: [String, Array],
  10404. default: props$E.upload.capture
  10405. },
  10406. // 当accept为video时生效,是否压缩视频,默认为true
  10407. compressed: {
  10408. type: Boolean,
  10409. default: props$E.upload.compressed
  10410. },
  10411. // 当accept为video时生效,可选值为back或front
  10412. camera: {
  10413. type: String,
  10414. default: props$E.upload.camera
  10415. },
  10416. // 当accept为video时生效,拍摄视频最长拍摄时间,单位秒
  10417. maxDuration: {
  10418. type: Number,
  10419. default: props$E.upload.maxDuration
  10420. },
  10421. // 上传区域的图标,只能内置图标
  10422. uploadIcon: {
  10423. type: String,
  10424. default: props$E.upload.uploadIcon
  10425. },
  10426. // 上传区域的图标的颜色,默认
  10427. uploadIconColor: {
  10428. type: String,
  10429. default: props$E.upload.uploadIconColor
  10430. },
  10431. // 是否开启文件读取前事件
  10432. useBeforeRead: {
  10433. type: Boolean,
  10434. default: props$E.upload.useBeforeRead
  10435. },
  10436. // 读取后的处理函数
  10437. afterRead: {
  10438. type: Function,
  10439. default: null
  10440. },
  10441. // 读取前的处理函数
  10442. beforeRead: {
  10443. type: Function,
  10444. default: null
  10445. },
  10446. // 是否显示组件自带的图片预览功能
  10447. previewFullImage: {
  10448. type: Boolean,
  10449. default: props$E.upload.previewFullImage
  10450. },
  10451. // 最大上传数量
  10452. maxCount: {
  10453. type: [String, Number],
  10454. default: props$E.upload.maxCount
  10455. },
  10456. // 是否启用
  10457. disabled: {
  10458. type: Boolean,
  10459. default: props$E.upload.disabled
  10460. },
  10461. // 预览上传的图片时的裁剪模式,和image组件mode属性一致
  10462. imageMode: {
  10463. type: String,
  10464. default: props$E.upload.imageMode
  10465. },
  10466. // 标识符,可以在回调函数的第二项参数中获取
  10467. name: {
  10468. type: String,
  10469. default: props$E.upload.name
  10470. },
  10471. // 所选的图片的尺寸, 可选值为original compressed
  10472. sizeType: {
  10473. type: Array,
  10474. default: props$E.upload.sizeType
  10475. },
  10476. // 是否开启图片多选,部分安卓机型不支持
  10477. multiple: {
  10478. type: Boolean,
  10479. default: props$E.upload.multiple
  10480. },
  10481. // 是否展示删除按钮
  10482. deletable: {
  10483. type: Boolean,
  10484. default: props$E.upload.deletable
  10485. },
  10486. // 文件大小限制,单位为byte
  10487. maxSize: {
  10488. type: [String, Number],
  10489. default: props$E.upload.maxSize
  10490. },
  10491. // 显示已上传的文件列表
  10492. fileList: {
  10493. type: Array,
  10494. default: props$E.upload.fileList
  10495. },
  10496. // 上传区域的提示文字
  10497. uploadText: {
  10498. type: String,
  10499. default: props$E.upload.uploadText
  10500. },
  10501. // 内部预览图片区域和选择图片按钮的区域宽度
  10502. width: {
  10503. type: [String, Number],
  10504. default: props$E.upload.width
  10505. },
  10506. // 内部预览图片区域和选择图片按钮的区域高度
  10507. height: {
  10508. type: [String, Number],
  10509. default: props$E.upload.height
  10510. },
  10511. // 是否在上传完成后展示预览图
  10512. previewImage: {
  10513. type: Boolean,
  10514. default: props$E.upload.previewImage
  10515. }
  10516. }
  10517. };
  10518. const _sfc_main$1F = {
  10519. name: "u-upload",
  10520. mixins: [mpMixin, mixin, mixinUp, props$l],
  10521. data() {
  10522. return {
  10523. lists: [],
  10524. isInCount: true
  10525. };
  10526. },
  10527. watch: {
  10528. // 监听文件列表的变化,重新整理内部数据
  10529. fileList: {
  10530. immediate: true,
  10531. handler() {
  10532. this.formatFileList();
  10533. },
  10534. immediate: true,
  10535. deep: true
  10536. }
  10537. },
  10538. emits: ["error", "beforeRead", "oversize", "afterRead", "delete", "clickPreview"],
  10539. methods: {
  10540. formatFileList() {
  10541. const {
  10542. fileList = [],
  10543. maxCount
  10544. } = this;
  10545. const lists = fileList.map(
  10546. (item) => Object.assign(Object.assign({}, item), {
  10547. // 如果item.url为本地选择的blob文件的话,无法判断其为video还是image,此处优先通过accept做判断处理
  10548. isImage: this.accept === "image" || uni.$u.test.image(item.url || item.thumb),
  10549. isVideo: this.accept === "video" || uni.$u.test.video(item.url || item.thumb),
  10550. deletable: typeof item.deletable === "boolean" ? item.deletable : this.deletable
  10551. })
  10552. );
  10553. this.lists = lists;
  10554. this.isInCount = lists.length < maxCount;
  10555. },
  10556. chooseFile() {
  10557. const {
  10558. maxCount,
  10559. multiple,
  10560. lists,
  10561. disabled
  10562. } = this;
  10563. if (disabled)
  10564. return;
  10565. let capture;
  10566. try {
  10567. capture = uni.$u.test.array(this.capture) ? this.capture : this.capture.split(",");
  10568. } catch (e) {
  10569. capture = [];
  10570. }
  10571. chooseFile(
  10572. Object.assign({
  10573. accept: this.accept,
  10574. multiple: this.multiple,
  10575. capture,
  10576. compressed: this.compressed,
  10577. maxDuration: this.maxDuration,
  10578. sizeType: this.sizeType,
  10579. camera: this.camera
  10580. }, {
  10581. maxCount: maxCount - lists.length
  10582. })
  10583. ).then((res2) => {
  10584. this.onBeforeRead(multiple ? res2 : res2[0]);
  10585. }).catch((error2) => {
  10586. this.$emit("error", error2);
  10587. });
  10588. },
  10589. // 文件读取之前
  10590. onBeforeRead(file) {
  10591. const {
  10592. beforeRead,
  10593. useBeforeRead
  10594. } = this;
  10595. let res2 = true;
  10596. if (uni.$u.test.func(beforeRead)) {
  10597. res2 = beforeRead(file, this.getDetail());
  10598. }
  10599. if (useBeforeRead) {
  10600. res2 = new Promise((resolve, reject) => {
  10601. this.$emit(
  10602. "beforeRead",
  10603. Object.assign(Object.assign({
  10604. file
  10605. }, this.getDetail()), {
  10606. callback: (ok) => {
  10607. ok ? resolve() : reject();
  10608. }
  10609. })
  10610. );
  10611. });
  10612. }
  10613. if (!res2) {
  10614. return;
  10615. }
  10616. if (uni.$u.test.promise(res2)) {
  10617. res2.then((data) => this.onAfterRead(data || file));
  10618. } else {
  10619. this.onAfterRead(file);
  10620. }
  10621. },
  10622. getDetail(index2) {
  10623. return {
  10624. name: this.name,
  10625. index: index2 == null ? this.fileList.length : index2
  10626. };
  10627. },
  10628. onAfterRead(file) {
  10629. const {
  10630. maxSize,
  10631. afterRead
  10632. } = this;
  10633. const oversize = Array.isArray(file) ? file.some((item) => item.size > maxSize) : file.size > maxSize;
  10634. if (oversize) {
  10635. this.$emit("oversize", Object.assign({
  10636. file
  10637. }, this.getDetail()));
  10638. return;
  10639. }
  10640. if (typeof afterRead === "function") {
  10641. afterRead(file, this.getDetail());
  10642. }
  10643. this.$emit("afterRead", Object.assign({
  10644. file
  10645. }, this.getDetail()));
  10646. },
  10647. deleteItem(index2) {
  10648. this.$emit(
  10649. "delete",
  10650. Object.assign(Object.assign({}, this.getDetail(index2)), {
  10651. file: this.fileList[index2]
  10652. })
  10653. );
  10654. },
  10655. // 预览图片
  10656. onPreviewImage(item) {
  10657. if (!item.isImage || !this.previewFullImage)
  10658. return;
  10659. uni.previewImage({
  10660. // 先filter找出为图片的item,再返回filter结果中的图片url
  10661. urls: this.lists.filter((item2) => this.accept === "image" || uni.$u.test.image(item2.url || item2.thumb)).map((item2) => item2.url || item2.thumb),
  10662. current: item.url || item.thumb,
  10663. fail() {
  10664. uni.$u.toast("预览图片失败");
  10665. }
  10666. });
  10667. },
  10668. onPreviewVideo(event) {
  10669. if (!this.data.previewFullImage)
  10670. return;
  10671. const {
  10672. index: index2
  10673. } = event.currentTarget.dataset;
  10674. const {
  10675. lists
  10676. } = this.data;
  10677. wx.previewMedia({
  10678. sources: lists.filter((item) => isVideoFile(item)).map(
  10679. (item) => Object.assign(Object.assign({}, item), {
  10680. type: "video"
  10681. })
  10682. ),
  10683. current: index2,
  10684. fail() {
  10685. uni.$u.toast("预览视频失败");
  10686. }
  10687. });
  10688. },
  10689. onClickPreview(event) {
  10690. const {
  10691. index: index2
  10692. } = event.currentTarget.dataset;
  10693. const item = this.data.lists[index2];
  10694. this.$emit(
  10695. "clickPreview",
  10696. Object.assign(Object.assign({}, item), this.getDetail(index2))
  10697. );
  10698. }
  10699. }
  10700. };
  10701. function _sfc_render$1E(_ctx, _cache, $props, $setup, $data, $options) {
  10702. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  10703. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  10704. return vue.openBlock(), vue.createElementBlock(
  10705. "view",
  10706. {
  10707. class: "u-upload",
  10708. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  10709. },
  10710. [
  10711. vue.createElementVNode("view", { class: "u-upload__wrap" }, [
  10712. _ctx.previewImage ? (vue.openBlock(true), vue.createElementBlock(
  10713. vue.Fragment,
  10714. { key: 0 },
  10715. vue.renderList($data.lists, (item, index2) => {
  10716. return vue.openBlock(), vue.createElementBlock("view", {
  10717. class: "u-upload__wrap__preview",
  10718. key: index2
  10719. }, [
  10720. item.isImage || item.type && item.type === "image" ? (vue.openBlock(), vue.createElementBlock("image", {
  10721. key: 0,
  10722. src: item.thumb || item.url,
  10723. mode: _ctx.imageMode,
  10724. class: "u-upload__wrap__preview__image",
  10725. onClick: ($event) => $options.onPreviewImage(item),
  10726. style: vue.normalizeStyle([{
  10727. width: _ctx.$u.addUnit(_ctx.width),
  10728. height: _ctx.$u.addUnit(_ctx.height)
  10729. }])
  10730. }, null, 12, ["src", "mode", "onClick"])) : (vue.openBlock(), vue.createElementBlock("view", {
  10731. key: 1,
  10732. class: "u-upload__wrap__preview__other"
  10733. }, [
  10734. vue.createVNode(_component_u_icon, {
  10735. color: "#80CBF9",
  10736. size: "26",
  10737. name: item.isVideo || item.type && item.type === "video" ? "movie" : "folder"
  10738. }, null, 8, ["name"]),
  10739. vue.createElementVNode(
  10740. "text",
  10741. { class: "u-upload__wrap__preview__other__text" },
  10742. vue.toDisplayString(item.isVideo || item.type && item.type === "video" ? "视频" : "文件"),
  10743. 1
  10744. /* TEXT */
  10745. )
  10746. ])),
  10747. item.status === "uploading" || item.status === "failed" ? (vue.openBlock(), vue.createElementBlock("view", {
  10748. key: 2,
  10749. class: "u-upload__status"
  10750. }, [
  10751. vue.createElementVNode("view", { class: "u-upload__status__icon" }, [
  10752. item.status === "failed" ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  10753. key: 0,
  10754. name: "close-circle",
  10755. color: "#ffffff",
  10756. size: "25"
  10757. })) : (vue.openBlock(), vue.createBlock(_component_u_loading_icon, {
  10758. key: 1,
  10759. size: "22",
  10760. mode: "circle",
  10761. color: "#ffffff"
  10762. }))
  10763. ]),
  10764. item.message ? (vue.openBlock(), vue.createElementBlock(
  10765. "text",
  10766. {
  10767. key: 0,
  10768. class: "u-upload__status__message"
  10769. },
  10770. vue.toDisplayString(item.message),
  10771. 1
  10772. /* TEXT */
  10773. )) : vue.createCommentVNode("v-if", true)
  10774. ])) : vue.createCommentVNode("v-if", true),
  10775. item.status !== "uploading" && (_ctx.deletable || item.deletable) ? (vue.openBlock(), vue.createElementBlock("view", {
  10776. key: 3,
  10777. class: "u-upload__deletable",
  10778. onClick: vue.withModifiers(($event) => $options.deleteItem(index2), ["stop"])
  10779. }, [
  10780. vue.createElementVNode("view", { class: "u-upload__deletable__icon" }, [
  10781. vue.createVNode(_component_u_icon, {
  10782. name: "close",
  10783. color: "#ffffff",
  10784. size: "10"
  10785. })
  10786. ])
  10787. ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  10788. item.status === "success" ? (vue.openBlock(), vue.createElementBlock("view", {
  10789. key: 4,
  10790. class: "u-upload__success"
  10791. }, [
  10792. vue.createElementVNode("view", { class: "u-upload__success__icon" }, [
  10793. vue.createVNode(_component_u_icon, {
  10794. name: "checkmark",
  10795. color: "#ffffff",
  10796. size: "12"
  10797. })
  10798. ])
  10799. ])) : vue.createCommentVNode("v-if", true)
  10800. ]);
  10801. }),
  10802. 128
  10803. /* KEYED_FRAGMENT */
  10804. )) : vue.createCommentVNode("v-if", true),
  10805. $data.isInCount ? (vue.openBlock(), vue.createElementBlock(
  10806. vue.Fragment,
  10807. { key: 1 },
  10808. [
  10809. _ctx.$slots.default || _ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock("view", {
  10810. key: 0,
  10811. onClick: _cache[0] || (_cache[0] = (...args) => $options.chooseFile && $options.chooseFile(...args))
  10812. }, [
  10813. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  10814. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  10815. key: 1,
  10816. class: vue.normalizeClass(["u-upload__button", [_ctx.disabled && "u-upload__button--disabled"]]),
  10817. "hover-class": !_ctx.disabled ? "u-upload__button--hover" : "",
  10818. "hover-stay-time": "150",
  10819. onClick: _cache[1] || (_cache[1] = (...args) => $options.chooseFile && $options.chooseFile(...args)),
  10820. style: vue.normalizeStyle([{
  10821. width: _ctx.$u.addUnit(_ctx.width),
  10822. height: _ctx.$u.addUnit(_ctx.height)
  10823. }])
  10824. }, [
  10825. vue.createVNode(_component_u_icon, {
  10826. name: _ctx.uploadIcon,
  10827. size: "26",
  10828. color: _ctx.uploadIconColor
  10829. }, null, 8, ["name", "color"]),
  10830. _ctx.uploadText ? (vue.openBlock(), vue.createElementBlock(
  10831. "text",
  10832. {
  10833. key: 0,
  10834. class: "u-upload__button__text"
  10835. },
  10836. vue.toDisplayString(_ctx.uploadText),
  10837. 1
  10838. /* TEXT */
  10839. )) : vue.createCommentVNode("v-if", true)
  10840. ], 14, ["hover-class"]))
  10841. ],
  10842. 64
  10843. /* STABLE_FRAGMENT */
  10844. )) : vue.createCommentVNode("v-if", true)
  10845. ])
  10846. ],
  10847. 4
  10848. /* STYLE */
  10849. );
  10850. }
  10851. const __easycom_0$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["render", _sfc_render$1E], ["__scopeId", "data-v-c8491d64"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-upload/u-upload.vue"]]);
  10852. const baseUrl = "https://bpi.shuhi.com";
  10853. function initRequest() {
  10854. formatAppLog("log", "at config/request.js:6", "初始化了 http 请求代码");
  10855. uni.$u.http.setConfig((config2) => {
  10856. config2.baseURL = baseUrl;
  10857. config2.custom.toast = true;
  10858. config2.sslVerify = false;
  10859. return config2;
  10860. });
  10861. uni.$u.http.interceptors.request.use(
  10862. (config2) => {
  10863. config2.data = config2.data || {};
  10864. let token = uni.getStorageSync("token");
  10865. config2.header.Authorization = token ? `Bearer ${token}` : "";
  10866. return config2;
  10867. },
  10868. (config2) => {
  10869. return Promise.reject(config2);
  10870. }
  10871. );
  10872. uni.$u.http.interceptors.response.use(
  10873. (response) => {
  10874. var _a;
  10875. const data = response.data;
  10876. const custom = (_a = response.config) == null ? void 0 : _a.custom;
  10877. if (data.code !== 200) {
  10878. if (data.code === 401) {
  10879. uni.$u.toast(data.msg || "身份认证失败,请先登录");
  10880. uni.removeStorageSync("token");
  10881. setTimeout(() => {
  10882. uni.$u.route({
  10883. type: "reLaunch",
  10884. url: "/pages/login/login"
  10885. // 跳转到登录页
  10886. });
  10887. }, 1e3);
  10888. } else {
  10889. if (custom.toast !== false) {
  10890. uni.$u.toast(data.msg);
  10891. }
  10892. return data;
  10893. }
  10894. }
  10895. return data;
  10896. },
  10897. (response) => {
  10898. return Promise.reject(response);
  10899. }
  10900. );
  10901. }
  10902. const _sfc_main$1E = {
  10903. __name: "index",
  10904. props: {
  10905. filename: {
  10906. type: [Array, String],
  10907. default: () => []
  10908. },
  10909. url: {
  10910. type: String
  10911. },
  10912. notFile: {
  10913. type: Boolean,
  10914. default: false
  10915. },
  10916. tips: {
  10917. type: String
  10918. },
  10919. disabled: {
  10920. type: Boolean,
  10921. default: false
  10922. },
  10923. isUpdate: {
  10924. type: Boolean,
  10925. default: false
  10926. },
  10927. loading: {
  10928. type: Boolean,
  10929. default: false
  10930. }
  10931. },
  10932. emits: ["update:filename", "update:keyValue", "success", "update:loading"],
  10933. setup(__props, { expose: __expose, emit: __emit }) {
  10934. __expose();
  10935. const emit2 = __emit;
  10936. const props2 = __props;
  10937. const fileList = vue.ref([]);
  10938. vue.watch(() => props2.filename, (filename) => {
  10939. if (!filename)
  10940. return fileList.value = [];
  10941. if (typeof filename == "string") {
  10942. fileList.value = filename.split(",").map((v) => ({
  10943. url: baseUrl + v
  10944. }));
  10945. } else {
  10946. fileList.value = filename && filename.length > 0 ? filename.map((v) => ({
  10947. url: v.url || v
  10948. })) : [];
  10949. }
  10950. }, {
  10951. immediate: true,
  10952. deep: true
  10953. });
  10954. const afterRead = async (e) => {
  10955. const {
  10956. file
  10957. } = e;
  10958. fileList.value.push({
  10959. ...file,
  10960. status: "uploading",
  10961. message: "上传中..."
  10962. });
  10963. emit2("update:loading", true);
  10964. const result = await uploadFilePromise(file.url);
  10965. formatAppLog("log", "at components/cy-upload/index.vue:73", result, "result");
  10966. fileList.value.forEach((v, index2) => {
  10967. if (index2 == fileList.value.length - 1) {
  10968. v.url = result.url;
  10969. v.status = "success";
  10970. v.message = "";
  10971. }
  10972. });
  10973. formatAppLog("log", "at components/cy-upload/index.vue:82", fileList.value, "fileList.value");
  10974. emit2("update:filename", fileList.value.map((v) => v.url));
  10975. emit2("success", result);
  10976. emit2("update:loading", false);
  10977. };
  10978. const deletePic = (event) => {
  10979. fileList.value.splice(event.index, 1);
  10980. };
  10981. const uploadFilePromise = (url2, baseStr = "/app/common/upload") => {
  10982. let token = uni.getStorageSync("token");
  10983. return new Promise((resolve, reject) => {
  10984. uni.uploadFile({
  10985. url: baseUrl + baseStr,
  10986. // 图片上传地址
  10987. filePath: url2,
  10988. name: "file",
  10989. header: {
  10990. "Authorization": token
  10991. },
  10992. success: (res2) => {
  10993. let respic = JSON.parse(res2.data);
  10994. resolve(respic);
  10995. }
  10996. });
  10997. });
  10998. };
  10999. const __returned__ = { emit: emit2, props: props2, fileList, afterRead, deletePic, uploadFilePromise, watch: vue.watch, ref: vue.ref, get baseUrl() {
  11000. return baseUrl;
  11001. } };
  11002. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11003. return __returned__;
  11004. }
  11005. };
  11006. function _sfc_render$1D(_ctx, _cache, $props, $setup, $data, $options) {
  11007. const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_0$7);
  11008. return vue.openBlock(), vue.createElementBlock(
  11009. vue.Fragment,
  11010. null,
  11011. [
  11012. vue.createVNode(_component_u_upload, vue.mergeProps(_ctx.$attrs, {
  11013. fileList: $setup.fileList,
  11014. onAfterRead: $setup.afterRead,
  11015. onDelete: $setup.deletePic,
  11016. notFile: $props.notFile,
  11017. disabled: $props.disabled
  11018. }), null, 16, ["fileList", "notFile", "disabled"]),
  11019. $props.tips ? (vue.openBlock(), vue.createElementBlock(
  11020. "view",
  11021. {
  11022. key: 0,
  11023. class: "tips"
  11024. },
  11025. vue.toDisplayString($props.tips),
  11026. 1
  11027. /* TEXT */
  11028. )) : vue.createCommentVNode("v-if", true)
  11029. ],
  11030. 64
  11031. /* STABLE_FRAGMENT */
  11032. );
  11033. }
  11034. const cyUpload = /* @__PURE__ */ _export_sfc(_sfc_main$1E, [["render", _sfc_render$1D], ["__scopeId", "data-v-5002576b"], ["__file", "E:/书嗨项目/shuhi-app-fornt/components/cy-upload/index.vue"]]);
  11035. const _sfc_main$1D = {
  11036. __name: "feedbackPopup",
  11037. emits: ["submit"],
  11038. setup(__props, { expose: __expose, emit: __emit }) {
  11039. const show = vue.ref(false);
  11040. const emit2 = __emit;
  11041. const formRef = vue.ref(null);
  11042. const submitting = vue.ref(false);
  11043. const loading = vue.ref(false);
  11044. const formData = vue.reactive({
  11045. feedbackContent: "",
  11046. imgUrl: [],
  11047. isbn: ""
  11048. });
  11049. const rules2 = {
  11050. feedbackContent: [
  11051. {
  11052. required: true,
  11053. message: "请输入反馈信息",
  11054. trigger: ["blur", "change"]
  11055. }
  11056. ]
  11057. };
  11058. function open2(data) {
  11059. show.value = true;
  11060. formData.isbn = data.isbn;
  11061. }
  11062. function handleCancel() {
  11063. resetForm();
  11064. show.value = false;
  11065. }
  11066. async function handleConfirm() {
  11067. var _a;
  11068. (_a = formRef.value) == null ? void 0 : _a.validate().then((res2) => {
  11069. submitting.value = true;
  11070. let data = JSON.parse(JSON.stringify(formData));
  11071. data.imgUrl = data.imgUrl.join(",");
  11072. uni.$u.http.post("/app/feedback/add", data).then((res3) => {
  11073. if (res3.code == 200) {
  11074. uni.showToast({
  11075. title: "反馈已提交",
  11076. icon: "success"
  11077. });
  11078. emit2("submit", formData);
  11079. show.value = false;
  11080. } else {
  11081. uni.$u.toast(res3.msg);
  11082. }
  11083. }).finally(() => {
  11084. submitting.value = false;
  11085. });
  11086. });
  11087. }
  11088. function resetForm() {
  11089. var _a;
  11090. formData.feedbackContent = "";
  11091. formData.imgUrl = "";
  11092. (_a = formRef.value) == null ? void 0 : _a.resetFields();
  11093. }
  11094. __expose({
  11095. open: open2
  11096. });
  11097. const __returned__ = { show, emit: emit2, formRef, submitting, loading, formData, rules: rules2, open: open2, handleCancel, handleConfirm, resetForm, cyUpload, ref: vue.ref, reactive: vue.reactive };
  11098. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11099. return __returned__;
  11100. }
  11101. };
  11102. function _sfc_render$1C(_ctx, _cache, $props, $setup, $data, $options) {
  11103. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  11104. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  11105. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  11106. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$6);
  11107. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  11108. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  11109. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  11110. mode: "center",
  11111. show: $setup.show,
  11112. onClose: $setup.handleCancel,
  11113. closeOnClickOverlay: false
  11114. }, {
  11115. default: vue.withCtx(() => [
  11116. vue.createElementVNode("view", { class: "popup-container" }, [
  11117. vue.createVNode(_component_u_form, {
  11118. ref: "formRef",
  11119. model: $setup.formData,
  11120. rules: $setup.rules,
  11121. labelPosition: "top",
  11122. labelWidth: "100%",
  11123. "error-type": "toast"
  11124. }, {
  11125. default: vue.withCtx(() => [
  11126. vue.createCommentVNode(" 反馈信息 "),
  11127. vue.createVNode(_component_u_form_item, {
  11128. label: "反馈图书信息",
  11129. prop: "feedbackContent",
  11130. borderBottom: true
  11131. }, {
  11132. default: vue.withCtx(() => [
  11133. vue.createVNode(_component_u_input, {
  11134. modelValue: $setup.formData.feedbackContent,
  11135. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.feedbackContent = $event),
  11136. type: "textarea",
  11137. placeholder: "请输入反馈信息",
  11138. height: "100"
  11139. }, null, 8, ["modelValue"])
  11140. ]),
  11141. _: 1
  11142. /* STABLE */
  11143. }),
  11144. vue.createCommentVNode(" 图片上传 "),
  11145. vue.createVNode(_component_u_form_item, {
  11146. label: "上传照片",
  11147. prop: "imgUrl",
  11148. borderBottom: false
  11149. }, {
  11150. default: vue.withCtx(() => [
  11151. vue.createVNode($setup["cyUpload"], {
  11152. filename: $setup.formData.imgUrl,
  11153. "onUpdate:filename": _cache[1] || (_cache[1] = ($event) => $setup.formData.imgUrl = $event),
  11154. multiple: "",
  11155. maxCount: 4,
  11156. loading: $setup.loading
  11157. }, {
  11158. default: vue.withCtx(() => [
  11159. vue.createElementVNode("view", { class: "upload-slot" }, [
  11160. vue.createVNode(_component_u_icon, {
  11161. name: "plus",
  11162. size: "30"
  11163. }),
  11164. vue.createElementVNode("text", { class: "upload-text" }, "上传照片")
  11165. ])
  11166. ]),
  11167. _: 1
  11168. /* STABLE */
  11169. }, 8, ["filename", "loading"])
  11170. ]),
  11171. _: 1
  11172. /* STABLE */
  11173. })
  11174. ]),
  11175. _: 1
  11176. /* STABLE */
  11177. }, 8, ["model"]),
  11178. vue.createCommentVNode(" 按钮组 "),
  11179. vue.createElementVNode("view", { class: "button-group" }, [
  11180. vue.createVNode(_component_u_button, {
  11181. type: "info",
  11182. text: "取消",
  11183. plain: true,
  11184. onClick: $setup.handleCancel,
  11185. disabled: $setup.submitting
  11186. }, null, 8, ["disabled"]),
  11187. vue.createVNode(_component_u_button, {
  11188. type: "primary",
  11189. text: "确认",
  11190. onClick: $setup.handleConfirm,
  11191. loading: $setup.submitting,
  11192. disabled: $setup.loading
  11193. }, null, 8, ["loading", "disabled"])
  11194. ])
  11195. ])
  11196. ]),
  11197. _: 1
  11198. /* STABLE */
  11199. }, 8, ["show"]);
  11200. }
  11201. const FeedbackPopup = /* @__PURE__ */ _export_sfc(_sfc_main$1D, [["render", _sfc_render$1C], ["__scopeId", "data-v-0265fb8a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/book/components/feedbackPopup.vue"]]);
  11202. const _sfc_main$1C = {
  11203. __name: "index",
  11204. setup(__props, { expose: __expose }) {
  11205. __expose();
  11206. const showFeedback = vue.ref(null);
  11207. function handleFeedbackSubmit(data) {
  11208. formatAppLog("log", "at pages/book/index.vue:48", "反馈数据:", data);
  11209. }
  11210. const searchText = vue.ref("");
  11211. const bookList = vue.ref([]);
  11212. async function handleSearch() {
  11213. if (!searchText.value) {
  11214. uni.showToast({
  11215. title: "请输入ISBN",
  11216. icon: "none"
  11217. });
  11218. return;
  11219. }
  11220. await getSimpleBookInfoByIsbn(searchText.value);
  11221. }
  11222. async function getSimpleBookInfoByIsbn(isbn) {
  11223. uni.$u.http.get(`/app/book/getSimpleBookInfoByIsbn/${isbn}`).then((res2) => {
  11224. if (res2.code == 200) {
  11225. let bool = bookList.value.some((v) => v.isbn == isbn);
  11226. if (!bool) {
  11227. bookList.value.push(res2.data);
  11228. }
  11229. } else {
  11230. uni.$u.toast(res2.msg);
  11231. }
  11232. });
  11233. }
  11234. function scanCode() {
  11235. uni.scanCode({
  11236. scanType: ["barCode"],
  11237. success: (res2) => {
  11238. searchText.value = res2.result;
  11239. getSimpleBookInfoByIsbn(res2.result);
  11240. },
  11241. fail: () => {
  11242. uni.showToast({
  11243. title: "扫码失败",
  11244. icon: "none"
  11245. });
  11246. }
  11247. });
  11248. }
  11249. function editBook(book) {
  11250. var _a;
  11251. (_a = showFeedback.value) == null ? void 0 : _a.open(book);
  11252. }
  11253. onLoad(() => {
  11254. uni.$u.useGlobalEvent((e) => {
  11255. if (!e.barcode)
  11256. return;
  11257. getSimpleBookInfoByIsbn(e.barcode);
  11258. });
  11259. });
  11260. onShow(() => {
  11261. uni.$u.updateActivePageOnShow();
  11262. });
  11263. const __returned__ = { showFeedback, handleFeedbackSubmit, searchText, bookList, handleSearch, getSimpleBookInfoByIsbn, scanCode, editBook, ref: vue.ref, computed: vue.computed, get onLoad() {
  11264. return onLoad;
  11265. }, get onShow() {
  11266. return onShow;
  11267. }, FeedbackPopup };
  11268. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11269. return __returned__;
  11270. }
  11271. };
  11272. function _sfc_render$1B(_ctx, _cache, $props, $setup, $data, $options) {
  11273. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  11274. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  11275. return vue.openBlock(), vue.createElementBlock("view", {
  11276. class: "book-list",
  11277. style: { "padding": "0" }
  11278. }, [
  11279. vue.createCommentVNode(" 搜索框 "),
  11280. vue.createElementVNode("view", { class: "search-header" }, [
  11281. vue.createElementVNode("view", { class: "search-box" }, [
  11282. vue.createVNode(_component_u_icon, {
  11283. style: { "margin-right": "16rpx" },
  11284. name: "scan",
  11285. size: "30",
  11286. color: "#ffffff",
  11287. onClick: $setup.scanCode
  11288. }),
  11289. vue.createVNode(_component_u_search, {
  11290. height: "80rpx",
  11291. modelValue: $setup.searchText,
  11292. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  11293. placeholder: "请输入ISBN",
  11294. showAction: false,
  11295. clearabled: true,
  11296. onSearch: $setup.handleSearch,
  11297. bgColor: "#ffffff"
  11298. }, null, 8, ["modelValue"])
  11299. ])
  11300. ]),
  11301. vue.createCommentVNode(" 搜索结果列表 "),
  11302. $setup.bookList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11303. key: 0,
  11304. class: "book-list"
  11305. }, [
  11306. (vue.openBlock(true), vue.createElementBlock(
  11307. vue.Fragment,
  11308. null,
  11309. vue.renderList($setup.bookList, (book, index2) => {
  11310. return vue.openBlock(), vue.createElementBlock("view", {
  11311. class: "book-item",
  11312. key: index2
  11313. }, [
  11314. vue.createElementVNode("view", { class: "book-info" }, [
  11315. vue.createElementVNode("image", {
  11316. class: "book-image",
  11317. src: book.cover,
  11318. mode: "aspectFill"
  11319. }, null, 8, ["src"]),
  11320. vue.createElementVNode("view", { class: "book-details" }, [
  11321. vue.createElementVNode(
  11322. "text",
  11323. { class: "book-title" },
  11324. vue.toDisplayString(book.bookName),
  11325. 1
  11326. /* TEXT */
  11327. ),
  11328. vue.createElementVNode(
  11329. "text",
  11330. { class: "book-isbn" },
  11331. "ISBN: " + vue.toDisplayString(book.isbn),
  11332. 1
  11333. /* TEXT */
  11334. ),
  11335. vue.createElementVNode(
  11336. "text",
  11337. { class: "book-price" },
  11338. "定价: " + vue.toDisplayString(book.price),
  11339. 1
  11340. /* TEXT */
  11341. ),
  11342. vue.createElementVNode(
  11343. "text",
  11344. { class: "book-set" },
  11345. "套装: " + vue.toDisplayString(book.suit == 1 ? "是" : "否"),
  11346. 1
  11347. /* TEXT */
  11348. )
  11349. ])
  11350. ]),
  11351. vue.createElementVNode("view", { class: "book-action" }, [
  11352. vue.createVNode(_component_u_icon, {
  11353. name: "edit-pen",
  11354. size: "30",
  11355. color: "#4cd964",
  11356. onClick: ($event) => $setup.editBook(book)
  11357. }, null, 8, ["onClick"])
  11358. ])
  11359. ]);
  11360. }),
  11361. 128
  11362. /* KEYED_FRAGMENT */
  11363. ))
  11364. ])) : vue.createCommentVNode("v-if", true),
  11365. vue.createVNode(
  11366. $setup["FeedbackPopup"],
  11367. {
  11368. ref: "showFeedback",
  11369. onSubmit: $setup.handleFeedbackSubmit
  11370. },
  11371. null,
  11372. 512
  11373. /* NEED_PATCH */
  11374. )
  11375. ]);
  11376. }
  11377. const PagesBookIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1C, [["render", _sfc_render$1B], ["__scopeId", "data-v-0452ab4c"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/book/index.vue"]]);
  11378. const props$k = {
  11379. props: {
  11380. // 标签类型info、primary、success、warning、error
  11381. type: {
  11382. type: String,
  11383. default: props$E.tag.type
  11384. },
  11385. // 不可用
  11386. disabled: {
  11387. type: [Boolean, String],
  11388. default: props$E.tag.disabled
  11389. },
  11390. // 标签的大小,large,medium,mini
  11391. size: {
  11392. type: String,
  11393. default: props$E.tag.size
  11394. },
  11395. // tag的形状,circle(两边半圆形), square(方形,带圆角)
  11396. shape: {
  11397. type: String,
  11398. default: props$E.tag.shape
  11399. },
  11400. // 标签文字
  11401. text: {
  11402. type: [String, Number],
  11403. default: props$E.tag.text
  11404. },
  11405. // 背景颜色,默认为空字符串,即不处理
  11406. bgColor: {
  11407. type: String,
  11408. default: props$E.tag.bgColor
  11409. },
  11410. // 标签字体颜色,默认为空字符串,即不处理
  11411. color: {
  11412. type: String,
  11413. default: props$E.tag.color
  11414. },
  11415. // 标签的边框颜色
  11416. borderColor: {
  11417. type: String,
  11418. default: props$E.tag.borderColor
  11419. },
  11420. // 关闭按钮图标的颜色
  11421. closeColor: {
  11422. type: String,
  11423. default: props$E.tag.closeColor
  11424. },
  11425. // 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了
  11426. name: {
  11427. type: [String, Number],
  11428. default: props$E.tag.name
  11429. },
  11430. // // 模式选择,dark|light|plain
  11431. // mode: {
  11432. // type: String,
  11433. // default: 'light'
  11434. // },
  11435. // 镂空时是否填充背景色
  11436. plainFill: {
  11437. type: Boolean,
  11438. default: props$E.tag.plainFill
  11439. },
  11440. // 是否镂空
  11441. plain: {
  11442. type: Boolean,
  11443. default: props$E.tag.plain
  11444. },
  11445. // 是否可关闭
  11446. closable: {
  11447. type: Boolean,
  11448. default: props$E.tag.closable
  11449. },
  11450. // 是否显示
  11451. show: {
  11452. type: Boolean,
  11453. default: props$E.tag.show
  11454. },
  11455. // 内置图标,或绝对路径的图片
  11456. icon: {
  11457. type: String,
  11458. default: props$E.tag.icon
  11459. }
  11460. }
  11461. };
  11462. const _sfc_main$1B = {
  11463. name: "u-tag",
  11464. mixins: [mpMixin, mixin, props$k],
  11465. data() {
  11466. return {};
  11467. },
  11468. computed: {
  11469. style() {
  11470. const style = {};
  11471. if (this.bgColor) {
  11472. style.backgroundColor = this.bgColor;
  11473. }
  11474. if (this.color) {
  11475. style.color = this.color;
  11476. }
  11477. if (this.borderColor) {
  11478. style.borderColor = this.borderColor;
  11479. }
  11480. return style;
  11481. },
  11482. // nvue下,文本颜色无法继承父元素
  11483. textColor() {
  11484. const style = {};
  11485. if (this.color) {
  11486. style.color = this.color;
  11487. }
  11488. return style;
  11489. },
  11490. imgStyle() {
  11491. const width = this.size === "large" ? "17px" : this.size === "medium" ? "15px" : "13px";
  11492. return {
  11493. width,
  11494. height: width
  11495. };
  11496. },
  11497. // 文本的样式
  11498. closeSize() {
  11499. const size = this.size === "large" ? 15 : this.size === "medium" ? 13 : 12;
  11500. return size;
  11501. },
  11502. // 图标大小
  11503. iconSize() {
  11504. const size = this.size === "large" ? 21 : this.size === "medium" ? 19 : 16;
  11505. return size;
  11506. },
  11507. // 图标颜色
  11508. elIconColor() {
  11509. return this.iconColor ? this.iconColor : this.plain ? this.type : "#ffffff";
  11510. }
  11511. },
  11512. methods: {
  11513. // 点击关闭按钮
  11514. closeHandler() {
  11515. this.$emit("close", this.name);
  11516. },
  11517. // 点击标签
  11518. clickHandler() {
  11519. this.$emit("click", this.name);
  11520. }
  11521. }
  11522. };
  11523. function _sfc_render$1A(_ctx, _cache, $props, $setup, $data, $options) {
  11524. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  11525. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
  11526. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  11527. mode: "fade",
  11528. show: _ctx.show,
  11529. style: { "display": "inline-flex" }
  11530. }, {
  11531. default: vue.withCtx(() => [
  11532. vue.createElementVNode("view", { class: "u-tag-wrapper" }, [
  11533. vue.createElementVNode(
  11534. "view",
  11535. {
  11536. 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`]]),
  11537. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
  11538. style: vue.normalizeStyle([{
  11539. marginRight: _ctx.closable ? "10px" : 0,
  11540. marginTop: _ctx.closable ? "10px" : 0
  11541. }, $options.style])
  11542. },
  11543. [
  11544. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  11545. _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", {
  11546. key: 0,
  11547. class: "u-tag__icon"
  11548. }, [
  11549. _ctx.$u.test.image(_ctx.icon) ? (vue.openBlock(), vue.createElementBlock("image", {
  11550. key: 0,
  11551. src: _ctx.icon,
  11552. style: vue.normalizeStyle([$options.imgStyle])
  11553. }, null, 12, ["src"])) : (vue.openBlock(), vue.createBlock(_component_u_icon, {
  11554. key: 1,
  11555. color: $options.elIconColor,
  11556. name: _ctx.icon,
  11557. size: $options.iconSize
  11558. }, null, 8, ["color", "name", "size"]))
  11559. ])) : vue.createCommentVNode("v-if", true)
  11560. ], true),
  11561. vue.createElementVNode(
  11562. "text",
  11563. {
  11564. class: vue.normalizeClass(["u-tag__text", [`u-tag__text--${_ctx.type}`, _ctx.plain && `u-tag__text--${_ctx.type}--plain`, `u-tag__text--${_ctx.size}`]]),
  11565. style: vue.normalizeStyle([$options.textColor])
  11566. },
  11567. vue.toDisplayString(_ctx.text),
  11568. 7
  11569. /* TEXT, CLASS, STYLE */
  11570. )
  11571. ],
  11572. 6
  11573. /* CLASS, STYLE */
  11574. ),
  11575. _ctx.closable ? (vue.openBlock(), vue.createElementBlock(
  11576. "view",
  11577. {
  11578. key: 0,
  11579. class: vue.normalizeClass(["u-tag__close", [`u-tag__close--${_ctx.size}`]]),
  11580. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"])),
  11581. style: vue.normalizeStyle({ backgroundColor: _ctx.closeColor })
  11582. },
  11583. [
  11584. vue.createVNode(_component_u_icon, {
  11585. name: "close",
  11586. size: $options.closeSize,
  11587. color: "#ffffff"
  11588. }, null, 8, ["size"])
  11589. ],
  11590. 6
  11591. /* CLASS, STYLE */
  11592. )) : vue.createCommentVNode("v-if", true)
  11593. ])
  11594. ]),
  11595. _: 3
  11596. /* FORWARDED */
  11597. }, 8, ["show"]);
  11598. }
  11599. const __easycom_2$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1B, [["render", _sfc_render$1A], ["__scopeId", "data-v-2fd891bb"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-tag/u-tag.vue"]]);
  11600. const _sfc_main$1A = {
  11601. __name: "WarehouseSelector",
  11602. props: {
  11603. show: {
  11604. type: Boolean,
  11605. default: false
  11606. }
  11607. },
  11608. emits: ["update:show", "warehouse-selected"],
  11609. setup(__props, { expose: __expose, emit: __emit }) {
  11610. __expose();
  11611. const props2 = __props;
  11612. const emit2 = __emit;
  11613. const searchKeyword = vue.ref("");
  11614. const searchResults = vue.ref([]);
  11615. const historyWarehouses = vue.ref([""]);
  11616. const selectedWarehouse = vue.ref("");
  11617. const warehouseSearch = (name) => {
  11618. formatAppLog("log", "at pages/index/express/components/WarehouseSelector.vue:68", name);
  11619. uni.$u.http.post("/app/appUser/searchGodown?name=" + name).then((res2) => {
  11620. if (res2.code == 200) {
  11621. searchResults.value = res2.data;
  11622. }
  11623. });
  11624. };
  11625. const getUserBindHistory = () => {
  11626. uni.$u.http.get("/app/appUser/getUserBindGodownReocrd").then((res2) => {
  11627. if (res2.code == 200) {
  11628. historyWarehouses.value = res2.data;
  11629. }
  11630. });
  11631. };
  11632. getUserBindHistory();
  11633. const handleSearch = () => {
  11634. warehouseSearch(searchKeyword.value);
  11635. };
  11636. const selectItem = vue.ref({});
  11637. const selectWarehouse = (item) => {
  11638. selectedWarehouse.value = item.godownName;
  11639. selectItem.value = item;
  11640. };
  11641. const handleClose = () => {
  11642. emit2("update:show", false);
  11643. searchKeyword.value = "";
  11644. };
  11645. const handleConfirm = () => {
  11646. if (selectedWarehouse.value) {
  11647. emit2("warehouse-selected", selectItem.value);
  11648. handleClose();
  11649. }
  11650. };
  11651. const __returned__ = { props: props2, emit: emit2, searchKeyword, searchResults, historyWarehouses, selectedWarehouse, warehouseSearch, getUserBindHistory, handleSearch, selectItem, selectWarehouse, handleClose, handleConfirm, ref: vue.ref };
  11652. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11653. return __returned__;
  11654. }
  11655. };
  11656. function _sfc_render$1z(_ctx, _cache, $props, $setup, $data, $options) {
  11657. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  11658. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  11659. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  11660. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  11661. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  11662. show: $props.show,
  11663. onClose: $setup.handleClose,
  11664. mode: "bottom",
  11665. round: "10"
  11666. }, {
  11667. default: vue.withCtx(() => [
  11668. vue.createElementVNode("view", { class: "warehouse-selector" }, [
  11669. vue.createElementVNode("view", { style: { "flex": "1" } }, [
  11670. vue.createCommentVNode(" 标题 "),
  11671. vue.createElementVNode("view", { class: "header" }, [
  11672. vue.createElementVNode("text", { class: "title" }, "绑定仓库")
  11673. ]),
  11674. vue.createCommentVNode(" 搜索框 "),
  11675. vue.createElementVNode("view", { class: "search-box" }, [
  11676. vue.createVNode(_component_u_search, {
  11677. inputStyle: { "height": "80rpx", "font-size": "16px" },
  11678. actionStyle: { "font-size": "16px", color: "#22ac38" },
  11679. modelValue: $setup.searchKeyword,
  11680. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchKeyword = $event),
  11681. placeholder: "搜索仓库",
  11682. "show-action": true,
  11683. "action-text": "搜索",
  11684. onSearch: $setup.handleSearch,
  11685. onCustom: $setup.handleSearch
  11686. }, null, 8, ["modelValue"])
  11687. ]),
  11688. vue.createCommentVNode(" 搜索结果 "),
  11689. $setup.searchResults.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11690. key: 0,
  11691. class: "search-result"
  11692. }, [
  11693. vue.createElementVNode("text", { class: "section-title" }, "搜索结果"),
  11694. vue.createElementVNode("view", { class: "tag-group" }, [
  11695. (vue.openBlock(true), vue.createElementBlock(
  11696. vue.Fragment,
  11697. null,
  11698. vue.renderList($setup.searchResults, (item) => {
  11699. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  11700. key: item,
  11701. text: item.godownName,
  11702. plain: $setup.selectedWarehouse !== item.godownName,
  11703. shape: "circle",
  11704. onClick: ($event) => $setup.selectWarehouse(item),
  11705. size: "large"
  11706. }, null, 8, ["text", "plain", "onClick"]);
  11707. }),
  11708. 128
  11709. /* KEYED_FRAGMENT */
  11710. ))
  11711. ])
  11712. ])) : vue.createCommentVNode("v-if", true),
  11713. vue.createCommentVNode(" 历史绑定 "),
  11714. $setup.historyWarehouses.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11715. key: 1,
  11716. class: "history-section"
  11717. }, [
  11718. vue.createElementVNode("text", { class: "section-title" }, "历史绑定"),
  11719. vue.createElementVNode("view", { class: "tag-group" }, [
  11720. (vue.openBlock(true), vue.createElementBlock(
  11721. vue.Fragment,
  11722. null,
  11723. vue.renderList($setup.historyWarehouses, (item) => {
  11724. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  11725. key: item,
  11726. text: item,
  11727. plain: $setup.selectedWarehouse !== item.godownName,
  11728. shape: "circle",
  11729. onClick: ($event) => $setup.selectWarehouse(item),
  11730. size: "large"
  11731. }, null, 8, ["text", "plain", "onClick"]);
  11732. }),
  11733. 128
  11734. /* KEYED_FRAGMENT */
  11735. ))
  11736. ])
  11737. ])) : vue.createCommentVNode("v-if", true)
  11738. ]),
  11739. vue.createCommentVNode(" 底部按钮 "),
  11740. vue.createElementVNode("view", { class: "footer" }, [
  11741. vue.createVNode(_component_u_button, {
  11742. onClick: $setup.handleClose,
  11743. text: "取消",
  11744. plain: "",
  11745. shape: "circle"
  11746. }),
  11747. vue.createVNode(_component_u_button, {
  11748. type: "primary",
  11749. onClick: $setup.handleConfirm,
  11750. text: "确定",
  11751. shape: "circle"
  11752. })
  11753. ])
  11754. ])
  11755. ]),
  11756. _: 1
  11757. /* STABLE */
  11758. }, 8, ["show"]);
  11759. }
  11760. const WarehouseSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1A, [["render", _sfc_render$1z], ["__scopeId", "data-v-b9bd3f04"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/WarehouseSelector.vue"]]);
  11761. const placeholderStyle$3 = "font-size:32rpx";
  11762. const _sfc_main$1z = {
  11763. __name: "transfer-sign",
  11764. setup(__props, { expose: __expose }) {
  11765. __expose();
  11766. const customStyle = vue.reactive({
  11767. height: "90rpx"
  11768. });
  11769. const selectedWarehouse = vue.ref("");
  11770. const form = vue.ref({
  11771. "packageCode": "",
  11772. "godownId": ""
  11773. });
  11774. const showSelector = vue.ref(false);
  11775. function openWarehouseSelector() {
  11776. showSelector.value = true;
  11777. }
  11778. function handleWarehouseSelected(item) {
  11779. selectedWarehouse.value = item.godownName;
  11780. form.value.godownId = item.id;
  11781. }
  11782. function scanCode() {
  11783. uni.scanCode({
  11784. success: (res2) => {
  11785. form.value.packageCode = res2.result;
  11786. handleBarcode(res2.result);
  11787. },
  11788. fail: (err) => {
  11789. uni.$u.toast("扫码失败");
  11790. }
  11791. });
  11792. }
  11793. function handleBarcode(code2) {
  11794. if (!code2)
  11795. return uni.$u.toast("请输入物流单号");
  11796. uni.$u.http.post("/app/ordersign/transferSign", form.value).then((res2) => {
  11797. if (res2.code == 200) {
  11798. let text = code2 + "签收成功";
  11799. uni.$u.ttsModule.speak(text);
  11800. } else {
  11801. let text = code2 + "订单不存在";
  11802. uni.$u.ttsModule.speak(text);
  11803. }
  11804. });
  11805. }
  11806. function getUserBindWarehouse() {
  11807. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
  11808. var _a, _b;
  11809. if (res2.code == 200) {
  11810. selectedWarehouse.value = (_a = res2.data) == null ? void 0 : _a.godownName;
  11811. form.value.godownId = (_b = res2.data) == null ? void 0 : _b.id;
  11812. }
  11813. });
  11814. }
  11815. onLoad(() => {
  11816. getUserBindWarehouse();
  11817. uni.$u.useGlobalEvent((e) => {
  11818. form.value.packageCode = e.barcode;
  11819. handleBarcode(e.barcode);
  11820. });
  11821. });
  11822. onShow(() => {
  11823. uni.$u.updateActivePageOnShow();
  11824. });
  11825. const __returned__ = { placeholderStyle: placeholderStyle$3, customStyle, selectedWarehouse, form, showSelector, openWarehouseSelector, handleWarehouseSelected, scanCode, handleBarcode, getUserBindWarehouse, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  11826. return onLoad;
  11827. }, get onShow() {
  11828. return onShow;
  11829. }, WarehouseSelector };
  11830. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11831. return __returned__;
  11832. }
  11833. };
  11834. function _sfc_render$1y(_ctx, _cache, $props, $setup, $data, $options) {
  11835. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  11836. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  11837. const _directive_permission = vue.resolveDirective("permission");
  11838. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11839. vue.createElementVNode("view", { class: "main-content" }, [
  11840. vue.createElementVNode("view", { class: "input-group" }, [
  11841. vue.createVNode(_component_u_input, {
  11842. customStyle: $setup.customStyle,
  11843. "placeholder-style": $setup.placeholderStyle,
  11844. modelValue: $setup.selectedWarehouse,
  11845. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedWarehouse = $event),
  11846. placeholder: "请选择仓库",
  11847. readonly: "",
  11848. border: "surround"
  11849. }, null, 8, ["customStyle", "modelValue"]),
  11850. vue.createVNode(_component_u_button, {
  11851. customStyle: $setup.customStyle,
  11852. type: "info",
  11853. color: "#a4adb3",
  11854. onClick: $setup.openWarehouseSelector,
  11855. text: "选择"
  11856. }, null, 8, ["customStyle"])
  11857. ]),
  11858. vue.createElementVNode("view", { class: "input-group" }, [
  11859. vue.createVNode(_component_u_input, {
  11860. customStyle: $setup.customStyle,
  11861. "placeholder-style": $setup.placeholderStyle,
  11862. modelValue: $setup.form.packageCode,
  11863. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.packageCode = $event),
  11864. placeholder: "扫描/输入物流单号",
  11865. border: "surround"
  11866. }, null, 8, ["customStyle", "modelValue"]),
  11867. vue.withDirectives(vue.createVNode(_component_u_button, {
  11868. customStyle: $setup.customStyle,
  11869. type: "info",
  11870. color: "#a4adb3",
  11871. onClick: _cache[2] || (_cache[2] = ($event) => $setup.handleBarcode($setup.form.packageCode)),
  11872. text: "确定"
  11873. }, null, 8, ["customStyle"]), [
  11874. [_directive_permission, "app:express:transferSign:confirm"]
  11875. ])
  11876. ])
  11877. ]),
  11878. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  11879. vue.createVNode(_component_u_button, {
  11880. size: "large",
  11881. type: "success",
  11882. onClick: $setup.scanCode,
  11883. text: "扫码",
  11884. class: "scan-button"
  11885. })
  11886. ]),
  11887. vue.createVNode($setup["WarehouseSelector"], {
  11888. show: $setup.showSelector,
  11889. "onUpdate:show": _cache[3] || (_cache[3] = ($event) => $setup.showSelector = $event),
  11890. onWarehouseSelected: $setup.handleWarehouseSelected
  11891. }, null, 8, ["show"])
  11892. ]);
  11893. }
  11894. const PagesIndexExpressTransferSign = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["render", _sfc_render$1y], ["__scopeId", "data-v-333d344a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/transfer-sign.vue"]]);
  11895. const _sfc_main$1y = {
  11896. __name: "scan",
  11897. setup(__props, { expose: __expose }) {
  11898. __expose();
  11899. const isInitializing = vue.ref(false);
  11900. const isBluetoothOpened = vue.ref(false);
  11901. const isDiscovering = vue.ref(false);
  11902. const isConnecting = vue.ref(false);
  11903. const isConnected = vue.ref(false);
  11904. const devices = vue.ref([]);
  11905. const selectedDevice = vue.ref(null);
  11906. const scanData = vue.ref(null);
  11907. const deviceId = vue.ref("");
  11908. const serviceId = vue.ref("");
  11909. const characteristicId = vue.ref("");
  11910. const initBluetooth = () => {
  11911. isInitializing.value = true;
  11912. uni.openBluetoothAdapter({
  11913. success: (res2) => {
  11914. formatAppLog("log", "at pages/index/express/scan.vue:35", "蓝牙适配器初始化成功");
  11915. isBluetoothOpened.value = true;
  11916. isInitializing.value = false;
  11917. },
  11918. fail: (err) => {
  11919. formatAppLog("log", "at pages/index/express/scan.vue:40", "蓝牙适配器初始化失败:", err);
  11920. isInitializing.value = false;
  11921. }
  11922. });
  11923. };
  11924. const startDiscovery = () => {
  11925. isDiscovering.value = true;
  11926. uni.startBluetoothDevicesDiscovery({
  11927. success: (res2) => {
  11928. formatAppLog("log", "at pages/index/express/scan.vue:50", "开始搜索蓝牙设备成功");
  11929. uni.onBluetoothDeviceFound((devicesRes) => {
  11930. const newDevices = devicesRes.devices;
  11931. devices.value = devices.value.concat(newDevices);
  11932. formatAppLog("log", "at pages/index/express/scan.vue:54", devices.value, "devices.value");
  11933. const scanGunDevice = newDevices.find((device) => device.name.includes("Z0"));
  11934. if (scanGunDevice) {
  11935. selectedDevice.value = scanGunDevice;
  11936. deviceId.value = scanGunDevice.deviceId;
  11937. }
  11938. });
  11939. uni.onBluetoothAdapterStateChange((stateRes) => {
  11940. if (!stateRes.available) {
  11941. isDiscovering.value = false;
  11942. formatAppLog("log", "at pages/index/express/scan.vue:64", "蓝牙适配器不可用,停止搜索");
  11943. }
  11944. });
  11945. },
  11946. fail: (err) => {
  11947. formatAppLog("log", "at pages/index/express/scan.vue:69", "开始搜索蓝牙设备失败:", err);
  11948. isDiscovering.value = false;
  11949. }
  11950. });
  11951. };
  11952. const connectDevice = () => {
  11953. isConnecting.value = true;
  11954. uni.createBLEConnection({
  11955. deviceId: deviceId.value,
  11956. success: (res2) => {
  11957. formatAppLog("log", "at pages/index/express/scan.vue:80", "连接蓝牙设备成功");
  11958. isConnected.value = true;
  11959. isConnecting.value = false;
  11960. getBLEDeviceServices(deviceId.value);
  11961. },
  11962. fail: (err) => {
  11963. formatAppLog("log", "at pages/index/express/scan.vue:86", "连接蓝牙设备失败:", err);
  11964. isConnecting.value = false;
  11965. }
  11966. });
  11967. };
  11968. const getBLEDeviceServices = (deviceId2) => {
  11969. uni.getBLEDeviceServices({
  11970. deviceId: deviceId2,
  11971. success: (res2) => {
  11972. formatAppLog("log", "at pages/index/express/scan.vue:96", "获取服务列表成功:", res2.services);
  11973. const targetService = res2.services.find((service) => service.uuid === "目标服务UUID");
  11974. if (targetService) {
  11975. serviceId.value = targetService.uuid;
  11976. getBLEDeviceCharacteristics(deviceId2, serviceId.value);
  11977. }
  11978. },
  11979. fail: (err) => {
  11980. formatAppLog("log", "at pages/index/express/scan.vue:104", "获取服务列表失败:", err);
  11981. }
  11982. });
  11983. };
  11984. const getBLEDeviceCharacteristics = (deviceId2, serviceId2) => {
  11985. uni.getBLEDeviceCharacteristics({
  11986. deviceId: deviceId2,
  11987. serviceId: serviceId2,
  11988. success: (res2) => {
  11989. formatAppLog("log", "at pages/index/express/scan.vue:114", "获取特征列表成功:", res2.characteristics);
  11990. const targetCharacteristic = res2.characteristics.find((characteristic) => characteristic.properties.read && characteristic.properties.notify);
  11991. if (targetCharacteristic) {
  11992. characteristicId.value = targetCharacteristic.uuid;
  11993. }
  11994. },
  11995. fail: (err) => {
  11996. formatAppLog("log", "at pages/index/express/scan.vue:121", "获取特征列表失败:", err);
  11997. }
  11998. });
  11999. };
  12000. const startDataMonitor = () => {
  12001. uni.onBLECharacteristicValueChange((characteristicRes) => {
  12002. const value2 = characteristicRes.value;
  12003. const data = ab2str(value2);
  12004. formatAppLog("log", "at pages/index/express/scan.vue:130", "获取到扫码枪扫描的数据:", data);
  12005. scanData.value = data;
  12006. });
  12007. uni.notifyBLECharacteristicValueChange({
  12008. state: true,
  12009. deviceId: deviceId.value,
  12010. characteristicId: characteristicId.value,
  12011. success: (res2) => {
  12012. formatAppLog("log", "at pages/index/express/scan.vue:138", "开启特征值通知成功");
  12013. },
  12014. fail: (err) => {
  12015. formatAppLog("log", "at pages/index/express/scan.vue:141", "开启特征值通知失败:", err);
  12016. }
  12017. });
  12018. };
  12019. const ab2str = (buffer) => {
  12020. return String.fromCharCode.apply(null, new Uint8Array(buffer));
  12021. };
  12022. 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() {
  12023. return onLoad;
  12024. } };
  12025. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  12026. return __returned__;
  12027. }
  12028. };
  12029. function _sfc_render$1x(_ctx, _cache, $props, $setup, $data, $options) {
  12030. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12031. vue.createElementVNode("button", {
  12032. onClick: $setup.initBluetooth,
  12033. disabled: $setup.isInitializing
  12034. }, "初始化蓝牙", 8, ["disabled"]),
  12035. vue.createElementVNode("button", {
  12036. onClick: $setup.startDiscovery,
  12037. disabled: $setup.isDiscovering || !$setup.isBluetoothOpened
  12038. }, "开始搜索设备", 8, ["disabled"]),
  12039. vue.createElementVNode("button", {
  12040. onClick: $setup.connectDevice,
  12041. disabled: !$setup.selectedDevice || $setup.isConnecting
  12042. }, "连接设备", 8, ["disabled"]),
  12043. vue.createElementVNode("button", {
  12044. onClick: $setup.startDataMonitor,
  12045. disabled: !$setup.isConnected
  12046. }, "开始监听数据", 8, ["disabled"]),
  12047. $setup.scanData ? (vue.openBlock(), vue.createElementBlock(
  12048. "view",
  12049. { key: 0 },
  12050. "扫描结果: " + vue.toDisplayString($setup.scanData),
  12051. 1
  12052. /* TEXT */
  12053. )) : vue.createCommentVNode("v-if", true),
  12054. (vue.openBlock(true), vue.createElementBlock(
  12055. vue.Fragment,
  12056. null,
  12057. vue.renderList($setup.devices, (item) => {
  12058. return vue.openBlock(), vue.createElementBlock(
  12059. "view",
  12060. null,
  12061. vue.toDisplayString(item.name),
  12062. 1
  12063. /* TEXT */
  12064. );
  12065. }),
  12066. 256
  12067. /* UNKEYED_FRAGMENT */
  12068. ))
  12069. ]);
  12070. }
  12071. const PagesIndexExpressScan = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["render", _sfc_render$1x], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/scan.vue"]]);
  12072. const props$j = {
  12073. props: {
  12074. // radio的名称
  12075. name: {
  12076. type: [String, Number, Boolean],
  12077. default: props$E.radio.name
  12078. },
  12079. // 形状,square为方形,circle为圆型
  12080. shape: {
  12081. type: String,
  12082. default: props$E.radio.shape
  12083. },
  12084. // 是否禁用
  12085. disabled: {
  12086. type: [String, Boolean],
  12087. default: props$E.radio.disabled
  12088. },
  12089. // 是否禁止点击提示语选中单选框
  12090. labelDisabled: {
  12091. type: [String, Boolean],
  12092. default: props$E.radio.labelDisabled
  12093. },
  12094. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  12095. activeColor: {
  12096. type: String,
  12097. default: props$E.radio.activeColor
  12098. },
  12099. // 未选中的颜色
  12100. inactiveColor: {
  12101. type: String,
  12102. default: props$E.radio.inactiveColor
  12103. },
  12104. // 图标的大小,单位px
  12105. iconSize: {
  12106. type: [String, Number],
  12107. default: props$E.radio.iconSize
  12108. },
  12109. // label的字体大小,px单位
  12110. labelSize: {
  12111. type: [String, Number],
  12112. default: props$E.radio.labelSize
  12113. },
  12114. // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
  12115. label: {
  12116. type: [String, Number],
  12117. default: props$E.radio.label
  12118. },
  12119. // 整体的大小
  12120. size: {
  12121. type: [String, Number],
  12122. default: props$E.radio.size
  12123. },
  12124. // 图标颜色
  12125. color: {
  12126. type: String,
  12127. default: props$E.radio.color
  12128. },
  12129. // label的颜色
  12130. labelColor: {
  12131. type: String,
  12132. default: props$E.radio.labelColor
  12133. },
  12134. // 图标颜色
  12135. iconColor: {
  12136. type: String,
  12137. default: props$E.radio.iconColor
  12138. }
  12139. }
  12140. };
  12141. const _sfc_main$1x = {
  12142. name: "u-radio",
  12143. mixins: [mpMixin, mixin, props$j],
  12144. data() {
  12145. return {
  12146. checked: false,
  12147. // 当你看到这段代码的时候,
  12148. // 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式
  12149. // 故只能使用如此方法
  12150. parentData: {
  12151. iconSize: 12,
  12152. labelDisabled: null,
  12153. disabled: null,
  12154. shape: null,
  12155. activeColor: null,
  12156. inactiveColor: null,
  12157. size: 18,
  12158. value: null,
  12159. modelValue: null,
  12160. iconColor: null,
  12161. placement: "row",
  12162. borderBottom: false,
  12163. iconPlacement: "left"
  12164. }
  12165. };
  12166. },
  12167. computed: {
  12168. // 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置
  12169. elDisabled() {
  12170. return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false;
  12171. },
  12172. // 是否禁用label点击
  12173. elLabelDisabled() {
  12174. return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false;
  12175. },
  12176. // 组件尺寸,对应size的值,默认值为21px
  12177. elSize() {
  12178. return this.size ? this.size : this.parentData.size ? this.parentData.size : 21;
  12179. },
  12180. // 组件的勾选图标的尺寸,默认12px
  12181. elIconSize() {
  12182. return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12;
  12183. },
  12184. // 组件选中激活时的颜色
  12185. elActiveColor() {
  12186. return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : "#2979ff";
  12187. },
  12188. // 组件选未中激活时的颜色
  12189. elInactiveColor() {
  12190. return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : "#c8c9cc";
  12191. },
  12192. // label的颜色
  12193. elLabelColor() {
  12194. return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : "#606266";
  12195. },
  12196. // 组件的形状
  12197. elShape() {
  12198. return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle";
  12199. },
  12200. // label大小
  12201. elLabelSize() {
  12202. return uni.$u.addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : "15");
  12203. },
  12204. elIconColor() {
  12205. const iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : "#ffffff";
  12206. if (this.elDisabled) {
  12207. return this.checked ? this.elInactiveColor : "transparent";
  12208. } else {
  12209. return this.checked ? iconColor : "transparent";
  12210. }
  12211. },
  12212. iconClasses() {
  12213. let classes = [];
  12214. classes.push("u-radio__icon-wrap--" + this.elShape);
  12215. if (this.elDisabled) {
  12216. classes.push("u-radio__icon-wrap--disabled");
  12217. }
  12218. if (this.checked && this.elDisabled) {
  12219. classes.push("u-radio__icon-wrap--disabled--checked");
  12220. }
  12221. return classes;
  12222. },
  12223. iconWrapStyle() {
  12224. const style = {};
  12225. style.backgroundColor = this.checked && !this.elDisabled ? this.elActiveColor : "#ffffff";
  12226. style.borderColor = this.checked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor;
  12227. style.width = uni.$u.addUnit(this.elSize);
  12228. style.height = uni.$u.addUnit(this.elSize);
  12229. if (this.parentData.iconPlacement === "right") {
  12230. style.marginRight = 0;
  12231. }
  12232. return style;
  12233. },
  12234. radioStyle() {
  12235. const style = {};
  12236. if (this.parentData.borderBottom && this.parentData.placement === "row") {
  12237. uni.$u.error("检测到您将borderBottom设置为true,需要同时将u-radio-group的placement设置为column才有效");
  12238. }
  12239. if (this.parentData.borderBottom && this.parentData.placement === "column") {
  12240. style.paddingBottom = uni.$u.os() === "ios" ? "12px" : "8px";
  12241. }
  12242. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  12243. }
  12244. },
  12245. mounted() {
  12246. this.init();
  12247. },
  12248. methods: {
  12249. init() {
  12250. this.updateParentData();
  12251. if (!this.parent) {
  12252. uni.$u.error("u-radio必须搭配u-radio-group组件使用");
  12253. }
  12254. this.checked = this.name === this.parentData.modelValue;
  12255. },
  12256. updateParentData() {
  12257. this.getParentData("u-radio-group");
  12258. },
  12259. // 点击图标
  12260. iconClickHandler(e) {
  12261. this.preventEvent(e);
  12262. if (!this.elDisabled) {
  12263. this.setRadioCheckedStatus();
  12264. }
  12265. },
  12266. // 横向两端排列时,点击组件即可触发选中事件
  12267. wrapperClickHandler(e) {
  12268. this.parentData.iconPlacement === "right" && this.iconClickHandler(e);
  12269. },
  12270. // 点击label
  12271. labelClickHandler(e) {
  12272. this.preventEvent(e);
  12273. if (!this.elLabelDisabled && !this.elDisabled) {
  12274. this.setRadioCheckedStatus();
  12275. }
  12276. },
  12277. emitEvent() {
  12278. if (!this.checked) {
  12279. this.$emit("change", this.name);
  12280. this.$nextTick(() => {
  12281. uni.$u.formValidate(this, "change");
  12282. });
  12283. }
  12284. },
  12285. // 改变组件选中状态
  12286. // 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-radio实例
  12287. // 将本组件外的其他u-radio的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态
  12288. setRadioCheckedStatus() {
  12289. this.emitEvent();
  12290. this.checked = true;
  12291. typeof this.parent.unCheckedOther === "function" && this.parent.unCheckedOther(this);
  12292. }
  12293. }
  12294. };
  12295. function _sfc_render$1w(_ctx, _cache, $props, $setup, $data, $options) {
  12296. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  12297. return vue.openBlock(), vue.createElementBlock(
  12298. "view",
  12299. {
  12300. class: vue.normalizeClass(["u-radio", [`u-radio-label--${$data.parentData.iconPlacement}`, $data.parentData.borderBottom && $data.parentData.placement === "column" && "u-border-bottom"]]),
  12301. onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.wrapperClickHandler && $options.wrapperClickHandler(...args), ["stop"])),
  12302. style: vue.normalizeStyle([$options.radioStyle])
  12303. },
  12304. [
  12305. vue.createElementVNode(
  12306. "view",
  12307. {
  12308. class: vue.normalizeClass(["u-radio__icon-wrap", $options.iconClasses]),
  12309. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.iconClickHandler && $options.iconClickHandler(...args), ["stop"])),
  12310. style: vue.normalizeStyle([$options.iconWrapStyle])
  12311. },
  12312. [
  12313. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  12314. vue.createVNode(_component_u_icon, {
  12315. class: "u-radio__icon-wrap__icon",
  12316. name: "checkbox-mark",
  12317. size: $options.elIconSize,
  12318. color: $options.elIconColor
  12319. }, null, 8, ["size", "color"])
  12320. ], true)
  12321. ],
  12322. 6
  12323. /* CLASS, STYLE */
  12324. ),
  12325. vue.createElementVNode(
  12326. "text",
  12327. {
  12328. class: "u-radio__text",
  12329. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.labelClickHandler && $options.labelClickHandler(...args), ["stop"])),
  12330. style: vue.normalizeStyle({
  12331. color: $options.elDisabled ? $options.elInactiveColor : $options.elLabelColor,
  12332. fontSize: $options.elLabelSize,
  12333. lineHeight: $options.elLabelSize
  12334. })
  12335. },
  12336. vue.toDisplayString(_ctx.label),
  12337. 5
  12338. /* TEXT, STYLE */
  12339. )
  12340. ],
  12341. 6
  12342. /* CLASS, STYLE */
  12343. );
  12344. }
  12345. const __easycom_0$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["render", _sfc_render$1w], ["__scopeId", "data-v-83036558"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-radio/u-radio.vue"]]);
  12346. const props$i = {
  12347. props: {
  12348. // 绑定的值
  12349. modelValue: {
  12350. type: [String, Number, Boolean],
  12351. default: props$E.radioGroup.value
  12352. },
  12353. // 是否禁用全部radio
  12354. disabled: {
  12355. type: Boolean,
  12356. default: props$E.radioGroup.disabled
  12357. },
  12358. // 形状,circle-圆形,square-方形
  12359. shape: {
  12360. type: String,
  12361. default: props$E.radioGroup.shape
  12362. },
  12363. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  12364. activeColor: {
  12365. type: String,
  12366. default: props$E.radioGroup.activeColor
  12367. },
  12368. // 未选中的颜色
  12369. inactiveColor: {
  12370. type: String,
  12371. default: props$E.radioGroup.inactiveColor
  12372. },
  12373. // 标识符
  12374. name: {
  12375. type: String,
  12376. default: props$E.radioGroup.name
  12377. },
  12378. // 整个组件的尺寸,默认px
  12379. size: {
  12380. type: [String, Number],
  12381. default: props$E.radioGroup.size
  12382. },
  12383. // 布局方式,row-横向,column-纵向
  12384. placement: {
  12385. type: String,
  12386. default: props$E.radioGroup.placement
  12387. },
  12388. // label的文本
  12389. label: {
  12390. type: [String],
  12391. default: props$E.radioGroup.label
  12392. },
  12393. // label的颜色 (默认 '#303133' )
  12394. labelColor: {
  12395. type: [String],
  12396. default: props$E.radioGroup.labelColor
  12397. },
  12398. // label的字体大小,px单位
  12399. labelSize: {
  12400. type: [String, Number],
  12401. default: props$E.radioGroup.labelSize
  12402. },
  12403. // 是否禁止点击文本操作checkbox(默认 false )
  12404. labelDisabled: {
  12405. type: Boolean,
  12406. default: props$E.radioGroup.labelDisabled
  12407. },
  12408. // 图标颜色
  12409. iconColor: {
  12410. type: String,
  12411. default: props$E.radioGroup.iconColor
  12412. },
  12413. // 图标的大小,单位px
  12414. iconSize: {
  12415. type: [String, Number],
  12416. default: props$E.radioGroup.iconSize
  12417. },
  12418. // 竖向配列时,是否显示下划线
  12419. borderBottom: {
  12420. type: Boolean,
  12421. default: props$E.radioGroup.borderBottom
  12422. },
  12423. // 图标与文字的对齐方式
  12424. iconPlacement: {
  12425. type: String,
  12426. default: props$E.radio.iconPlacement
  12427. }
  12428. }
  12429. };
  12430. const _sfc_main$1w = {
  12431. name: "u-radio-group",
  12432. mixins: [mpMixin, mixin, props$i],
  12433. computed: {
  12434. // 这里computed的变量,都是子组件u-radio需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
  12435. // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-radio-group)
  12436. // 拉取父组件新的变化后的参数
  12437. parentData() {
  12438. return [
  12439. this.modelValue,
  12440. this.disabled,
  12441. this.inactiveColor,
  12442. this.activeColor,
  12443. this.size,
  12444. this.labelDisabled,
  12445. this.shape,
  12446. this.iconSize,
  12447. this.borderBottom,
  12448. this.placement
  12449. ];
  12450. },
  12451. bemClass() {
  12452. return this.bem("radio-group", ["placement"]);
  12453. }
  12454. },
  12455. watch: {
  12456. // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
  12457. parentData() {
  12458. if (this.children.length) {
  12459. this.children.map((child) => {
  12460. typeof child.init === "function" && child.init();
  12461. });
  12462. }
  12463. }
  12464. },
  12465. data() {
  12466. return {};
  12467. },
  12468. created() {
  12469. this.children = [];
  12470. },
  12471. emits: ["update:modelValue", "change"],
  12472. methods: {
  12473. // 将其他的radio设置为未选中的状态
  12474. unCheckedOther(childInstance) {
  12475. this.children.map((child) => {
  12476. if (childInstance !== child) {
  12477. child.checked = false;
  12478. }
  12479. });
  12480. const {
  12481. name
  12482. } = childInstance;
  12483. this.$emit("update:modelValue", name);
  12484. this.$emit("change", name);
  12485. }
  12486. }
  12487. };
  12488. function _sfc_render$1v(_ctx, _cache, $props, $setup, $data, $options) {
  12489. return vue.openBlock(), vue.createElementBlock(
  12490. "view",
  12491. {
  12492. class: vue.normalizeClass(["u-radio-group", $options.bemClass])
  12493. },
  12494. [
  12495. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  12496. ],
  12497. 2
  12498. /* CLASS */
  12499. );
  12500. }
  12501. const __easycom_1$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["render", _sfc_render$1v], ["__scopeId", "data-v-cbc8bf70"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-radio-group/u-radio-group.vue"]]);
  12502. const props$h = {
  12503. props: {
  12504. // 是否虚线
  12505. dashed: {
  12506. type: Boolean,
  12507. default: props$E.divider.dashed
  12508. },
  12509. // 是否细线
  12510. hairline: {
  12511. type: Boolean,
  12512. default: props$E.divider.hairline
  12513. },
  12514. // 是否以点替代文字,优先于text字段起作用
  12515. dot: {
  12516. type: Boolean,
  12517. default: props$E.divider.dot
  12518. },
  12519. // 内容文本的位置,left-左边,center-中间,right-右边
  12520. textPosition: {
  12521. type: String,
  12522. default: props$E.divider.textPosition
  12523. },
  12524. // 文本内容
  12525. text: {
  12526. type: [String, Number],
  12527. default: props$E.divider.text
  12528. },
  12529. // 文本大小
  12530. textSize: {
  12531. type: [String, Number],
  12532. default: props$E.divider.textSize
  12533. },
  12534. // 文本颜色
  12535. textColor: {
  12536. type: String,
  12537. default: props$E.divider.textColor
  12538. },
  12539. // 线条颜色
  12540. lineColor: {
  12541. type: String,
  12542. default: props$E.divider.lineColor
  12543. }
  12544. }
  12545. };
  12546. const _sfc_main$1v = {
  12547. name: "u-divider",
  12548. mixins: [mpMixin, mixin, props$h],
  12549. computed: {
  12550. textStyle() {
  12551. const style = {};
  12552. style.fontSize = uni.$u.addUnit(this.textSize);
  12553. style.color = this.textColor;
  12554. return style;
  12555. },
  12556. // 左边线条的的样式
  12557. leftLineStyle() {
  12558. const style = {};
  12559. if (this.textPosition === "left") {
  12560. style.width = "80rpx";
  12561. } else {
  12562. style.flex = 1;
  12563. }
  12564. return style;
  12565. },
  12566. // 右边线条的的样式
  12567. rightLineStyle() {
  12568. const style = {};
  12569. if (this.textPosition === "right") {
  12570. style.width = "80rpx";
  12571. } else {
  12572. style.flex = 1;
  12573. }
  12574. return style;
  12575. }
  12576. },
  12577. methods: {
  12578. // divider组件被点击时触发
  12579. click() {
  12580. this.$emit("click");
  12581. }
  12582. }
  12583. };
  12584. function _sfc_render$1u(_ctx, _cache, $props, $setup, $data, $options) {
  12585. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$e);
  12586. return vue.openBlock(), vue.createElementBlock(
  12587. "view",
  12588. {
  12589. class: "u-divider",
  12590. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
  12591. onClick: _cache[0] || (_cache[0] = (...args) => $options.click && $options.click(...args))
  12592. },
  12593. [
  12594. vue.createVNode(_component_u_line, {
  12595. color: _ctx.lineColor,
  12596. customStyle: $options.leftLineStyle,
  12597. hairline: _ctx.hairline,
  12598. dashed: _ctx.dashed
  12599. }, null, 8, ["color", "customStyle", "hairline", "dashed"]),
  12600. _ctx.dot ? (vue.openBlock(), vue.createElementBlock("text", {
  12601. key: 0,
  12602. class: "u-divider__dot"
  12603. }, "●")) : _ctx.text ? (vue.openBlock(), vue.createElementBlock(
  12604. "text",
  12605. {
  12606. key: 1,
  12607. class: "u-divider__text",
  12608. style: vue.normalizeStyle([$options.textStyle])
  12609. },
  12610. vue.toDisplayString(_ctx.text),
  12611. 5
  12612. /* TEXT, STYLE */
  12613. )) : vue.createCommentVNode("v-if", true),
  12614. vue.createVNode(_component_u_line, {
  12615. color: _ctx.lineColor,
  12616. customStyle: $options.rightLineStyle,
  12617. hairline: _ctx.hairline,
  12618. dashed: _ctx.dashed
  12619. }, null, 8, ["color", "customStyle", "hairline", "dashed"])
  12620. ],
  12621. 4
  12622. /* STYLE */
  12623. );
  12624. }
  12625. const __easycom_2$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["render", _sfc_render$1u], ["__scopeId", "data-v-ea022cee"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-divider/u-divider.vue"]]);
  12626. const _sfc_main$1u = {
  12627. __name: "quick-check",
  12628. setup(__props, { expose: __expose }) {
  12629. __expose();
  12630. const selectedBatchId = vue.ref("");
  12631. const showBatchSelector = vue.ref(false);
  12632. const count = vue.ref(0);
  12633. const formData = vue.ref({
  12634. batchNum: "",
  12635. packageCode: "",
  12636. searchType: "2",
  12637. packageStatus: ""
  12638. });
  12639. const batchList = vue.ref([]);
  12640. function getBatchList() {
  12641. uni.$u.http.get("/app/batchnum/pagelist").then((res2) => {
  12642. batchList.value = res2.rows;
  12643. });
  12644. }
  12645. getBatchList();
  12646. const openBatchSelector = () => {
  12647. showBatchSelector.value = true;
  12648. };
  12649. const selectBatch = (batch) => {
  12650. selectedBatchId.value = batch.id;
  12651. count.value = Number(batch.num);
  12652. formData.value.batchNum = batch.batchNum;
  12653. showBatchSelector.value = false;
  12654. };
  12655. const handleSearch = () => {
  12656. formatAppLog("log", "at pages/index/express/quick-check.vue:117", "查询:", formData.value.packageCode);
  12657. };
  12658. const handleSubmitBatch = () => {
  12659. formatAppLog("log", "at pages/index/express/quick-check.vue:122", "提交批次:", formData.value.batchNum);
  12660. if (!formData.value.batchNum) {
  12661. uni.$u.toast("请选择批次");
  12662. return;
  12663. }
  12664. if (!formData.value.packageCode) {
  12665. uni.$u.toast("请扫描/输入物流单号");
  12666. return;
  12667. }
  12668. uni.$u.http.post("/app/ordersign/deliverySign", formData.value).then((res2) => {
  12669. formatAppLog("log", "at pages/index/express/quick-check.vue:132", res2);
  12670. if (res2.code == 200) {
  12671. let text = code + "快递验收成功";
  12672. uni.$u.ttsModule.speak(text);
  12673. } else {
  12674. let text = code + "订单不存在";
  12675. uni.$u.ttsModule.speak(text);
  12676. }
  12677. });
  12678. };
  12679. const handleScan = () => {
  12680. uni.scanCode({
  12681. success: (res2) => {
  12682. formData.value.packageCode = res2.result;
  12683. handleSubmitBatch();
  12684. }
  12685. });
  12686. };
  12687. const createNewBatch = () => {
  12688. uni.$u.http.post("/app/batchnum/add").then((res2) => {
  12689. if (res2.code == 200) {
  12690. getBatchList();
  12691. }
  12692. });
  12693. };
  12694. onLoad(() => {
  12695. uni.$u.useGlobalEvent((e) => {
  12696. formData.value.packageCode = e.barcode;
  12697. handleSubmitBatch();
  12698. });
  12699. });
  12700. onShow(() => {
  12701. uni.$u.updateActivePageOnShow();
  12702. });
  12703. const __returned__ = { selectedBatchId, showBatchSelector, count, formData, batchList, getBatchList, openBatchSelector, selectBatch, handleSearch, handleSubmitBatch, handleScan, createNewBatch, ref: vue.ref, get onLoad() {
  12704. return onLoad;
  12705. }, get onShow() {
  12706. return onShow;
  12707. } };
  12708. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  12709. return __returned__;
  12710. }
  12711. };
  12712. function _sfc_render$1t(_ctx, _cache, $props, $setup, $data, $options) {
  12713. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  12714. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  12715. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
  12716. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$5);
  12717. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  12718. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$2);
  12719. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  12720. const _directive_permission = vue.resolveDirective("permission");
  12721. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12722. vue.createCommentVNode(" 批次选择区域 "),
  12723. vue.createElementVNode("view", { class: "select-section" }, [
  12724. vue.createElementVNode("view", { class: "batch-select" }, [
  12725. vue.createElementVNode("text", { class: "required" }, "*"),
  12726. vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "批次:"),
  12727. vue.createElementVNode("view", { class: "batch-input" }, [
  12728. vue.createElementVNode("view", {
  12729. class: "batch-input-text",
  12730. onClick: $setup.openBatchSelector
  12731. }),
  12732. vue.createVNode(_component_u_input, {
  12733. modelValue: $setup.formData.batchNum,
  12734. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.batchNum = $event),
  12735. placeholder: "请选择/新建批次",
  12736. readonly: "",
  12737. border: "surround",
  12738. "placeholder-style": "font-size: 32rpx",
  12739. "custom-style": "font-size: 32rpx;height: 88rpx;"
  12740. }, {
  12741. suffix: vue.withCtx(() => [
  12742. vue.createVNode(_component_u_icon, {
  12743. name: "arrow-down",
  12744. size: "18"
  12745. })
  12746. ]),
  12747. _: 1
  12748. /* STABLE */
  12749. }, 8, ["modelValue"])
  12750. ])
  12751. ])
  12752. ]),
  12753. vue.createCommentVNode(" 数量显示 "),
  12754. vue.createElementVNode("view", { class: "count-badge" }, [
  12755. vue.createTextVNode(" 数量 "),
  12756. vue.createElementVNode(
  12757. "text",
  12758. { style: { "font-size": "32rpx" } },
  12759. vue.toDisplayString($setup.count),
  12760. 1
  12761. /* TEXT */
  12762. )
  12763. ]),
  12764. vue.createCommentVNode(" 底部按钮 "),
  12765. vue.createElementVNode("view", { class: "footer" }, [
  12766. vue.createCommentVNode(" 查询区域 "),
  12767. vue.createElementVNode("view", { class: "query-section" }, [
  12768. vue.createVNode(_component_u_radio_group, {
  12769. modelValue: $setup.formData.searchType,
  12770. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.searchType = $event),
  12771. class: "query-radio"
  12772. }, {
  12773. default: vue.withCtx(() => [
  12774. vue.createVNode(_component_u_radio, {
  12775. label: "查订单",
  12776. name: "1",
  12777. labelSize: "16px",
  12778. iconSize: "16px"
  12779. }),
  12780. vue.createVNode(_component_u_radio, {
  12781. label: "查物流",
  12782. "custom-style": "margin-left:20px",
  12783. name: "2",
  12784. labelSize: "16px",
  12785. iconSize: "16px"
  12786. })
  12787. ]),
  12788. _: 1
  12789. /* STABLE */
  12790. }, 8, ["modelValue"]),
  12791. vue.createElementVNode("view", { class: "search-box" }, [
  12792. vue.createVNode(_component_u_input, {
  12793. "custom-style": "font-size: 32rpx;",
  12794. "placeholder-style": "font-size: 32rpx;",
  12795. modelValue: $setup.formData.packageCode,
  12796. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.packageCode = $event),
  12797. adjustPosition: true,
  12798. placeholder: "扫描/输入物流单号",
  12799. border: "surround",
  12800. clearable: ""
  12801. }, null, 8, ["modelValue"]),
  12802. vue.createVNode(_component_u_button, {
  12803. color: "#c8c8c8",
  12804. text: "查询",
  12805. onClick: $setup.handleSearch
  12806. })
  12807. ])
  12808. ]),
  12809. vue.createVNode(_component_u_divider),
  12810. vue.createElementVNode("view", { style: { "display": "flex" } }, [
  12811. vue.createVNode(_component_u_button, {
  12812. size: "large",
  12813. type: "warning",
  12814. text: "验收扫码",
  12815. onClick: $setup.handleScan
  12816. }),
  12817. vue.withDirectives(vue.createVNode(
  12818. _component_u_button,
  12819. {
  12820. size: "large",
  12821. type: "primary",
  12822. text: "提交批次",
  12823. onClick: $setup.handleSubmitBatch
  12824. },
  12825. null,
  12826. 512
  12827. /* NEED_PATCH */
  12828. ), [
  12829. [_directive_permission, "app:express:quickCheck:confirm"]
  12830. ])
  12831. ])
  12832. ]),
  12833. vue.createCommentVNode(" 批次选择弹窗 "),
  12834. vue.createVNode(_component_u_popup, {
  12835. show: $setup.showBatchSelector,
  12836. mode: "bottom",
  12837. onClose: _cache[3] || (_cache[3] = ($event) => $setup.showBatchSelector = false)
  12838. }, {
  12839. default: vue.withCtx(() => [
  12840. vue.createElementVNode("view", {
  12841. class: "batch-popup",
  12842. style: { "min-height": "300px" }
  12843. }, [
  12844. vue.createElementVNode("view", { class: "popup-header" }, [
  12845. vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "批次"),
  12846. vue.createElementVNode("view", {
  12847. style: { "font-size": "32rpx", "color": "#007AFF" },
  12848. onClick: $setup.createNewBatch
  12849. }, [
  12850. vue.createElementVNode("text", null, "新建批次")
  12851. ])
  12852. ]),
  12853. vue.createElementVNode("scroll-view", {
  12854. "scroll-y": "",
  12855. class: "batch-list"
  12856. }, [
  12857. (vue.openBlock(true), vue.createElementBlock(
  12858. vue.Fragment,
  12859. null,
  12860. vue.renderList($setup.batchList, (batch) => {
  12861. return vue.openBlock(), vue.createElementBlock("view", {
  12862. key: batch.id,
  12863. class: vue.normalizeClass(["batch-item", { active: $setup.selectedBatchId === batch.id }]),
  12864. onClick: ($event) => $setup.selectBatch(batch)
  12865. }, [
  12866. vue.createElementVNode(
  12867. "text",
  12868. null,
  12869. vue.toDisplayString(batch.batchNum),
  12870. 1
  12871. /* TEXT */
  12872. ),
  12873. vue.createElementVNode(
  12874. "text",
  12875. null,
  12876. vue.toDisplayString(batch.num),
  12877. 1
  12878. /* TEXT */
  12879. )
  12880. ], 10, ["onClick"]);
  12881. }),
  12882. 128
  12883. /* KEYED_FRAGMENT */
  12884. ))
  12885. ])
  12886. ])
  12887. ]),
  12888. _: 1
  12889. /* STABLE */
  12890. }, 8, ["show"])
  12891. ]);
  12892. }
  12893. const PagesIndexExpressQuickCheck = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["render", _sfc_render$1t], ["__scopeId", "data-v-61cc11f4"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/quick-check.vue"]]);
  12894. const keymap = {
  12895. "7": "0",
  12896. "8": "1",
  12897. "9": "2",
  12898. "10": "3",
  12899. "11": "4",
  12900. "12": "5",
  12901. "13": "6",
  12902. "14": "7",
  12903. "15": "8",
  12904. "16": "9",
  12905. "29": "A",
  12906. "30": "B",
  12907. "31": "C",
  12908. "32": "D",
  12909. "33": "E",
  12910. "34": "F",
  12911. "35": "G",
  12912. "36": "H",
  12913. "37": "I",
  12914. "38": "J",
  12915. "39": "K",
  12916. "40": "L",
  12917. "41": "M",
  12918. "42": "N",
  12919. "43": "O",
  12920. "44": "P",
  12921. "45": "Q",
  12922. "46": "R",
  12923. "47": "S",
  12924. "48": "T",
  12925. "49": "U",
  12926. "50": "V",
  12927. "51": "W",
  12928. "52": "X",
  12929. "53": "Y",
  12930. "54": "Z",
  12931. "55": ",",
  12932. "56": ".",
  12933. "59": "",
  12934. "69": "-",
  12935. "70": "=",
  12936. "81": "+"
  12937. };
  12938. const _sfc_main$1t = {
  12939. __name: "quick-unpack",
  12940. setup(__props, { expose: __expose }) {
  12941. __expose();
  12942. function goScan() {
  12943. uni.navigateTo({
  12944. url: "/pages/index/express/scan"
  12945. });
  12946. }
  12947. const unpackCode = vue.ref("");
  12948. function confirmTrackingNumber(code2) {
  12949. uni.$u.http.post("/app/ordersign/unpackingSign", {
  12950. packageCode: code2
  12951. }).then((res2) => {
  12952. if (res2.code == 200) {
  12953. let text = code2 + "拆包成功";
  12954. uni.$u.ttsModule.speak(text);
  12955. } else {
  12956. let text = code2 + res2.msg;
  12957. uni.$u.ttsModule.speak(text);
  12958. }
  12959. });
  12960. }
  12961. function scanCode() {
  12962. uni.scanCode({
  12963. success: (res2) => {
  12964. unpackCode.value = res2.result;
  12965. confirmTrackingNumber(res2.result);
  12966. formatAppLog("log", "at pages/index/express/quick-unpack.vue:68", "扫码结果:", res2.result);
  12967. },
  12968. fail: (err) => {
  12969. formatAppLog("error", "at pages/index/express/quick-unpack.vue:71", "扫码失败:", err);
  12970. }
  12971. });
  12972. }
  12973. const inputCache = vue.ref("");
  12974. const keypress = (e) => {
  12975. if (e.keyCode === 66 || e.key == "Enter") {
  12976. unpackCode.value = inputCache.value;
  12977. confirmTrackingNumber(unpackCode.value);
  12978. inputCache.value = "";
  12979. } else {
  12980. inputCache.value += keymap[e.keyCode] || "";
  12981. }
  12982. };
  12983. onLoad(() => {
  12984. uni.$u.useGlobalEvent((e) => {
  12985. unpackCode.value = e.barcode;
  12986. confirmTrackingNumber(e.barcode);
  12987. });
  12988. plus.key.addEventListener("keyup", keypress);
  12989. });
  12990. onUnload(() => {
  12991. plus.key.removeEventListener("keyup", keypress);
  12992. });
  12993. onShow(() => {
  12994. uni.$u.updateActivePageOnShow();
  12995. });
  12996. const __returned__ = { goScan, unpackCode, confirmTrackingNumber, scanCode, inputCache, keypress, ref: vue.ref, get onLoad() {
  12997. return onLoad;
  12998. }, get onUnload() {
  12999. return onUnload;
  13000. }, get onShow() {
  13001. return onShow;
  13002. }, get keymap() {
  13003. return keymap;
  13004. } };
  13005. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  13006. return __returned__;
  13007. }
  13008. };
  13009. function _sfc_render$1s(_ctx, _cache, $props, $setup, $data, $options) {
  13010. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  13011. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  13012. const _directive_permission = vue.resolveDirective("permission");
  13013. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  13014. vue.createCommentVNode(' <view class="container">\r\n <button @click="initBluetooth" :disabled="isInitializing">初始化蓝牙</button>\r\n <button @click="startDiscovery" :disabled="isDiscovering || !isBluetoothOpened">开始搜索设备</button>\r\n <button @click="connectDevice" :disabled="!selectedDevice || isConnecting">连接设备</button>\r\n <button @click="startDataMonitor" :disabled="!isConnected">开始监听数据</button>\r\n <view v-if="scanData">扫描结果: {{ scanData }}</view>\r\n </view> '),
  13015. vue.createCommentVNode(' <u-button type="primary" @click="goScan" text="扫码" /> '),
  13016. vue.createElementVNode("view", { class: "main-content" }, [
  13017. vue.createElementVNode("view", { class: "input-group" }, [
  13018. vue.createVNode(_component_u_input, {
  13019. "placeholder-style": "font-size:32rpx",
  13020. modelValue: $setup.unpackCode,
  13021. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.unpackCode = $event),
  13022. placeholder: "扫描/输入物流单号",
  13023. border: "surround"
  13024. }, null, 8, ["modelValue"]),
  13025. vue.withDirectives(vue.createVNode(
  13026. _component_u_button,
  13027. {
  13028. type: "primary",
  13029. onClick: _cache[1] || (_cache[1] = ($event) => $setup.confirmTrackingNumber($setup.unpackCode)),
  13030. text: "确定"
  13031. },
  13032. null,
  13033. 512
  13034. /* NEED_PATCH */
  13035. ), [
  13036. [_directive_permission, "app:express:quickUnpack:confirm"]
  13037. ])
  13038. ])
  13039. ]),
  13040. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  13041. vue.createVNode(_component_u_button, {
  13042. size: "large",
  13043. type: "success",
  13044. onClick: $setup.scanCode,
  13045. text: "扫码",
  13046. class: "scan-button"
  13047. })
  13048. ])
  13049. ]);
  13050. }
  13051. const PagesIndexExpressQuickUnpack = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["render", _sfc_render$1s], ["__scopeId", "data-v-cd1b3ab5"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/quick-unpack.vue"]]);
  13052. const props$g = {
  13053. props: {
  13054. // tab的数据
  13055. list: {
  13056. type: Array,
  13057. default: props$E.subsection.list
  13058. },
  13059. // 当前活动的tab的index
  13060. current: {
  13061. type: [String, Number],
  13062. default: props$E.subsection.current
  13063. },
  13064. // 激活的颜色
  13065. activeColor: {
  13066. type: String,
  13067. default: props$E.subsection.activeColor
  13068. },
  13069. // 未激活的颜色
  13070. inactiveColor: {
  13071. type: String,
  13072. default: props$E.subsection.inactiveColor
  13073. },
  13074. // 模式选择,mode=button为按钮形式,mode=subsection时为分段模式
  13075. mode: {
  13076. type: String,
  13077. default: props$E.subsection.mode
  13078. },
  13079. // 字体大小
  13080. fontSize: {
  13081. type: [String, Number],
  13082. default: props$E.subsection.fontSize
  13083. },
  13084. // 激活tab的字体是否加粗
  13085. bold: {
  13086. type: Boolean,
  13087. default: props$E.subsection.bold
  13088. },
  13089. // mode = button时,组件背景颜色
  13090. bgColor: {
  13091. type: String,
  13092. default: props$E.subsection.bgColor
  13093. },
  13094. // 从list元素对象中读取的键名
  13095. keyName: {
  13096. type: String,
  13097. default: props$E.subsection.keyName
  13098. }
  13099. }
  13100. };
  13101. const _sfc_main$1s = {
  13102. name: "u-subsection",
  13103. mixins: [mpMixin, mixin, props$g],
  13104. data() {
  13105. return {
  13106. // 组件尺寸
  13107. itemRect: {
  13108. width: 0,
  13109. height: 0
  13110. }
  13111. };
  13112. },
  13113. watch: {
  13114. list(newValue, oldValue) {
  13115. this.init();
  13116. },
  13117. current: {
  13118. immediate: true,
  13119. handler(n) {
  13120. }
  13121. }
  13122. },
  13123. computed: {
  13124. wrapperStyle() {
  13125. const style = {};
  13126. if (this.mode === "button") {
  13127. style.backgroundColor = this.bgColor;
  13128. }
  13129. return style;
  13130. },
  13131. // 滑块的样式
  13132. barStyle() {
  13133. const style = {};
  13134. style.width = `${this.itemRect.width}px`;
  13135. style.height = `${this.itemRect.height}px`;
  13136. style.transform = `translateX(${this.current * this.itemRect.width}px)`;
  13137. if (this.mode === "subsection") {
  13138. style.backgroundColor = this.activeColor;
  13139. }
  13140. return style;
  13141. },
  13142. // 分段器item的样式
  13143. itemStyle(index2) {
  13144. return (index3) => {
  13145. const style = {};
  13146. if (this.mode === "subsection") {
  13147. style.borderColor = this.activeColor;
  13148. style.borderWidth = "1px";
  13149. style.borderStyle = "solid";
  13150. }
  13151. return style;
  13152. };
  13153. },
  13154. // 分段器文字颜色
  13155. textStyle(index2) {
  13156. return (index3) => {
  13157. const style = {};
  13158. style.fontWeight = this.bold && this.current === index3 ? "bold" : "normal";
  13159. style.fontSize = uni.$u.addUnit(this.fontSize);
  13160. if (this.mode === "subsection") {
  13161. style.color = this.current === index3 ? "#fff" : this.inactiveColor;
  13162. } else {
  13163. style.color = this.current === index3 ? this.activeColor : this.inactiveColor;
  13164. }
  13165. return style;
  13166. };
  13167. }
  13168. },
  13169. mounted() {
  13170. this.init();
  13171. },
  13172. methods: {
  13173. init() {
  13174. uni.$u.sleep().then(() => this.getRect());
  13175. },
  13176. // 判断展示文本
  13177. getText(item) {
  13178. return typeof item === "object" ? item[this.keyName] : item;
  13179. },
  13180. // 获取组件的尺寸
  13181. getRect() {
  13182. this.$uGetRect(".u-subsection__item--0").then((size) => {
  13183. this.itemRect = size;
  13184. });
  13185. },
  13186. clickHandler(index2) {
  13187. this.$emit("change", index2);
  13188. }
  13189. }
  13190. };
  13191. function _sfc_render$1r(_ctx, _cache, $props, $setup, $data, $options) {
  13192. return vue.openBlock(), vue.createElementBlock(
  13193. "view",
  13194. {
  13195. class: vue.normalizeClass(["u-subsection", [`u-subsection--${_ctx.mode}`]]),
  13196. ref: "u-subsection",
  13197. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), $options.wrapperStyle])
  13198. },
  13199. [
  13200. vue.createElementVNode(
  13201. "view",
  13202. {
  13203. class: vue.normalizeClass(["u-subsection__bar", [
  13204. _ctx.mode === "button" && "u-subsection--button__bar",
  13205. _ctx.current === 0 && _ctx.mode === "subsection" && "u-subsection__bar--first",
  13206. _ctx.current > 0 && _ctx.current < _ctx.list.length - 1 && _ctx.mode === "subsection" && "u-subsection__bar--center",
  13207. _ctx.current === _ctx.list.length - 1 && _ctx.mode === "subsection" && "u-subsection__bar--last"
  13208. ]]),
  13209. ref: "u-subsection__bar",
  13210. style: vue.normalizeStyle([$options.barStyle])
  13211. },
  13212. null,
  13213. 6
  13214. /* CLASS, STYLE */
  13215. ),
  13216. (vue.openBlock(true), vue.createElementBlock(
  13217. vue.Fragment,
  13218. null,
  13219. vue.renderList(_ctx.list, (item, index2) => {
  13220. return vue.openBlock(), vue.createElementBlock("view", {
  13221. class: vue.normalizeClass(["u-subsection__item", [
  13222. `u-subsection__item--${index2}`,
  13223. index2 < _ctx.list.length - 1 && "u-subsection__item--no-border-right",
  13224. index2 === 0 && "u-subsection__item--first",
  13225. index2 === _ctx.list.length - 1 && "u-subsection__item--last"
  13226. ]]),
  13227. ref_for: true,
  13228. ref: `u-subsection__item--${index2}`,
  13229. style: vue.normalizeStyle([$options.itemStyle(index2)]),
  13230. onClick: ($event) => $options.clickHandler(index2),
  13231. key: index2
  13232. }, [
  13233. vue.createElementVNode(
  13234. "text",
  13235. {
  13236. class: "u-subsection__item__text",
  13237. style: vue.normalizeStyle([$options.textStyle(index2)])
  13238. },
  13239. vue.toDisplayString($options.getText(item)),
  13240. 5
  13241. /* TEXT, STYLE */
  13242. )
  13243. ], 14, ["onClick"]);
  13244. }),
  13245. 128
  13246. /* KEYED_FRAGMENT */
  13247. ))
  13248. ],
  13249. 6
  13250. /* CLASS, STYLE */
  13251. );
  13252. }
  13253. const __easycom_0$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1s, [["render", _sfc_render$1r], ["__scopeId", "data-v-b5ccb67e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-subsection/u-subsection.vue"]]);
  13254. const props$f = {
  13255. props: {
  13256. // 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px
  13257. offsetTop: {
  13258. type: [String, Number],
  13259. default: props$E.sticky.offsetTop
  13260. },
  13261. // 自定义导航栏的高度
  13262. customNavHeight: {
  13263. type: [String, Number],
  13264. default: props$E.sticky.customNavHeight
  13265. },
  13266. // 是否开启吸顶功能
  13267. disabled: {
  13268. type: Boolean,
  13269. default: props$E.sticky.disabled
  13270. },
  13271. // 吸顶区域的背景颜色
  13272. bgColor: {
  13273. type: String,
  13274. default: props$E.sticky.bgColor
  13275. },
  13276. // z-index值
  13277. zIndex: {
  13278. type: [String, Number],
  13279. default: props$E.sticky.zIndex
  13280. },
  13281. // 列表中的索引值
  13282. index: {
  13283. type: [String, Number],
  13284. default: props$E.sticky.index
  13285. }
  13286. }
  13287. };
  13288. const _sfc_main$1r = {
  13289. name: "u-sticky",
  13290. mixins: [mpMixin, mixin, props$f],
  13291. data() {
  13292. return {
  13293. cssSticky: false,
  13294. // 是否使用css的sticky实现
  13295. stickyTop: 0,
  13296. // 吸顶的top值,因为可能受自定义导航栏影响,最终的吸顶值非offsetTop值
  13297. elId: uni.$u.guid(),
  13298. left: 0,
  13299. // js模式时,吸顶的内容因为处于postition: fixed模式,为了和原来保持一致的样式,需要记录并重新设置它的left,height,width属性
  13300. width: "auto",
  13301. height: "auto",
  13302. fixed: false
  13303. // js模式时,是否处于吸顶模式
  13304. };
  13305. },
  13306. computed: {
  13307. style() {
  13308. const style = {};
  13309. if (!this.disabled) {
  13310. if (this.cssSticky) {
  13311. style.position = "sticky";
  13312. style.zIndex = this.uZindex;
  13313. style.top = uni.$u.addUnit(this.stickyTop);
  13314. } else {
  13315. style.height = this.fixed ? this.height + "px" : "auto";
  13316. }
  13317. } else {
  13318. style.position = "static";
  13319. }
  13320. style.backgroundColor = this.bgColor;
  13321. return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style);
  13322. },
  13323. // 吸顶内容的样式
  13324. stickyContent() {
  13325. const style = {};
  13326. if (!this.cssSticky) {
  13327. style.position = this.fixed ? "fixed" : "static";
  13328. style.top = this.stickyTop + "px";
  13329. style.left = this.left + "px";
  13330. style.width = this.width == "auto" ? "auto" : this.width + "px";
  13331. style.zIndex = this.uZindex;
  13332. }
  13333. return style;
  13334. },
  13335. uZindex() {
  13336. return this.zIndex ? this.zIndex : uni.$u.zIndex.sticky;
  13337. }
  13338. },
  13339. mounted() {
  13340. this.init();
  13341. },
  13342. methods: {
  13343. init() {
  13344. this.getStickyTop();
  13345. this.checkSupportCssSticky();
  13346. if (!this.cssSticky) {
  13347. !this.disabled && this.initObserveContent();
  13348. }
  13349. },
  13350. initObserveContent() {
  13351. this.$uGetRect("#" + this.elId).then((res2) => {
  13352. this.height = res2.height;
  13353. this.left = res2.left;
  13354. this.width = res2.width;
  13355. this.$nextTick(() => {
  13356. this.observeContent();
  13357. });
  13358. });
  13359. },
  13360. observeContent() {
  13361. this.disconnectObserver("contentObserver");
  13362. const contentObserver = uni.createIntersectionObserver({
  13363. // 检测的区间范围
  13364. thresholds: [0.95, 0.98, 1]
  13365. });
  13366. contentObserver.relativeToViewport({
  13367. top: -this.stickyTop
  13368. });
  13369. contentObserver.observe(`#${this.elId}`, (res2) => {
  13370. this.setFixed(res2.boundingClientRect.top);
  13371. });
  13372. this.contentObserver = contentObserver;
  13373. },
  13374. setFixed(top) {
  13375. const fixed = top <= this.stickyTop;
  13376. this.fixed = fixed;
  13377. },
  13378. disconnectObserver(observerName) {
  13379. const observer = this[observerName];
  13380. observer && observer.disconnect();
  13381. },
  13382. getStickyTop() {
  13383. this.stickyTop = uni.$u.getPx(this.offsetTop) + uni.$u.getPx(this.customNavHeight);
  13384. },
  13385. async checkSupportCssSticky() {
  13386. if (uni.$u.os() === "android" && Number(uni.$u.sys().system) > 8) {
  13387. this.cssSticky = true;
  13388. }
  13389. this.cssSticky = await this.checkComputedStyle();
  13390. if (uni.$u.os() === "ios") {
  13391. this.cssSticky = true;
  13392. }
  13393. },
  13394. // 在APP和微信小程序上,通过uni.createSelectorQuery可以判断是否支持css sticky
  13395. checkComputedStyle() {
  13396. return new Promise((resolve) => {
  13397. uni.createSelectorQuery().in(this).select(".u-sticky").fields({
  13398. computedStyle: ["position"]
  13399. }).exec((e) => {
  13400. resolve("sticky" === e[0].position);
  13401. });
  13402. });
  13403. },
  13404. // H5通过创建元素的形式嗅探是否支持css sticky
  13405. // 判断浏览器是否支持sticky属性
  13406. checkCssStickyForH5() {
  13407. }
  13408. },
  13409. beforeDestroy() {
  13410. this.disconnectObserver("contentObserver");
  13411. }
  13412. };
  13413. function _sfc_render$1q(_ctx, _cache, $props, $setup, $data, $options) {
  13414. return vue.openBlock(), vue.createElementBlock("view", {
  13415. class: "u-sticky",
  13416. id: $data.elId,
  13417. style: vue.normalizeStyle([$options.style])
  13418. }, [
  13419. vue.createElementVNode(
  13420. "view",
  13421. {
  13422. style: vue.normalizeStyle([$options.stickyContent]),
  13423. class: "u-sticky__content"
  13424. },
  13425. [
  13426. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  13427. ],
  13428. 4
  13429. /* STYLE */
  13430. )
  13431. ], 12, ["id"]);
  13432. }
  13433. const __easycom_1$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1r, [["render", _sfc_render$1q], ["__scopeId", "data-v-8b303089"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-sticky/u-sticky.vue"]]);
  13434. const props$e = {
  13435. props: {
  13436. // 是否展示modal
  13437. show: {
  13438. type: Boolean,
  13439. default: props$E.modal.show
  13440. },
  13441. // 标题
  13442. title: {
  13443. type: [String],
  13444. default: props$E.modal.title
  13445. },
  13446. // 弹窗内容
  13447. content: {
  13448. type: String,
  13449. default: props$E.modal.content
  13450. },
  13451. // 确认文案
  13452. confirmText: {
  13453. type: String,
  13454. default: props$E.modal.confirmText
  13455. },
  13456. // 取消文案
  13457. cancelText: {
  13458. type: String,
  13459. default: props$E.modal.cancelText
  13460. },
  13461. // 是否显示确认按钮
  13462. showConfirmButton: {
  13463. type: Boolean,
  13464. default: props$E.modal.showConfirmButton
  13465. },
  13466. // 是否显示取消按钮
  13467. showCancelButton: {
  13468. type: Boolean,
  13469. default: props$E.modal.showCancelButton
  13470. },
  13471. // 确认按钮颜色
  13472. confirmColor: {
  13473. type: String,
  13474. default: props$E.modal.confirmColor
  13475. },
  13476. // 取消文字颜色
  13477. cancelColor: {
  13478. type: String,
  13479. default: props$E.modal.cancelColor
  13480. },
  13481. // 对调确认和取消的位置
  13482. buttonReverse: {
  13483. type: Boolean,
  13484. default: props$E.modal.buttonReverse
  13485. },
  13486. // 是否开启缩放效果
  13487. zoom: {
  13488. type: Boolean,
  13489. default: props$E.modal.zoom
  13490. },
  13491. // 是否异步关闭,只对确定按钮有效
  13492. asyncClose: {
  13493. type: Boolean,
  13494. default: props$E.modal.asyncClose
  13495. },
  13496. // 是否允许点击遮罩关闭modal
  13497. closeOnClickOverlay: {
  13498. type: Boolean,
  13499. default: props$E.modal.closeOnClickOverlay
  13500. },
  13501. // 给一个负的margin-top,往上偏移,避免和键盘重合的情况
  13502. negativeTop: {
  13503. type: [String, Number],
  13504. default: props$E.modal.negativeTop
  13505. },
  13506. // modal宽度,不支持百分比,可以数值,px,rpx单位
  13507. width: {
  13508. type: [String, Number],
  13509. default: props$E.modal.width
  13510. },
  13511. // 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮
  13512. confirmButtonShape: {
  13513. type: String,
  13514. default: props$E.modal.confirmButtonShape
  13515. }
  13516. }
  13517. };
  13518. const _sfc_main$1q = {
  13519. name: "u-modal",
  13520. mixins: [mpMixin, mixin, props$e],
  13521. data() {
  13522. return {
  13523. loading: false
  13524. };
  13525. },
  13526. watch: {
  13527. show(n) {
  13528. if (n && this.loading)
  13529. this.loading = false;
  13530. }
  13531. },
  13532. methods: {
  13533. // 点击确定按钮
  13534. confirmHandler() {
  13535. if (this.asyncClose) {
  13536. this.loading = true;
  13537. }
  13538. this.$emit("confirm");
  13539. },
  13540. // 点击取消按钮
  13541. cancelHandler() {
  13542. this.$emit("cancel");
  13543. },
  13544. // 点击遮罩
  13545. // 从原理上来说,modal的遮罩点击,并不是真的点击到了遮罩
  13546. // 因为modal依赖于popup的中部弹窗类型,中部弹窗比较特殊,虽有然遮罩,但是为了让弹窗内容能flex居中
  13547. // 多了一个透明的遮罩,此透明的遮罩会覆盖在灰色的遮罩上,所以实际上是点击不到灰色遮罩的,popup内部在
  13548. // 透明遮罩的子元素做了.stop处理,所以点击内容区,也不会导致误触发
  13549. clickHandler() {
  13550. if (this.closeOnClickOverlay) {
  13551. this.$emit("close");
  13552. }
  13553. }
  13554. }
  13555. };
  13556. function _sfc_render$1p(_ctx, _cache, $props, $setup, $data, $options) {
  13557. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$e);
  13558. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  13559. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  13560. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  13561. mode: "center",
  13562. zoom: _ctx.zoom,
  13563. show: _ctx.show,
  13564. customStyle: {
  13565. borderRadius: "6px",
  13566. overflow: "hidden",
  13567. marginTop: `-${_ctx.$u.addUnit(_ctx.negativeTop)}`
  13568. },
  13569. closeOnClickOverlay: _ctx.closeOnClickOverlay,
  13570. safeAreaInsetBottom: false,
  13571. duration: 400,
  13572. onClick: $options.clickHandler
  13573. }, {
  13574. default: vue.withCtx(() => [
  13575. vue.createElementVNode(
  13576. "view",
  13577. {
  13578. class: "u-modal",
  13579. style: vue.normalizeStyle({
  13580. width: _ctx.$u.addUnit(_ctx.width)
  13581. })
  13582. },
  13583. [
  13584. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  13585. "text",
  13586. {
  13587. key: 0,
  13588. class: "u-modal__title"
  13589. },
  13590. vue.toDisplayString(_ctx.title),
  13591. 1
  13592. /* TEXT */
  13593. )) : vue.createCommentVNode("v-if", true),
  13594. vue.createElementVNode(
  13595. "view",
  13596. {
  13597. class: "u-modal__content",
  13598. style: vue.normalizeStyle({
  13599. paddingTop: `${_ctx.title ? 12 : 25}px`
  13600. })
  13601. },
  13602. [
  13603. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  13604. vue.createElementVNode(
  13605. "text",
  13606. { class: "u-modal__content__text" },
  13607. vue.toDisplayString(_ctx.content),
  13608. 1
  13609. /* TEXT */
  13610. )
  13611. ], true)
  13612. ],
  13613. 4
  13614. /* STYLE */
  13615. ),
  13616. _ctx.$slots.confirmButton ? (vue.openBlock(), vue.createElementBlock("view", {
  13617. key: 1,
  13618. class: "u-modal__button-group--confirm-button"
  13619. }, [
  13620. vue.renderSlot(_ctx.$slots, "confirmButton", {}, void 0, true)
  13621. ])) : (vue.openBlock(), vue.createElementBlock(
  13622. vue.Fragment,
  13623. { key: 2 },
  13624. [
  13625. vue.createVNode(_component_u_line),
  13626. vue.createElementVNode(
  13627. "view",
  13628. {
  13629. class: "u-modal__button-group",
  13630. style: vue.normalizeStyle({
  13631. flexDirection: _ctx.buttonReverse ? "row-reverse" : "row"
  13632. })
  13633. },
  13634. [
  13635. _ctx.showCancelButton ? (vue.openBlock(), vue.createElementBlock(
  13636. "view",
  13637. {
  13638. key: 0,
  13639. 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"]]),
  13640. "hover-stay-time": 150,
  13641. "hover-class": "u-modal__button-group__wrapper--hover",
  13642. onClick: _cache[0] || (_cache[0] = (...args) => $options.cancelHandler && $options.cancelHandler(...args))
  13643. },
  13644. [
  13645. vue.createElementVNode(
  13646. "text",
  13647. {
  13648. class: "u-modal__button-group__wrapper__text",
  13649. style: vue.normalizeStyle({
  13650. color: _ctx.cancelColor
  13651. })
  13652. },
  13653. vue.toDisplayString(_ctx.cancelText),
  13654. 5
  13655. /* TEXT, STYLE */
  13656. )
  13657. ],
  13658. 2
  13659. /* CLASS */
  13660. )) : vue.createCommentVNode("v-if", true),
  13661. _ctx.showConfirmButton && _ctx.showCancelButton ? (vue.openBlock(), vue.createBlock(_component_u_line, {
  13662. key: 1,
  13663. direction: "column"
  13664. })) : vue.createCommentVNode("v-if", true),
  13665. _ctx.showConfirmButton ? (vue.openBlock(), vue.createElementBlock(
  13666. "view",
  13667. {
  13668. key: 2,
  13669. 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"]]),
  13670. "hover-stay-time": 150,
  13671. "hover-class": "u-modal__button-group__wrapper--hover",
  13672. onClick: _cache[1] || (_cache[1] = (...args) => $options.confirmHandler && $options.confirmHandler(...args))
  13673. },
  13674. [
  13675. $data.loading ? (vue.openBlock(), vue.createBlock(_component_u_loading_icon, { key: 0 })) : (vue.openBlock(), vue.createElementBlock(
  13676. "text",
  13677. {
  13678. key: 1,
  13679. class: "u-modal__button-group__wrapper__text",
  13680. style: vue.normalizeStyle({
  13681. color: _ctx.confirmColor
  13682. })
  13683. },
  13684. vue.toDisplayString(_ctx.confirmText),
  13685. 5
  13686. /* TEXT, STYLE */
  13687. ))
  13688. ],
  13689. 2
  13690. /* CLASS */
  13691. )) : vue.createCommentVNode("v-if", true)
  13692. ],
  13693. 4
  13694. /* STYLE */
  13695. )
  13696. ],
  13697. 64
  13698. /* STABLE_FRAGMENT */
  13699. ))
  13700. ],
  13701. 4
  13702. /* STYLE */
  13703. )
  13704. ]),
  13705. _: 3
  13706. /* FORWARDED */
  13707. }, 8, ["zoom", "show", "customStyle", "closeOnClickOverlay", "onClick"]);
  13708. }
  13709. const __easycom_1$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", _sfc_render$1p], ["__scopeId", "data-v-f667648f"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-modal/u-modal.vue"]]);
  13710. const _sfc_main$1p = {
  13711. __name: "ApproveButton",
  13712. emits: ["approve"],
  13713. setup(__props, { expose: __expose, emit: __emit }) {
  13714. __expose();
  13715. const emit2 = __emit;
  13716. const showConfirmModal = vue.ref(false);
  13717. const handleApprove = () => {
  13718. showConfirmModal.value = true;
  13719. };
  13720. const confirmApprove = () => {
  13721. emit2("approve");
  13722. showConfirmModal.value = false;
  13723. };
  13724. const __returned__ = { emit: emit2, showConfirmModal, handleApprove, confirmApprove, ref: vue.ref };
  13725. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  13726. return __returned__;
  13727. }
  13728. };
  13729. function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) {
  13730. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  13731. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
  13732. return vue.openBlock(), vue.createElementBlock("view", { style: { "width": "50%" } }, [
  13733. vue.createVNode(
  13734. _component_u_button,
  13735. vue.mergeProps({
  13736. type: "success",
  13737. text: "同意",
  13738. size: "small",
  13739. onClick: $setup.handleApprove
  13740. }, _ctx.$attrs),
  13741. null,
  13742. 16
  13743. /* FULL_PROPS */
  13744. ),
  13745. vue.createCommentVNode(" 确认弹窗 "),
  13746. vue.createVNode(_component_u_modal, {
  13747. show: $setup.showConfirmModal,
  13748. title: "确认",
  13749. content: "确认收到货了吗?",
  13750. onConfirm: $setup.confirmApprove,
  13751. showCancelButton: "",
  13752. "content-style": { textAlign: "center" },
  13753. onCancel: _cache[0] || (_cache[0] = ($event) => $setup.showConfirmModal = false)
  13754. }, null, 8, ["show"])
  13755. ]);
  13756. }
  13757. const ApproveButton = /* @__PURE__ */ _export_sfc(_sfc_main$1p, [["render", _sfc_render$1o], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/ApproveButton.vue"]]);
  13758. const props$d = {
  13759. props: {
  13760. // 是否展示工具条
  13761. show: {
  13762. type: Boolean,
  13763. default: props$E.toolbar.show
  13764. },
  13765. // 取消按钮的文字
  13766. cancelText: {
  13767. type: String,
  13768. default: props$E.toolbar.cancelText
  13769. },
  13770. // 确认按钮的文字
  13771. confirmText: {
  13772. type: String,
  13773. default: props$E.toolbar.confirmText
  13774. },
  13775. // 取消按钮的颜色
  13776. cancelColor: {
  13777. type: String,
  13778. default: props$E.toolbar.cancelColor
  13779. },
  13780. // 确认按钮的颜色
  13781. confirmColor: {
  13782. type: String,
  13783. default: props$E.toolbar.confirmColor
  13784. },
  13785. // 标题文字
  13786. title: {
  13787. type: String,
  13788. default: props$E.toolbar.title
  13789. }
  13790. }
  13791. };
  13792. const _sfc_main$1o = {
  13793. name: "u-toolbar",
  13794. mixins: [mpMixin, mixin, props$d],
  13795. methods: {
  13796. // 点击取消按钮
  13797. cancel() {
  13798. this.$emit("cancel");
  13799. },
  13800. // 点击确定按钮
  13801. confirm() {
  13802. this.$emit("confirm");
  13803. }
  13804. }
  13805. };
  13806. function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) {
  13807. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  13808. "view",
  13809. {
  13810. key: 0,
  13811. class: "u-toolbar",
  13812. onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"]))
  13813. },
  13814. [
  13815. vue.createElementVNode("view", {
  13816. class: "u-toolbar__cancel__wrapper",
  13817. "hover-class": "u-hover-class"
  13818. }, [
  13819. vue.createElementVNode(
  13820. "text",
  13821. {
  13822. class: "u-toolbar__wrapper__cancel",
  13823. onClick: _cache[0] || (_cache[0] = (...args) => $options.cancel && $options.cancel(...args)),
  13824. style: vue.normalizeStyle({
  13825. color: _ctx.cancelColor
  13826. })
  13827. },
  13828. vue.toDisplayString(_ctx.cancelText),
  13829. 5
  13830. /* TEXT, STYLE */
  13831. )
  13832. ]),
  13833. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  13834. "text",
  13835. {
  13836. key: 0,
  13837. class: "u-toolbar__title u-line-1"
  13838. },
  13839. vue.toDisplayString(_ctx.title),
  13840. 1
  13841. /* TEXT */
  13842. )) : vue.createCommentVNode("v-if", true),
  13843. vue.createElementVNode("view", {
  13844. class: "u-toolbar__confirm__wrapper",
  13845. "hover-class": "u-hover-class"
  13846. }, [
  13847. vue.createElementVNode(
  13848. "text",
  13849. {
  13850. class: "u-toolbar__wrapper__confirm",
  13851. onClick: _cache[1] || (_cache[1] = (...args) => $options.confirm && $options.confirm(...args)),
  13852. style: vue.normalizeStyle({
  13853. color: _ctx.confirmColor
  13854. })
  13855. },
  13856. vue.toDisplayString(_ctx.confirmText),
  13857. 5
  13858. /* TEXT, STYLE */
  13859. )
  13860. ])
  13861. ],
  13862. 32
  13863. /* NEED_HYDRATION */
  13864. )) : vue.createCommentVNode("v-if", true);
  13865. }
  13866. const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1o, [["render", _sfc_render$1n], ["__scopeId", "data-v-eadae74e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-toolbar/u-toolbar.vue"]]);
  13867. const props$c = {
  13868. props: {
  13869. // 是否展示picker弹窗
  13870. show: {
  13871. type: Boolean,
  13872. default: props$E.picker.show
  13873. },
  13874. // 是否展示顶部的操作栏
  13875. showToolbar: {
  13876. type: Boolean,
  13877. default: props$E.picker.showToolbar
  13878. },
  13879. // 顶部标题
  13880. title: {
  13881. type: String,
  13882. default: props$E.picker.title
  13883. },
  13884. // 对象数组,设置每一列的数据
  13885. columns: {
  13886. type: Array,
  13887. default: props$E.picker.columns
  13888. },
  13889. // 是否显示加载中状态
  13890. loading: {
  13891. type: Boolean,
  13892. default: props$E.picker.loading
  13893. },
  13894. // 各列中,单个选项的高度
  13895. itemHeight: {
  13896. type: [String, Number],
  13897. default: props$E.picker.itemHeight
  13898. },
  13899. // 取消按钮的文字
  13900. cancelText: {
  13901. type: String,
  13902. default: props$E.picker.cancelText
  13903. },
  13904. // 确认按钮的文字
  13905. confirmText: {
  13906. type: String,
  13907. default: props$E.picker.confirmText
  13908. },
  13909. // 取消按钮的颜色
  13910. cancelColor: {
  13911. type: String,
  13912. default: props$E.picker.cancelColor
  13913. },
  13914. // 确认按钮的颜色
  13915. confirmColor: {
  13916. type: String,
  13917. default: props$E.picker.confirmColor
  13918. },
  13919. // 每列中可见选项的数量
  13920. visibleItemCount: {
  13921. type: [String, Number],
  13922. default: props$E.picker.visibleItemCount
  13923. },
  13924. // 选项对象中,需要展示的属性键名
  13925. keyName: {
  13926. type: String,
  13927. default: props$E.picker.keyName
  13928. },
  13929. // 是否允许点击遮罩关闭选择器
  13930. closeOnClickOverlay: {
  13931. type: Boolean,
  13932. default: props$E.picker.closeOnClickOverlay
  13933. },
  13934. // 各列的默认索引
  13935. defaultIndex: {
  13936. type: Array,
  13937. default: props$E.picker.defaultIndex
  13938. },
  13939. // 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效
  13940. immediateChange: {
  13941. type: Boolean,
  13942. default: props$E.picker.immediateChange
  13943. }
  13944. }
  13945. };
  13946. const _sfc_main$1n = {
  13947. name: "u-picker",
  13948. mixins: [mpMixin, mixin, props$c],
  13949. data() {
  13950. return {
  13951. // 上一次选择的列索引
  13952. lastIndex: [],
  13953. // 索引值 ,对应picker-view的value
  13954. innerIndex: [],
  13955. // 各列的值
  13956. innerColumns: [],
  13957. // 上一次的变化列索引
  13958. columnIndex: 0
  13959. };
  13960. },
  13961. watch: {
  13962. // 监听默认索引的变化,重新设置对应的值
  13963. defaultIndex: {
  13964. immediate: true,
  13965. handler(n) {
  13966. this.setIndexs(n, true);
  13967. }
  13968. },
  13969. // 监听columns参数的变化
  13970. columns: {
  13971. immediate: true,
  13972. deep: true,
  13973. handler(n) {
  13974. this.setColumns(n);
  13975. }
  13976. }
  13977. },
  13978. emits: ["close", "cancel", "confirm", "change"],
  13979. methods: {
  13980. // 获取item需要显示的文字,判别为对象还是文本
  13981. getItemText(item) {
  13982. if (uni.$u.test.object(item)) {
  13983. return item[this.keyName];
  13984. } else {
  13985. return item;
  13986. }
  13987. },
  13988. // 关闭选择器
  13989. closeHandler() {
  13990. if (this.closeOnClickOverlay) {
  13991. this.$emit("close");
  13992. }
  13993. },
  13994. // 点击工具栏的取消按钮
  13995. cancel() {
  13996. this.$emit("cancel");
  13997. },
  13998. // 点击工具栏的确定按钮
  13999. confirm() {
  14000. this.$emit("confirm", {
  14001. indexs: this.innerIndex,
  14002. value: this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]),
  14003. values: this.innerColumns
  14004. });
  14005. },
  14006. // 选择器某一列的数据发生变化时触发
  14007. changeHandler(e) {
  14008. const {
  14009. value: value2
  14010. } = e.detail;
  14011. let index2 = 0, columnIndex = 0;
  14012. for (let i = 0; i < value2.length; i++) {
  14013. let item = value2[i];
  14014. if (item !== (this.lastIndex[i] || 0)) {
  14015. columnIndex = i;
  14016. index2 = item;
  14017. break;
  14018. }
  14019. }
  14020. this.columnIndex = columnIndex;
  14021. const values = this.innerColumns;
  14022. this.setLastIndex(value2);
  14023. this.setIndexs(value2);
  14024. this.$emit("change", {
  14025. // 微信小程序不能传递this,会因为循环引用而报错
  14026. picker: this,
  14027. value: this.innerColumns.map((item, index3) => item[value2[index3]]),
  14028. index: index2,
  14029. indexs: value2,
  14030. // values为当前变化列的数组内容
  14031. values,
  14032. columnIndex
  14033. });
  14034. },
  14035. // 设置index索引,此方法可被外部调用设置
  14036. setIndexs(index2, setLastIndex) {
  14037. this.innerIndex = uni.$u.deepClone(index2);
  14038. if (setLastIndex) {
  14039. this.setLastIndex(index2);
  14040. }
  14041. },
  14042. // 记录上一次的各列索引位置
  14043. setLastIndex(index2) {
  14044. this.lastIndex = uni.$u.deepClone(index2);
  14045. },
  14046. // 设置对应列选项的所有值
  14047. setColumnValues(columnIndex, values) {
  14048. this.innerColumns.splice(columnIndex, 1, values);
  14049. let tmpIndex = uni.$u.deepClone(this.innerIndex);
  14050. for (let i = 0; i < this.innerColumns.length; i++) {
  14051. if (i > this.columnIndex) {
  14052. tmpIndex[i] = 0;
  14053. }
  14054. }
  14055. this.setIndexs(tmpIndex);
  14056. },
  14057. // 获取对应列的所有选项
  14058. getColumnValues(columnIndex) {
  14059. (async () => {
  14060. await uni.$u.sleep();
  14061. })();
  14062. return this.innerColumns[columnIndex];
  14063. },
  14064. // 设置整体各列的columns的值
  14065. setColumns(columns) {
  14066. formatAppLog("log", "at uni_modules/uview-plus/components/u-picker/u-picker.vue:217", columns);
  14067. this.innerColumns = uni.$u.deepClone(columns);
  14068. if (this.innerIndex.length === 0) {
  14069. this.innerIndex = new Array(columns.length).fill(0);
  14070. }
  14071. },
  14072. // 获取各列选中值对应的索引
  14073. getIndexs() {
  14074. return this.innerIndex;
  14075. },
  14076. // 获取各列选中的值
  14077. getValues() {
  14078. (async () => {
  14079. await uni.$u.sleep();
  14080. })();
  14081. return this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]);
  14082. }
  14083. }
  14084. };
  14085. function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) {
  14086. const _component_u_toolbar = resolveEasycom(vue.resolveDynamicComponent("u-toolbar"), __easycom_0$4);
  14087. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  14088. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  14089. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  14090. show: _ctx.show,
  14091. onClose: $options.closeHandler
  14092. }, {
  14093. default: vue.withCtx(() => [
  14094. vue.createElementVNode("view", { class: "u-picker" }, [
  14095. _ctx.showToolbar ? (vue.openBlock(), vue.createBlock(_component_u_toolbar, {
  14096. key: 0,
  14097. cancelColor: _ctx.cancelColor,
  14098. confirmColor: _ctx.confirmColor,
  14099. cancelText: _ctx.cancelText,
  14100. confirmText: _ctx.confirmText,
  14101. title: _ctx.title,
  14102. onCancel: $options.cancel,
  14103. onConfirm: $options.confirm
  14104. }, null, 8, ["cancelColor", "confirmColor", "cancelText", "confirmText", "title", "onCancel", "onConfirm"])) : vue.createCommentVNode("v-if", true),
  14105. vue.createElementVNode("picker-view", {
  14106. class: "u-picker__view",
  14107. indicatorStyle: `height: ${_ctx.$u.addUnit(_ctx.itemHeight)}`,
  14108. value: $data.innerIndex,
  14109. immediateChange: _ctx.immediateChange,
  14110. style: vue.normalizeStyle({
  14111. height: `${_ctx.$u.addUnit(_ctx.visibleItemCount * _ctx.itemHeight)}`
  14112. }),
  14113. onChange: _cache[0] || (_cache[0] = (...args) => $options.changeHandler && $options.changeHandler(...args))
  14114. }, [
  14115. (vue.openBlock(true), vue.createElementBlock(
  14116. vue.Fragment,
  14117. null,
  14118. vue.renderList($data.innerColumns, (item, index2) => {
  14119. return vue.openBlock(), vue.createElementBlock("picker-view-column", {
  14120. key: index2,
  14121. class: "u-picker__view__column"
  14122. }, [
  14123. _ctx.$u.test.array(item) ? (vue.openBlock(true), vue.createElementBlock(
  14124. vue.Fragment,
  14125. { key: 0 },
  14126. vue.renderList(item, (item1, index1) => {
  14127. return vue.openBlock(), vue.createElementBlock(
  14128. "text",
  14129. {
  14130. class: "u-picker__view__column__item u-line-1",
  14131. key: index1,
  14132. style: vue.normalizeStyle({
  14133. height: _ctx.$u.addUnit(_ctx.itemHeight),
  14134. lineHeight: _ctx.$u.addUnit(_ctx.itemHeight),
  14135. fontWeight: index1 === $data.innerIndex[index2] ? "bold" : "normal"
  14136. })
  14137. },
  14138. vue.toDisplayString($options.getItemText(item1)),
  14139. 5
  14140. /* TEXT, STYLE */
  14141. );
  14142. }),
  14143. 128
  14144. /* KEYED_FRAGMENT */
  14145. )) : vue.createCommentVNode("v-if", true)
  14146. ]);
  14147. }),
  14148. 128
  14149. /* KEYED_FRAGMENT */
  14150. ))
  14151. ], 44, ["indicatorStyle", "value", "immediateChange"]),
  14152. _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  14153. key: 1,
  14154. class: "u-picker--loading"
  14155. }, [
  14156. vue.createVNode(_component_u_loading_icon, { mode: "circle" })
  14157. ])) : vue.createCommentVNode("v-if", true)
  14158. ])
  14159. ]),
  14160. _: 1
  14161. /* STABLE */
  14162. }, 8, ["show", "onClose"]);
  14163. }
  14164. const __easycom_1$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["render", _sfc_render$1m], ["__scopeId", "data-v-91b05052"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-picker/u-picker.vue"]]);
  14165. const _sfc_main$1m = {
  14166. __name: "RejectButton",
  14167. emits: ["reject"],
  14168. setup(__props, { expose: __expose, emit: __emit }) {
  14169. __expose();
  14170. const emit2 = __emit;
  14171. const showRejectPicker = vue.ref(false);
  14172. const rejectReasons = vue.ref([]);
  14173. const getRejectReason = async () => {
  14174. const res2 = await uni.$u.http.get("/app/sysDict/getDict?key=route_exception_reason ");
  14175. if (res2.code == 200) {
  14176. rejectReasons.value = res2.data.map((item) => item.dictValue);
  14177. }
  14178. };
  14179. getRejectReason();
  14180. const handleReject = () => {
  14181. showRejectPicker.value = true;
  14182. };
  14183. const confirmReject = (e) => {
  14184. const reason = e.value[0];
  14185. emit2("reject", reason);
  14186. showRejectPicker.value = false;
  14187. };
  14188. const __returned__ = { emit: emit2, showRejectPicker, rejectReasons, getRejectReason, handleReject, confirmReject, ref: vue.ref };
  14189. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14190. return __returned__;
  14191. }
  14192. };
  14193. function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) {
  14194. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  14195. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$2);
  14196. return vue.openBlock(), vue.createElementBlock("view", { style: { "width": "50%" } }, [
  14197. vue.createVNode(
  14198. _component_u_button,
  14199. vue.mergeProps({
  14200. type: "warning",
  14201. text: "驳回",
  14202. size: "small",
  14203. onClick: $setup.handleReject
  14204. }, _ctx.$attrs),
  14205. null,
  14206. 16
  14207. /* FULL_PROPS */
  14208. ),
  14209. vue.createCommentVNode(" 驳回原因选择器 "),
  14210. vue.createVNode(_component_u_picker, {
  14211. show: $setup.showRejectPicker,
  14212. columns: [$setup.rejectReasons],
  14213. onConfirm: $setup.confirmReject,
  14214. onCancel: _cache[0] || (_cache[0] = ($event) => $setup.showRejectPicker = false)
  14215. }, null, 8, ["show", "columns"])
  14216. ]);
  14217. }
  14218. const RejectButton = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["render", _sfc_render$1l], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/RejectButton.vue"]]);
  14219. const _sfc_main$1l = {
  14220. __name: "ExceptionItem",
  14221. props: {
  14222. order: {
  14223. type: Object,
  14224. default: () => ({
  14225. orderNo: "",
  14226. expressNo: "",
  14227. estimatedPrice: "",
  14228. pusher: "",
  14229. pushTime: ""
  14230. })
  14231. }
  14232. },
  14233. emits: ["refresh"],
  14234. setup(__props, { expose: __expose, emit: __emit }) {
  14235. __expose();
  14236. const props2 = __props;
  14237. const emit2 = __emit;
  14238. const handleCheckLogistics = () => {
  14239. uni.navigateTo({
  14240. url: `/pages/index/express/logistics-detail?orderId=${props2.order.orderId}&status=${props2.order.checkStatus}&id=${props2.order.id}`
  14241. });
  14242. };
  14243. function handleButtonClick(checkStatus, reason) {
  14244. uni.$u.http.post("/app/orderexception/update", {
  14245. id: props2.order.id,
  14246. checkStatus,
  14247. refusalReason: reason
  14248. }).then((res2) => {
  14249. if (res2.code == 200) {
  14250. if (checkStatus == 2) {
  14251. let text = props2.order.waybillCode + "签收成功";
  14252. uni.$u.ttsModule.speak(text);
  14253. }
  14254. uni.$u.toast("操作成功");
  14255. emit2("refresh");
  14256. } else {
  14257. uni.$u.toast(res2.msg);
  14258. }
  14259. });
  14260. }
  14261. const __returned__ = { props: props2, emit: emit2, handleCheckLogistics, handleButtonClick, ref: vue.ref, ApproveButton, RejectButton };
  14262. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14263. return __returned__;
  14264. }
  14265. };
  14266. function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
  14267. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  14268. const _directive_permission = vue.resolveDirective("permission");
  14269. return vue.openBlock(), vue.createElementBlock("view", { class: "exception-item" }, [
  14270. vue.createCommentVNode(" 订单信息 "),
  14271. vue.createElementVNode("view", { class: "info-section flex-1" }, [
  14272. vue.createElementVNode("view", { class: "info-row" }, [
  14273. vue.createElementVNode("text", { class: "label" }, "订单编号:"),
  14274. vue.createElementVNode(
  14275. "text",
  14276. { class: "value" },
  14277. vue.toDisplayString($props.order.orderId),
  14278. 1
  14279. /* TEXT */
  14280. )
  14281. ]),
  14282. vue.createElementVNode("view", { class: "info-row" }, [
  14283. vue.createElementVNode("text", { class: "label" }, "快递单号:"),
  14284. vue.createElementVNode(
  14285. "text",
  14286. { class: "value" },
  14287. vue.toDisplayString($props.order.waybillCode),
  14288. 1
  14289. /* TEXT */
  14290. )
  14291. ]),
  14292. vue.createElementVNode("view", { class: "info-row" }, [
  14293. vue.createElementVNode("text", { class: "label" }, "预估单价:"),
  14294. vue.createElementVNode(
  14295. "text",
  14296. { class: "value" },
  14297. vue.toDisplayString($props.order.expectMoney) + "元",
  14298. 1
  14299. /* TEXT */
  14300. )
  14301. ]),
  14302. vue.createElementVNode("view", { class: "info-row" }, [
  14303. vue.createElementVNode("text", { class: "label" }, "推送人:"),
  14304. vue.createElementVNode(
  14305. "text",
  14306. { class: "value" },
  14307. vue.toDisplayString($props.order.createName),
  14308. 1
  14309. /* TEXT */
  14310. )
  14311. ]),
  14312. vue.createElementVNode("view", {
  14313. class: "info-row",
  14314. style: { "margin-bottom": "0" }
  14315. }, [
  14316. vue.createElementVNode("text", { class: "label" }, "推送时间:"),
  14317. vue.createElementVNode(
  14318. "text",
  14319. { class: "value" },
  14320. vue.toDisplayString($props.order.createTime),
  14321. 1
  14322. /* TEXT */
  14323. )
  14324. ])
  14325. ]),
  14326. vue.createCommentVNode(" 操作按钮 "),
  14327. vue.createElementVNode("view", { class: "action-section" }, [
  14328. vue.createVNode(_component_u_button, {
  14329. type: "primary",
  14330. text: "查看物流",
  14331. size: "small",
  14332. onClick: $setup.handleCheckLogistics
  14333. }),
  14334. $props.order.checkStatus == 1 ? vue.withDirectives((vue.openBlock(), vue.createBlock(
  14335. $setup["ApproveButton"],
  14336. {
  14337. key: 0,
  14338. onApprove: _cache[0] || (_cache[0] = ($event) => $setup.handleButtonClick(2))
  14339. },
  14340. null,
  14341. 512
  14342. /* NEED_PATCH */
  14343. )), [
  14344. [_directive_permission, "app:express:exception:approve"]
  14345. ]) : vue.createCommentVNode("v-if", true),
  14346. $props.order.checkStatus == 1 ? vue.withDirectives((vue.openBlock(), vue.createBlock(
  14347. $setup["RejectButton"],
  14348. {
  14349. key: 1,
  14350. onReject: _cache[1] || (_cache[1] = (reason) => $setup.handleButtonClick(3, reason))
  14351. },
  14352. null,
  14353. 512
  14354. /* NEED_PATCH */
  14355. )), [
  14356. [_directive_permission, "app:express:exception:reject"]
  14357. ]) : vue.createCommentVNode("v-if", true),
  14358. $props.order.checkStatus == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  14359. key: 2,
  14360. style: { "color": "#19be6b" }
  14361. }, "[已签收]")) : vue.createCommentVNode("v-if", true),
  14362. $props.order.checkStatus == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  14363. key: 3,
  14364. style: { "color": "#f00" }
  14365. }, "[已驳回]")) : vue.createCommentVNode("v-if", true)
  14366. ])
  14367. ]);
  14368. }
  14369. const ExceptionItem = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["render", _sfc_render$1k], ["__scopeId", "data-v-e0527396"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/ExceptionItem.vue"]]);
  14370. const _sfc_main$1k = {
  14371. __name: "route-exception",
  14372. setup(__props, { expose: __expose }) {
  14373. __expose();
  14374. const tabList = ["待处理订单", "历史异常签收"];
  14375. const curNow = vue.ref(0);
  14376. const exceptionList = vue.ref([]);
  14377. let urlList = ["/app/orderexception/pagelist", "/app/orderexception/getPageLoglist"];
  14378. const requestStr = vue.ref(urlList[0]);
  14379. function sectionChange(index2) {
  14380. curNow.value = index2;
  14381. requestStr.value = urlList[index2];
  14382. handleSearch();
  14383. }
  14384. const pageScrollRef = vue.ref(null);
  14385. const otherParams = vue.ref({ search: "" });
  14386. const updateList = (list) => {
  14387. exceptionList.value = list;
  14388. };
  14389. const handleSearch = () => {
  14390. var _a;
  14391. (_a = pageScrollRef.value) == null ? void 0 : _a.resetUpScroll();
  14392. };
  14393. const handleScan = () => {
  14394. uni.scanCode({
  14395. success: (res2) => {
  14396. otherParams.value.search = res2.result;
  14397. handleSearch();
  14398. }
  14399. });
  14400. };
  14401. onLoad(() => {
  14402. uni.$u.useGlobalEvent((e) => {
  14403. otherParams.value.search = e.barcode;
  14404. handleSearch();
  14405. });
  14406. });
  14407. onShow(() => {
  14408. uni.$u.updateActivePageOnShow();
  14409. });
  14410. const __returned__ = { tabList, curNow, exceptionList, get urlList() {
  14411. return urlList;
  14412. }, set urlList(v) {
  14413. urlList = v;
  14414. }, requestStr, sectionChange, pageScrollRef, otherParams, updateList, handleSearch, handleScan, ref: vue.ref, get onLoad() {
  14415. return onLoad;
  14416. }, get onShow() {
  14417. return onShow;
  14418. }, ExceptionItem, PageScroll: pageScroll };
  14419. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14420. return __returned__;
  14421. }
  14422. };
  14423. function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) {
  14424. const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$5);
  14425. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  14426. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  14427. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  14428. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14429. vue.createCommentVNode(" 列表区域 "),
  14430. vue.createVNode($setup["PageScroll"], {
  14431. ref: "pageScrollRef",
  14432. height: "100vh",
  14433. requestStr: $setup.requestStr,
  14434. onUpdateList: $setup.updateList,
  14435. otherParams: $setup.otherParams
  14436. }, {
  14437. default: vue.withCtx(() => [
  14438. vue.createVNode(_component_u_sticky, { "offset-top": 0 }, {
  14439. default: vue.withCtx(() => [
  14440. vue.createCommentVNode(" 顶部标签页 "),
  14441. vue.createVNode(_component_u_subsection, {
  14442. fontSize: "16",
  14443. list: $setup.tabList,
  14444. current: $setup.curNow,
  14445. onChange: $setup.sectionChange,
  14446. mode: "subsection",
  14447. class: "tabs-list"
  14448. }, null, 8, ["current"])
  14449. ]),
  14450. _: 1
  14451. /* STABLE */
  14452. }),
  14453. vue.createElementVNode("view", { class: "list-container" }, [
  14454. (vue.openBlock(true), vue.createElementBlock(
  14455. vue.Fragment,
  14456. null,
  14457. vue.renderList($setup.exceptionList, (item) => {
  14458. return vue.openBlock(), vue.createBlock($setup["ExceptionItem"], {
  14459. key: item.orderNo,
  14460. order: item,
  14461. onRefresh: $setup.handleSearch
  14462. }, null, 8, ["order"]);
  14463. }),
  14464. 128
  14465. /* KEYED_FRAGMENT */
  14466. ))
  14467. ])
  14468. ]),
  14469. _: 1
  14470. /* STABLE */
  14471. }, 8, ["requestStr", "otherParams"]),
  14472. vue.createCommentVNode(" 底部搜索框 "),
  14473. vue.createElementVNode("view", { class: "search-bar fixed-bottom" }, [
  14474. vue.createVNode(_component_u_search, {
  14475. modelValue: $setup.otherParams.search,
  14476. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.otherParams.search = $event),
  14477. placeholder: "请输入物流单号/订单编号",
  14478. "show-action": false,
  14479. inputStyle: { fontSize: "32rpx" },
  14480. onSearch: $setup.handleSearch,
  14481. height: "80rpx",
  14482. shape: "round"
  14483. }, null, 8, ["modelValue"]),
  14484. vue.createVNode(_component_u_icon, {
  14485. name: "scan",
  14486. size: "28",
  14487. color: "#19be6b",
  14488. onClick: $setup.handleScan
  14489. })
  14490. ])
  14491. ]);
  14492. }
  14493. const PagesIndexExpressRouteException = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1j], ["__scopeId", "data-v-388e5b84"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/route-exception.vue"]]);
  14494. const placeholderStyle$2 = "font-size:32rpx";
  14495. const _sfc_main$1j = {
  14496. __name: "warehouse-sign",
  14497. setup(__props, { expose: __expose }) {
  14498. __expose();
  14499. const customStyle = vue.reactive({
  14500. height: "90rpx"
  14501. });
  14502. const selectedWarehouse = vue.ref("");
  14503. const form = vue.ref({
  14504. "packageCode": "",
  14505. "godownId": ""
  14506. });
  14507. const showSelector = vue.ref(false);
  14508. function openWarehouseSelector() {
  14509. showSelector.value = true;
  14510. }
  14511. function handleWarehouseSelected(item) {
  14512. selectedWarehouse.value = item.godownName;
  14513. form.value.godownId = item.id;
  14514. }
  14515. function scanCode() {
  14516. uni.scanCode({
  14517. success: (res2) => {
  14518. form.value.packageCode = res2.result;
  14519. handleBarcode(res2.result);
  14520. },
  14521. fail: (err) => {
  14522. uni.$u.toast("扫码失败");
  14523. }
  14524. });
  14525. }
  14526. function handleBarcode(code2) {
  14527. if (!code2)
  14528. return uni.$u.toast("请输入物流单号");
  14529. uni.$u.http.post("/app/ordersign/toGodownSign", form.value).then((res2) => {
  14530. if (res2.code == 200) {
  14531. let text = code2 + "到仓签收成功";
  14532. uni.$u.ttsModule.speak(text);
  14533. } else {
  14534. let text = code2 + "订单不存在";
  14535. uni.$u.ttsModule.speak(text);
  14536. }
  14537. });
  14538. }
  14539. function getUserBindWarehouse() {
  14540. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
  14541. var _a, _b;
  14542. if (res2.code == 200) {
  14543. selectedWarehouse.value = (_a = res2.data) == null ? void 0 : _a.godownName;
  14544. form.value.godownId = (_b = res2.data) == null ? void 0 : _b.id;
  14545. }
  14546. });
  14547. }
  14548. onLoad(() => {
  14549. getUserBindWarehouse();
  14550. uni.$u.useGlobalEvent((e) => {
  14551. form.value.packageCode = e.barcode;
  14552. handleBarcode(e.barcode);
  14553. });
  14554. });
  14555. onShow(() => {
  14556. uni.$u.updateActivePageOnShow();
  14557. });
  14558. const __returned__ = { placeholderStyle: placeholderStyle$2, customStyle, selectedWarehouse, form, showSelector, openWarehouseSelector, handleWarehouseSelected, scanCode, handleBarcode, getUserBindWarehouse, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  14559. return onLoad;
  14560. }, get onShow() {
  14561. return onShow;
  14562. }, WarehouseSelector };
  14563. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14564. return __returned__;
  14565. }
  14566. };
  14567. function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
  14568. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  14569. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  14570. const _directive_permission = vue.resolveDirective("permission");
  14571. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14572. vue.createElementVNode("view", { class: "main-content" }, [
  14573. vue.createElementVNode("view", { class: "input-group" }, [
  14574. vue.createVNode(_component_u_input, {
  14575. customStyle: $setup.customStyle,
  14576. "placeholder-style": $setup.placeholderStyle,
  14577. modelValue: $setup.selectedWarehouse,
  14578. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedWarehouse = $event),
  14579. placeholder: "请选择仓库",
  14580. readonly: "",
  14581. border: "surround"
  14582. }, null, 8, ["customStyle", "modelValue"]),
  14583. vue.createVNode(_component_u_button, {
  14584. customStyle: $setup.customStyle,
  14585. type: "info",
  14586. color: "#a4adb3",
  14587. onClick: $setup.openWarehouseSelector,
  14588. text: "选择"
  14589. }, null, 8, ["customStyle"])
  14590. ]),
  14591. vue.createElementVNode("view", { class: "input-group" }, [
  14592. vue.createVNode(_component_u_input, {
  14593. customStyle: $setup.customStyle,
  14594. "placeholder-style": $setup.placeholderStyle,
  14595. modelValue: $setup.form.packageCode,
  14596. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.packageCode = $event),
  14597. placeholder: "扫描/输入物流单号",
  14598. border: "surround"
  14599. }, null, 8, ["customStyle", "modelValue"]),
  14600. vue.withDirectives(vue.createVNode(_component_u_button, {
  14601. customStyle: $setup.customStyle,
  14602. type: "info",
  14603. color: "#a4adb3",
  14604. onClick: _cache[2] || (_cache[2] = ($event) => $setup.handleBarcode($setup.form.packageCode)),
  14605. text: "确定"
  14606. }, null, 8, ["customStyle"]), [
  14607. [_directive_permission, "app:express:warehouseSign:confirm"]
  14608. ])
  14609. ])
  14610. ]),
  14611. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  14612. vue.createVNode(_component_u_button, {
  14613. size: "large",
  14614. type: "success",
  14615. onClick: $setup.scanCode,
  14616. text: "扫码",
  14617. class: "scan-button"
  14618. })
  14619. ]),
  14620. vue.createVNode($setup["WarehouseSelector"], {
  14621. show: $setup.showSelector,
  14622. "onUpdate:show": _cache[3] || (_cache[3] = ($event) => $setup.showSelector = $event),
  14623. onWarehouseSelected: $setup.handleWarehouseSelected
  14624. }, null, 8, ["show"])
  14625. ]);
  14626. }
  14627. const PagesIndexExpressWarehouseSign = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$1i], ["__scopeId", "data-v-7473f06e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/warehouse-sign.vue"]]);
  14628. const placeholderStyle$1 = "font-size:32rpx";
  14629. const _sfc_main$1i = {
  14630. __name: "weight-modify",
  14631. setup(__props, { expose: __expose }) {
  14632. __expose();
  14633. const customStyle = vue.reactive({
  14634. height: "90rpx"
  14635. });
  14636. const formRef = vue.ref(null);
  14637. const form = vue.ref({
  14638. "packageCode": "",
  14639. "batchNum": "",
  14640. "godownId": "",
  14641. "otherInfo": "",
  14642. "actualWeight": "",
  14643. "imgUrlList": []
  14644. });
  14645. const rules2 = {
  14646. packageCode: [{
  14647. required: true,
  14648. message: "请输入物流单号",
  14649. trigger: "blur"
  14650. }],
  14651. actualWeight: [{
  14652. required: true,
  14653. message: "请输入重量",
  14654. trigger: "blur"
  14655. }]
  14656. };
  14657. function scanCode() {
  14658. uni.scanCode({
  14659. success: (res2) => {
  14660. form.value.packageCode = res2.result;
  14661. },
  14662. fail: (err) => {
  14663. uni.$u.toast("扫码失败");
  14664. }
  14665. });
  14666. }
  14667. function submitForm() {
  14668. formRef.value.validate().then((valid) => {
  14669. if (valid) {
  14670. uni.$u.http.post("/app/ordersign/changeWeight", form.value).then((res2) => {
  14671. if (res2.code == 200) {
  14672. uni.$u.toast("重量修改成功");
  14673. let text = code + "已提交审核";
  14674. uni.$u.ttsModule.speak(text);
  14675. } else {
  14676. let text = code + "订单不存在";
  14677. uni.$u.ttsModule.speak(text);
  14678. }
  14679. });
  14680. }
  14681. });
  14682. }
  14683. onLoad(() => {
  14684. uni.$u.useGlobalEvent((e) => {
  14685. form.value.packageCode = e.barcode;
  14686. });
  14687. });
  14688. onShow(() => {
  14689. uni.$u.updateActivePageOnShow();
  14690. });
  14691. const __returned__ = { placeholderStyle: placeholderStyle$1, customStyle, formRef, form, rules: rules2, scanCode, submitForm, ref: vue.ref, reactive: vue.reactive, get onLoad() {
  14692. return onLoad;
  14693. }, get onShow() {
  14694. return onShow;
  14695. }, cyUpload };
  14696. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14697. return __returned__;
  14698. }
  14699. };
  14700. function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
  14701. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  14702. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  14703. const _component_u__form = resolveEasycom(vue.resolveDynamicComponent("u--form"), __easycom_2$5);
  14704. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  14705. const _directive_permission = vue.resolveDirective("permission");
  14706. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14707. vue.createVNode(_component_u__form, {
  14708. ref: "formRef",
  14709. model: $setup.form,
  14710. rules: $setup.rules,
  14711. "label-width": "165px",
  14712. "label-position": "top",
  14713. labelStyle: { fontSize: "32rpx" },
  14714. errorType: "toast"
  14715. }, {
  14716. default: vue.withCtx(() => [
  14717. vue.createCommentVNode(" 物流单号输入 "),
  14718. vue.createVNode(_component_u_form_item, {
  14719. label: "",
  14720. prop: "packageCode"
  14721. }, {
  14722. default: vue.withCtx(() => [
  14723. vue.createVNode(_component_u_input, {
  14724. placeholderStyle: $setup.placeholderStyle,
  14725. customStyle: $setup.customStyle,
  14726. modelValue: $setup.form.packageCode,
  14727. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.packageCode = $event),
  14728. placeholder: "扫描/输入物流单号",
  14729. border: "surround",
  14730. name: "packageCode"
  14731. }, null, 8, ["customStyle", "modelValue"])
  14732. ]),
  14733. _: 1
  14734. /* STABLE */
  14735. }),
  14736. vue.createCommentVNode(" 重量输入 "),
  14737. vue.createVNode(_component_u_form_item, {
  14738. label: "重量(kg)",
  14739. prop: "actualWeight"
  14740. }, {
  14741. default: vue.withCtx(() => [
  14742. vue.createVNode(_component_u_input, {
  14743. placeholderStyle: $setup.placeholderStyle,
  14744. customStyle: $setup.customStyle,
  14745. modelValue: $setup.form.actualWeight,
  14746. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.actualWeight = $event),
  14747. placeholder: "请输入重量",
  14748. border: "surround",
  14749. name: "actualWeight",
  14750. type: "number"
  14751. }, null, 8, ["customStyle", "modelValue"])
  14752. ]),
  14753. _: 1
  14754. /* STABLE */
  14755. }),
  14756. vue.createCommentVNode(" 图片上传 "),
  14757. vue.createVNode(_component_u_form_item, {
  14758. label: "上传图片",
  14759. prop: "imgUrlList"
  14760. }, {
  14761. default: vue.withCtx(() => [
  14762. vue.createVNode($setup["cyUpload"], {
  14763. filename: $setup.form.imgUrlList,
  14764. "onUpdate:filename": _cache[2] || (_cache[2] = ($event) => $setup.form.imgUrlList = $event),
  14765. name: "imgUrlList",
  14766. limit: 10,
  14767. "max-size": 1024 * 1024
  14768. }, null, 8, ["filename"])
  14769. ]),
  14770. _: 1
  14771. /* STABLE */
  14772. })
  14773. ]),
  14774. _: 1
  14775. /* STABLE */
  14776. }, 8, ["model"]),
  14777. vue.createCommentVNode(" 底部按钮 "),
  14778. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  14779. vue.createVNode(_component_u_button, {
  14780. size: "large",
  14781. type: "warning",
  14782. onClick: $setup.scanCode,
  14783. text: "扫码",
  14784. class: "scan-button"
  14785. }),
  14786. vue.withDirectives(vue.createVNode(
  14787. _component_u_button,
  14788. {
  14789. size: "large",
  14790. type: "success",
  14791. onClick: $setup.submitForm,
  14792. text: "提交",
  14793. class: "submit-button"
  14794. },
  14795. null,
  14796. 512
  14797. /* NEED_PATCH */
  14798. ), [
  14799. [_directive_permission, "app:express:changeWeight:confirm"]
  14800. ])
  14801. ])
  14802. ]);
  14803. }
  14804. const PagesIndexExpressWeightModify = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$1h], ["__scopeId", "data-v-e6126507"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/weight-modify.vue"]]);
  14805. const _sfc_main$1h = {
  14806. __name: "confirm-receipt",
  14807. setup(__props, { expose: __expose }) {
  14808. __expose();
  14809. const formData = vue.ref({
  14810. searchType: "2",
  14811. search: ""
  14812. });
  14813. const handleSubmit = () => {
  14814. if (!formData.value.search) {
  14815. uni.$u.toast("请扫描/输入物流单号");
  14816. return;
  14817. }
  14818. uni.$u.http.post("/app/orderinfo/confirmOrder", formData.value).then((res2) => {
  14819. if (res2.code == 200) {
  14820. let text = formData.value.search + "收货成功";
  14821. uni.$u.ttsModule.speak(text);
  14822. } else {
  14823. let text = formData.value.search + "订单不存在";
  14824. uni.$u.ttsModule.speak(text);
  14825. }
  14826. });
  14827. };
  14828. const handleScan = () => {
  14829. uni.scanCode({
  14830. success: (res2) => {
  14831. formData.value.search = res2.result;
  14832. handleSubmit();
  14833. }
  14834. });
  14835. };
  14836. onLoad(() => {
  14837. uni.$u.useGlobalEvent((e) => {
  14838. formData.value.search = e.barcode;
  14839. handleSubmit();
  14840. });
  14841. });
  14842. onShow(() => {
  14843. uni.$u.updateActivePageOnShow();
  14844. });
  14845. const __returned__ = { formData, handleSubmit, handleScan, ref: vue.ref, get onLoad() {
  14846. return onLoad;
  14847. }, get onShow() {
  14848. return onShow;
  14849. } };
  14850. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14851. return __returned__;
  14852. }
  14853. };
  14854. function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) {
  14855. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
  14856. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$5);
  14857. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  14858. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  14859. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$2);
  14860. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14861. vue.createCommentVNode(" 底部按钮 "),
  14862. vue.createElementVNode("view", { class: "footer" }, [
  14863. vue.createCommentVNode(" 查询区域 "),
  14864. vue.createElementVNode("view", { class: "query-section" }, [
  14865. vue.createVNode(_component_u_radio_group, {
  14866. modelValue: $setup.formData.searchType,
  14867. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.searchType = $event)
  14868. }, {
  14869. default: vue.withCtx(() => [
  14870. vue.createVNode(_component_u_radio, {
  14871. label: "查订单",
  14872. name: "1",
  14873. labelSize: "16px",
  14874. iconSize: "16px"
  14875. }),
  14876. vue.createVNode(_component_u_radio, {
  14877. label: "查物流",
  14878. "custom-style": "margin-left:20px",
  14879. name: "2",
  14880. labelSize: "16px",
  14881. iconSize: "16px"
  14882. })
  14883. ]),
  14884. _: 1
  14885. /* STABLE */
  14886. }, 8, ["modelValue"]),
  14887. vue.createElementVNode("view", { class: "search-box" }, [
  14888. vue.createVNode(_component_u_input, {
  14889. "custom-style": "font-size:32rpx",
  14890. "placeholder-style": "fong-size:32rpx",
  14891. modelValue: $setup.formData.search,
  14892. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.search = $event),
  14893. placeholder: $setup.formData.searchType == "1" ? "扫描/输入订单号" : "扫描/输入物流单号",
  14894. border: "surround",
  14895. clearable: ""
  14896. }, null, 8, ["modelValue", "placeholder"]),
  14897. vue.createVNode(_component_u_button, {
  14898. color: "#c8c8c8",
  14899. text: "查询",
  14900. onClick: $setup.handleSubmit
  14901. })
  14902. ])
  14903. ]),
  14904. vue.createVNode(_component_u_divider),
  14905. vue.createElementVNode("view", { style: { "display": "flex" } }, [
  14906. vue.createVNode(_component_u_button, {
  14907. size: "large",
  14908. type: "success",
  14909. text: "确认收货扫码",
  14910. onClick: $setup.handleScan
  14911. })
  14912. ])
  14913. ])
  14914. ]);
  14915. }
  14916. const PagesIndexAuditConfirmReceipt = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1g], ["__scopeId", "data-v-fec7d541"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/confirm-receipt.vue"]]);
  14917. const props$b = {
  14918. props: {
  14919. // 是否开启顶部安全区适配
  14920. safeAreaInsetTop: {
  14921. type: Boolean,
  14922. default: props$E.navbar.safeAreaInsetTop
  14923. },
  14924. // 固定在顶部时,是否生成一个等高元素,以防止塌陷
  14925. placeholder: {
  14926. type: Boolean,
  14927. default: props$E.navbar.placeholder
  14928. },
  14929. // 是否固定在顶部
  14930. fixed: {
  14931. type: Boolean,
  14932. default: props$E.navbar.fixed
  14933. },
  14934. // 是否显示下边框
  14935. border: {
  14936. type: Boolean,
  14937. default: props$E.navbar.border
  14938. },
  14939. // 左边的图标
  14940. leftIcon: {
  14941. type: String,
  14942. default: props$E.navbar.leftIcon
  14943. },
  14944. // 左边的提示文字
  14945. leftText: {
  14946. type: String,
  14947. default: props$E.navbar.leftText
  14948. },
  14949. // 左右的提示文字
  14950. rightText: {
  14951. type: String,
  14952. default: props$E.navbar.rightText
  14953. },
  14954. // 右边的图标
  14955. rightIcon: {
  14956. type: String,
  14957. default: props$E.navbar.rightIcon
  14958. },
  14959. // 标题
  14960. title: {
  14961. type: [String, Number],
  14962. default: props$E.navbar.title
  14963. },
  14964. // 背景颜色
  14965. bgColor: {
  14966. type: String,
  14967. default: props$E.navbar.bgColor
  14968. },
  14969. // 标题的宽度
  14970. titleWidth: {
  14971. type: [String, Number],
  14972. default: props$E.navbar.titleWidth
  14973. },
  14974. // 导航栏高度
  14975. height: {
  14976. type: [String, Number],
  14977. default: props$E.navbar.height
  14978. },
  14979. // 左侧返回图标的大小
  14980. leftIconSize: {
  14981. type: [String, Number],
  14982. default: props$E.navbar.leftIconSize
  14983. },
  14984. // 左侧返回图标的颜色
  14985. leftIconColor: {
  14986. type: String,
  14987. default: props$E.navbar.leftIconColor
  14988. },
  14989. // 点击左侧区域(返回图标),是否自动返回上一页
  14990. autoBack: {
  14991. type: Boolean,
  14992. default: props$E.navbar.autoBack
  14993. },
  14994. // 标题的样式,对象或字符串
  14995. titleStyle: {
  14996. type: [String, Object],
  14997. default: props$E.navbar.titleStyle
  14998. }
  14999. }
  15000. };
  15001. const _sfc_main$1g = {
  15002. name: "u-navbar",
  15003. mixins: [mpMixin, mixin, props$b],
  15004. data() {
  15005. return {};
  15006. },
  15007. methods: {
  15008. // 点击左侧区域
  15009. leftClick() {
  15010. this.$emit("leftClick");
  15011. if (this.autoBack) {
  15012. uni.navigateBack();
  15013. }
  15014. },
  15015. // 点击右侧区域
  15016. rightClick() {
  15017. this.$emit("rightClick");
  15018. }
  15019. }
  15020. };
  15021. function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) {
  15022. const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$8);
  15023. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  15024. return vue.openBlock(), vue.createElementBlock("view", { class: "u-navbar" }, [
  15025. _ctx.fixed && _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock(
  15026. "view",
  15027. {
  15028. key: 0,
  15029. class: "u-navbar__placeholder",
  15030. style: vue.normalizeStyle({
  15031. height: _ctx.$u.addUnit(_ctx.$u.getPx(_ctx.height) + _ctx.$u.sys().statusBarHeight, "px")
  15032. })
  15033. },
  15034. null,
  15035. 4
  15036. /* STYLE */
  15037. )) : vue.createCommentVNode("v-if", true),
  15038. vue.createElementVNode(
  15039. "view",
  15040. {
  15041. class: vue.normalizeClass([_ctx.fixed && "u-navbar--fixed"])
  15042. },
  15043. [
  15044. _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, {
  15045. key: 0,
  15046. bgColor: _ctx.bgColor
  15047. }, null, 8, ["bgColor"])) : vue.createCommentVNode("v-if", true),
  15048. vue.createElementVNode(
  15049. "view",
  15050. {
  15051. class: vue.normalizeClass(["u-navbar__content", [_ctx.border && "u-border-bottom"]]),
  15052. style: vue.normalizeStyle({
  15053. height: _ctx.$u.addUnit(_ctx.height),
  15054. backgroundColor: _ctx.bgColor
  15055. })
  15056. },
  15057. [
  15058. vue.createElementVNode("view", {
  15059. class: "u-navbar__content__left",
  15060. "hover-class": "u-navbar__content__left--hover",
  15061. "hover-start-time": "150",
  15062. onClick: _cache[0] || (_cache[0] = (...args) => $options.leftClick && $options.leftClick(...args))
  15063. }, [
  15064. vue.renderSlot(_ctx.$slots, "left", {}, () => [
  15065. _ctx.leftIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  15066. key: 0,
  15067. name: _ctx.leftIcon,
  15068. size: _ctx.leftIconSize,
  15069. color: _ctx.leftIconColor
  15070. }, null, 8, ["name", "size", "color"])) : vue.createCommentVNode("v-if", true),
  15071. _ctx.leftText ? (vue.openBlock(), vue.createElementBlock(
  15072. "text",
  15073. {
  15074. key: 1,
  15075. style: vue.normalizeStyle({
  15076. color: _ctx.leftIconColor
  15077. }),
  15078. class: "u-navbar__content__left__text"
  15079. },
  15080. vue.toDisplayString(_ctx.leftText),
  15081. 5
  15082. /* TEXT, STYLE */
  15083. )) : vue.createCommentVNode("v-if", true)
  15084. ], true)
  15085. ]),
  15086. vue.renderSlot(_ctx.$slots, "center", {}, () => [
  15087. vue.createElementVNode(
  15088. "text",
  15089. {
  15090. class: "u-line-1 u-navbar__content__title",
  15091. style: vue.normalizeStyle([{
  15092. width: _ctx.$u.addUnit(_ctx.titleWidth)
  15093. }, _ctx.$u.addStyle(_ctx.titleStyle)])
  15094. },
  15095. vue.toDisplayString(_ctx.title),
  15096. 5
  15097. /* TEXT, STYLE */
  15098. )
  15099. ], true),
  15100. _ctx.$slots.right || _ctx.rightIcon || _ctx.rightText ? (vue.openBlock(), vue.createElementBlock("view", {
  15101. key: 0,
  15102. class: "u-navbar__content__right",
  15103. onClick: _cache[1] || (_cache[1] = (...args) => $options.rightClick && $options.rightClick(...args))
  15104. }, [
  15105. vue.renderSlot(_ctx.$slots, "right", {}, () => [
  15106. _ctx.rightIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  15107. key: 0,
  15108. name: _ctx.rightIcon,
  15109. size: "20"
  15110. }, null, 8, ["name"])) : vue.createCommentVNode("v-if", true),
  15111. _ctx.rightText ? (vue.openBlock(), vue.createElementBlock(
  15112. "text",
  15113. {
  15114. key: 1,
  15115. class: "u-navbar__content__right__text"
  15116. },
  15117. vue.toDisplayString(_ctx.rightText),
  15118. 1
  15119. /* TEXT */
  15120. )) : vue.createCommentVNode("v-if", true)
  15121. ], true)
  15122. ])) : vue.createCommentVNode("v-if", true)
  15123. ],
  15124. 6
  15125. /* CLASS, STYLE */
  15126. )
  15127. ],
  15128. 2
  15129. /* CLASS */
  15130. )
  15131. ]);
  15132. }
  15133. const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["render", _sfc_render$1f], ["__scopeId", "data-v-f631659b"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-navbar/u-navbar.vue"]]);
  15134. const props$a = {
  15135. props: {
  15136. // 步进器标识符,在change回调返回
  15137. name: {
  15138. type: [String, Number],
  15139. default: props$E.numberBox.name
  15140. },
  15141. // 用于双向绑定的值,初始化时设置设为默认min值(最小值)
  15142. modelValue: {
  15143. type: [String, Number],
  15144. default: props$E.numberBox.value
  15145. },
  15146. // 最小值
  15147. min: {
  15148. type: [String, Number],
  15149. default: props$E.numberBox.min
  15150. },
  15151. // 最大值
  15152. max: {
  15153. type: [String, Number],
  15154. default: props$E.numberBox.max
  15155. },
  15156. // 加减的步长,可为小数
  15157. step: {
  15158. type: [String, Number],
  15159. default: props$E.numberBox.step
  15160. },
  15161. // 是否只允许输入整数
  15162. integer: {
  15163. type: Boolean,
  15164. default: props$E.numberBox.integer
  15165. },
  15166. // 是否禁用,包括输入框,加减按钮
  15167. disabled: {
  15168. type: Boolean,
  15169. default: props$E.numberBox.disabled
  15170. },
  15171. // 是否禁用输入框
  15172. disabledInput: {
  15173. type: Boolean,
  15174. default: props$E.numberBox.disabledInput
  15175. },
  15176. // 是否开启异步变更,开启后需要手动控制输入值
  15177. asyncChange: {
  15178. type: Boolean,
  15179. default: props$E.numberBox.asyncChange
  15180. },
  15181. // 输入框宽度,单位为px
  15182. inputWidth: {
  15183. type: [String, Number],
  15184. default: props$E.numberBox.inputWidth
  15185. },
  15186. // 是否显示减少按钮
  15187. showMinus: {
  15188. type: Boolean,
  15189. default: props$E.numberBox.showMinus
  15190. },
  15191. // 是否显示增加按钮
  15192. showPlus: {
  15193. type: Boolean,
  15194. default: props$E.numberBox.showPlus
  15195. },
  15196. // 显示的小数位数
  15197. decimalLength: {
  15198. type: [String, Number, null],
  15199. default: props$E.numberBox.decimalLength
  15200. },
  15201. // 是否开启长按加减手势
  15202. longPress: {
  15203. type: Boolean,
  15204. default: props$E.numberBox.longPress
  15205. },
  15206. // 输入框文字和加减按钮图标的颜色
  15207. color: {
  15208. type: String,
  15209. default: props$E.numberBox.color
  15210. },
  15211. // 按钮大小,宽高等于此值,单位px,输入框高度和此值保持一致
  15212. buttonSize: {
  15213. type: [String, Number],
  15214. default: props$E.numberBox.buttonSize
  15215. },
  15216. // 输入框和按钮的背景颜色
  15217. bgColor: {
  15218. type: String,
  15219. default: props$E.numberBox.bgColor
  15220. },
  15221. // 指定光标于键盘的距离,避免键盘遮挡输入框,单位px
  15222. cursorSpacing: {
  15223. type: [String, Number],
  15224. default: props$E.numberBox.cursorSpacing
  15225. },
  15226. // 是否禁用增加按钮
  15227. disablePlus: {
  15228. type: Boolean,
  15229. default: props$E.numberBox.disablePlus
  15230. },
  15231. // 是否禁用减少按钮
  15232. disableMinus: {
  15233. type: Boolean,
  15234. default: props$E.numberBox.disableMinus
  15235. },
  15236. // 加减按钮图标的样式
  15237. iconStyle: {
  15238. type: [Object, String],
  15239. default: props$E.numberBox.iconStyle
  15240. }
  15241. }
  15242. };
  15243. const _sfc_main$1f = {
  15244. name: "u-number-box",
  15245. mixins: [mpMixin, mixin, props$a],
  15246. data() {
  15247. return {
  15248. // 输入框实际操作的值
  15249. currentValue: "",
  15250. // 定时器
  15251. longPressTimer: null
  15252. };
  15253. },
  15254. watch: {
  15255. // 多个值之间,只要一个值发生变化,都要重新检查check()函数
  15256. watchChange(n) {
  15257. this.check();
  15258. },
  15259. // 监听v-mode的变化,重新初始化内部的值
  15260. modelValue(n) {
  15261. if (n !== this.currentValue) {
  15262. this.currentValue = this.format(this.modelValue);
  15263. }
  15264. }
  15265. },
  15266. computed: {
  15267. getCursorSpacing() {
  15268. return uni.$u.getPx(this.cursorSpacing);
  15269. },
  15270. // 按钮的样式
  15271. buttonStyle() {
  15272. return (type2) => {
  15273. const style = {
  15274. backgroundColor: this.bgColor,
  15275. height: uni.$u.addUnit(this.buttonSize),
  15276. color: this.color
  15277. };
  15278. if (this.isDisabled(type2)) {
  15279. style.backgroundColor = "#f7f8fa";
  15280. }
  15281. return style;
  15282. };
  15283. },
  15284. // 输入框的样式
  15285. inputStyle() {
  15286. this.disabled || this.disabledInput;
  15287. const style = {
  15288. color: this.color,
  15289. backgroundColor: this.bgColor,
  15290. height: uni.$u.addUnit(this.buttonSize),
  15291. width: uni.$u.addUnit(this.inputWidth)
  15292. };
  15293. return style;
  15294. },
  15295. // 用于监听多个值发生变化
  15296. watchChange() {
  15297. return [this.integer, this.decimalLength, this.min, this.max];
  15298. },
  15299. isDisabled() {
  15300. return (type2) => {
  15301. if (type2 === "plus") {
  15302. return this.disabled || this.disablePlus || this.currentValue >= this.max;
  15303. }
  15304. return this.disabled || this.disableMinus || this.currentValue <= this.min;
  15305. };
  15306. }
  15307. },
  15308. mounted() {
  15309. this.init();
  15310. },
  15311. emits: ["update:modelValue", "focus", "blur", "overlimit", "change", "plus", "minus"],
  15312. methods: {
  15313. init() {
  15314. this.currentValue = this.format(this.modelValue);
  15315. },
  15316. // 格式化整理数据,限制范围
  15317. format(value2) {
  15318. value2 = this.filter(value2);
  15319. value2 = value2 === "" ? 0 : +value2;
  15320. value2 = Math.max(Math.min(this.max, value2), this.min);
  15321. if (this.decimalLength !== null) {
  15322. value2 = value2.toFixed(this.decimalLength);
  15323. }
  15324. return value2;
  15325. },
  15326. // 过滤非法的字符
  15327. filter(value2) {
  15328. value2 = String(value2).replace(/[^0-9.-]/g, "");
  15329. if (this.integer && value2.indexOf(".") !== -1) {
  15330. value2 = value2.split(".")[0];
  15331. }
  15332. return value2;
  15333. },
  15334. check() {
  15335. const val = this.format(this.currentValue);
  15336. if (val !== this.currentValue) {
  15337. this.currentValue = val;
  15338. }
  15339. },
  15340. // 判断是否出于禁止操作状态
  15341. // isDisabled(type) {
  15342. // if (type === 'plus') {
  15343. // // 在点击增加按钮情况下,判断整体的disabled,是否单独禁用增加按钮,以及当前值是否大于最大的允许值
  15344. // return (
  15345. // this.disabled ||
  15346. // this.disablePlus ||
  15347. // this.currentValue >= this.max
  15348. // )
  15349. // }
  15350. // // 点击减少按钮同理
  15351. // return (
  15352. // this.disabled ||
  15353. // this.disableMinus ||
  15354. // this.currentValue <= this.min
  15355. // )
  15356. // },
  15357. // 输入框活动焦点
  15358. onFocus(event) {
  15359. this.$emit("focus", {
  15360. ...event.detail,
  15361. name: this.name
  15362. });
  15363. },
  15364. // 输入框失去焦点
  15365. onBlur(event) {
  15366. this.format(event.detail.value);
  15367. this.$emit(
  15368. "blur",
  15369. {
  15370. ...event.detail,
  15371. name: this.name
  15372. }
  15373. );
  15374. },
  15375. // 输入框值发生变化
  15376. onInput(e) {
  15377. const {
  15378. value: value2 = ""
  15379. } = e.detail || {};
  15380. if (value2 === "")
  15381. return;
  15382. let formatted = this.filter(value2);
  15383. if (this.decimalLength !== null && formatted.indexOf(".") !== -1) {
  15384. const pair = formatted.split(".");
  15385. formatted = `${pair[0]}.${pair[1].slice(0, this.decimalLength)}`;
  15386. }
  15387. formatted = this.format(formatted);
  15388. this.emitChange(formatted);
  15389. },
  15390. // 发出change事件
  15391. emitChange(value2) {
  15392. if (!this.asyncChange) {
  15393. this.$nextTick(() => {
  15394. this.$emit("update:modelValue", value2);
  15395. this.currentValue = value2;
  15396. this.$forceUpdate();
  15397. });
  15398. }
  15399. this.$emit("change", {
  15400. value: value2,
  15401. name: this.name
  15402. });
  15403. },
  15404. onChange() {
  15405. const {
  15406. type: type2
  15407. } = this;
  15408. if (this.isDisabled(type2)) {
  15409. return this.$emit("overlimit", type2);
  15410. }
  15411. const diff = type2 === "minus" ? -this.step : +this.step;
  15412. const value2 = this.format(this.add(+this.currentValue, diff));
  15413. this.emitChange(value2);
  15414. this.$emit(type2);
  15415. },
  15416. // 对值扩大后进行四舍五入,再除以扩大因子,避免出现浮点数操作的精度问题
  15417. add(num1, num2) {
  15418. const cardinal = Math.pow(10, 10);
  15419. return Math.round((num1 + num2) * cardinal) / cardinal;
  15420. },
  15421. // 点击加减按钮
  15422. clickHandler(type2) {
  15423. this.type = type2;
  15424. this.onChange();
  15425. },
  15426. longPressStep() {
  15427. this.clearTimeout();
  15428. this.longPressTimer = setTimeout(() => {
  15429. this.onChange();
  15430. this.longPressStep();
  15431. }, 250);
  15432. },
  15433. onTouchStart(type2) {
  15434. if (!this.longPress)
  15435. return;
  15436. this.clearTimeout();
  15437. this.type = type2;
  15438. this.longPressTimer = setTimeout(() => {
  15439. this.onChange();
  15440. this.longPressStep();
  15441. }, 600);
  15442. },
  15443. // 触摸结束,清除定时器,停止长按加减
  15444. onTouchEnd() {
  15445. if (!this.longPress)
  15446. return;
  15447. this.clearTimeout();
  15448. },
  15449. // 清除定时器
  15450. clearTimeout() {
  15451. clearTimeout(this.longPressTimer);
  15452. this.longPressTimer = null;
  15453. }
  15454. }
  15455. };
  15456. function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
  15457. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  15458. return vue.openBlock(), vue.createElementBlock("view", { class: "u-number-box" }, [
  15459. _ctx.showMinus && _ctx.$slots.minus ? (vue.openBlock(), vue.createElementBlock(
  15460. "view",
  15461. {
  15462. key: 0,
  15463. class: "u-number-box__slot",
  15464. onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => $options.clickHandler("minus"), ["stop"])),
  15465. onTouchstart: _cache[1] || (_cache[1] = ($event) => $options.onTouchStart("minus")),
  15466. onTouchend: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"]))
  15467. },
  15468. [
  15469. vue.renderSlot(_ctx.$slots, "minus", {}, void 0, true)
  15470. ],
  15471. 32
  15472. /* NEED_HYDRATION */
  15473. )) : _ctx.showMinus ? (vue.openBlock(), vue.createElementBlock(
  15474. "view",
  15475. {
  15476. key: 1,
  15477. class: vue.normalizeClass(["u-number-box__minus", { "u-number-box__minus--disabled": $options.isDisabled("minus") }]),
  15478. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.clickHandler("minus"), ["stop"])),
  15479. onTouchstart: _cache[4] || (_cache[4] = ($event) => $options.onTouchStart("minus")),
  15480. onTouchend: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"])),
  15481. "hover-class": "u-number-box__minus--hover",
  15482. "hover-stay-time": "150",
  15483. style: vue.normalizeStyle([$options.buttonStyle("minus")])
  15484. },
  15485. [
  15486. vue.createVNode(_component_u_icon, {
  15487. name: "minus",
  15488. color: $options.isDisabled("minus") ? "#c8c9cc" : "#323233",
  15489. size: "15",
  15490. bold: "",
  15491. customStyle: _ctx.iconStyle
  15492. }, null, 8, ["color", "customStyle"])
  15493. ],
  15494. 38
  15495. /* CLASS, STYLE, NEED_HYDRATION */
  15496. )) : vue.createCommentVNode("v-if", true),
  15497. vue.renderSlot(_ctx.$slots, "input", {}, () => [
  15498. vue.withDirectives(vue.createElementVNode("input", {
  15499. disabled: _ctx.disabledInput || _ctx.disabled,
  15500. "cursor-spacing": $options.getCursorSpacing,
  15501. class: vue.normalizeClass([{ "u-number-box__input--disabled": _ctx.disabled || _ctx.disabledInput }, "u-number-box__input"]),
  15502. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.currentValue = $event),
  15503. onBlur: _cache[7] || (_cache[7] = (...args) => $options.onBlur && $options.onBlur(...args)),
  15504. onFocus: _cache[8] || (_cache[8] = (...args) => $options.onFocus && $options.onFocus(...args)),
  15505. onInput: _cache[9] || (_cache[9] = (...args) => $options.onInput && $options.onInput(...args)),
  15506. type: "number",
  15507. style: vue.normalizeStyle([$options.inputStyle])
  15508. }, null, 46, ["disabled", "cursor-spacing"]), [
  15509. [vue.vModelText, $data.currentValue]
  15510. ])
  15511. ], true),
  15512. _ctx.showPlus && _ctx.$slots.plus ? (vue.openBlock(), vue.createElementBlock(
  15513. "view",
  15514. {
  15515. key: 2,
  15516. class: "u-number-box__slot",
  15517. onClick: _cache[10] || (_cache[10] = vue.withModifiers(($event) => $options.clickHandler("plus"), ["stop"])),
  15518. onTouchstart: _cache[11] || (_cache[11] = ($event) => $options.onTouchStart("plus")),
  15519. onTouchend: _cache[12] || (_cache[12] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"]))
  15520. },
  15521. [
  15522. vue.renderSlot(_ctx.$slots, "plus", {}, void 0, true)
  15523. ],
  15524. 32
  15525. /* NEED_HYDRATION */
  15526. )) : _ctx.showPlus ? (vue.openBlock(), vue.createElementBlock(
  15527. "view",
  15528. {
  15529. key: 3,
  15530. class: vue.normalizeClass(["u-number-box__plus", { "u-number-box__minus--disabled": $options.isDisabled("plus") }]),
  15531. onClick: _cache[13] || (_cache[13] = vue.withModifiers(($event) => $options.clickHandler("plus"), ["stop"])),
  15532. onTouchstart: _cache[14] || (_cache[14] = ($event) => $options.onTouchStart("plus")),
  15533. onTouchend: _cache[15] || (_cache[15] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"])),
  15534. "hover-class": "u-number-box__plus--hover",
  15535. "hover-stay-time": "150",
  15536. style: vue.normalizeStyle([$options.buttonStyle("plus")])
  15537. },
  15538. [
  15539. vue.createVNode(_component_u_icon, {
  15540. name: "plus",
  15541. color: $options.isDisabled("plus") ? "#c8c9cc" : "#323233",
  15542. size: "15",
  15543. bold: "",
  15544. customStyle: _ctx.iconStyle
  15545. }, null, 8, ["color", "customStyle"])
  15546. ],
  15547. 38
  15548. /* CLASS, STYLE, NEED_HYDRATION */
  15549. )) : vue.createCommentVNode("v-if", true)
  15550. ]);
  15551. }
  15552. const __easycom_3$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["render", _sfc_render$1e], ["__scopeId", "data-v-eb6f6237"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-number-box/u-number-box.vue"]]);
  15553. const _sfc_main$1e = {
  15554. __name: "scan-order",
  15555. setup(__props, { expose: __expose }) {
  15556. __expose();
  15557. function playGlobalSound() {
  15558. uni.$u.playClickSound();
  15559. }
  15560. const isbnList = vue.ref([]);
  15561. const showModal = vue.ref(false);
  15562. const newIsbn = vue.ref("");
  15563. const removeItem = (index2) => {
  15564. isbnList.value.splice(index2, 1);
  15565. };
  15566. const goBack = () => {
  15567. uni.navigateBack();
  15568. };
  15569. function clearAll() {
  15570. isbnList.value.length = 0;
  15571. }
  15572. const addOrUpdateIsbn = (isbn) => {
  15573. const existingItem = isbnList.value.find((item) => item.isbn === isbn);
  15574. if (existingItem) {
  15575. existingItem.quantity += 1;
  15576. } else {
  15577. isbnList.value.push({
  15578. isbn,
  15579. quantity: 1
  15580. });
  15581. }
  15582. };
  15583. function handleIsbn(isbn) {
  15584. if (isValidISBN(isbn)) {
  15585. addOrUpdateIsbn(isbn);
  15586. } else {
  15587. uni.$u.ttsModule.speak("不正确的ISBN码");
  15588. }
  15589. }
  15590. const handleScan = () => {
  15591. uni.scanCode({
  15592. success: (res2) => {
  15593. handleIsbn(res2.result);
  15594. }
  15595. });
  15596. };
  15597. const isValidISBN = (isbn) => {
  15598. return /^97[89]\d{10}$/.test(isbn);
  15599. };
  15600. const handleQuery = () => {
  15601. if (isbnList.value.length === 0) {
  15602. uni.showToast({
  15603. title: "请先添加ISBN",
  15604. icon: "none"
  15605. });
  15606. return;
  15607. }
  15608. uni.setStorageSync("isbnList", isbnList.value);
  15609. uni.navigateTo({
  15610. url: "/pages/index/audit/isbn-order"
  15611. });
  15612. };
  15613. const addIsbn = () => {
  15614. if (isValidISBN(newIsbn.value)) {
  15615. addOrUpdateIsbn(newIsbn.value);
  15616. showModal.value = false;
  15617. newIsbn.value = "";
  15618. } else {
  15619. uni.$u.ttsModule.speak("不正确的ISBN码");
  15620. }
  15621. };
  15622. onLoad(() => {
  15623. uni.$u.useGlobalEvent((e) => {
  15624. addOrUpdateIsbn(e.barcode);
  15625. });
  15626. });
  15627. onShow(() => {
  15628. uni.$u.updateActivePageOnShow();
  15629. });
  15630. const __returned__ = { playGlobalSound, isbnList, showModal, newIsbn, removeItem, goBack, clearAll, addOrUpdateIsbn, handleIsbn, handleScan, isValidISBN, handleQuery, addIsbn, ref: vue.ref, get onLoad() {
  15631. return onLoad;
  15632. }, get onShow() {
  15633. return onShow;
  15634. } };
  15635. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15636. return __returned__;
  15637. }
  15638. };
  15639. function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) {
  15640. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  15641. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  15642. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  15643. const _component_u_number_box = resolveEasycom(vue.resolveDynamicComponent("u-number-box"), __easycom_3$3);
  15644. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  15645. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  15646. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  15647. return vue.openBlock(), vue.createElementBlock("view", {
  15648. class: "container",
  15649. onClick: $setup.playGlobalSound
  15650. }, [
  15651. vue.createVNode(_component_u_navbar, {
  15652. title: "扫书查单",
  15653. border: false,
  15654. fixed: "",
  15655. bgColor: "#22ac38",
  15656. leftIconColor: "#fff",
  15657. titleStyle: "font-size:36rpx;color:#fff"
  15658. }, {
  15659. left: vue.withCtx(() => [
  15660. vue.createVNode(_component_u_icon, {
  15661. name: "arrow-left",
  15662. color: "#fff",
  15663. size: "20",
  15664. onClick: $setup.goBack
  15665. })
  15666. ]),
  15667. right: vue.withCtx(() => [
  15668. vue.createElementVNode("text", {
  15669. style: { "color": "#fff", "font-size": "32rpx" },
  15670. type: "primary",
  15671. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showModal = true)
  15672. }, "新增")
  15673. ]),
  15674. _: 1
  15675. /* STABLE */
  15676. }),
  15677. vue.createCommentVNode(" 顶部操作栏 "),
  15678. vue.createVNode(_component_u_sticky, null, {
  15679. default: vue.withCtx(() => [
  15680. vue.createElementVNode("view", {
  15681. class: "header",
  15682. onClick: $setup.clearAll
  15683. }, "清除全部"),
  15684. vue.createCommentVNode(" 提示信息 "),
  15685. vue.createElementVNode("view", { class: "tips" }, [
  15686. vue.createElementVNode("text", null, "请勿录入审核为不良的书籍ISBN!"),
  15687. vue.createElementVNode("text", { class: "sub-tips" }, "不良书籍的ISBN可能是错误的!")
  15688. ])
  15689. ]),
  15690. _: 1
  15691. /* STABLE */
  15692. }),
  15693. vue.createCommentVNode(" ISBN列表 "),
  15694. vue.createElementVNode("scroll-view", {
  15695. "scroll-y": "",
  15696. class: "isbn-list"
  15697. }, [
  15698. (vue.openBlock(true), vue.createElementBlock(
  15699. vue.Fragment,
  15700. null,
  15701. vue.renderList($setup.isbnList, (item, index2) => {
  15702. return vue.openBlock(), vue.createElementBlock("view", {
  15703. key: index2,
  15704. class: "isbn-item"
  15705. }, [
  15706. vue.createElementVNode("view", { class: "item-left" }, [
  15707. vue.createVNode(_component_u_icon, {
  15708. name: "minus-circle-fill",
  15709. color: "#dd524d",
  15710. size: "24",
  15711. onClick: ($event) => $setup.removeItem(index2)
  15712. }, null, 8, ["onClick"]),
  15713. vue.createElementVNode(
  15714. "text",
  15715. { class: "index" },
  15716. vue.toDisplayString(index2 + 1) + "、",
  15717. 1
  15718. /* TEXT */
  15719. ),
  15720. vue.createElementVNode(
  15721. "text",
  15722. { class: "isbn" },
  15723. vue.toDisplayString(item.isbn),
  15724. 1
  15725. /* TEXT */
  15726. )
  15727. ]),
  15728. vue.createVNode(_component_u_number_box, {
  15729. modelValue: item.quantity,
  15730. "onUpdate:modelValue": ($event) => item.quantity = $event,
  15731. disableMinus: item.quantity <= 1
  15732. }, null, 8, ["modelValue", "onUpdate:modelValue", "disableMinus"])
  15733. ]);
  15734. }),
  15735. 128
  15736. /* KEYED_FRAGMENT */
  15737. ))
  15738. ]),
  15739. vue.createCommentVNode(" 底部按钮 "),
  15740. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  15741. vue.createVNode(_component_u_button, {
  15742. size: "large",
  15743. type: "warning",
  15744. text: "扫码加书",
  15745. onClick: $setup.handleScan
  15746. }),
  15747. vue.createVNode(_component_u_button, {
  15748. size: "large",
  15749. type: "primary",
  15750. text: "查询",
  15751. onClick: $setup.handleQuery
  15752. })
  15753. ]),
  15754. vue.createCommentVNode(" ISBN Input Modal "),
  15755. vue.createVNode(_component_u_popup, {
  15756. show: $setup.showModal,
  15757. mode: "center",
  15758. customStyle: "width: 84%;border-radius:10px"
  15759. }, {
  15760. default: vue.withCtx(() => [
  15761. vue.createElementVNode("view", { class: "modal-content" }, [
  15762. vue.createElementVNode("text", null, "输入ISBN码"),
  15763. vue.createVNode(_component_u_input, {
  15764. modelValue: $setup.newIsbn,
  15765. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.newIsbn = $event),
  15766. placeholder: "请输入ISBN码",
  15767. "custom-style": "margin:60rpx 0"
  15768. }, null, 8, ["modelValue"]),
  15769. vue.createElementVNode("view", { class: "modal-buttons" }, [
  15770. vue.createVNode(_component_u_button, {
  15771. text: "取消",
  15772. onClick: _cache[2] || (_cache[2] = ($event) => $setup.showModal = false)
  15773. }),
  15774. vue.createVNode(_component_u_button, {
  15775. type: "primary",
  15776. text: "确定",
  15777. onClick: $setup.addIsbn
  15778. })
  15779. ])
  15780. ])
  15781. ]),
  15782. _: 1
  15783. /* STABLE */
  15784. }, 8, ["show"])
  15785. ]);
  15786. }
  15787. const PagesIndexAuditScanOrder = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$1d], ["__scopeId", "data-v-1af411ea"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/scan-order.vue"]]);
  15788. const _sfc_main$1d = {
  15789. __name: "orderItem",
  15790. props: {
  15791. item: {
  15792. type: Object,
  15793. default: () => {
  15794. }
  15795. }
  15796. },
  15797. setup(__props, { expose: __expose }) {
  15798. __expose();
  15799. const props2 = __props;
  15800. const statusEnum = {
  15801. 0: "创建",
  15802. 1: "用户删除",
  15803. 2: "下单(待初审)",
  15804. 3: "初审(待取书)",
  15805. 4: "初审未通过",
  15806. 5: "快递取书(待签收)",
  15807. 6: "快递签收(待收货)",
  15808. 7: "物流签收(路由异常)",
  15809. 8: "仓库收货(待审核)",
  15810. 9: "审核中(审核未提交)",
  15811. 10: "已审核(待付款)",
  15812. 11: "已完成"
  15813. };
  15814. const maskedNickName = vue.computed(() => {
  15815. let nickName = props2.item.userNick || props2.item.nickName;
  15816. if (!nickName)
  15817. return "";
  15818. return nickName.charAt(0) + "*".repeat(nickName.length - 1);
  15819. });
  15820. let statusText = vue.computed(() => {
  15821. return props2.item.status ? statusEnum[props2.item.status] : "-";
  15822. });
  15823. const statusColor = vue.ref("#FF4D4F");
  15824. const copyToClipboard = (text) => {
  15825. uni.setClipboardData({
  15826. data: text,
  15827. success: () => {
  15828. uni.showToast({
  15829. title: "复制成功",
  15830. icon: "success"
  15831. });
  15832. }
  15833. });
  15834. };
  15835. const handleAudit = () => {
  15836. uni.navigateTo({
  15837. url: `/pages/index/detail/index?id=${props2.item.orderId}`
  15838. });
  15839. };
  15840. const handleView = () => {
  15841. uni.navigateTo({
  15842. url: `/pages/index/detail/index?id=${props2.item.orderId}&type=2`
  15843. });
  15844. };
  15845. const __returned__ = { props: props2, statusEnum, maskedNickName, get statusText() {
  15846. return statusText;
  15847. }, set statusText(v) {
  15848. statusText = v;
  15849. }, statusColor, copyToClipboard, handleAudit, handleView, ref: vue.ref, computed: vue.computed };
  15850. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15851. return __returned__;
  15852. }
  15853. };
  15854. function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) {
  15855. var _a, _b, _c;
  15856. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  15857. return vue.openBlock(), vue.createElementBlock("view", { class: "order-card" }, [
  15858. vue.createCommentVNode(" 用户信息 "),
  15859. vue.createElementVNode("view", { class: "user-info" }, [
  15860. vue.createElementVNode("image", {
  15861. class: "avatar",
  15862. src: $props.item.imgPath,
  15863. mode: "aspectFill"
  15864. }, null, 8, ["src"]),
  15865. vue.createElementVNode("view", { class: "user-details" }, [
  15866. vue.createElementVNode(
  15867. "text",
  15868. { class: "username" },
  15869. vue.toDisplayString($props.item.plat == 1 ? "微信用户" : "支付宝用户") + " (" + vue.toDisplayString($setup.maskedNickName) + ")",
  15870. 1
  15871. /* TEXT */
  15872. ),
  15873. vue.createElementVNode(
  15874. "text",
  15875. { class: "date" },
  15876. "共卖出" + vue.toDisplayString($props.item.totalNum) + "本书",
  15877. 1
  15878. /* TEXT */
  15879. ),
  15880. vue.createElementVNode(
  15881. "text",
  15882. { class: "date" },
  15883. "来自" + vue.toDisplayString($props.item.sendSsq),
  15884. 1
  15885. /* TEXT */
  15886. )
  15887. ]),
  15888. vue.createElementVNode("view", { class: "user-details right-items" }, [
  15889. vue.createElementVNode(
  15890. "text",
  15891. { class: "date" },
  15892. vue.toDisplayString($props.item.schedulePickupStartTime),
  15893. 1
  15894. /* TEXT */
  15895. ),
  15896. vue.createElementVNode(
  15897. "text",
  15898. {
  15899. class: "status",
  15900. style: vue.normalizeStyle({ color: $setup.statusColor })
  15901. },
  15902. "[" + vue.toDisplayString($setup.statusText) + "]",
  15903. 5
  15904. /* TEXT, STYLE */
  15905. )
  15906. ])
  15907. ]),
  15908. vue.createCommentVNode(" 订单详情 "),
  15909. vue.createElementVNode("view", { class: "order-details" }, [
  15910. vue.createElementVNode("view", { class: "detail-row flex flex-col" }, [
  15911. vue.createElementVNode("view", { class: "flex-1" }, [
  15912. vue.createElementVNode("text", null, "订单ID:"),
  15913. vue.createElementVNode(
  15914. "text",
  15915. {
  15916. class: "link",
  15917. onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyToClipboard($props.item.orderId))
  15918. },
  15919. vue.toDisplayString($props.item.orderId),
  15920. 1
  15921. /* TEXT */
  15922. )
  15923. ]),
  15924. vue.createElementVNode("view", {
  15925. class: "flex-1",
  15926. style: { "flex": "1.5" }
  15927. }, [
  15928. vue.createElementVNode("text", null, "运单号:"),
  15929. vue.createElementVNode(
  15930. "text",
  15931. {
  15932. class: "link",
  15933. onClick: _cache[1] || (_cache[1] = ($event) => $setup.copyToClipboard($props.item.waybillCode))
  15934. },
  15935. vue.toDisplayString($props.item.waybillCode),
  15936. 1
  15937. /* TEXT */
  15938. )
  15939. ])
  15940. ]),
  15941. vue.createElementVNode("view", { class: "detail-row" }, [
  15942. vue.createElementVNode(
  15943. "text",
  15944. { class: "flex-1" },
  15945. "预估金额:" + vue.toDisplayString($props.item.expectMoney || 0),
  15946. 1
  15947. /* TEXT */
  15948. ),
  15949. vue.createElementVNode(
  15950. "text",
  15951. { class: "flex-1" },
  15952. "审核金额:" + vue.toDisplayString($props.item.finalMoney || "待核算"),
  15953. 1
  15954. /* TEXT */
  15955. )
  15956. ]),
  15957. vue.createElementVNode("view", { class: "detail-row" }, [
  15958. vue.createElementVNode(
  15959. "text",
  15960. null,
  15961. "内部备注:" + 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 : "-"),
  15962. 1
  15963. /* TEXT */
  15964. )
  15965. ])
  15966. ]),
  15967. vue.createCommentVNode(" 操作按钮 "),
  15968. vue.createElementVNode("view", { class: "action-buttons" }, [
  15969. vue.createVNode(_component_u_button, {
  15970. size: "small",
  15971. type: "primary",
  15972. onClick: $setup.handleAudit,
  15973. disabled: $props.item.status != 8 || $props.item.status != 9
  15974. }, {
  15975. default: vue.withCtx(() => [
  15976. vue.createTextVNode("到货审核")
  15977. ]),
  15978. _: 1
  15979. /* STABLE */
  15980. }, 8, ["disabled"]),
  15981. vue.createVNode(_component_u_button, {
  15982. size: "small",
  15983. onClick: $setup.handleView
  15984. }, {
  15985. default: vue.withCtx(() => [
  15986. vue.createTextVNode("查看")
  15987. ]),
  15988. _: 1
  15989. /* STABLE */
  15990. })
  15991. ])
  15992. ]);
  15993. }
  15994. const orderItem = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$1c], ["__scopeId", "data-v-12bc2a79"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/components/orderItem.vue"]]);
  15995. const _sfc_main$1c = {
  15996. __name: "isbn-order",
  15997. setup(__props, { expose: __expose }) {
  15998. __expose();
  15999. const otherParams = vue.ref({
  16000. isbnList: ""
  16001. });
  16002. const scrollRef = vue.ref(null);
  16003. const refreshList = () => {
  16004. var _a;
  16005. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  16006. };
  16007. function playGlobalSound() {
  16008. uni.$u.playClickSound();
  16009. }
  16010. let dataList = vue.ref([]);
  16011. const updateList = (data, page2) => {
  16012. dataList.value = data;
  16013. if (data.length > 0 && page2 == 1) {
  16014. uni.$u.ttsModule.speak("查询到" + data.length + "条数据");
  16015. }
  16016. if (data.length == 0 && page2 == 1) {
  16017. uni.$u.ttsModule.speak("未查询到数据");
  16018. }
  16019. };
  16020. onLoad(() => {
  16021. const storedList = uni.getStorageSync("isbnList");
  16022. if (storedList) {
  16023. otherParams.value.isbnList = storedList.map((v) => v.isbn);
  16024. refreshList();
  16025. }
  16026. });
  16027. const __returned__ = { otherParams, scrollRef, refreshList, playGlobalSound, get dataList() {
  16028. return dataList;
  16029. }, set dataList(v) {
  16030. dataList = v;
  16031. }, updateList, reactive: vue.reactive, PageScroll: pageScroll, OrderItem: orderItem, ref: vue.ref, get onLoad() {
  16032. return onLoad;
  16033. } };
  16034. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16035. return __returned__;
  16036. }
  16037. };
  16038. function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
  16039. return vue.openBlock(), vue.createElementBlock("view", {
  16040. class: "common-page",
  16041. style: { "padding": "0" },
  16042. onClick: $setup.playGlobalSound
  16043. }, [
  16044. vue.createVNode($setup["PageScroll"], {
  16045. requestStr: "/app/orderinfo/getOrderListByIsbn",
  16046. onUpdateList: $setup.updateList,
  16047. ref: "scrollRef",
  16048. otherParams: $setup.otherParams,
  16049. method: "post"
  16050. }, {
  16051. default: vue.withCtx(() => [
  16052. $setup.dataList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  16053. key: 0,
  16054. class: "list-con"
  16055. }, [
  16056. (vue.openBlock(true), vue.createElementBlock(
  16057. vue.Fragment,
  16058. null,
  16059. vue.renderList($setup.dataList, (cell) => {
  16060. return vue.openBlock(), vue.createBlock($setup["OrderItem"], {
  16061. key: cell.id,
  16062. item: cell,
  16063. class: "mt-20"
  16064. }, null, 8, ["item"]);
  16065. }),
  16066. 128
  16067. /* KEYED_FRAGMENT */
  16068. ))
  16069. ])) : vue.createCommentVNode("v-if", true)
  16070. ]),
  16071. _: 1
  16072. /* STABLE */
  16073. }, 8, ["otherParams"])
  16074. ]);
  16075. }
  16076. const PagesIndexAuditIsbnOrder = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$1b], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/isbn-order.vue"]]);
  16077. const _sfc_main$1b = {
  16078. __name: "express-order",
  16079. setup(__props, { expose: __expose }) {
  16080. __expose();
  16081. const form = vue.ref({
  16082. searchType: "2",
  16083. search: ""
  16084. });
  16085. function playGlobalSound() {
  16086. formatAppLog("log", "at pages/index/audit/express-order.vue:47", "playGlobalSound");
  16087. uni.$u.playClickSound();
  16088. }
  16089. const handleSearch = () => {
  16090. playGlobalSound();
  16091. if (!form.value.search) {
  16092. let text = form.value.searchType == "1" ? "请输入订单编号" : "请输入物流单号";
  16093. uni.$u.ttsModule.speak(text);
  16094. return;
  16095. }
  16096. uni.$u.http.get("/app/orderinfo/getOrderInfoForCheck", {
  16097. params: {
  16098. ...form.value
  16099. }
  16100. }).then((res2) => {
  16101. if (res2.code == 200) {
  16102. uni.setStorageSync("orderDetail", res2.data);
  16103. uni.navigateTo({
  16104. url: `/pages/index/detail/index?id=${res2.data.orderId}`
  16105. });
  16106. } else {
  16107. let text = form.value.search + res2.msg;
  16108. uni.$u.ttsModule.speak(text);
  16109. }
  16110. });
  16111. };
  16112. const handleScan = () => {
  16113. playGlobalSound();
  16114. uni.scanCode({
  16115. success: (res2) => {
  16116. form.value.search = res2.result;
  16117. handleSearch();
  16118. }
  16119. });
  16120. };
  16121. onLoad(() => {
  16122. uni.$u.useGlobalEvent((e) => {
  16123. form.value.search = e.barcode;
  16124. handleSearch();
  16125. });
  16126. });
  16127. onShow(() => {
  16128. uni.$u.updateActivePageOnShow();
  16129. });
  16130. const __returned__ = { form, playGlobalSound, handleSearch, handleScan, ref: vue.ref, get onLoad() {
  16131. return onLoad;
  16132. }, get onShow() {
  16133. return onShow;
  16134. } };
  16135. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16136. return __returned__;
  16137. }
  16138. };
  16139. function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
  16140. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
  16141. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$5);
  16142. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  16143. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  16144. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$2);
  16145. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  16146. vue.createCommentVNode(" 底部按钮 "),
  16147. vue.createElementVNode("view", { class: "footer" }, [
  16148. vue.createCommentVNode(" 查询区域 "),
  16149. vue.createElementVNode("view", { class: "query-section" }, [
  16150. vue.createVNode(_component_u_radio_group, {
  16151. modelValue: $setup.form.searchType,
  16152. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.searchType = $event),
  16153. onChange: $setup.playGlobalSound
  16154. }, {
  16155. default: vue.withCtx(() => [
  16156. vue.createVNode(_component_u_radio, {
  16157. label: "查订单",
  16158. name: "1",
  16159. "label-size": "17"
  16160. }),
  16161. vue.createVNode(_component_u_radio, {
  16162. label: "查物流",
  16163. "custom-style": "margin-left:20px",
  16164. name: "2",
  16165. "label-size": "17"
  16166. })
  16167. ]),
  16168. _: 1
  16169. /* STABLE */
  16170. }, 8, ["modelValue"]),
  16171. vue.createElementVNode("view", { class: "search-box" }, [
  16172. vue.createVNode(_component_u_input, {
  16173. "custom-style": "width:100rpx",
  16174. modelValue: $setup.form.search,
  16175. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.search = $event),
  16176. placeholder: $setup.form.searchType == "1" ? "扫描/输入订单编号" : "扫描/输入物流单号",
  16177. border: "surround",
  16178. clearable: "",
  16179. onFocus: $setup.playGlobalSound,
  16180. "placeholder-style": "font-size:32rpx"
  16181. }, null, 8, ["modelValue", "placeholder"]),
  16182. vue.createVNode(_component_u_button, {
  16183. color: "#c8c8c8",
  16184. text: "查询",
  16185. onClick: $setup.handleSearch
  16186. })
  16187. ])
  16188. ]),
  16189. vue.createVNode(_component_u_divider),
  16190. vue.createElementVNode("view", { style: { "display": "flex" } }, [
  16191. vue.createVNode(_component_u_button, {
  16192. size: "large",
  16193. type: "success",
  16194. text: "扫码",
  16195. onClick: $setup.handleScan
  16196. })
  16197. ])
  16198. ])
  16199. ]);
  16200. }
  16201. const PagesIndexAuditExpressOrder = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$1a], ["__scopeId", "data-v-b27ee25f"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/express-order.vue"]]);
  16202. const _sfc_main$1a = {
  16203. __name: "user-orders",
  16204. setup(__props, { expose: __expose }) {
  16205. __expose();
  16206. const otherParams = vue.ref({
  16207. userId: ""
  16208. });
  16209. const scrollRef = vue.ref(null);
  16210. const refreshList = () => {
  16211. var _a;
  16212. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  16213. };
  16214. let dataList = vue.ref([]);
  16215. const updateList = (data, page2) => {
  16216. dataList.value = data;
  16217. if (data.length > 0 && page2 == 1) {
  16218. uni.$u.ttsModule.speak("查询到" + data.length + "条数据");
  16219. }
  16220. if (data.length == 0 && page2 == 1) {
  16221. uni.$u.ttsModule.speak("未查询到数据");
  16222. }
  16223. };
  16224. onLoad((options) => {
  16225. otherParams.value.userId = options.userId;
  16226. refreshList();
  16227. });
  16228. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  16229. return dataList;
  16230. }, set dataList(v) {
  16231. dataList = v;
  16232. }, updateList, reactive: vue.reactive, PageScroll: pageScroll, OrderItem: orderItem, ref: vue.ref, get onLoad() {
  16233. return onLoad;
  16234. } };
  16235. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16236. return __returned__;
  16237. }
  16238. };
  16239. function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
  16240. return vue.openBlock(), vue.createElementBlock("view", {
  16241. class: "common-page",
  16242. style: { "padding": "0" }
  16243. }, [
  16244. vue.createVNode($setup["PageScroll"], {
  16245. requestStr: "/app/orderinfo/getOrderListByUserId",
  16246. onUpdateList: $setup.updateList,
  16247. ref: "scrollRef",
  16248. otherParams: $setup.otherParams,
  16249. method: "get"
  16250. }, {
  16251. default: vue.withCtx(() => [
  16252. $setup.dataList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  16253. key: 0,
  16254. class: "list-con"
  16255. }, [
  16256. (vue.openBlock(true), vue.createElementBlock(
  16257. vue.Fragment,
  16258. null,
  16259. vue.renderList($setup.dataList, (cell) => {
  16260. return vue.openBlock(), vue.createBlock($setup["OrderItem"], {
  16261. key: cell.id,
  16262. item: cell,
  16263. class: "mt-20"
  16264. }, null, 8, ["item"]);
  16265. }),
  16266. 128
  16267. /* KEYED_FRAGMENT */
  16268. ))
  16269. ])) : vue.createCommentVNode("v-if", true)
  16270. ]),
  16271. _: 1
  16272. /* STABLE */
  16273. }, 8, ["otherParams"])
  16274. ]);
  16275. }
  16276. const PagesIndexDetailUserOrders = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$19], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/user-orders.vue"]]);
  16277. const _sfc_main$19 = {
  16278. __name: "AuditorSelector",
  16279. props: {
  16280. show: {
  16281. type: Boolean,
  16282. default: false
  16283. }
  16284. },
  16285. emits: ["update:show", "auditor-selected"],
  16286. setup(__props, { expose: __expose, emit: __emit }) {
  16287. __expose();
  16288. const props2 = __props;
  16289. const emit2 = __emit;
  16290. const searchKeyword = vue.ref("");
  16291. const searchResults = vue.ref([]);
  16292. const historyAuditors = vue.ref(uni.getStorageSync("historyAuditors") || []);
  16293. const checkUserId = vue.ref("");
  16294. const auditorSearch = (name) => {
  16295. formatAppLog("log", "at pages/index/detail/components/AuditorSelector.vue:66", name);
  16296. uni.$u.http.get("/app/appUser/getCheckUser?name=" + name).then((res2) => {
  16297. if (res2.code == 200) {
  16298. searchResults.value = res2.data;
  16299. }
  16300. });
  16301. };
  16302. const handleSearch = () => {
  16303. auditorSearch(searchKeyword.value);
  16304. };
  16305. const selectItem = vue.ref({});
  16306. const selectAuditor = (item) => {
  16307. checkUserId.value = item.userId;
  16308. selectItem.value = item;
  16309. };
  16310. const handleClose = () => {
  16311. emit2("update:show", false);
  16312. searchKeyword.value = "";
  16313. };
  16314. const handleConfirm = () => {
  16315. if (checkUserId.value) {
  16316. emit2("auditor-selected", selectItem.value);
  16317. uni.setStorageSync("checkUserInfo", selectItem.value);
  16318. addToHistory(selectItem.value);
  16319. handleClose();
  16320. }
  16321. };
  16322. const addToHistory = (item) => {
  16323. const existingIndex = historyAuditors.value.findIndex((auditor) => auditor.userId === item.userId);
  16324. if (existingIndex !== -1) {
  16325. historyAuditors.value.splice(existingIndex, 1);
  16326. }
  16327. historyAuditors.value.unshift(item);
  16328. if (historyAuditors.value.length > 10) {
  16329. historyAuditors.value.pop();
  16330. }
  16331. uni.setStorageSync("historyAuditors", historyAuditors.value);
  16332. };
  16333. vue.onMounted(() => {
  16334. const storedHistory = uni.getStorageSync("historyAuditors") || [];
  16335. historyAuditors.value = storedHistory;
  16336. });
  16337. const __returned__ = { props: props2, emit: emit2, searchKeyword, searchResults, historyAuditors, checkUserId, auditorSearch, handleSearch, selectItem, selectAuditor, handleClose, handleConfirm, addToHistory, ref: vue.ref, onMounted: vue.onMounted };
  16338. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16339. return __returned__;
  16340. }
  16341. };
  16342. function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
  16343. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  16344. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  16345. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  16346. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  16347. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  16348. show: $props.show,
  16349. onClose: $setup.handleClose,
  16350. mode: "bottom",
  16351. round: "10"
  16352. }, {
  16353. default: vue.withCtx(() => [
  16354. vue.createElementVNode("view", { class: "auditor-selector" }, [
  16355. vue.createElementVNode("view", { style: { "flex": "1" } }, [
  16356. vue.createCommentVNode(" Title "),
  16357. vue.createElementVNode("view", { class: "header" }, [
  16358. vue.createElementVNode("text", { class: "title" }, "绑定审核员")
  16359. ]),
  16360. vue.createCommentVNode(" Search Box "),
  16361. vue.createElementVNode("view", { class: "search-box" }, [
  16362. vue.createVNode(_component_u_search, {
  16363. inputStyle: { "height": "80rpx", "font-size": "16px" },
  16364. actionStyle: { "font-size": "16px", color: "#22ac38" },
  16365. modelValue: $setup.searchKeyword,
  16366. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchKeyword = $event),
  16367. placeholder: "搜索审核员",
  16368. "show-action": true,
  16369. "action-text": "搜索",
  16370. onSearch: $setup.handleSearch,
  16371. onCustom: $setup.handleSearch
  16372. }, null, 8, ["modelValue"])
  16373. ]),
  16374. vue.createCommentVNode(" Search Results "),
  16375. $setup.searchResults.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  16376. key: 0,
  16377. class: "search-result"
  16378. }, [
  16379. vue.createElementVNode("text", { class: "section-title" }, "搜索结果"),
  16380. vue.createElementVNode("view", { class: "tag-group" }, [
  16381. (vue.openBlock(true), vue.createElementBlock(
  16382. vue.Fragment,
  16383. null,
  16384. vue.renderList($setup.searchResults, (item) => {
  16385. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  16386. key: item,
  16387. text: item.userName,
  16388. plain: $setup.checkUserId !== item.userId,
  16389. shape: "circle",
  16390. onClick: ($event) => $setup.selectAuditor(item),
  16391. size: "large"
  16392. }, null, 8, ["text", "plain", "onClick"]);
  16393. }),
  16394. 128
  16395. /* KEYED_FRAGMENT */
  16396. ))
  16397. ])
  16398. ])) : vue.createCommentVNode("v-if", true),
  16399. vue.createCommentVNode(" History "),
  16400. $setup.historyAuditors.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  16401. key: 1,
  16402. class: "history-section"
  16403. }, [
  16404. vue.createElementVNode("text", { class: "section-title" }, "历史绑定"),
  16405. vue.createElementVNode("view", { class: "tag-group" }, [
  16406. (vue.openBlock(true), vue.createElementBlock(
  16407. vue.Fragment,
  16408. null,
  16409. vue.renderList($setup.historyAuditors, (item) => {
  16410. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  16411. key: item,
  16412. text: item.userName,
  16413. plain: $setup.checkUserId !== item.userId,
  16414. shape: "circle",
  16415. onClick: ($event) => $setup.selectAuditor(item),
  16416. size: "large"
  16417. }, null, 8, ["text", "plain", "onClick"]);
  16418. }),
  16419. 128
  16420. /* KEYED_FRAGMENT */
  16421. ))
  16422. ])
  16423. ])) : vue.createCommentVNode("v-if", true)
  16424. ]),
  16425. vue.createCommentVNode(" Footer Buttons "),
  16426. vue.createElementVNode("view", { class: "footer" }, [
  16427. vue.createVNode(_component_u_button, {
  16428. onClick: $setup.handleClose,
  16429. text: "取消",
  16430. plain: "",
  16431. shape: "circle"
  16432. }),
  16433. vue.createVNode(_component_u_button, {
  16434. type: "primary",
  16435. onClick: $setup.handleConfirm,
  16436. text: "确定",
  16437. shape: "circle"
  16438. })
  16439. ])
  16440. ])
  16441. ]),
  16442. _: 1
  16443. /* STABLE */
  16444. }, 8, ["show"]);
  16445. }
  16446. const AuditorSelector = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$18], ["__scopeId", "data-v-8d9417b9"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/AuditorSelector.vue"]]);
  16447. const props$9 = {
  16448. props: {
  16449. // 输入框的内容
  16450. value: {
  16451. type: [String, Number],
  16452. default: props$E.textarea.value
  16453. },
  16454. // 输入框的内容
  16455. modelValue: {
  16456. type: [String, Number],
  16457. default: props$E.textarea.value
  16458. },
  16459. // 输入框为空时占位符
  16460. placeholder: {
  16461. type: [String, Number],
  16462. default: props$E.textarea.placeholder
  16463. },
  16464. // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
  16465. placeholderClass: {
  16466. type: String,
  16467. default: props$E.input.placeholderClass
  16468. },
  16469. // 指定placeholder的样式
  16470. placeholderStyle: {
  16471. type: [String, Object],
  16472. default: props$E.input.placeholderStyle
  16473. },
  16474. // 输入框高度
  16475. height: {
  16476. type: [String, Number],
  16477. default: props$E.textarea.height
  16478. },
  16479. // 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效
  16480. confirmType: {
  16481. type: String,
  16482. default: props$E.textarea.confirmType
  16483. },
  16484. // 是否禁用
  16485. disabled: {
  16486. type: Boolean,
  16487. default: props$E.textarea.disabled
  16488. },
  16489. // 是否显示统计字数
  16490. count: {
  16491. type: Boolean,
  16492. default: props$E.textarea.count
  16493. },
  16494. // 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现
  16495. focus: {
  16496. type: Boolean,
  16497. default: props$E.textarea.focus
  16498. },
  16499. // 是否自动增加高度
  16500. autoHeight: {
  16501. type: Boolean,
  16502. default: props$E.textarea.autoHeight
  16503. },
  16504. // 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true
  16505. fixed: {
  16506. type: Boolean,
  16507. default: props$E.textarea.fixed
  16508. },
  16509. // 指定光标与键盘的距离
  16510. cursorSpacing: {
  16511. type: Number,
  16512. default: props$E.textarea.cursorSpacing
  16513. },
  16514. // 指定focus时的光标位置
  16515. cursor: {
  16516. type: [String, Number],
  16517. default: props$E.textarea.cursor
  16518. },
  16519. // 是否显示键盘上方带有”完成“按钮那一栏,
  16520. showConfirmBar: {
  16521. type: Boolean,
  16522. default: props$E.textarea.showConfirmBar
  16523. },
  16524. // 光标起始位置,自动聚焦时有效,需与selection-end搭配使用
  16525. selectionStart: {
  16526. type: Number,
  16527. default: props$E.textarea.selectionStart
  16528. },
  16529. // 光标结束位置,自动聚焦时有效,需与selection-start搭配使用
  16530. selectionEnd: {
  16531. type: Number,
  16532. default: props$E.textarea.selectionEnd
  16533. },
  16534. // 键盘弹起时,是否自动上推页面
  16535. adjustPosition: {
  16536. type: Boolean,
  16537. default: props$E.textarea.adjustPosition
  16538. },
  16539. // 是否去掉 iOS 下的默认内边距,只微信小程序有效
  16540. disableDefaultPadding: {
  16541. type: Boolean,
  16542. default: props$E.textarea.disableDefaultPadding
  16543. },
  16544. // focus时,点击页面的时候不收起键盘,只微信小程序有效
  16545. holdKeyboard: {
  16546. type: Boolean,
  16547. default: props$E.textarea.holdKeyboard
  16548. },
  16549. // 最大输入长度,设置为 -1 的时候不限制最大长度
  16550. maxlength: {
  16551. type: [String, Number],
  16552. default: props$E.textarea.maxlength
  16553. },
  16554. // 边框类型,surround-四周边框,bottom-底部边框
  16555. border: {
  16556. type: String,
  16557. default: props$E.textarea.border
  16558. },
  16559. // 用于处理或者过滤输入框内容的方法
  16560. formatter: {
  16561. type: [Function, null],
  16562. default: props$E.textarea.formatter
  16563. },
  16564. // 是否忽略组件内对文本合成系统事件的处理
  16565. ignoreCompositionEvent: {
  16566. type: Boolean,
  16567. default: true
  16568. }
  16569. }
  16570. };
  16571. const _sfc_main$18 = {
  16572. name: "u-textarea",
  16573. mixins: [mpMixin, mixin, props$9],
  16574. data() {
  16575. return {
  16576. // 输入框的值
  16577. innerValue: "",
  16578. // 是否处于获得焦点状态
  16579. focused: false,
  16580. // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
  16581. firstChange: true,
  16582. // value绑定值的变化是由内部还是外部引起的
  16583. changeFromInner: false,
  16584. // 过滤处理方法
  16585. innerFormatter: (value2) => value2
  16586. };
  16587. },
  16588. created() {
  16589. },
  16590. watch: {
  16591. modelValue: {
  16592. immediate: true,
  16593. handler(newVal, oldVal) {
  16594. this.innerValue = newVal;
  16595. this.firstChange = false;
  16596. this.changeFromInner = false;
  16597. }
  16598. }
  16599. },
  16600. computed: {
  16601. // 组件的类名
  16602. textareaClass() {
  16603. let classes = [], { border, disabled } = this;
  16604. border === "surround" && (classes = classes.concat(["u-border", "u-textarea--radius"]));
  16605. border === "bottom" && (classes = classes.concat([
  16606. "u-border-bottom",
  16607. "u-textarea--no-radius"
  16608. ]));
  16609. disabled && classes.push("u-textarea--disabled");
  16610. return classes.join(" ");
  16611. },
  16612. // 组件的样式
  16613. textareaStyle() {
  16614. const style = {};
  16615. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  16616. }
  16617. },
  16618. emits: ["update:modelValue", "linechange", "focus", "blur", "change", "confirm", "keyboardheightchange"],
  16619. methods: {
  16620. // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
  16621. setFormatter(e) {
  16622. this.innerFormatter = e;
  16623. },
  16624. onFocus(e) {
  16625. this.$emit("focus", e);
  16626. },
  16627. onBlur(e) {
  16628. this.$emit("blur", e);
  16629. uni.$u.formValidate(this, "blur");
  16630. },
  16631. onLinechange(e) {
  16632. this.$emit("linechange", e);
  16633. },
  16634. onInput(e) {
  16635. let { value: value2 = "" } = e.detail || {};
  16636. const formatter = this.formatter || this.innerFormatter;
  16637. const formatValue = formatter(value2);
  16638. this.innerValue = value2;
  16639. this.$nextTick(() => {
  16640. this.innerValue = formatValue;
  16641. this.valueChange();
  16642. });
  16643. },
  16644. // 内容发生变化,进行处理
  16645. valueChange() {
  16646. const value2 = this.innerValue;
  16647. this.$nextTick(() => {
  16648. this.$emit("update:modelValue", value2);
  16649. this.changeFromInner = true;
  16650. this.$emit("change", value2);
  16651. uni.$u.formValidate(this, "change");
  16652. });
  16653. },
  16654. onConfirm(e) {
  16655. this.$emit("confirm", e);
  16656. },
  16657. onKeyboardheightchange(e) {
  16658. this.$emit("keyboardheightchange", e);
  16659. }
  16660. }
  16661. };
  16662. function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
  16663. return vue.openBlock(), vue.createElementBlock(
  16664. "view",
  16665. {
  16666. class: vue.normalizeClass(["u-textarea", $options.textareaClass]),
  16667. style: vue.normalizeStyle([$options.textareaStyle])
  16668. },
  16669. [
  16670. vue.createElementVNode("textarea", {
  16671. class: "u-textarea__field",
  16672. value: $data.innerValue,
  16673. style: vue.normalizeStyle({ height: _ctx.$u.addUnit(_ctx.height) }),
  16674. placeholder: _ctx.placeholder,
  16675. "placeholder-style": _ctx.$u.addStyle(_ctx.placeholderStyle, "string"),
  16676. "placeholder-class": _ctx.placeholderClass,
  16677. disabled: _ctx.disabled,
  16678. focus: _ctx.focus,
  16679. autoHeight: _ctx.autoHeight,
  16680. fixed: _ctx.fixed,
  16681. cursorSpacing: _ctx.cursorSpacing,
  16682. cursor: _ctx.cursor,
  16683. showConfirmBar: _ctx.showConfirmBar,
  16684. selectionStart: _ctx.selectionStart,
  16685. selectionEnd: _ctx.selectionEnd,
  16686. adjustPosition: _ctx.adjustPosition,
  16687. disableDefaultPadding: _ctx.disableDefaultPadding,
  16688. holdKeyboard: _ctx.holdKeyboard,
  16689. maxlength: _ctx.maxlength,
  16690. "confirm-type": _ctx.confirmType,
  16691. ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
  16692. onFocus: _cache[0] || (_cache[0] = (...args) => $options.onFocus && $options.onFocus(...args)),
  16693. onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)),
  16694. onLinechange: _cache[2] || (_cache[2] = (...args) => $options.onLinechange && $options.onLinechange(...args)),
  16695. onInput: _cache[3] || (_cache[3] = (...args) => $options.onInput && $options.onInput(...args)),
  16696. onConfirm: _cache[4] || (_cache[4] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
  16697. onKeyboardheightchange: _cache[5] || (_cache[5] = (...args) => $options.onKeyboardheightchange && $options.onKeyboardheightchange(...args))
  16698. }, null, 44, ["value", "placeholder", "placeholder-style", "placeholder-class", "disabled", "focus", "autoHeight", "fixed", "cursorSpacing", "cursor", "showConfirmBar", "selectionStart", "selectionEnd", "adjustPosition", "disableDefaultPadding", "holdKeyboard", "maxlength", "confirm-type", "ignoreCompositionEvent"]),
  16699. _ctx.count ? (vue.openBlock(), vue.createElementBlock(
  16700. "text",
  16701. {
  16702. key: 0,
  16703. class: "u-textarea__count",
  16704. style: vue.normalizeStyle({
  16705. "background-color": _ctx.disabled ? "transparent" : "#fff"
  16706. })
  16707. },
  16708. vue.toDisplayString($data.innerValue.length) + "/" + vue.toDisplayString(_ctx.maxlength),
  16709. 5
  16710. /* TEXT, STYLE */
  16711. )) : vue.createCommentVNode("v-if", true)
  16712. ],
  16713. 6
  16714. /* CLASS, STYLE */
  16715. );
  16716. }
  16717. const __easycom_3$2 = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$17], ["__scopeId", "data-v-b6c174a6"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-textarea/u-textarea.vue"]]);
  16718. const _sfc_main$17 = {
  16719. __name: "OrderInfo",
  16720. props: {
  16721. orderId: String,
  16722. estimatedAmount: Number,
  16723. userNote: String,
  16724. detail: Object
  16725. // Add more props as needed
  16726. },
  16727. emits: ["refresh"],
  16728. setup(__props, { expose: __expose, emit: __emit }) {
  16729. __expose();
  16730. const props2 = __props;
  16731. let finalExpressList = { "1": "顺丰快递", "2": "京东快递", "3": "德邦快递" };
  16732. let finalExpressText = vue.computed(() => {
  16733. return props2.detail.finalExpress ? finalExpressList[props2.detail.finalExpress] : "";
  16734. });
  16735. function playGlobalSound() {
  16736. uni.$u.playClickSound();
  16737. }
  16738. const statusEnum = {
  16739. 0: "创建",
  16740. 1: "用户删除",
  16741. 2: "下单(待初审)",
  16742. 3: "初审(待取书)",
  16743. 4: "初审未通过",
  16744. 5: "快递取书(待签收)",
  16745. 6: "快递签收(待收货)",
  16746. 7: "物流签收(路由异常)",
  16747. 8: "仓库收货(待审核)",
  16748. 9: "审核中(审核未提交)",
  16749. 10: "已审核(待付款)",
  16750. 11: "已完成"
  16751. };
  16752. let statusText = vue.computed(() => {
  16753. return statusEnum[props2.detail.status] || "未知状态";
  16754. });
  16755. const maskedSendMobile = vue.computed(() => {
  16756. if (props2.detail.sendMobile && props2.detail.sendMobile.length === 11) {
  16757. return props2.detail.sendMobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
  16758. }
  16759. return props2.detail.sendMobile;
  16760. });
  16761. function copyToClipboard(text) {
  16762. uni.setClipboardData({
  16763. data: text,
  16764. success: function() {
  16765. uni.showToast({
  16766. title: "复制成功",
  16767. icon: "success"
  16768. });
  16769. },
  16770. fail: function(err) {
  16771. formatAppLog("error", "at pages/index/detail/components/OrderInfo.vue:125", "Could not copy text: ", err);
  16772. }
  16773. });
  16774. }
  16775. const showModal = vue.ref(false);
  16776. const internalRemark = vue.ref("");
  16777. function fillRemark(text) {
  16778. internalRemark.value = text;
  16779. }
  16780. const remarkInfo = vue.ref({});
  16781. function handleRemark() {
  16782. var _a;
  16783. showModal.value = true;
  16784. remarkInfo.value = ((_a = props2.detail.manageRemark) == null ? void 0 : _a[0]) || {};
  16785. internalRemark.value = remarkInfo.value.remark || "";
  16786. }
  16787. function handleCancel() {
  16788. showModal.value = false;
  16789. playGlobalSound();
  16790. }
  16791. const emit2 = __emit;
  16792. function confirmRemark() {
  16793. playGlobalSound();
  16794. uni.$u.http.post("/app/orderinfo/setManageRemark", {
  16795. orderId: props2.detail.orderId,
  16796. remark: internalRemark.value,
  16797. id: remarkInfo.value.id
  16798. }).then((res2) => {
  16799. if (res2.code == 200) {
  16800. uni.$u.toast("保存成功");
  16801. uni.$u.ttsModule.speak("保存成功");
  16802. showModal.value = false;
  16803. emit2("refresh");
  16804. } else {
  16805. uni.$u.toast(res2.msg);
  16806. }
  16807. });
  16808. }
  16809. const __returned__ = { props: props2, get finalExpressList() {
  16810. return finalExpressList;
  16811. }, set finalExpressList(v) {
  16812. finalExpressList = v;
  16813. }, get finalExpressText() {
  16814. return finalExpressText;
  16815. }, set finalExpressText(v) {
  16816. finalExpressText = v;
  16817. }, playGlobalSound, statusEnum, get statusText() {
  16818. return statusText;
  16819. }, set statusText(v) {
  16820. statusText = v;
  16821. }, maskedSendMobile, copyToClipboard, showModal, internalRemark, fillRemark, remarkInfo, handleRemark, handleCancel, emit: emit2, confirmRemark, computed: vue.computed, ref: vue.ref, watch: vue.watch };
  16822. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16823. return __returned__;
  16824. }
  16825. };
  16826. function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
  16827. var _a, _b, _c, _d;
  16828. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  16829. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$2);
  16830. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  16831. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
  16832. return vue.openBlock(), vue.createElementBlock(
  16833. vue.Fragment,
  16834. null,
  16835. [
  16836. vue.createElementVNode("view", { class: "order-info bg-white" }, [
  16837. vue.createElementVNode("view", { class: "info-item flex" }, [
  16838. vue.createElementVNode("text", { class: "label" }, "订单编号"),
  16839. vue.createElementVNode(
  16840. "text",
  16841. {
  16842. style: { "color": "#22ac38" },
  16843. class: "flex-1 text-center content",
  16844. onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyToClipboard($props.detail.orderId))
  16845. },
  16846. vue.toDisplayString($props.detail.orderId),
  16847. 1
  16848. /* TEXT */
  16849. )
  16850. ]),
  16851. vue.createElementVNode("view", { class: "info-item" }, [
  16852. vue.createElementVNode("text", { class: "label" }, "预估金额"),
  16853. vue.createElementVNode(
  16854. "text",
  16855. { class: "content" },
  16856. vue.toDisplayString($props.detail.expectMoney),
  16857. 1
  16858. /* TEXT */
  16859. ),
  16860. vue.createElementVNode("text", { class: "label border-left" }, "审核金额"),
  16861. vue.createElementVNode(
  16862. "text",
  16863. { class: "content" },
  16864. vue.toDisplayString($props.detail.finalMoney),
  16865. 1
  16866. /* TEXT */
  16867. )
  16868. ]),
  16869. vue.createElementVNode("view", { class: "info-item" }, [
  16870. vue.createElementVNode("text", { class: "label" }, "用户备注"),
  16871. vue.createElementVNode(
  16872. "text",
  16873. { class: "content" },
  16874. vue.toDisplayString($props.detail.userRemark),
  16875. 1
  16876. /* TEXT */
  16877. )
  16878. ]),
  16879. vue.createElementVNode("view", {
  16880. class: "info-item",
  16881. onClick: $setup.handleRemark
  16882. }, [
  16883. vue.createElementVNode("text", { class: "label" }, "内部备注"),
  16884. vue.createElementVNode(
  16885. "text",
  16886. { class: "content" },
  16887. 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 : " " : " "),
  16888. 1
  16889. /* TEXT */
  16890. )
  16891. ]),
  16892. vue.createElementVNode("view", { class: "info-item" }, [
  16893. vue.createElementVNode("text", { class: "label" }, "订单状态"),
  16894. vue.createElementVNode(
  16895. "text",
  16896. {
  16897. class: "content",
  16898. style: { "color": "#c5493e" }
  16899. },
  16900. "[" + vue.toDisplayString($setup.statusText) + "]",
  16901. 1
  16902. /* TEXT */
  16903. )
  16904. ]),
  16905. vue.createElementVNode("view", { class: "info-item" }, [
  16906. vue.createElementVNode("text", { class: "label" }, "快递"),
  16907. vue.createElementVNode("text", { class: "content" }, [
  16908. vue.createTextVNode(
  16909. vue.toDisplayString($setup.finalExpressText),
  16910. 1
  16911. /* TEXT */
  16912. ),
  16913. vue.createElementVNode(
  16914. "text",
  16915. {
  16916. style: { "color": "#409eef" },
  16917. onClick: _cache[1] || (_cache[1] = ($event) => $setup.copyToClipboard($props.detail.waybillCode))
  16918. },
  16919. "(单号:" + vue.toDisplayString($props.detail.waybillCode) + ")",
  16920. 1
  16921. /* TEXT */
  16922. )
  16923. ])
  16924. ]),
  16925. vue.createElementVNode("view", { class: "info-item" }, [
  16926. vue.createElementVNode("text", { class: "label" }, [
  16927. vue.createTextVNode("发件人"),
  16928. vue.createElementVNode("text", { style: { "color": "#e99d42" } }, "(所有单)")
  16929. ]),
  16930. vue.createElementVNode("view", { class: "content flex flex-a-c flex-j-c" }, [
  16931. vue.createElementVNode("text", {
  16932. class: "content-text",
  16933. onClick: _cache[2] || (_cache[2] = ($event) => $setup.copyToClipboard($props.detail.sendMobile))
  16934. }, "复制"),
  16935. vue.createElementVNode(
  16936. "text",
  16937. { class: "content-text ml-10 mr-10" },
  16938. vue.toDisplayString($setup.maskedSendMobile),
  16939. 1
  16940. /* TEXT */
  16941. ),
  16942. $props.detail.orderFrom == 1 ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  16943. key: 0,
  16944. name: "weixin-circle-fill",
  16945. size: "18",
  16946. color: "#22ac38"
  16947. })) : vue.createCommentVNode("v-if", true),
  16948. $props.detail.orderFrom == 2 ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  16949. key: 1,
  16950. name: "zhifubao-circle-fill",
  16951. size: "18",
  16952. color: "#999"
  16953. })) : vue.createCommentVNode("v-if", true)
  16954. ])
  16955. ]),
  16956. vue.createElementVNode("view", { class: "info-item" }, [
  16957. vue.createElementVNode("text", { class: "label" }, "发货地址"),
  16958. vue.createElementVNode(
  16959. "text",
  16960. { class: "content" },
  16961. vue.toDisplayString($props.detail.sendAddress),
  16962. 1
  16963. /* TEXT */
  16964. )
  16965. ]),
  16966. vue.createElementVNode("view", { class: "info-item" }, [
  16967. vue.createElementVNode("text", { class: "label" }, "收货仓库"),
  16968. vue.createElementVNode(
  16969. "text",
  16970. { class: "content" },
  16971. vue.toDisplayString($props.detail.recipientAddress) + "-" + vue.toDisplayString($props.detail.recipientGodown) + "-" + vue.toDisplayString($props.detail.recipientName),
  16972. 1
  16973. /* TEXT */
  16974. )
  16975. ])
  16976. ]),
  16977. vue.createVNode(_component_u_modal, {
  16978. show: $setup.showModal,
  16979. title: "编辑内部备注",
  16980. showCancelButton: true,
  16981. onConfirm: $setup.confirmRemark,
  16982. onCancel: $setup.handleCancel
  16983. }, {
  16984. default: vue.withCtx(() => [
  16985. vue.createElementVNode("view", {
  16986. class: "modal-content w100",
  16987. onClick: $setup.playGlobalSound
  16988. }, [
  16989. vue.createVNode(_component_u_textarea, {
  16990. modelValue: $setup.internalRemark,
  16991. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.internalRemark = $event),
  16992. placeholder: "编辑内部备注",
  16993. autoHeight: "",
  16994. style: { "min-height": "100px" }
  16995. }, null, 8, ["modelValue"]),
  16996. vue.createElementVNode("view", { class: "mt-20 common-title" }, "快速填入"),
  16997. vue.createElementVNode("view", { class: "quick-fill mt-16" }, [
  16998. vue.createVNode(_component_u_tag, {
  16999. class: "mr-10 mb-10",
  17000. onClick: _cache[4] || (_cache[4] = ($event) => $setup.fillRemark("少书给客服")),
  17001. text: "少书给客服"
  17002. }),
  17003. vue.createVNode(_component_u_tag, {
  17004. class: "mr-10 mb-10",
  17005. onClick: _cache[5] || (_cache[5] = ($event) => $setup.fillRemark("多书给客服")),
  17006. text: "多书给客服"
  17007. }),
  17008. vue.createVNode(_component_u_tag, {
  17009. class: "mr-10 mb-10",
  17010. onClick: _cache[6] || (_cache[6] = ($event) => $setup.fillRemark("子母件")),
  17011. text: "子母件"
  17012. }),
  17013. vue.createVNode(_component_u_tag, {
  17014. class: "mr-10 mb-10",
  17015. onClick: _cache[7] || (_cache[7] = ($event) => $setup.fillRemark("书单不符给客服")),
  17016. text: "书单不符给客服"
  17017. }),
  17018. vue.createVNode(_component_u_tag, {
  17019. class: "mr-10 mb-10",
  17020. onClick: _cache[8] || (_cache[8] = ($event) => $setup.fillRemark("需理赔给客服")),
  17021. text: "需理赔给客服"
  17022. })
  17023. ])
  17024. ])
  17025. ]),
  17026. _: 1
  17027. /* STABLE */
  17028. }, 8, ["show"])
  17029. ],
  17030. 64
  17031. /* STABLE_FRAGMENT */
  17032. );
  17033. }
  17034. const OrderInfo = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$16], ["__scopeId", "data-v-034ad4bc"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/OrderInfo.vue"]]);
  17035. const _sfc_main$16 = {
  17036. __name: "UserInfoCard",
  17037. props: {
  17038. detail: {
  17039. type: Object,
  17040. default: () => ({})
  17041. }
  17042. },
  17043. setup(__props, { expose: __expose }) {
  17044. __expose();
  17045. const props2 = __props;
  17046. const handleUserOrders = () => {
  17047. uni.navigateTo({
  17048. url: `/pages/index/detail/user-orders?userId=${props2.detail.userId}`
  17049. });
  17050. };
  17051. const formattedName = vue.computed(() => {
  17052. var _a, _b;
  17053. return ((_b = (_a = props2.detail) == null ? void 0 : _a.userNick) == null ? void 0 : _b.charAt(0)) + "**";
  17054. });
  17055. const statusClass = vue.computed(() => {
  17056. return props2.detail.userStatus == 1 ? "color-green" : "color-red";
  17057. });
  17058. const blacklistAction = vue.computed(() => {
  17059. return props2.detail.userStatus == 1 ? "加入黑名单" : "移除黑名单";
  17060. });
  17061. const showModal = vue.ref(false);
  17062. const showBlacklistModal = vue.ref(false);
  17063. const reason = vue.ref("");
  17064. const toggleBlacklist = () => {
  17065. showBlacklistModal.value = true;
  17066. };
  17067. const confirmBlacklist = () => {
  17068. let apiStr = props2.detail.userStatus == 1 ? "/app/appUser/setUserBlack" : "app/appUser/removeUserBlack";
  17069. uni.$u.http.post(apiStr, {
  17070. userId: props2.detail.userId,
  17071. reason: reason.value
  17072. }).then((res2) => {
  17073. if (res2.code == 200) {
  17074. uni.$u.toast("操作成功");
  17075. showBlacklistModal.value = false;
  17076. props2.detail.userStatus = props2.detail.userStatus == 1 ? 2 : 1;
  17077. } else {
  17078. uni.$u.toast(res2.msg);
  17079. }
  17080. });
  17081. };
  17082. const __returned__ = { props: props2, handleUserOrders, formattedName, statusClass, blacklistAction, showModal, showBlacklistModal, reason, toggleBlacklist, confirmBlacklist, ref: vue.ref, computed: vue.computed };
  17083. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  17084. return __returned__;
  17085. }
  17086. };
  17087. function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
  17088. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
  17089. return vue.openBlock(), vue.createElementBlock("view", { class: "user-info-card bg-white mt-16" }, [
  17090. vue.createElementVNode("view", { class: "header" }, [
  17091. vue.createElementVNode(
  17092. "text",
  17093. { style: { "color": "#666" } },
  17094. vue.toDisplayString($props.detail.orderTime),
  17095. 1
  17096. /* TEXT */
  17097. ),
  17098. vue.createElementVNode("text", {
  17099. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showModal = true),
  17100. class: "color-green"
  17101. }, "[查看订单日志]")
  17102. ]),
  17103. vue.createElementVNode("view", { class: "content flex flex-j-b" }, [
  17104. vue.createElementVNode("image", {
  17105. src: $props.detail.imgPath,
  17106. class: "user-image"
  17107. }, null, 8, ["src"]),
  17108. vue.createElementVNode("view", { class: "flex flex-a-e flex-1 ml-12" }, [
  17109. vue.createElementVNode("view", { class: "flex flex-d flex-1" }, [
  17110. vue.createElementVNode("text", {
  17111. class: "color-green",
  17112. onClick: $setup.handleUserOrders
  17113. }, [
  17114. vue.createTextVNode(
  17115. vue.toDisplayString($setup.formattedName),
  17116. 1
  17117. /* TEXT */
  17118. ),
  17119. vue.createElementVNode("text", { style: { "color": "#e99d42" } }, "(所有单)")
  17120. ]),
  17121. vue.createElementVNode(
  17122. "text",
  17123. {
  17124. class: "common-text",
  17125. style: { "margin-top": "10rpx" }
  17126. },
  17127. "共卖出" + vue.toDisplayString($props.detail.totalNum) + "本书",
  17128. 1
  17129. /* TEXT */
  17130. ),
  17131. vue.createElementVNode(
  17132. "text",
  17133. { class: "common-text" },
  17134. "来自" + vue.toDisplayString($props.detail.sendSsq),
  17135. 1
  17136. /* TEXT */
  17137. ),
  17138. vue.createElementVNode("text", {
  17139. class: "common-text",
  17140. style: { "margin-top": "10rpx" }
  17141. }, [
  17142. vue.createTextVNode("用户状态: "),
  17143. vue.createElementVNode(
  17144. "text",
  17145. {
  17146. class: vue.normalizeClass($setup.statusClass)
  17147. },
  17148. vue.toDisplayString($props.detail.userStatus == 1 ? "正常" : $props.detail.userStatus == 2 ? "黑名单" : "-"),
  17149. 3
  17150. /* TEXT, CLASS */
  17151. )
  17152. ])
  17153. ]),
  17154. vue.createElementVNode(
  17155. "text",
  17156. {
  17157. style: { "min-width": "160rpx" },
  17158. onClick: $setup.toggleBlacklist,
  17159. class: "color-red"
  17160. },
  17161. "[" + vue.toDisplayString($setup.blacklistAction) + "]",
  17162. 1
  17163. /* TEXT */
  17164. )
  17165. ])
  17166. ]),
  17167. vue.createVNode(_component_u_modal, {
  17168. show: $setup.showModal,
  17169. "onUpdate:show": _cache[1] || (_cache[1] = ($event) => $setup.showModal = $event),
  17170. title: "订单日志",
  17171. showCancelButton: false,
  17172. confirmText: "关闭",
  17173. onConfirm: _cache[2] || (_cache[2] = ($event) => $setup.showModal = false),
  17174. class: "log-modal"
  17175. }, {
  17176. default: vue.withCtx(() => [
  17177. vue.createElementVNode("view", { class: "log-container" }, [
  17178. vue.createElementVNode("view", { class: "log-header" }, [
  17179. vue.createElementVNode("text", null, "描述"),
  17180. vue.createElementVNode("text", null, "操作人"),
  17181. vue.createElementVNode("text", null, "时间")
  17182. ]),
  17183. (vue.openBlock(true), vue.createElementBlock(
  17184. vue.Fragment,
  17185. null,
  17186. vue.renderList($props.detail.logVoList, (log, index2) => {
  17187. return vue.openBlock(), vue.createElementBlock("view", {
  17188. class: "log-item",
  17189. key: index2
  17190. }, [
  17191. vue.createElementVNode(
  17192. "text",
  17193. { class: "log-item-content" },
  17194. vue.toDisplayString(log.statusName),
  17195. 1
  17196. /* TEXT */
  17197. ),
  17198. vue.createElementVNode(
  17199. "text",
  17200. { class: "log-item-name" },
  17201. vue.toDisplayString(log.createName),
  17202. 1
  17203. /* TEXT */
  17204. ),
  17205. vue.createElementVNode(
  17206. "text",
  17207. { class: "log-item-time" },
  17208. vue.toDisplayString(log.createTime),
  17209. 1
  17210. /* TEXT */
  17211. )
  17212. ]);
  17213. }),
  17214. 128
  17215. /* KEYED_FRAGMENT */
  17216. ))
  17217. ])
  17218. ]),
  17219. _: 1
  17220. /* STABLE */
  17221. }, 8, ["show"]),
  17222. vue.createVNode(_component_u_modal, {
  17223. show: $setup.showBlacklistModal,
  17224. "onUpdate:show": _cache[4] || (_cache[4] = ($event) => $setup.showBlacklistModal = $event),
  17225. title: "拉黑用户",
  17226. showCancelButton: true,
  17227. confirmText: "提交",
  17228. cancelText: "取消",
  17229. onConfirm: $setup.confirmBlacklist,
  17230. onCancel: _cache[5] || (_cache[5] = ($event) => $setup.showBlacklistModal = false)
  17231. }, {
  17232. default: vue.withCtx(() => [
  17233. vue.withDirectives(vue.createElementVNode(
  17234. "textarea",
  17235. {
  17236. class: "reason-textarea",
  17237. placeholder: "请输入拉黑原因...",
  17238. autoHeight: "",
  17239. "bg-color": "#f8f8f8",
  17240. "border-radius": "10rpx",
  17241. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.reason = $event),
  17242. height: "100px"
  17243. },
  17244. null,
  17245. 512
  17246. /* NEED_PATCH */
  17247. ), [
  17248. [vue.vModelText, $setup.reason]
  17249. ])
  17250. ]),
  17251. _: 1
  17252. /* STABLE */
  17253. }, 8, ["show"])
  17254. ]);
  17255. }
  17256. const UserInfoCard = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$15], ["__scopeId", "data-v-42a1a738"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/UserInfoCard.vue"]]);
  17257. const _sfc_main$15 = {
  17258. __name: "LogisticsTimeline",
  17259. props: {
  17260. list: {
  17261. type: Array,
  17262. default: []
  17263. }
  17264. },
  17265. setup(__props, { expose: __expose }) {
  17266. __expose();
  17267. const props2 = __props;
  17268. const __returned__ = { props: props2 };
  17269. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  17270. return __returned__;
  17271. }
  17272. };
  17273. function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
  17274. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  17275. return vue.openBlock(), vue.createElementBlock("view", {
  17276. "scroll-y": "",
  17277. class: "timeline-container"
  17278. }, [
  17279. (vue.openBlock(true), vue.createElementBlock(
  17280. vue.Fragment,
  17281. null,
  17282. vue.renderList($props.list, (item, index2) => {
  17283. return vue.openBlock(), vue.createElementBlock("view", {
  17284. key: index2,
  17285. class: "timeline-item"
  17286. }, [
  17287. vue.createElementVNode("view", { class: "timeline-icon" }, [
  17288. vue.createVNode(_component_u_icon, {
  17289. name: "map-fill",
  17290. color: "#19be6b",
  17291. size: "16"
  17292. })
  17293. ]),
  17294. vue.createElementVNode("view", { class: "timeline-content" }, [
  17295. vue.createElementVNode(
  17296. "text",
  17297. { class: "title" },
  17298. vue.toDisplayString(item.title),
  17299. 1
  17300. /* TEXT */
  17301. ),
  17302. vue.createElementVNode(
  17303. "text",
  17304. { class: "desc" },
  17305. vue.toDisplayString(item.description),
  17306. 1
  17307. /* TEXT */
  17308. ),
  17309. vue.createElementVNode(
  17310. "text",
  17311. { class: "time" },
  17312. vue.toDisplayString(item.time),
  17313. 1
  17314. /* TEXT */
  17315. )
  17316. ]),
  17317. index2 < $props.list.length - 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  17318. key: 0,
  17319. class: "timeline-line"
  17320. })) : vue.createCommentVNode("v-if", true)
  17321. ]);
  17322. }),
  17323. 128
  17324. /* KEYED_FRAGMENT */
  17325. ))
  17326. ]);
  17327. }
  17328. const LogisticsTimeline = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$14], ["__scopeId", "data-v-140e9488"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/LogisticsTimeline.vue"]]);
  17329. const _sfc_main$14 = {
  17330. __name: "BookItem",
  17331. props: {
  17332. item: Object,
  17333. showClose: {
  17334. type: Boolean,
  17335. default: false
  17336. }
  17337. },
  17338. setup(__props, { expose: __expose }) {
  17339. __expose();
  17340. const props2 = __props;
  17341. const goodNum = vue.computed(() => {
  17342. var _a;
  17343. return ((_a = props2.item.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 1).length) || 0;
  17344. });
  17345. const badNum = vue.computed(() => {
  17346. var _a;
  17347. return ((_a = props2.item.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 3).length) || 0;
  17348. });
  17349. const reasons = vue.computed(() => {
  17350. let list = props2.item.auditCommentList;
  17351. if (!list)
  17352. return "";
  17353. if (list.length > 0) {
  17354. let poorList = list.filter((v) => v.sts == 3);
  17355. if (poorList.length == 0)
  17356. return "";
  17357. return poorList.map((v) => v.com).join(";");
  17358. }
  17359. });
  17360. const __returned__ = { props: props2, goodNum, badNum, reasons, computed: vue.computed };
  17361. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  17362. return __returned__;
  17363. }
  17364. };
  17365. function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
  17366. return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [
  17367. vue.createElementVNode("view", { class: "flex w100" }, [
  17368. vue.createElementVNode("view", { class: "flex-d" }, [
  17369. vue.createElementVNode("image", {
  17370. style: { "width": "70px", "height": "90px" },
  17371. src: $props.item.cover,
  17372. mode: "aspectFill"
  17373. }, null, 8, ["src"]),
  17374. !$props.showClose ? (vue.openBlock(), vue.createElementBlock(
  17375. "view",
  17376. {
  17377. key: 0,
  17378. class: "quantity mt-24"
  17379. },
  17380. "数量: " + vue.toDisplayString($props.item.num),
  17381. 1
  17382. /* TEXT */
  17383. )) : vue.createCommentVNode("v-if", true)
  17384. ]),
  17385. vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
  17386. vue.createElementVNode(
  17387. "view",
  17388. { class: "common-title mb-20" },
  17389. vue.toDisplayString($props.item.bookName),
  17390. 1
  17391. /* TEXT */
  17392. ),
  17393. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  17394. vue.createElementVNode(
  17395. "view",
  17396. { class: "isbn" },
  17397. "ISBN: " + vue.toDisplayString($props.item.isbn),
  17398. 1
  17399. /* TEXT */
  17400. ),
  17401. vue.createElementVNode(
  17402. "view",
  17403. { class: "set" },
  17404. "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "不是"),
  17405. 1
  17406. /* TEXT */
  17407. )
  17408. ]),
  17409. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  17410. vue.createElementVNode(
  17411. "view",
  17412. { class: "price" },
  17413. "定价: " + vue.toDisplayString($props.item.bookPrice),
  17414. 1
  17415. /* TEXT */
  17416. ),
  17417. vue.createElementVNode(
  17418. "view",
  17419. { class: "estimate" },
  17420. "预估单价: " + vue.toDisplayString(($props.item.recycleDiscount * $props.item.bookPrice * 0.1).toFixed(2)),
  17421. 1
  17422. /* TEXT */
  17423. )
  17424. ]),
  17425. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  17426. vue.createElementVNode(
  17427. "view",
  17428. { class: "discount" },
  17429. "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
  17430. 1
  17431. /* TEXT */
  17432. ),
  17433. vue.createElementVNode("view", { class: "review" }, [
  17434. vue.createTextVNode("审核金额: "),
  17435. vue.createElementVNode(
  17436. "text",
  17437. { class: "color-red" },
  17438. vue.toDisplayString($props.item.finalMoney || 0),
  17439. 1
  17440. /* TEXT */
  17441. )
  17442. ])
  17443. ]),
  17444. vue.createElementVNode("view", { class: "quality mb-10" }, [
  17445. vue.createTextVNode(
  17446. " 品相: 良好(" + vue.toDisplayString($setup.goodNum) + ") 、 一般(" + vue.toDisplayString($props.item.averageNum || 0) + ") 、 ",
  17447. 1
  17448. /* TEXT */
  17449. ),
  17450. vue.createElementVNode(
  17451. "text",
  17452. {
  17453. class: vue.normalizeClass($props.item.badNum > 0 ? "color-red" : "")
  17454. },
  17455. "极差(" + vue.toDisplayString($setup.badNum) + ")",
  17456. 3
  17457. /* TEXT, CLASS */
  17458. )
  17459. ]),
  17460. $setup.reasons ? (vue.openBlock(), vue.createElementBlock(
  17461. "view",
  17462. {
  17463. key: 0,
  17464. class: "color-red"
  17465. },
  17466. "原因:" + vue.toDisplayString($setup.reasons),
  17467. 1
  17468. /* TEXT */
  17469. )) : vue.createCommentVNode("v-if", true)
  17470. ])
  17471. ])
  17472. ]);
  17473. }
  17474. const BookItem$2 = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$13], ["__scopeId", "data-v-a629889e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/BookItem.vue"]]);
  17475. const pinyin = {
  17476. "a": "啊阿锕",
  17477. "ai": "埃挨哎唉哀皑癌蔼矮艾碍爱隘诶捱嗳嗌嫒瑷暧砹锿霭",
  17478. "an": "鞍氨安俺按暗岸胺案谙埯揞犴庵桉铵鹌顸黯",
  17479. "ang": "肮昂盎",
  17480. "ao": "凹敖熬翱袄傲奥懊澳坳拗嗷噢岙廒遨媪骜聱螯鏊鳌鏖",
  17481. "ba": "芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸茇菝萆捭岜灞杷钯粑鲅魃",
  17482. "bai": "白柏百摆佰败拜稗薜掰鞴",
  17483. "ban": "斑班搬扳般颁板版扮拌伴瓣半办绊阪坂豳钣瘢癍舨",
  17484. "bang": "邦帮梆榜膀绑棒磅蚌镑傍谤蒡螃",
  17485. "bao": "苞胞包褒雹保堡饱宝抱报暴豹鲍爆勹葆宀孢煲鸨褓趵龅",
  17486. "bo": "剥薄玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳亳蕃啵饽檗擘礴钹鹁簸跛",
  17487. "bei": "杯碑悲卑北辈背贝钡倍狈备惫焙被孛陂邶埤蓓呗怫悖碚鹎褙鐾",
  17488. "ben": "奔苯本笨畚坌锛",
  17489. "beng": "崩绷甭泵蹦迸唪嘣甏",
  17490. "bi": "逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛匕仳俾芘荜荸吡哔狴庳愎滗濞弼妣婢嬖璧贲畀铋秕裨筚箅篦舭襞跸髀",
  17491. "bian": "鞭边编贬扁便变卞辨辩辫遍匾弁苄忭汴缏煸砭碥稹窆蝙笾鳊",
  17492. "biao": "标彪膘表婊骠飑飙飚灬镖镳瘭裱鳔",
  17493. "bie": "鳖憋别瘪蹩鳘",
  17494. "bin": "彬斌濒滨宾摈傧浜缤玢殡膑镔髌鬓",
  17495. "bing": "兵冰柄丙秉饼炳病并禀邴摒绠枋槟燹",
  17496. "bu": "捕卜哺补埠不布步簿部怖拊卟逋瓿晡钚醭",
  17497. "ca": "擦嚓礤",
  17498. "cai": "猜裁材才财睬踩采彩菜蔡",
  17499. "can": "餐参蚕残惭惨灿骖璨粲黪",
  17500. "cang": "苍舱仓沧藏伧",
  17501. "cao": "操糙槽曹草艹嘈漕螬艚",
  17502. "ce": "厕策侧册测刂帻恻",
  17503. "ceng": "层蹭噌",
  17504. "cha": "插叉茬茶查碴搽察岔差诧猹馇汊姹杈楂槎檫钗锸镲衩",
  17505. "chai": "拆柴豺侪茈瘥虿龇",
  17506. "chan": "搀掺蝉馋谗缠铲产阐颤冁谄谶蒇廛忏潺澶孱羼婵嬗骣觇禅镡裣蟾躔",
  17507. "chang": "昌猖场尝常长偿肠厂敞畅唱倡伥鬯苌菖徜怅惝阊娼嫦昶氅鲳",
  17508. "chao": "超抄钞朝嘲潮巢吵炒怊绉晁耖",
  17509. "che": "车扯撤掣彻澈坼屮砗",
  17510. "chen": "郴臣辰尘晨忱沉陈趁衬称谌抻嗔宸琛榇肜胂碜龀",
  17511. "cheng": "撑城橙成呈乘程惩澄诚承逞骋秤埕嵊徵浈枨柽樘晟塍瞠铖裎蛏酲",
  17512. "chi": "吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽傺墀芪茌搋叱哧啻嗤彳饬沲媸敕胝眙眵鸱瘛褫蚩螭笞篪豉踅踟魑",
  17513. "chong": "充冲虫崇宠茺忡憧铳艟",
  17514. "chou": "抽酬畴踌稠愁筹仇绸瞅丑俦圳帱惆溴妯瘳雠鲋",
  17515. "chu": "臭初出橱厨躇锄雏滁除楚础储矗搐触处亍刍憷绌杵楮樗蜍蹰黜",
  17516. "chuan": "揣川穿椽传船喘串掾舛惴遄巛氚钏镩舡",
  17517. "chuang": "疮窗幢床闯创怆",
  17518. "chui": "吹炊捶锤垂陲棰槌",
  17519. "chun": "春椿醇唇淳纯蠢促莼沌肫朐鹑蝽",
  17520. "chuo": "戳绰蔟辶辍镞踔龊",
  17521. "ci": "疵茨磁雌辞慈瓷词此刺赐次荠呲嵯鹚螅糍趑",
  17522. "cong": "聪葱囱匆从丛偬苁淙骢琮璁枞",
  17523. "cu": "凑粗醋簇猝殂蹙",
  17524. "cuan": "蹿篡窜汆撺昕爨",
  17525. "cui": "摧崔催脆瘁粹淬翠萃悴璀榱隹",
  17526. "cun": "村存寸磋忖皴",
  17527. "cuo": "撮搓措挫错厝脞锉矬痤鹾蹉躜",
  17528. "da": "搭达答瘩打大耷哒嗒怛妲疸褡笪靼鞑",
  17529. "dai": "呆歹傣戴带殆代贷袋待逮怠埭甙呔岱迨逯骀绐玳黛",
  17530. "dan": "耽担丹单郸掸胆旦氮但惮淡诞弹蛋亻儋卩萏啖澹檐殚赕眈瘅聃箪",
  17531. "dang": "当挡党荡档谠凼菪宕砀铛裆",
  17532. "dao": "刀捣蹈倒岛祷导到稻悼道盗叨啁忉洮氘焘忑纛",
  17533. "de": "德得的锝",
  17534. "deng": "蹬灯登等瞪凳邓噔嶝戥磴镫簦",
  17535. "di": "堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔氐籴诋谛邸坻莜荻嘀娣柢棣觌砥碲睇镝羝骶",
  17536. "dian": "颠掂滇碘点典靛垫电佃甸店惦奠淀殿丶阽坫埝巅玷癜癫簟踮",
  17537. "diao": "碉叼雕凋刁掉吊钓调轺铞蜩粜貂",
  17538. "die": "跌爹碟蝶迭谍叠佚垤堞揲喋渫轶牒瓞褶耋蹀鲽鳎",
  17539. "ding": "丁盯叮钉顶鼎锭定订丢仃啶玎腚碇町铤疔耵酊",
  17540. "dong": "东冬董懂动栋侗恫冻洞垌咚岽峒夂氡胨胴硐鸫",
  17541. "dou": "兜抖斗陡豆逗痘蔸钭窦窬蚪篼酡",
  17542. "du": "都督毒犊独读堵睹赌杜镀肚度渡妒芏嘟渎椟橐牍蠹笃髑黩",
  17543. "duan": "端短锻段断缎彖椴煅簖",
  17544. "dui": "堆兑队对怼憝碓",
  17545. "dun": "墩吨蹲敦顿囤钝盾遁炖砘礅盹镦趸",
  17546. "duo": "掇哆多夺垛躲朵跺舵剁惰堕咄哚缍柁铎裰踱",
  17547. "e": "蛾峨鹅俄额讹娥恶厄扼遏鄂饿噩谔垩垭苊莪萼呃愕屙婀轭曷腭硪锇锷鹗颚鳄",
  17548. "en": "恩蒽摁唔嗯",
  17549. "er": "而儿耳尔饵洱二贰迩珥铒鸸鲕",
  17550. "fa": "发罚筏伐乏阀法珐垡砝",
  17551. "fan": "藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛蘩幡犭梵攵燔畈蹯",
  17552. "fang": "坊芳方肪房防妨仿访纺放匚邡彷钫舫鲂",
  17553. "fei": "菲非啡飞肥匪诽吠肺废沸费芾狒悱淝妃绋绯榧腓斐扉祓砩镄痱蜚篚翡霏鲱",
  17554. "fen": "芬酚吩氛分纷坟焚汾粉奋份忿愤粪偾瀵棼愍鲼鼢",
  17555. "feng": "丰封枫蜂峰锋风疯烽逢冯缝讽奉凤俸酆葑沣砜",
  17556. "fu": "佛否夫敷肤孵扶拂辐幅氟符伏俘服浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐匐凫郛芙苻茯莩菔呋幞滏艴孚驸绂桴赙黻黼罘稃馥虍蚨蜉蝠蝮麸趺跗鳆",
  17557. "ga": "噶嘎蛤尬呷尕尜旮钆",
  17558. "gai": "该改概钙盖溉丐陔垓戤赅胲",
  17559. "gan": "干甘杆柑竿肝赶感秆敢赣坩苷尴擀泔淦澉绀橄旰矸疳酐",
  17560. "gang": "冈刚钢缸肛纲岗港戆罡颃筻",
  17561. "gong": "杠工攻功恭龚供躬公宫弓巩汞拱贡共蕻廾咣珙肱蚣蛩觥",
  17562. "gao": "篙皋高膏羔糕搞镐稿告睾诰郜蒿藁缟槔槁杲锆",
  17563. "ge": "哥歌搁戈鸽胳疙割革葛格阁隔铬个各鬲仡哿塥嗝纥搿膈硌铪镉袼颌虼舸骼髂",
  17564. "gei": "给",
  17565. "gen": "根跟亘茛哏艮",
  17566. "geng": "耕更庚羹埂耿梗哽赓鲠",
  17567. "gou": "钩勾沟苟狗垢构购够佝诟岣遘媾缑觏彀鸲笱篝鞲",
  17568. "gu": "辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇嘏诂菰哌崮汩梏轱牯牿胍臌毂瞽罟钴锢瓠鸪鹄痼蛄酤觚鲴骰鹘",
  17569. "gua": "刮瓜剐寡挂褂卦诖呱栝鸹",
  17570. "guai": "乖拐怪哙",
  17571. "guan": "棺关官冠观管馆罐惯灌贯倌莞掼涫盥鹳鳏",
  17572. "guang": "光广逛犷桄胱疒",
  17573. "gui": "瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽匦刿庋宄妫桧炅晷皈簋鲑鳜",
  17574. "gun": "辊滚棍丨衮绲磙鲧",
  17575. "guo": "锅郭国果裹过馘蠃埚掴呙囗帼崞猓椁虢锞聒蜮蜾蝈",
  17576. "ha": "哈",
  17577. "hai": "骸孩海氦亥害骇咴嗨颏醢",
  17578. "han": "酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉邗菡撖阚瀚晗焓颔蚶鼾",
  17579. "hen": "夯痕很狠恨",
  17580. "hang": "杭航沆绗珩桁",
  17581. "hao": "壕嚎豪毫郝好耗号浩薅嗥嚆濠灏昊皓颢蚝",
  17582. "he": "呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺诃劾壑藿嗑嗬阖盍蚵翮",
  17583. "hei": "嘿黑",
  17584. "heng": "哼亨横衡恒訇蘅",
  17585. "hong": "轰哄烘虹鸿洪宏弘红黉讧荭薨闳泓",
  17586. "hou": "喉侯猴吼厚候后堠後逅瘊篌糇鲎骺",
  17587. "hu": "呼乎忽瑚壶葫胡蝴狐糊湖弧虎唬护互沪户冱唿囫岵猢怙惚浒滹琥槲轷觳烀煳戽扈祜鹕鹱笏醐斛",
  17588. "hua": "花哗华猾滑画划化话劐浍骅桦铧稞",
  17589. "huai": "槐徊怀淮坏还踝",
  17590. "huan": "欢环桓缓换患唤痪豢焕涣宦幻郇奂垸擐圜洹浣漶寰逭缳锾鲩鬟",
  17591. "huang": "荒慌黄磺蝗簧皇凰惶煌晃幌恍谎隍徨湟潢遑璜肓癀蟥篁鳇",
  17592. "hui": "灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘诙茴荟蕙哕喙隳洄彗缋珲晖恚虺蟪麾",
  17593. "hun": "荤昏婚魂浑混诨馄阍溷缗",
  17594. "huo": "豁活伙火获或惑霍货祸攉嚯夥钬锪镬耠蠖",
  17595. "ji": "击圾基机畸稽积箕肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪居丌乩剞佶佴脔墼芨芰萁蒺蕺掎叽咭哜唧岌嵴洎彐屐骥畿玑楫殛戟戢赍觊犄齑矶羁嵇稷瘠瘵虮笈笄暨跻跽霁鲚鲫髻麂",
  17596. "jia": "嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁伽郏拮岬浃迦珈戛胛恝铗镓痂蛱笳袈跏",
  17597. "jian": "歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件健舰剑饯渐溅涧建僭谏谫菅蒹搛囝湔蹇謇缣枧柙楗戋戬牮犍毽腱睑锏鹣裥笕箴翦趼踺鲣鞯",
  17598. "jiang": "僵姜将浆江疆蒋桨奖讲匠酱降茳洚绛缰犟礓耩糨豇",
  17599. "jiao": "蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫佼僬茭挢噍峤徼姣纟敫皎鹪蛟醮跤鲛",
  17600. "jie": "窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届偈讦诘喈嗟獬婕孑桀獒碣锴疖袷颉蚧羯鲒骱髫",
  17601. "jin": "巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸尽卺荩堇噤馑廑妗缙瑾槿赆觐钅锓衿矜",
  17602. "jing": "劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净刭儆阱菁獍憬泾迳弪婧肼胫腈旌",
  17603. "jiong": "炯窘冂迥扃",
  17604. "jiu": "揪究纠玖韭久灸九酒厩救旧臼舅咎就疚僦啾阄柩桕鹫赳鬏",
  17605. "ju": "鞠拘狙疽驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧倨讵苣苴莒掬遽屦琚枸椐榘榉橘犋飓钜锔窭裾趄醵踽龃雎鞫",
  17606. "juan": "捐鹃娟倦眷卷绢鄄狷涓桊蠲锩镌隽",
  17607. "jue": "撅攫抉掘倔爵觉决诀绝厥劂谲矍蕨噘崛獗孓珏桷橛爝镢蹶觖",
  17608. "jun": "均菌钧军君峻俊竣浚郡骏捃狻皲筠麇",
  17609. "ka": "喀咖卡佧咔胩",
  17610. "ke": "咯坷苛柯棵磕颗科壳咳可渴克刻客课岢恪溘骒缂珂轲氪瞌钶疴窠蝌髁",
  17611. "kai": "开揩楷凯慨剀垲蒈忾恺铠锎",
  17612. "kan": "刊堪勘坎砍看侃凵莰莶戡龛瞰",
  17613. "kang": "康慷糠扛抗亢炕坑伉闶钪",
  17614. "kao": "考拷烤靠尻栲犒铐",
  17615. "ken": "肯啃垦恳垠裉颀",
  17616. "keng": "吭忐铿",
  17617. "kong": "空恐孔控倥崆箜",
  17618. "kou": "抠口扣寇芤蔻叩眍筘",
  17619. "ku": "枯哭窟苦酷库裤刳堀喾绔骷",
  17620. "kua": "夸垮挎跨胯侉",
  17621. "kuai": "块筷侩快蒯郐蒉狯脍",
  17622. "kuan": "宽款髋",
  17623. "kuang": "匡筐狂框矿眶旷况诓诳邝圹夼哐纩贶",
  17624. "kui": "亏盔岿窥葵奎魁傀馈愧溃馗匮夔隗揆喹喟悝愦阕逵暌睽聩蝰篑臾跬",
  17625. "kun": "坤昆捆困悃阃琨锟醌鲲髡",
  17626. "kuo": "括扩廓阔蛞",
  17627. "la": "垃拉喇蜡腊辣啦剌摺邋旯砬瘌",
  17628. "lai": "莱来赖崃徕涞濑赉睐铼癞籁",
  17629. "lan": "蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥啉岚懔漤榄斓罱镧褴",
  17630. "lang": "琅榔狼廊郎朗浪莨蒗啷阆锒稂螂",
  17631. "lao": "捞劳牢老佬姥酪烙涝唠崂栳铑铹痨醪",
  17632. "le": "勒乐肋仂叻嘞泐鳓",
  17633. "lei": "雷镭蕾磊累儡垒擂类泪羸诔荽咧漯嫘缧檑耒酹",
  17634. "ling": "棱冷拎玲菱零龄铃伶羚凌灵陵岭领另令酃塄苓呤囹泠绫柃棂瓴聆蛉翎鲮",
  17635. "leng": "楞愣",
  17636. "li": "厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐痢立粒沥隶力璃哩俪俚郦坜苈莅蓠藜捩呖唳喱猁溧澧逦娌嫠骊缡珞枥栎轹戾砺詈罹锂鹂疠疬蛎蜊蠡笠篥粝醴跞雳鲡鳢黧",
  17637. "lian": "俩联莲连镰廉怜涟帘敛脸链恋炼练挛蔹奁潋濂娈琏楝殓臁膦裢蠊鲢",
  17638. "liang": "粮凉梁粱良两辆量晾亮谅墚椋踉靓魉",
  17639. "liao": "撩聊僚疗燎寥辽潦了撂镣廖料蓼尥嘹獠寮缭钌鹩耢",
  17640. "lie": "列裂烈劣猎冽埒洌趔躐鬣",
  17641. "lin": "琳林磷霖临邻鳞淋凛赁吝蔺嶙廪遴檩辚瞵粼躏麟",
  17642. "liu": "溜琉榴硫馏留刘瘤流柳六抡偻蒌泖浏遛骝绺旒熘锍镏鹨鎏",
  17643. "long": "龙聋咙笼窿隆垄拢陇弄垅茏泷珑栊胧砻癃",
  17644. "lou": "楼娄搂篓漏陋喽嵝镂瘘耧蝼髅",
  17645. "lu": "芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮垆摅撸噜泸渌漉璐栌橹轳辂辘氇胪镥鸬鹭簏舻鲈",
  17646. "lv": "驴吕铝侣旅履屡缕虑氯律率滤绿捋闾榈膂稆褛",
  17647. "luan": "峦孪滦卵乱栾鸾銮",
  17648. "lue": "掠略锊",
  17649. "lun": "轮伦仑沦纶论囵",
  17650. "luo": "萝螺罗逻锣箩骡裸落洛骆络倮荦摞猡泺椤脶镙瘰雒",
  17651. "ma": "妈麻玛码蚂马骂嘛吗唛犸嬷杩麽",
  17652. "mai": "埋买麦卖迈脉劢荬咪霾",
  17653. "man": "瞒馒蛮满蔓曼慢漫谩墁幔缦熳镘颟螨鳗鞔",
  17654. "mang": "芒茫盲忙莽邙漭朦硭蟒",
  17655. "meng": "氓萌蒙檬盟锰猛梦孟勐甍瞢懵礞虻蜢蠓艋艨黾",
  17656. "miao": "猫苗描瞄藐秒渺庙妙喵邈缈缪杪淼眇鹋蜱",
  17657. "mao": "茅锚毛矛铆卯茂冒帽貌贸侔袤勖茆峁瑁昴牦耄旄懋瞀蛑蝥蟊髦",
  17658. "me": "么",
  17659. "mei": "玫枚梅酶霉煤没眉媒镁每美昧寐妹媚坶莓嵋猸浼湄楣镅鹛袂魅",
  17660. "men": "门闷们扪玟焖懑钔",
  17661. "mi": "眯醚靡糜迷谜弥米秘觅泌蜜密幂芈冖谧蘼嘧猕獯汨宓弭脒敉糸縻麋",
  17662. "mian": "棉眠绵冕免勉娩缅面沔湎腼眄",
  17663. "mie": "蔑灭咩蠛篾",
  17664. "min": "民抿皿敏悯闽苠岷闵泯珉",
  17665. "ming": "明螟鸣铭名命冥茗溟暝瞑酩",
  17666. "miu": "谬",
  17667. "mo": "摸摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谟茉蓦馍嫫镆秣瘼耱蟆貊貘",
  17668. "mou": "谋牟某厶哞婺眸鍪",
  17669. "mu": "拇牡亩姆母墓暮幕募慕木目睦牧穆仫苜呒沐毪钼",
  17670. "na": "拿哪呐钠那娜纳内捺肭镎衲箬",
  17671. "nai": "氖乃奶耐奈鼐艿萘柰",
  17672. "nan": "南男难囊喃囡楠腩蝻赧",
  17673. "nao": "挠脑恼闹孬垴猱瑙硇铙蛲",
  17674. "ne": "淖呢讷",
  17675. "nei": "馁",
  17676. "nen": "嫩能枘恁",
  17677. "ni": "妮霓倪泥尼拟你匿腻逆溺伲坭猊怩滠昵旎祢慝睨铌鲵",
  17678. "nian": "蔫拈年碾撵捻念廿辇黏鲇鲶",
  17679. "niang": "娘酿",
  17680. "niao": "鸟尿茑嬲脲袅",
  17681. "nie": "捏聂孽啮镊镍涅乜陧蘖嗫肀颞臬蹑",
  17682. "nin": "您柠",
  17683. "ning": "狞凝宁拧泞佞蓥咛甯聍",
  17684. "niu": "牛扭钮纽狃忸妞蚴",
  17685. "nong": "脓浓农侬",
  17686. "nu": "奴努怒呶帑弩胬孥驽",
  17687. "nv": "女恧钕衄",
  17688. "nuan": "暖",
  17689. "nuenue": "虐",
  17690. "nue": "疟谑",
  17691. "nuo": "挪懦糯诺傩搦喏锘",
  17692. "ou": "哦欧鸥殴藕呕偶沤怄瓯耦",
  17693. "pa": "啪趴爬帕怕琶葩筢",
  17694. "pai": "拍排牌徘湃派俳蒎",
  17695. "pan": "攀潘盘磐盼畔判叛爿泮袢襻蟠蹒",
  17696. "pang": "乓庞旁耪胖滂逄",
  17697. "pao": "抛咆刨炮袍跑泡匏狍庖脬疱",
  17698. "pei": "呸胚培裴赔陪配佩沛掊辔帔淠旆锫醅霈",
  17699. "pen": "喷盆湓",
  17700. "peng": "砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯堋嘭怦蟛",
  17701. "pi": "砒霹批披劈琵毗啤脾疲皮匹痞僻屁譬丕陴邳郫圮鼙擗噼庀媲纰枇甓睥罴铍痦癖疋蚍貔",
  17702. "pian": "篇偏片骗谝骈犏胼褊翩蹁",
  17703. "piao": "飘漂瓢票剽嘌嫖缥殍瞟螵",
  17704. "pie": "撇瞥丿苤氕",
  17705. "pin": "拼频贫品聘拚姘嫔榀牝颦",
  17706. "ping": "乒坪苹萍平凭瓶评屏俜娉枰鲆",
  17707. "po": "坡泼颇婆破魄迫粕叵鄱溥珀钋钷皤笸",
  17708. "pou": "剖裒踣",
  17709. "pu": "扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑匍噗濮璞氆镤镨蹼",
  17710. "qi": "期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫亟亓圻芑萋葺嘁屺岐汔淇骐绮琪琦杞桤槭欹祺憩碛蛴蜞綦綮趿蹊鳍麒",
  17711. "qia": "掐恰洽葜",
  17712. "qian": "牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉佥阡芊芡荨掮岍悭慊骞搴褰缱椠肷愆钤虔箝",
  17713. "qiang": "枪呛腔羌墙蔷强抢嫱樯戗炝锖锵镪襁蜣羟跫跄",
  17714. "qiao": "橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍劁诮谯荞愀憔缲樵毳硗跷鞒",
  17715. "qie": "切茄且怯窃郄唼惬妾挈锲箧",
  17716. "qin": "钦侵亲秦琴勤芹擒禽寝沁芩蓁蕲揿吣嗪噙溱檎螓衾",
  17717. "qing": "青轻氢倾卿清擎晴氰情顷请庆倩苘圊檠磬蜻罄箐謦鲭黥",
  17718. "qiong": "琼穷邛茕穹筇銎",
  17719. "qiu": "秋丘邱球求囚酋泅俅氽巯艽犰湫逑遒楸赇鸠虬蚯蝤裘糗鳅鼽",
  17720. "qu": "趋区蛆曲躯屈驱渠取娶龋趣去诎劬蕖蘧岖衢阒璩觑氍祛磲癯蛐蠼麴瞿黢",
  17721. "quan": "圈颧权醛泉全痊拳犬券劝诠荃獾悛绻辁畎铨蜷筌鬈",
  17722. "que": "缺炔瘸却鹊榷确雀阙悫",
  17723. "qun": "裙群逡",
  17724. "ran": "然燃冉染苒髯",
  17725. "rang": "瓤壤攘嚷让禳穰",
  17726. "rao": "饶扰绕荛娆桡",
  17727. "ruo": "惹若弱",
  17728. "re": "热偌",
  17729. "ren": "壬仁人忍韧任认刃妊纫仞荏葚饪轫稔衽",
  17730. "reng": "扔仍",
  17731. "ri": "日",
  17732. "rong": "戎茸蓉荣融熔溶容绒冗嵘狨缛榕蝾",
  17733. "rou": "揉柔肉糅蹂鞣",
  17734. "ru": "茹蠕儒孺如辱乳汝入褥蓐薷嚅洳溽濡铷襦颥",
  17735. "ruan": "软阮朊",
  17736. "rui": "蕊瑞锐芮蕤睿蚋",
  17737. "run": "闰润",
  17738. "sa": "撒洒萨卅仨挲飒",
  17739. "sai": "腮鳃塞赛噻",
  17740. "san": "三叁伞散彡馓氵毵糁霰",
  17741. "sang": "桑嗓丧搡磉颡",
  17742. "sao": "搔骚扫嫂埽臊瘙鳋",
  17743. "se": "瑟色涩啬铩铯穑",
  17744. "sen": "森",
  17745. "seng": "僧",
  17746. "sha": "莎砂杀刹沙纱傻啥煞脎歃痧裟霎鲨",
  17747. "shai": "筛晒酾",
  17748. "shan": "珊苫杉山删煽衫闪陕擅赡膳善汕扇缮剡讪鄯埏芟潸姗骟膻钐疝蟮舢跚鳝",
  17749. "shang": "墒伤商赏晌上尚裳垧绱殇熵觞",
  17750. "shao": "梢捎稍烧芍勺韶少哨邵绍劭苕潲蛸笤筲艄",
  17751. "she": "奢赊蛇舌舍赦摄射慑涉社设厍佘猞畲麝",
  17752. "shen": "砷申呻伸身深娠绅神沈审婶甚肾慎渗诜谂吲哂渖椹矧蜃",
  17753. "sheng": "声生甥牲升绳省盛剩胜圣丞渑媵眚笙",
  17754. "shi": "师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试谥埘莳蓍弑唑饣轼耆贳炻礻铈铊螫舐筮豕鲥鲺",
  17755. "shou": "收手首守寿授售受瘦兽扌狩绶艏",
  17756. "shu": "蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱恕倏塾菽忄沭涑澍姝纾毹腧殳镯秫鹬",
  17757. "shua": "刷耍唰涮",
  17758. "shuai": "摔衰甩帅蟀",
  17759. "shuan": "栓拴闩",
  17760. "shuang": "霜双爽孀",
  17761. "shui": "谁水睡税",
  17762. "shun": "吮瞬顺舜恂",
  17763. "shuo": "说硕朔烁蒴搠嗍濯妁槊铄",
  17764. "si": "斯撕嘶思私司丝死肆寺嗣四伺似饲巳厮俟兕菥咝汜泗澌姒驷缌祀祠锶鸶耜蛳笥",
  17765. "song": "松耸怂颂送宋讼诵凇菘崧嵩忪悚淞竦",
  17766. "sou": "搜艘擞嗽叟嗖嗾馊溲飕瞍锼螋",
  17767. "su": "苏酥俗素速粟僳塑溯宿诉肃夙谡蔌嗉愫簌觫稣",
  17768. "suan": "酸蒜算",
  17769. "sui": "虽隋随绥髓碎岁穗遂隧祟蓑冫谇濉邃燧眭睢",
  17770. "sun": "孙损笋荪狲飧榫跣隼",
  17771. "suo": "梭唆缩琐索锁所唢嗦娑桫睃羧",
  17772. "ta": "塌他它她塔獭挞蹋踏闼溻遢榻沓",
  17773. "tai": "胎苔抬台泰酞太态汰邰薹肽炱钛跆鲐",
  17774. "tan": "坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭郯蕈昙钽锬覃",
  17775. "tang": "汤塘搪堂棠膛唐糖傥饧溏瑭铴镗耥螗螳羰醣",
  17776. "thang": "倘躺淌",
  17777. "theng": "趟烫",
  17778. "tao": "掏涛滔绦萄桃逃淘陶讨套挑鼗啕韬饕",
  17779. "te": "特",
  17780. "teng": "藤腾疼誊滕",
  17781. "ti": "梯剔踢锑提题蹄啼体替嚏惕涕剃屉荑悌逖绨缇鹈裼醍",
  17782. "tian": "天添填田甜恬舔腆掭忝阗殄畋钿蚺",
  17783. "tiao": "条迢眺跳佻祧铫窕龆鲦",
  17784. "tie": "贴铁帖萜餮",
  17785. "ting": "厅听烃汀廷停亭庭挺艇莛葶婷梃蜓霆",
  17786. "tong": "通桐酮瞳同铜彤童桶捅筒统痛佟僮仝茼嗵恸潼砼",
  17787. "tou": "偷投头透亠",
  17788. "tu": "凸秃突图徒途涂屠土吐兔堍荼菟钍酴",
  17789. "tuan": "湍团疃",
  17790. "tui": "推颓腿蜕褪退忒煺",
  17791. "tun": "吞屯臀饨暾豚窀",
  17792. "tuo": "拖托脱鸵陀驮驼椭妥拓唾乇佗坨庹沱柝砣箨舄跎鼍",
  17793. "wa": "挖哇蛙洼娃瓦袜佤娲腽",
  17794. "wai": "歪外",
  17795. "wan": "豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕剜芄苋菀纨绾琬脘畹蜿箢",
  17796. "wang": "汪王亡枉网往旺望忘妄罔尢惘辋魍",
  17797. "wei": "威巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫倭偎诿隈葳薇帏帷崴嵬猥猬闱沩洧涠逶娓玮韪軎炜煨熨痿艉鲔",
  17798. "wen": "瘟温蚊文闻纹吻稳紊问刎愠阌汶璺韫殁雯",
  17799. "weng": "嗡翁瓮蓊蕹",
  17800. "wo": "挝蜗涡窝我斡卧握沃莴幄渥杌肟龌",
  17801. "wu": "巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误兀仵阢邬圬芴庑怃忤浯寤迕妩骛牾焐鹉鹜蜈鋈鼯",
  17802. "xi": "昔熙析西硒矽晰嘻吸锡牺稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细僖兮隰郗茜葸蓰奚唏徙饩阋浠淅屣嬉玺樨曦觋欷熹禊禧钸皙穸蜥蟋舾羲粞翕醯鼷",
  17803. "xia": "瞎虾匣霞辖暇峡侠狭下厦夏吓掀葭嗄狎遐瑕硖瘕罅黠",
  17804. "xian": "锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线冼藓岘猃暹娴氙祆鹇痫蚬筅籼酰跹",
  17805. "xiang": "相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象芗葙饷庠骧缃蟓鲞飨",
  17806. "xiao": "萧硝霄削哮嚣销消宵淆晓小孝校肖啸笑效哓咻崤潇逍骁绡枭枵筱箫魈",
  17807. "xie": "楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑偕亵勰燮薤撷廨瀣邂绁缬榭榍歙躞",
  17808. "xin": "薪芯锌欣辛新忻心信衅囟馨莘歆铽鑫",
  17809. "xing": "星腥猩惺兴刑型形邢行醒幸杏性姓陉荇荥擤悻硎",
  17810. "xiong": "兄凶胸匈汹雄熊芎",
  17811. "xiu": "休修羞朽嗅锈秀袖绣莠岫馐庥鸺貅髹",
  17812. "xu": "墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续讴诩圩蓿怵洫溆顼栩煦砉盱胥糈醑",
  17813. "xuan": "轩喧宣悬旋玄选癣眩绚儇谖萱揎馔泫洵渲漩璇楦暄炫煊碹铉镟痃",
  17814. "xue": "靴薛学穴雪血噱泶鳕",
  17815. "xun": "勋熏循旬询寻驯巡殉汛训讯逊迅巽埙荀薰峋徇浔曛窨醺鲟",
  17816. "ya": "压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶伢揠吖岈迓娅琊桠氩砑睚痖",
  17817. "yan": "焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验厣靥赝俨偃兖讠谳郾鄢芫菸崦恹闫阏洇湮滟妍嫣琰晏胭腌焱罨筵酽魇餍鼹",
  17818. "yang": "殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾徉怏泱炀烊恙蛘鞅",
  17819. "yao": "邀腰妖瑶摇尧遥窑谣姚咬舀药要耀夭爻吆崾徭瀹幺珧杳曜肴鹞窈繇鳐",
  17820. "ye": "椰噎耶爷野冶也页掖业叶曳腋夜液谒邺揶馀晔烨铘",
  17821. "yi": "一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎刈劓佾诒圪圯埸懿苡薏弈奕挹弋呓咦咿噫峄嶷猗饴怿怡悒漪迤驿缢殪贻旖熠钇镒镱痍瘗癔翊衤蜴舣羿翳酏黟",
  17822. "yin": "茵荫因殷音阴姻吟银淫寅饮尹引隐印胤鄞堙茚喑狺夤氤铟瘾蚓霪龈",
  17823. "ying": "英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映嬴郢茔莺萦撄嘤膺滢潆瀛瑛璎楹鹦瘿颍罂",
  17824. "yo": "哟唷",
  17825. "yong": "拥佣臃痈庸雍踊蛹咏泳涌永恿勇用俑壅墉慵邕镛甬鳙饔",
  17826. "you": "幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼卣攸侑莸呦囿宥柚猷牖铕疣蝣鱿黝鼬",
  17827. "yu": "迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉浴寓裕预豫驭禺毓伛俣谀谕萸蓣揄喁圄圉嵛狳饫庾阈妪妤纡瑜昱觎腴欤於煜燠聿钰鹆瘐瘀窳蝓竽舁雩龉",
  17828. "yuan": "鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院塬沅媛瑗橼爰眢鸢螈鼋",
  17829. "yue": "曰约越跃钥岳粤月悦阅龠樾刖钺",
  17830. "yun": "耘云郧匀陨允运蕴酝晕韵孕郓芸狁恽纭殒昀氲",
  17831. "za": "匝砸杂拶咂",
  17832. "zai": "栽哉灾宰载再在咱崽甾",
  17833. "zan": "攒暂赞瓒昝簪糌趱錾",
  17834. "zang": "赃脏葬奘戕臧",
  17835. "zao": "遭糟凿藻枣早澡蚤躁噪造皂灶燥唣缫",
  17836. "ze": "责择则泽仄赜啧迮昃笮箦舴",
  17837. "zei": "贼",
  17838. "zen": "怎谮",
  17839. "zeng": "增憎曾赠缯甑罾锃",
  17840. "zha": "扎喳渣札轧铡闸眨栅榨咋乍炸诈揸吒咤哳怍砟痄蚱齄",
  17841. "zhai": "摘斋宅窄债寨砦",
  17842. "zhan": "瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽谵搌旃",
  17843. "zhang": "樟章彰漳张掌涨杖丈帐账仗胀瘴障仉鄣幛嶂獐嫜璋蟑",
  17844. "zhao": "招昭找沼赵照罩兆肇召爪诏棹钊笊",
  17845. "zhe": "遮折哲蛰辙者锗蔗这浙谪陬柘辄磔鹧褚蜇赭",
  17846. "zhen": "珍斟真甄砧臻贞针侦枕疹诊震振镇阵缜桢榛轸赈胗朕祯畛鸩",
  17847. "zheng": "蒸挣睁征狰争怔整拯正政帧症郑证诤峥钲铮筝",
  17848. "zhi": "芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒卮陟郅埴芷摭帙忮彘咫骘栉枳栀桎轵轾攴贽膣祉祗黹雉鸷痣蛭絷酯跖踬踯豸觯",
  17849. "zhong": "中盅忠钟衷终种肿重仲众冢锺螽舂舯踵",
  17850. "zhou": "舟周州洲诌粥轴肘帚咒皱宙昼骤啄着倜诹荮鬻纣胄碡籀舳酎鲷",
  17851. "zhu": "珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑住注祝驻伫侏邾苎茱洙渚潴驺杼槠橥炷铢疰瘃蚰竺箸翥躅麈",
  17852. "zhua": "抓",
  17853. "zhuai": "拽",
  17854. "zhuan": "专砖转撰赚篆抟啭颛",
  17855. "zhuang": "桩庄装妆撞壮状丬",
  17856. "zhui": "椎锥追赘坠缀萑骓缒",
  17857. "zhun": "谆准",
  17858. "zhuo": "捉拙卓桌琢茁酌灼浊倬诼廴蕞擢啜浞涿杓焯禚斫",
  17859. "zi": "兹咨资姿滋淄孜紫仔籽滓子自渍字谘嵫姊孳缁梓辎赀恣眦锱秭耔笫粢觜訾鲻髭",
  17860. "zong": "鬃棕踪宗综总纵腙粽",
  17861. "zou": "邹走奏揍鄹鲰",
  17862. "zu": "租足卒族祖诅阻组俎菹啐徂驵蹴",
  17863. "zuan": "钻纂攥缵",
  17864. "zui": "嘴醉最罪",
  17865. "zun": "尊遵撙樽鳟",
  17866. "zuo": "昨左佐柞做作坐座阝阼胙祚酢",
  17867. "cou": "薮楱辏腠",
  17868. "nang": "攮哝囔馕曩",
  17869. "o": "喔",
  17870. "dia": "嗲",
  17871. "chuai": "嘬膪踹",
  17872. "cen": "岑涔",
  17873. "diu": "铥",
  17874. "nou": "耨",
  17875. "fou": "缶",
  17876. "bia": "髟"
  17877. };
  17878. const _ToPinyin = class _ToPinyin {
  17879. constructor() {
  17880. }
  17881. static getInstance() {
  17882. if (!this.instance) {
  17883. this.instance = new _ToPinyin();
  17884. }
  17885. return this.instance;
  17886. }
  17887. // 转首字母 this.chineseToInitials(this.chineseToPinYin('你好')) this.chineseToInitials('NiHao')
  17888. chineseToInitials(word) {
  17889. let SX = "";
  17890. for (var i = 0; i < word.length; i++) {
  17891. var c = word.charAt(i);
  17892. if (/^[A-Z]+$/.test(c)) {
  17893. SX += c;
  17894. }
  17895. }
  17896. return SX;
  17897. }
  17898. // 转拼音
  17899. chineseToPinYin(l1) {
  17900. var l2 = l1.length;
  17901. var I1 = "";
  17902. var reg = new RegExp("[a-zA-Z0-9]");
  17903. for (var i = 0; i < l2; i++) {
  17904. var val = l1.substr(i, 1);
  17905. var name = this.arraySearch(val, pinyin);
  17906. if (reg.test(val)) {
  17907. I1 += val.toLocaleUpperCase();
  17908. } else if (name !== false) {
  17909. I1 += name;
  17910. }
  17911. }
  17912. I1 = I1.replace(/ /g, "-");
  17913. while (I1.indexOf("--") > 0) {
  17914. I1 = I1.replace("--", "-");
  17915. }
  17916. return I1;
  17917. }
  17918. arraySearch(l1, l2) {
  17919. for (var name in pinyin) {
  17920. if (pinyin[name].indexOf(l1) !== -1) {
  17921. return this.ucfirst(name);
  17922. }
  17923. }
  17924. return false;
  17925. }
  17926. ucfirst(l1) {
  17927. if (l1.length > 0) {
  17928. var first = l1.substr(0, 1).toUpperCase();
  17929. var spare = l1.substr(1, l1.length);
  17930. return first + spare;
  17931. }
  17932. }
  17933. };
  17934. __publicField(_ToPinyin, "instance");
  17935. let ToPinyin = _ToPinyin;
  17936. const toPinyin = ToPinyin.getInstance();
  17937. const _sfc_main$13 = {
  17938. __name: "BookInfo",
  17939. props: {
  17940. bookList: {
  17941. type: Array,
  17942. default: () => []
  17943. },
  17944. detail: {
  17945. type: Object,
  17946. default: () => ({})
  17947. },
  17948. isShow: {
  17949. type: Boolean,
  17950. default: true
  17951. }
  17952. },
  17953. emits: ["get-all-firstLetter"],
  17954. setup(__props, { expose: __expose, emit: __emit }) {
  17955. __expose();
  17956. const props2 = __props;
  17957. const emit2 = __emit;
  17958. const auditNum = vue.computed(() => {
  17959. return props2.bookList.reduce((total, item) => {
  17960. var _a;
  17961. let num = ((_a = item.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts != 0).length) || 0;
  17962. return total + num;
  17963. }, 0);
  17964. });
  17965. function handleBookClick(book) {
  17966. if (props2.detail.status >= 10) {
  17967. uni.$u.ttsModule.speak("订单已审核完成");
  17968. return;
  17969. }
  17970. uni.navigateTo({
  17971. url: `/pages/index/detail/book-audit?isbn=${book.isbn}&orderId=${props2.detail.orderId}`
  17972. });
  17973. uni.setStorageSync("auditBook", book);
  17974. }
  17975. function getAuditCateNum(cate) {
  17976. let auditList = [];
  17977. props2.bookList.forEach((v) => {
  17978. auditList.push(...v.auditCommentList || []);
  17979. });
  17980. return auditList.filter((v) => v.sts == cate).length;
  17981. }
  17982. const formatBookList = (list) => {
  17983. const poorBooks = { title: "极差", list: [], backgroundColor: "#de868f", id: "poor" };
  17984. const goodBooks = { title: "良好", list: [], backgroundColor: "#81b337", id: "good" };
  17985. const otherBooks = [];
  17986. const allFirstLetter = [];
  17987. const handleBookCategorization = (book) => {
  17988. let firstLetter;
  17989. let firstChineseChar = null;
  17990. for (let i = 0; i < book.bookName.length; i++) {
  17991. const char = book.bookName.charAt(i);
  17992. if (/^[\u4E00-\u9FA5]$/.test(char)) {
  17993. firstChineseChar = char;
  17994. break;
  17995. }
  17996. }
  17997. if (firstChineseChar) {
  17998. firstLetter = toPinyin.chineseToInitials(toPinyin.chineseToPinYin(firstChineseChar));
  17999. } else {
  18000. const char = book.bookName.charAt(0);
  18001. if (/^[A-Za-z]$/.test(char)) {
  18002. firstLetter = char.toUpperCase();
  18003. } else {
  18004. firstLetter = char;
  18005. }
  18006. }
  18007. let bool = otherBooks.some((item) => item.title == firstLetter);
  18008. if (!bool) {
  18009. otherBooks.push({ id: firstLetter, title: firstLetter, list: [{ ...book }] });
  18010. allFirstLetter.push(firstLetter);
  18011. emit2("get-all-firstLetter", allFirstLetter);
  18012. } else {
  18013. otherBooks.find((item) => item.title == firstLetter).list.push(book);
  18014. }
  18015. };
  18016. list.forEach((book) => {
  18017. var _a, _b, _c;
  18018. book.goodNum = ((_a = book.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 1).length) || 0;
  18019. book.badNum = ((_b = book.auditCommentList) == null ? void 0 : _b.filter((v) => v.sts == 3).length) || 0;
  18020. const totalAudited = ((_c = book.auditCommentList) == null ? void 0 : _c.filter((v) => v.sts !== 0).length) || 0;
  18021. const isFullyAudited = totalAudited === book.num;
  18022. if (isFullyAudited) {
  18023. if (book.auditCommentList.some((v) => v.sts === 3)) {
  18024. poorBooks.list.push(book);
  18025. } else if (book.auditCommentList.every((v) => v.sts === 1)) {
  18026. goodBooks.list.push(book);
  18027. } else {
  18028. handleBookCategorization(book);
  18029. }
  18030. } else {
  18031. handleBookCategorization(book);
  18032. }
  18033. });
  18034. return { poorBooks, goodBooks, otherBooks };
  18035. };
  18036. const formatList = vue.ref([]);
  18037. vue.watch(
  18038. () => props2.bookList,
  18039. (newVal) => {
  18040. let { poorBooks, goodBooks, otherBooks } = formatBookList(newVal);
  18041. otherBooks.sort((a, b) => a.id.localeCompare(b.id));
  18042. let poor = poorBooks.list.length > 0 ? poorBooks : {};
  18043. let good = goodBooks.list.length > 0 ? goodBooks : {};
  18044. formatList.value = [...otherBooks, poor, good];
  18045. },
  18046. { immediate: true, deep: true }
  18047. );
  18048. 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() {
  18049. return toPinyin;
  18050. } };
  18051. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18052. return __returned__;
  18053. }
  18054. };
  18055. function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
  18056. return vue.openBlock(), vue.createElementBlock("view", { class: "book-info" }, [
  18057. $props.isShow ? (vue.openBlock(), vue.createElementBlock(
  18058. vue.Fragment,
  18059. { key: 0 },
  18060. [
  18061. vue.createElementVNode(
  18062. "view",
  18063. {
  18064. class: "font-bold mt-12 mb-10",
  18065. style: { "padding": "0 20rpx" }
  18066. },
  18067. vue.toDisplayString($props.bookList.length) + "条记录,共" + vue.toDisplayString($props.detail.totalNum) + "本,已审" + vue.toDisplayString($setup.auditNum || 0) + "本 ",
  18068. 1
  18069. /* TEXT */
  18070. ),
  18071. vue.createElementVNode(
  18072. "view",
  18073. {
  18074. class: "font-light",
  18075. style: { "padding": "0 20rpx" }
  18076. },
  18077. " 其中已审:良好" + vue.toDisplayString($setup.getAuditCateNum(1)) + "本,一般0本,极差" + vue.toDisplayString($setup.getAuditCateNum(3)) + "本 ",
  18078. 1
  18079. /* TEXT */
  18080. )
  18081. ],
  18082. 64
  18083. /* STABLE_FRAGMENT */
  18084. )) : vue.createCommentVNode("v-if", true),
  18085. (vue.openBlock(true), vue.createElementBlock(
  18086. vue.Fragment,
  18087. null,
  18088. vue.renderList($setup.formatList, (item) => {
  18089. return vue.withDirectives((vue.openBlock(), vue.createElementBlock("view", {
  18090. class: "book-info-item bg-white mt-12",
  18091. style: vue.normalizeStyle({ backgroundColor: item.backgroundColor }),
  18092. key: item.title,
  18093. id: item.id
  18094. }, [
  18095. vue.createElementVNode(
  18096. "view",
  18097. { class: "book-info-item-title" },
  18098. vue.toDisplayString(item.title),
  18099. 1
  18100. /* TEXT */
  18101. ),
  18102. vue.createElementVNode("view", { class: "book-info-item-list" }, [
  18103. (vue.openBlock(true), vue.createElementBlock(
  18104. vue.Fragment,
  18105. null,
  18106. vue.renderList(item.list, (book) => {
  18107. return vue.openBlock(), vue.createBlock($setup["BookItem"], {
  18108. key: book.bookId,
  18109. item: book,
  18110. onClick: ($event) => $setup.handleBookClick(book)
  18111. }, null, 8, ["item", "onClick"]);
  18112. }),
  18113. 128
  18114. /* KEYED_FRAGMENT */
  18115. ))
  18116. ])
  18117. ], 12, ["id"])), [
  18118. [vue.vShow, item == null ? void 0 : item.title]
  18119. ]);
  18120. }),
  18121. 128
  18122. /* KEYED_FRAGMENT */
  18123. ))
  18124. ]);
  18125. }
  18126. const BookInfo = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$12], ["__scopeId", "data-v-8c7d14f9"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/BookInfo.vue"]]);
  18127. const props$8 = {
  18128. props: {
  18129. // 图片地址
  18130. src: {
  18131. type: String,
  18132. default: props$E.image.src
  18133. },
  18134. // 裁剪模式
  18135. mode: {
  18136. type: String,
  18137. default: props$E.image.mode
  18138. },
  18139. // 宽度,单位任意
  18140. width: {
  18141. type: [String, Number],
  18142. default: props$E.image.width
  18143. },
  18144. // 高度,单位任意
  18145. height: {
  18146. type: [String, Number],
  18147. default: props$E.image.height
  18148. },
  18149. // 图片形状,circle-圆形,square-方形
  18150. shape: {
  18151. type: String,
  18152. default: props$E.image.shape
  18153. },
  18154. // 圆角,单位任意
  18155. radius: {
  18156. type: [String, Number],
  18157. default: props$E.image.radius
  18158. },
  18159. // 是否懒加载,微信小程序、App、百度小程序、字节跳动小程序
  18160. lazyLoad: {
  18161. type: Boolean,
  18162. default: props$E.image.lazyLoad
  18163. },
  18164. // 开启长按图片显示识别微信小程序码菜单
  18165. showMenuByLongpress: {
  18166. type: Boolean,
  18167. default: props$E.image.showMenuByLongpress
  18168. },
  18169. // 加载中的图标,或者小图片
  18170. loadingIcon: {
  18171. type: String,
  18172. default: props$E.image.loadingIcon
  18173. },
  18174. // 加载失败的图标,或者小图片
  18175. errorIcon: {
  18176. type: String,
  18177. default: props$E.image.errorIcon
  18178. },
  18179. // 是否显示加载中的图标或者自定义的slot
  18180. showLoading: {
  18181. type: Boolean,
  18182. default: props$E.image.showLoading
  18183. },
  18184. // 是否显示加载错误的图标或者自定义的slot
  18185. showError: {
  18186. type: Boolean,
  18187. default: props$E.image.showError
  18188. },
  18189. // 是否需要淡入效果
  18190. fade: {
  18191. type: Boolean,
  18192. default: props$E.image.fade
  18193. },
  18194. // 只支持网络资源,只对微信小程序有效
  18195. webp: {
  18196. type: Boolean,
  18197. default: props$E.image.webp
  18198. },
  18199. // 过渡时间,单位ms
  18200. duration: {
  18201. type: [String, Number],
  18202. default: props$E.image.duration
  18203. },
  18204. // 背景颜色,用于深色页面加载图片时,为了和背景色融合
  18205. bgColor: {
  18206. type: String,
  18207. default: props$E.image.bgColor
  18208. }
  18209. }
  18210. };
  18211. const _sfc_main$12 = {
  18212. name: "u-image",
  18213. mixins: [mpMixin, mixin, props$8],
  18214. data() {
  18215. return {
  18216. // 图片是否加载错误,如果是,则显示错误占位图
  18217. isError: false,
  18218. // 初始化组件时,默认为加载中状态
  18219. loading: true,
  18220. // 不透明度,为了实现淡入淡出的效果
  18221. opacity: 1,
  18222. // 过渡时间,因为props的值无法修改,故需要一个中间值
  18223. durationTime: this.duration,
  18224. // 图片加载完成时,去掉背景颜色,因为如果是png图片,就会显示灰色的背景
  18225. backgroundStyle: {},
  18226. // 用于fade模式的控制组件显示与否
  18227. show: false
  18228. };
  18229. },
  18230. watch: {
  18231. src: {
  18232. immediate: true,
  18233. handler(n) {
  18234. if (!n) {
  18235. this.isError = true;
  18236. } else {
  18237. this.isError = false;
  18238. this.loading = true;
  18239. }
  18240. }
  18241. }
  18242. },
  18243. computed: {
  18244. wrapStyle() {
  18245. let style = {};
  18246. style.width = this.$u.addUnit(this.width);
  18247. style.height = this.$u.addUnit(this.height);
  18248. style.borderRadius = this.shape == "circle" ? "10000px" : uni.$u.addUnit(this.radius);
  18249. style.overflow = this.radius > 0 ? "hidden" : "visible";
  18250. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  18251. }
  18252. },
  18253. mounted() {
  18254. this.show = true;
  18255. },
  18256. emits: ["click", "error", "load"],
  18257. methods: {
  18258. // 点击图片
  18259. onClick() {
  18260. this.$emit("click");
  18261. },
  18262. // 图片加载失败
  18263. onErrorHandler(err) {
  18264. this.loading = false;
  18265. this.isError = true;
  18266. this.$emit("error", err);
  18267. },
  18268. // 图片加载完成,标记loading结束
  18269. onLoadHandler(event) {
  18270. this.loading = false;
  18271. this.isError = false;
  18272. this.$emit("load", event);
  18273. this.removeBgColor();
  18274. },
  18275. // 移除图片的背景色
  18276. removeBgColor() {
  18277. this.backgroundStyle = {
  18278. backgroundColor: "transparent"
  18279. };
  18280. }
  18281. }
  18282. };
  18283. function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
  18284. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  18285. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
  18286. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  18287. mode: "fade",
  18288. show: $data.show,
  18289. duration: _ctx.fade ? 1e3 : 0
  18290. }, {
  18291. default: vue.withCtx(() => [
  18292. vue.createElementVNode(
  18293. "view",
  18294. {
  18295. class: "u-image",
  18296. onClick: _cache[2] || (_cache[2] = (...args) => $options.onClick && $options.onClick(...args)),
  18297. style: vue.normalizeStyle([$options.wrapStyle, $data.backgroundStyle])
  18298. },
  18299. [
  18300. !$data.isError ? (vue.openBlock(), vue.createElementBlock("image", {
  18301. key: 0,
  18302. src: _ctx.src,
  18303. mode: _ctx.mode,
  18304. onError: _cache[0] || (_cache[0] = (...args) => $options.onErrorHandler && $options.onErrorHandler(...args)),
  18305. onLoad: _cache[1] || (_cache[1] = (...args) => $options.onLoadHandler && $options.onLoadHandler(...args)),
  18306. "show-menu-by-longpress": _ctx.showMenuByLongpress,
  18307. "lazy-load": _ctx.lazyLoad,
  18308. class: "u-image__image",
  18309. style: vue.normalizeStyle({
  18310. borderRadius: _ctx.shape == "circle" ? "10000px" : _ctx.$u.addUnit(_ctx.radius),
  18311. width: _ctx.$u.addUnit(_ctx.width),
  18312. height: _ctx.$u.addUnit(_ctx.height)
  18313. })
  18314. }, null, 44, ["src", "mode", "show-menu-by-longpress", "lazy-load"])) : vue.createCommentVNode("v-if", true),
  18315. _ctx.showLoading && $data.loading ? (vue.openBlock(), vue.createElementBlock(
  18316. "view",
  18317. {
  18318. key: 1,
  18319. class: "u-image__loading",
  18320. style: vue.normalizeStyle({
  18321. borderRadius: _ctx.shape == "circle" ? "50%" : _ctx.$u.addUnit(_ctx.radius),
  18322. backgroundColor: this.bgColor,
  18323. width: _ctx.$u.addUnit(_ctx.width),
  18324. height: _ctx.$u.addUnit(_ctx.height)
  18325. })
  18326. },
  18327. [
  18328. vue.renderSlot(_ctx.$slots, "loading", {}, () => [
  18329. vue.createVNode(_component_u_icon, {
  18330. name: _ctx.loadingIcon,
  18331. width: _ctx.width,
  18332. height: _ctx.height
  18333. }, null, 8, ["name", "width", "height"])
  18334. ], true)
  18335. ],
  18336. 4
  18337. /* STYLE */
  18338. )) : vue.createCommentVNode("v-if", true),
  18339. _ctx.showError && $data.isError && !$data.loading ? (vue.openBlock(), vue.createElementBlock(
  18340. "view",
  18341. {
  18342. key: 2,
  18343. class: "u-image__error",
  18344. style: vue.normalizeStyle({
  18345. borderRadius: _ctx.shape == "circle" ? "50%" : _ctx.$u.addUnit(_ctx.radius),
  18346. width: _ctx.$u.addUnit(_ctx.width),
  18347. height: _ctx.$u.addUnit(_ctx.height)
  18348. })
  18349. },
  18350. [
  18351. vue.renderSlot(_ctx.$slots, "error", {}, () => [
  18352. vue.createVNode(_component_u_icon, {
  18353. name: _ctx.errorIcon,
  18354. width: _ctx.width,
  18355. height: _ctx.height
  18356. }, null, 8, ["name", "width", "height"])
  18357. ], true)
  18358. ],
  18359. 4
  18360. /* STYLE */
  18361. )) : vue.createCommentVNode("v-if", true)
  18362. ],
  18363. 4
  18364. /* STYLE */
  18365. )
  18366. ]),
  18367. _: 3
  18368. /* FORWARDED */
  18369. }, 8, ["show", "duration"]);
  18370. }
  18371. const __easycom_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$11], ["__scopeId", "data-v-abebd402"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-image/u-image.vue"]]);
  18372. const _sfc_main$11 = {
  18373. __name: "FileInfo",
  18374. props: {
  18375. orderId: {
  18376. type: String,
  18377. default: ""
  18378. },
  18379. annexType: {
  18380. type: Number,
  18381. default: 1
  18382. },
  18383. isbn: {
  18384. type: String,
  18385. default: ""
  18386. }
  18387. },
  18388. setup(__props, { expose: __expose }) {
  18389. __expose();
  18390. const form = vue.ref({
  18391. imgInfo: [],
  18392. remark: ""
  18393. });
  18394. const props2 = __props;
  18395. const fileList = vue.ref([]);
  18396. function getFileList() {
  18397. uni.$u.http.get("/app/orderinfo/getOrderAnnexList", {
  18398. params: {
  18399. orderId: props2.orderId,
  18400. annexType: props2.annexType,
  18401. isbn: props2.isbn
  18402. }
  18403. }).then((res2) => {
  18404. if (res2.code == 200) {
  18405. fileList.value = res2.data;
  18406. }
  18407. });
  18408. }
  18409. getFileList();
  18410. const handleUpload = () => {
  18411. formatAppLog("log", "at pages/index/detail/components/FileInfo.vue:73", form.value);
  18412. let data = {
  18413. orderId: props2.orderId,
  18414. annexType: props2.annexType,
  18415. isbn: props2.isbn,
  18416. ...form.value
  18417. };
  18418. uni.$u.http.post("/app/orderinfo/setOrderAnnex", data).then((res2) => {
  18419. if (res2.code == 200) {
  18420. uni.$u.toast("上传成功");
  18421. form.value.imgInfo = [];
  18422. form.value.remark = "";
  18423. getFileList();
  18424. } else {
  18425. uni.$u.toast(res2.msg);
  18426. }
  18427. });
  18428. };
  18429. const __returned__ = { form, props: props2, fileList, getFileList, handleUpload, ref: vue.ref, cyUpload };
  18430. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18431. return __returned__;
  18432. }
  18433. };
  18434. function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
  18435. var _a;
  18436. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$2);
  18437. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  18438. const _component_u_image = resolveEasycom(vue.resolveDynamicComponent("u-image"), __easycom_2$1);
  18439. return vue.openBlock(), vue.createElementBlock("view", { class: "file-info bg-white" }, [
  18440. vue.createElementVNode("view", { class: "file-info-container" }, [
  18441. vue.createVNode($setup["cyUpload"], {
  18442. filename: $setup.form.imgInfo,
  18443. "onUpdate:filename": _cache[0] || (_cache[0] = ($event) => $setup.form.imgInfo = $event),
  18444. limit: 3
  18445. }, null, 8, ["filename"]),
  18446. vue.createVNode(_component_u_textarea, {
  18447. modelValue: $setup.form.remark,
  18448. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.remark = $event),
  18449. placeholder: "上传说明...",
  18450. autoHeight: "",
  18451. style: { "min-height": "60px" }
  18452. }, null, 8, ["modelValue"]),
  18453. vue.createElementVNode("view", { class: "flex flex-a-c flex-j-c" }, [
  18454. vue.createVNode(_component_u_button, {
  18455. class: "mt-24",
  18456. type: "primary",
  18457. onClick: $setup.handleUpload
  18458. }, {
  18459. default: vue.withCtx(() => [
  18460. vue.createTextVNode("上传(最多上传3张)")
  18461. ]),
  18462. _: 1
  18463. /* STABLE */
  18464. })
  18465. ])
  18466. ]),
  18467. vue.createElementVNode("view", { class: "file-info-list" }, [
  18468. vue.createElementVNode("view", { class: "file-info-list-title text-center" }, "已上传记录"),
  18469. !((_a = $setup.fileList) == null ? void 0 : _a.length) ? (vue.openBlock(), vue.createElementBlock("view", {
  18470. key: 0,
  18471. class: "file-info-list-content mt-24 mb-24 text-center"
  18472. }, "还没有上传记录")) : (vue.openBlock(true), vue.createElementBlock(
  18473. vue.Fragment,
  18474. { key: 1 },
  18475. vue.renderList($setup.fileList, (item) => {
  18476. return vue.openBlock(), vue.createElementBlock("view", {
  18477. class: "file-info-item",
  18478. key: item.id
  18479. }, [
  18480. vue.createElementVNode("view", { class: "file-info-item-img flex flex-a-c" }, [
  18481. (vue.openBlock(true), vue.createElementBlock(
  18482. vue.Fragment,
  18483. null,
  18484. vue.renderList(item.imgInfo, (img) => {
  18485. return vue.openBlock(), vue.createBlock(_component_u_image, {
  18486. src: img,
  18487. width: "90",
  18488. height: "90",
  18489. style: { "margin-right": "10px" }
  18490. }, null, 8, ["src"]);
  18491. }),
  18492. 256
  18493. /* UNKEYED_FRAGMENT */
  18494. ))
  18495. ]),
  18496. vue.createElementVNode("view", { class: "file-info-item-info mt-10 font-14" }, [
  18497. vue.createElementVNode(
  18498. "view",
  18499. { class: "file-info-item-info-name" },
  18500. "上传说明:" + vue.toDisplayString(item.remark),
  18501. 1
  18502. /* TEXT */
  18503. ),
  18504. vue.createElementVNode("view", { class: "file-info-item-info-name mt-10" }, [
  18505. vue.createElementVNode(
  18506. "text",
  18507. null,
  18508. vue.toDisplayString(item.createTime),
  18509. 1
  18510. /* TEXT */
  18511. ),
  18512. vue.createElementVNode(
  18513. "text",
  18514. { class: "ml-20" },
  18515. vue.toDisplayString(item.createName),
  18516. 1
  18517. /* TEXT */
  18518. )
  18519. ])
  18520. ])
  18521. ]);
  18522. }),
  18523. 128
  18524. /* KEYED_FRAGMENT */
  18525. ))
  18526. ])
  18527. ]);
  18528. }
  18529. const FileInfo = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$10], ["__scopeId", "data-v-b4cf7c83"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/FileInfo.vue"]]);
  18530. const _sfc_main$10 = {
  18531. __name: "index",
  18532. setup(__props, { expose: __expose }) {
  18533. __expose();
  18534. const showAuditorSelector = vue.ref(false);
  18535. const selectedAuditor = vue.ref({});
  18536. const handleAuditorSelected = (auditor) => {
  18537. selectedAuditor.value = auditor;
  18538. orderDetail.value.auditUserId = auditor.userId;
  18539. orderDetail.value.auditUserName = auditor.userName;
  18540. uni.setStorageSync("checkUserInfo", {
  18541. userName: auditor.userName,
  18542. userId: auditor.userId
  18543. });
  18544. };
  18545. function playGlobalSound() {
  18546. uni.$u.playClickSound();
  18547. }
  18548. const toView = vue.ref("");
  18549. function scrollToView(to) {
  18550. toView.value = to;
  18551. uni.pageScrollTo({
  18552. selector: "#" + to,
  18553. duration: 200
  18554. });
  18555. }
  18556. function scrollToTop() {
  18557. uni.pageScrollTo({
  18558. top: 0,
  18559. duration: 200
  18560. });
  18561. }
  18562. function handleBindCode() {
  18563. uni.$u.toast("暂无开发");
  18564. }
  18565. const list = vue.ref(["图书清单", "物流信息", "上传附件"]);
  18566. const current = vue.ref(0);
  18567. const handleSectionChange = (index2) => {
  18568. current.value = index2;
  18569. };
  18570. const allLetters = vue.ref([]);
  18571. function onGetAllFirstLetter(data) {
  18572. allLetters.value = data;
  18573. }
  18574. function handleLogisticsConfirm() {
  18575. uni.showModal({
  18576. title: "提示",
  18577. content: "是否确认物流签收?",
  18578. success: (res2) => {
  18579. if (res2.confirm) {
  18580. uni.showLoading({ title: "加载中...", mask: true });
  18581. uni.$u.http.post("/app/orderinfo/signLogistics", {
  18582. searchType: 1,
  18583. search: orderDetail.value.orderId
  18584. }).then((res3) => {
  18585. if (res3.code == 200) {
  18586. uni.showToast({ title: "签收成功", icon: "none" });
  18587. uni.$u.ttsModule.speak("签收成功");
  18588. uni.navigateBack();
  18589. }
  18590. }).finally(() => {
  18591. uni.hideLoading();
  18592. });
  18593. }
  18594. }
  18595. });
  18596. }
  18597. function handleConfirm() {
  18598. uni.showLoading({ title: "加载中...", mask: true });
  18599. uni.$u.http.post("/app/orderinfo/confirmOrder", {
  18600. searchType: 1,
  18601. search: orderDetail.value.orderId
  18602. }).then((res2) => {
  18603. if (res2.code == 200) {
  18604. uni.showToast({ title: "确认收货成功", icon: "none" });
  18605. uni.$u.ttsModule.speak("确认收货成功");
  18606. getOrderDetail();
  18607. }
  18608. }).finally(() => {
  18609. uni.hideLoading();
  18610. });
  18611. }
  18612. function handleComplete() {
  18613. let bookList = orderDetail.value.detailVoList;
  18614. let bool = bookList.some((item) => {
  18615. var _a;
  18616. return ((_a = item.auditCommentList) == null ? void 0 : _a.length) < item.num;
  18617. });
  18618. if (bool) {
  18619. let text = "还有未审核的书";
  18620. uni.$u.toast(text);
  18621. uni.$u.ttsModule.speak(text);
  18622. return;
  18623. } else {
  18624. uni.$u.http.post("/app/orderinfo/checkOrderFinish", {
  18625. checkUserId: orderDetail.value.auditUserId,
  18626. orderId: orderDetail.value.orderId
  18627. }).then((res2) => {
  18628. if (res2.code == 200) {
  18629. uni.showToast({ title: "审核完成", icon: "none" });
  18630. uni.$u.ttsModule.speak("审核完成");
  18631. uni.navigateBack();
  18632. }
  18633. });
  18634. }
  18635. }
  18636. const orderDetail = vue.ref({ status: 0 });
  18637. function getOrderDetail() {
  18638. if (!orderId.value)
  18639. return;
  18640. uni.showLoading({
  18641. title: "加载中...",
  18642. mask: true
  18643. });
  18644. uni.$u.http.get("/app/orderinfo/getOrderInfoForCheck", {
  18645. params: {
  18646. searchType: 1,
  18647. search: orderId.value
  18648. }
  18649. }).then((res2) => {
  18650. if (res2.code == 200) {
  18651. orderDetail.value = res2.data;
  18652. getCheckUserInfo();
  18653. if (res2.data.auditUserId) {
  18654. let auditUserInfo = {
  18655. userName: res2.data.auditUserName,
  18656. userId: res2.data.auditUserId
  18657. };
  18658. uni.setStorageSync("checkUserInfo", auditUserInfo);
  18659. } else {
  18660. let userInfo = uni.getStorageSync("checkUserInfo");
  18661. orderDetail.value.auditUserName = userInfo.userName;
  18662. orderDetail.value.auditUserId = userInfo.userId;
  18663. }
  18664. if (isOnLoad.value) {
  18665. if (res2.data.manageRemark.length > 0 && res2.data.status < 10) {
  18666. uni.$u.ttsModule.speak("此订单有备注信息,请注意查看");
  18667. }
  18668. if (res2.data.warnArea && res2.data.warnArea.length > 0) {
  18669. let text = `此订单来源于${res2.data.warnArea}`;
  18670. uni.$u.ttsModule.speak(text);
  18671. }
  18672. isOnLoad.value = false;
  18673. }
  18674. } else {
  18675. uni.$u.toast(res2.msg);
  18676. }
  18677. }).finally(() => {
  18678. uni.hideLoading();
  18679. });
  18680. }
  18681. function getCheckUserInfo() {
  18682. uni.$u.http.get("/app/orderinfo/getCheckUser").then((res2) => {
  18683. if (res2.code == 200) {
  18684. let userInfo = res2.data;
  18685. orderDetail.value.auditUserName = userInfo.userName;
  18686. orderDetail.value.auditUserId = userInfo.userId;
  18687. uni.setStorageSync("checkUserInfo", {
  18688. userName: userInfo.userName,
  18689. userId: userInfo.userId
  18690. });
  18691. }
  18692. });
  18693. }
  18694. function checkIsbn(isbn) {
  18695. const isbn13Regex = /^(?:97[89]-?\d{1,5}-?\d{1,7}-?\d{1,6}-?\d)$/;
  18696. if (isbn13Regex.test(isbn)) {
  18697. return true;
  18698. }
  18699. return false;
  18700. }
  18701. function handleScan(isbn) {
  18702. if (!checkIsbn(isbn)) {
  18703. let text = `不是正确的ISBN码`;
  18704. uni.$u.ttsModule.speak(text);
  18705. return;
  18706. }
  18707. if (orderDetail.value.status >= 10) {
  18708. uni.$u.ttsModule.speak("订单已审核完成");
  18709. return;
  18710. }
  18711. let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
  18712. if (isbns.includes(isbn)) {
  18713. let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
  18714. if (book.suit == 1) {
  18715. let text = `${isbn}请注意套装书是否齐全`;
  18716. uni.$u.ttsModule.speak(text);
  18717. }
  18718. if (book.bookWarn == 1) {
  18719. let text = `请注意${isbn}需要取出`;
  18720. uni.$u.ttsModule.speak(text);
  18721. }
  18722. uni.navigateTo({
  18723. url: `/pages/index/detail/book-audit?isbn=${isbn}&orderId=${orderDetail.value.orderId}`
  18724. });
  18725. uni.setStorageSync("auditBook", book);
  18726. uni.setStorageSync("orderDetail", orderDetail.value);
  18727. } else {
  18728. let text = `此订单中不存在${isbn}这本书 `;
  18729. uni.$u.ttsModule.speak(text);
  18730. }
  18731. }
  18732. function handleScanCode() {
  18733. uni.scanCode({
  18734. success: (res2) => {
  18735. res2.result && handleScan(res2.result);
  18736. }
  18737. });
  18738. }
  18739. const orderId = vue.ref("");
  18740. const isOnLoad = vue.ref(false);
  18741. const type2 = vue.ref(1);
  18742. onLoad((option) => {
  18743. orderId.value = option.id;
  18744. getOrderDetail();
  18745. isOnLoad.value = true;
  18746. type2.value = option.type || 1;
  18747. uni.removeStorageSync("scannedBooks");
  18748. uni.$u.useGlobalEvent((e) => {
  18749. if (e.barcode) {
  18750. handleScan(e.barcode);
  18751. }
  18752. });
  18753. });
  18754. onShow(() => {
  18755. uni.$u.updateActivePageOnShow();
  18756. getOrderDetail();
  18757. });
  18758. 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() {
  18759. return onLoad;
  18760. }, get onShow() {
  18761. return onShow;
  18762. }, AuditorSelector, OrderInfo, UserInfoCard, LogisticsTimeline, BookInfo, FileInfo };
  18763. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18764. return __returned__;
  18765. }
  18766. };
  18767. function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
  18768. var _a;
  18769. const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$5);
  18770. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  18771. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  18772. return vue.openBlock(), vue.createElementBlock(
  18773. "view",
  18774. {
  18775. class: vue.normalizeClass(["order-detail", { "fixed-bottom-2": $setup.type == 2 }]),
  18776. onClick: $setup.playGlobalSound
  18777. },
  18778. [
  18779. vue.createElementVNode("scroll-view", {
  18780. class: "scroller",
  18781. "scroll-into-view": $setup.toView,
  18782. "scroll-y": "true",
  18783. "scroll-with-animation": "true"
  18784. }, [
  18785. vue.createElementVNode("view", { class: "flex flex-a-c flex-j-b bg-white bind-audit mb-16" }, [
  18786. vue.createElementVNode("text", null, "绑定审核员"),
  18787. vue.createElementVNode(
  18788. "text",
  18789. { class: "text-center flex-1" },
  18790. vue.toDisplayString($setup.orderDetail.auditUserName || ((_a = $setup.selectedAuditor) == null ? void 0 : _a.userName) || ""),
  18791. 1
  18792. /* TEXT */
  18793. ),
  18794. vue.createElementVNode("text", {
  18795. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showAuditorSelector = true),
  18796. class: "color-primary"
  18797. }, "绑定")
  18798. ]),
  18799. vue.createVNode($setup["OrderInfo"], {
  18800. detail: $setup.orderDetail,
  18801. onRefresh: $setup.getOrderDetail
  18802. }, null, 8, ["detail"]),
  18803. vue.createVNode($setup["UserInfoCard"], { detail: $setup.orderDetail }, null, 8, ["detail"]),
  18804. vue.createElementVNode("view", {
  18805. class: "mt-16",
  18806. style: { "padding": "0 6rpx" }
  18807. }, [
  18808. vue.createVNode(_component_u_subsection, {
  18809. list: $setup.list,
  18810. mode: "subsection",
  18811. current: $setup.current,
  18812. onChange: $setup.handleSectionChange
  18813. }, null, 8, ["list", "current"]),
  18814. $setup.current == 0 ? (vue.openBlock(), vue.createBlock($setup["BookInfo"], {
  18815. key: 0,
  18816. bookList: $setup.orderDetail.detailVoList,
  18817. detail: $setup.orderDetail,
  18818. onGetAllFirstLetter: $setup.onGetAllFirstLetter
  18819. }, null, 8, ["bookList", "detail"])) : vue.createCommentVNode("v-if", true),
  18820. $setup.current == 1 ? (vue.openBlock(), vue.createBlock($setup["LogisticsTimeline"], {
  18821. key: 1,
  18822. list: $setup.orderDetail.trackingVoList
  18823. }, null, 8, ["list"])) : vue.createCommentVNode("v-if", true),
  18824. $setup.current == 2 ? (vue.openBlock(), vue.createBlock($setup["FileInfo"], {
  18825. key: 2,
  18826. orderId: $setup.orderDetail.orderId
  18827. }, null, 8, ["orderId"])) : vue.createCommentVNode("v-if", true)
  18828. ])
  18829. ], 8, ["scroll-into-view"]),
  18830. vue.createElementVNode("view", { class: "fixed-left" }, [
  18831. vue.createElementVNode("view", {
  18832. class: "bind-code common-bg",
  18833. style: { "margin-bottom": "30px", "padding": "20rpx" },
  18834. onClick: $setup.handleBindCode
  18835. }, "绑码 "),
  18836. vue.createElementVNode("view", { class: "common-bg flex flex-a-c flex-j-c flex-d" }, [
  18837. vue.createElementVNode("view", {
  18838. class: "book-status-item",
  18839. onClick: _cache[1] || (_cache[1] = ($event) => $setup.scrollToView("good"))
  18840. }, "良好"),
  18841. vue.createElementVNode("view", {
  18842. class: "book-status-item item-center",
  18843. onClick: _cache[2] || (_cache[2] = ($event) => $setup.scrollToView("average"))
  18844. }, "一般"),
  18845. vue.createElementVNode("view", {
  18846. class: "book-status-item",
  18847. onClick: _cache[3] || (_cache[3] = ($event) => $setup.scrollToView("poor"))
  18848. }, "极差")
  18849. ])
  18850. ]),
  18851. vue.createElementVNode("view", { class: "fixed-right" }, [
  18852. vue.createElementVNode("view", { class: "letter-bg flex flex-a-c flex-j-c flex-d" }, [
  18853. vue.createElementVNode("view", { class: "letter-item" }, [
  18854. vue.createVNode(_component_u_icon, {
  18855. name: "arrow-up-fill",
  18856. size: "20",
  18857. color: "#ffffff",
  18858. onClick: $setup.scrollToTop
  18859. })
  18860. ]),
  18861. (vue.openBlock(true), vue.createElementBlock(
  18862. vue.Fragment,
  18863. null,
  18864. vue.renderList($setup.allLetters, (item) => {
  18865. return vue.openBlock(), vue.createElementBlock("view", {
  18866. class: "letter-item",
  18867. onClick: ($event) => $setup.scrollToView(item)
  18868. }, vue.toDisplayString(item), 9, ["onClick"]);
  18869. }),
  18870. 256
  18871. /* UNKEYED_FRAGMENT */
  18872. ))
  18873. ])
  18874. ]),
  18875. $setup.type != 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  18876. key: 0,
  18877. class: "common-bg fixed-bottom"
  18878. }, [
  18879. $setup.orderDetail.status == 5 ? (vue.openBlock(), vue.createBlock(_component_u_button, {
  18880. key: 0,
  18881. type: "warning",
  18882. size: "large",
  18883. onClick: $setup.handleLogisticsConfirm
  18884. }, {
  18885. default: vue.withCtx(() => [
  18886. vue.createTextVNode("物流签收")
  18887. ]),
  18888. _: 1
  18889. /* STABLE */
  18890. })) : vue.createCommentVNode("v-if", true),
  18891. $setup.orderDetail.status == 6 ? (vue.openBlock(), vue.createBlock(_component_u_button, {
  18892. key: 1,
  18893. type: "primary",
  18894. size: "large",
  18895. onClick: $setup.handleConfirm
  18896. }, {
  18897. default: vue.withCtx(() => [
  18898. vue.createTextVNode("确认收货")
  18899. ]),
  18900. _: 1
  18901. /* STABLE */
  18902. })) : vue.createCommentVNode("v-if", true),
  18903. $setup.orderDetail.status == 8 || $setup.orderDetail.status == 9 || $setup.orderDetail.status == 10 ? (vue.openBlock(), vue.createElementBlock(
  18904. vue.Fragment,
  18905. { key: 2 },
  18906. [
  18907. vue.createVNode(_component_u_button, {
  18908. type: "warning",
  18909. size: "large",
  18910. onClick: $setup.handleScanCode
  18911. }, {
  18912. default: vue.withCtx(() => [
  18913. vue.createTextVNode("扫码")
  18914. ]),
  18915. _: 1
  18916. /* STABLE */
  18917. }),
  18918. vue.createVNode(_component_u_button, {
  18919. type: "primary",
  18920. size: "large",
  18921. onClick: $setup.handleComplete
  18922. }, {
  18923. default: vue.withCtx(() => [
  18924. vue.createTextVNode("完成")
  18925. ]),
  18926. _: 1
  18927. /* STABLE */
  18928. })
  18929. ],
  18930. 64
  18931. /* STABLE_FRAGMENT */
  18932. )) : vue.createCommentVNode("v-if", true)
  18933. ])) : vue.createCommentVNode("v-if", true),
  18934. vue.createVNode($setup["AuditorSelector"], {
  18935. show: $setup.showAuditorSelector,
  18936. "onUpdate:show": _cache[4] || (_cache[4] = ($event) => $setup.showAuditorSelector = $event),
  18937. onAuditorSelected: $setup.handleAuditorSelected
  18938. }, null, 8, ["show"])
  18939. ],
  18940. 2
  18941. /* CLASS */
  18942. );
  18943. }
  18944. const PagesIndexDetailIndex = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$$], ["__scopeId", "data-v-8b10f148"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/index.vue"]]);
  18945. const _sfc_main$$ = {
  18946. __name: "AuditInfo",
  18947. props: {
  18948. detail: {
  18949. type: Object,
  18950. default: () => ({})
  18951. },
  18952. auditList: {
  18953. type: Array,
  18954. default: () => []
  18955. }
  18956. },
  18957. emits: ["selected"],
  18958. setup(__props, { expose: __expose, emit: __emit }) {
  18959. const props2 = __props;
  18960. const auditCommentList = vue.ref([]);
  18961. const initAuditList = (detail) => {
  18962. if (!(detail == null ? void 0 : detail.auditCommentList))
  18963. return;
  18964. auditCommentList.value = detail.auditCommentList.map((item, index2) => ({
  18965. ...item,
  18966. idx: index2,
  18967. isbn: detail.isbn,
  18968. comList: item.com ? typeof item.com === "string" ? item.com.split(",") : item.com : []
  18969. }));
  18970. sortByAuditStatus();
  18971. };
  18972. vue.watch(
  18973. () => props2.detail,
  18974. () => {
  18975. initAuditList(props2.detail);
  18976. },
  18977. { deep: true, immediate: true }
  18978. );
  18979. const auditList = vue.ref([
  18980. { sts: 1, label: "品相良好" },
  18981. { sts: 2, label: "品相一般", disabled: true },
  18982. { sts: 3, label: "品相极差" }
  18983. ]);
  18984. const emit2 = __emit;
  18985. const radioClick = (audit, index2, sts) => {
  18986. if (sts == 2)
  18987. return;
  18988. audit.sts = sts;
  18989. if (sts == 1) {
  18990. audit.comList = [];
  18991. }
  18992. auditCommentList.value[index2] = audit;
  18993. formatReason();
  18994. };
  18995. const getAuditCateNum = (cate) => {
  18996. var _a, _b;
  18997. return ((_b = (_a = props2.detail.auditCommentList) == null ? void 0 : _a.filter((item) => item.sts == cate)) == null ? void 0 : _b.length) || 0;
  18998. };
  18999. let reasonList = vue.ref([
  19000. { sts: 3, label: "明显泛黄水印/发霉/明显异味" },
  19001. { sts: 3, label: "老化泛黄褪色/污渍" },
  19002. { sts: 3, label: "明显破损/脱胶缺页/书籍变型" },
  19003. { sts: 3, label: "无此书" },
  19004. { sts: 3, label: "印刷不清晰" },
  19005. { sts: 3, label: "无防伪" },
  19006. { sts: 3, label: "无外护封/无ISBN" },
  19007. { sts: 3, label: "无此书多其他书" },
  19008. { sts: 3, label: "笔记杂乱/习题做完" },
  19009. { sts: 3, label: "有笔记贴" },
  19010. { sts: 3, label: "套装缺册" },
  19011. { sts: 3, label: "听力无光盘" },
  19012. { sts: 3, label: "图书馆/藏书印章" }
  19013. ]);
  19014. const formatReason = () => {
  19015. let list = auditCommentList.value.map((item, index2) => ({
  19016. ...item,
  19017. idx: index2,
  19018. com: item.comList.join(",")
  19019. }));
  19020. return list;
  19021. };
  19022. const toggleReason = (audit, index2, item) => {
  19023. const idx = audit.comList.indexOf(item.label);
  19024. if (idx > -1) {
  19025. audit.comList.splice(idx, 1);
  19026. } else {
  19027. audit.comList.push(item.label);
  19028. }
  19029. auditCommentList.value[index2] = audit;
  19030. };
  19031. const sortByAuditStatus = () => {
  19032. const sortedList = [...auditCommentList.value];
  19033. sortedList.sort((a, b) => {
  19034. if (a.sts === 0 && (b.sts === 1 || b.sts === 3)) {
  19035. return -1;
  19036. }
  19037. if (b.sts === 0 && (a.sts === 1 || a.sts === 3)) {
  19038. return 1;
  19039. }
  19040. return 0;
  19041. });
  19042. auditCommentList.value = sortedList;
  19043. return sortedList;
  19044. };
  19045. __expose({
  19046. formatReason,
  19047. initAuditList,
  19048. sortByAuditStatus
  19049. });
  19050. const __returned__ = { props: props2, auditCommentList, initAuditList, auditList, emit: emit2, radioClick, getAuditCateNum, get reasonList() {
  19051. return reasonList;
  19052. }, set reasonList(v) {
  19053. reasonList = v;
  19054. }, formatReason, toggleReason, sortByAuditStatus, ref: vue.ref, watch: vue.watch, nextTick: vue.nextTick, onMounted: vue.onMounted };
  19055. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19056. return __returned__;
  19057. }
  19058. };
  19059. function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
  19060. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  19061. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  19062. return vue.openBlock(), vue.createElementBlock("view", { class: "audit-info" }, [
  19063. vue.createElementVNode(
  19064. "view",
  19065. {
  19066. class: "font-bold mt-16",
  19067. style: { "padding": "0 20rpx" }
  19068. },
  19069. " 该书共" + vue.toDisplayString($props.detail.num) + "本,其中:良好" + vue.toDisplayString($setup.getAuditCateNum(1)) + "本,一般" + vue.toDisplayString($setup.getAuditCateNum(2)) + "本,极差" + vue.toDisplayString($setup.getAuditCateNum(3)) + "本 ",
  19070. 1
  19071. /* TEXT */
  19072. ),
  19073. $setup.auditCommentList.length > 0 ? (vue.openBlock(true), vue.createElementBlock(
  19074. vue.Fragment,
  19075. { key: 0 },
  19076. vue.renderList($setup.auditCommentList, (audit, index2) => {
  19077. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  19078. vue.createElementVNode(
  19079. "view",
  19080. {
  19081. class: "mt-10 bind-code",
  19082. style: { "padding": "10rpx 20rpx" }
  19083. },
  19084. " 第" + vue.toDisplayString(index2 + 1) + "本的审核意见 ",
  19085. 1
  19086. /* TEXT */
  19087. ),
  19088. vue.createElementVNode("view", {
  19089. class: "mt-20 bg-white flex flex-j-a flex-a-c",
  19090. style: { "padding": "20rpx", "border-radius": "10rpx" }
  19091. }, [
  19092. (vue.openBlock(true), vue.createElementBlock(
  19093. vue.Fragment,
  19094. null,
  19095. vue.renderList($setup.auditList, (item, idx) => {
  19096. return vue.openBlock(), vue.createElementBlock("view", {
  19097. class: "u-page__tag-item",
  19098. key: idx
  19099. }, [
  19100. vue.createVNode(_component_u_tag, {
  19101. size: "large",
  19102. text: item.label,
  19103. plain: audit.sts != item.sts,
  19104. type: "primary",
  19105. name: item.sts,
  19106. class: vue.normalizeClass({ disabled: item.sts == 2 }),
  19107. onClick: ($event) => $setup.radioClick(audit, index2, item.sts)
  19108. }, null, 8, ["text", "plain", "name", "class", "onClick"])
  19109. ]);
  19110. }),
  19111. 128
  19112. /* KEYED_FRAGMENT */
  19113. ))
  19114. ]),
  19115. audit.sts == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  19116. key: 0,
  19117. class: "mt-20 bg-white",
  19118. style: { "padding": "20rpx", "border-radius": "10rpx" }
  19119. }, [
  19120. vue.createElementVNode("view", { class: "flex flex-a-c flex-wrap" }, [
  19121. (vue.openBlock(true), vue.createElementBlock(
  19122. vue.Fragment,
  19123. null,
  19124. vue.renderList($setup.reasonList, (item, idx) => {
  19125. return vue.openBlock(), vue.createElementBlock("view", {
  19126. class: vue.normalizeClass(["mr-10 reason-item", { selected: audit.comList.includes(item.label) }]),
  19127. key: idx,
  19128. onClick: ($event) => $setup.toggleReason(audit, index2, item)
  19129. }, vue.toDisplayString(item.label), 11, ["onClick"]);
  19130. }),
  19131. 128
  19132. /* KEYED_FRAGMENT */
  19133. ))
  19134. ])
  19135. ])) : vue.createCommentVNode("v-if", true)
  19136. ]);
  19137. }),
  19138. 128
  19139. /* KEYED_FRAGMENT */
  19140. )) : vue.createCommentVNode("v-if", true),
  19141. vue.createCommentVNode(" 悬浮排序按钮 "),
  19142. vue.createElementVNode("view", {
  19143. class: "floating-sort-btn",
  19144. onClick: $setup.sortByAuditStatus
  19145. }, [
  19146. vue.createVNode(_component_u_icon, {
  19147. name: "list",
  19148. color: "#FFFFFF",
  19149. size: "22"
  19150. }),
  19151. vue.createElementVNode("text", { class: "btn-text" }, "排序")
  19152. ])
  19153. ]);
  19154. }
  19155. const AuditInfo = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$_], ["__scopeId", "data-v-9873c737"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/AuditInfo.vue"]]);
  19156. const _sfc_main$_ = {
  19157. __name: "book-audit",
  19158. setup(__props, { expose: __expose }) {
  19159. __expose();
  19160. const detail = vue.ref({});
  19161. function playGlobalSound() {
  19162. uni.$u.playClickSound();
  19163. }
  19164. const getBookInfo = (isbn) => {
  19165. uni.$u.http.get(`/app/book/getBookByIsbn/${isbn}`).then((res2) => {
  19166. if (res2.code == 200) {
  19167. detail.value = res2.data;
  19168. }
  19169. });
  19170. };
  19171. const auditBook = vue.ref({});
  19172. const getBookInfoAndAuditInfo = (isbn, orderId2) => {
  19173. uni.$u.http.get(`/app/orderinfo/getBookCheckInfo?isbn=${isbn}&&orderId=${orderId2}`).then((res2) => {
  19174. if (res2.code == 200) {
  19175. auditBook.value = res2.data;
  19176. vue.nextTick(() => {
  19177. var _a;
  19178. (_a = auditInfoRef.value) == null ? void 0 : _a.initAuditList(auditBook.value);
  19179. });
  19180. }
  19181. });
  19182. };
  19183. const list = vue.ref(["图书审核", "绑码", "附件信息"]);
  19184. const current = vue.ref(0);
  19185. const handleSectionChange = (index2) => {
  19186. current.value = index2;
  19187. };
  19188. const auditData = vue.ref([]);
  19189. const handleAuditSelected = (data) => {
  19190. auditData.value = data.map((item, index2) => {
  19191. item.idx = index2;
  19192. item.com = Array.isArray(item.com) ? item.com.join(",") : item.com;
  19193. return item;
  19194. });
  19195. };
  19196. const scannedBooks = vue.ref([]);
  19197. function checkIsbn(isbn) {
  19198. const isbn13Regex = /^(?:97[89]-?\d{1,5}-?\d{1,7}-?\d{1,6}-?\d)$/;
  19199. if (isbn13Regex.test(isbn)) {
  19200. return true;
  19201. }
  19202. return false;
  19203. }
  19204. function handleScan(isbn) {
  19205. var _a;
  19206. if (!checkIsbn(isbn)) {
  19207. let text = `不是正确的ISBN码`;
  19208. uni.$u.ttsModule.speak(text);
  19209. return;
  19210. }
  19211. let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
  19212. if (isbns.includes(isbn)) {
  19213. let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
  19214. if (((_a = book.auditCommentList) == null ? void 0 : _a.length) > 0) {
  19215. let noAuditNum = book.auditCommentList.filter((item) => item.sts == 0).length;
  19216. formatAppLog("log", "at pages/index/detail/book-audit.vue:140", noAuditNum, "noAuditNum");
  19217. if (noAuditNum == 0) {
  19218. let text = `${isbn}已超出订单中的数量`;
  19219. uni.$u.ttsModule.speak(text);
  19220. return;
  19221. }
  19222. if (book.suit == 1) {
  19223. let text = `${isbn}请注意套装书是否齐全`;
  19224. uni.$u.ttsModule.speak(text);
  19225. }
  19226. if (book.bookWarn == 1) {
  19227. let text = `请注意${isbn}需要取出`;
  19228. uni.$u.ttsModule.speak(text);
  19229. }
  19230. scannedBooks.value.push(isbn);
  19231. uni.setStorageSync("scannedBooks", scannedBooks.value);
  19232. uni.navigateTo({
  19233. url: `/pages/index/detail/batch-audit?orderId=${orderId.value}`
  19234. });
  19235. }
  19236. } else {
  19237. let text = `此订单中不存在${isbn}这本书 `;
  19238. uni.$u.ttsModule.speak(text);
  19239. }
  19240. }
  19241. function handleScanCode() {
  19242. uni.scanCode({
  19243. success: (res2) => {
  19244. handleScan(res2.result);
  19245. }
  19246. });
  19247. }
  19248. const auditInfoRef = vue.ref();
  19249. const handleAudit = () => {
  19250. var _a;
  19251. let checkList = (_a = auditInfoRef.value) == null ? void 0 : _a.formatReason(auditData.value);
  19252. let checkUserInfo = uni.getStorageSync("checkUserInfo");
  19253. if (checkUserInfo.userId) {
  19254. checkUserId.value = checkUserInfo.userId;
  19255. } else {
  19256. uni.$u.toast("请先选择审核人");
  19257. }
  19258. let poorList = checkList.filter((item) => item.sts == 3);
  19259. if (poorList.length > 0 && !poorList.every((item) => item.com)) {
  19260. uni.$u.ttsModule.speak("请选择品相");
  19261. return;
  19262. }
  19263. uni.$u.http.post("/app/orderinfo/checkOrder", {
  19264. checkUserId: checkUserId.value,
  19265. orderId: orderId.value,
  19266. checkList
  19267. }).then((res2) => {
  19268. if (res2.code == 200) {
  19269. uni.showToast({ title: "审核成功", icon: "none" });
  19270. uni.$u.ttsModule.speak("审核成功");
  19271. uni.navigateBack();
  19272. } else {
  19273. uni.$u.toast(res2.msg);
  19274. }
  19275. });
  19276. };
  19277. const checkUserId = vue.ref();
  19278. const orderId = vue.ref();
  19279. const orderDetail = vue.ref({});
  19280. let isbnScan = vue.ref("");
  19281. onLoad((options) => {
  19282. options.isbn && getBookInfo(options.isbn);
  19283. scannedBooks.value = [options.isbn];
  19284. isbnScan.value = options.isbn;
  19285. orderId.value = options.orderId;
  19286. getBookInfoAndAuditInfo(options.isbn, options.orderId);
  19287. orderDetail.value = uni.getStorageSync("orderDetail");
  19288. uni.$u.useGlobalEvent((e) => {
  19289. if (e.barcode) {
  19290. handleScan(e.barcode);
  19291. }
  19292. });
  19293. });
  19294. onShow(() => {
  19295. var _a;
  19296. if (isbnScan.value) {
  19297. checkUserId.value = (_a = uni.getStorageSync("userInfo")) == null ? void 0 : _a.userId;
  19298. orderDetail.value = uni.getStorageSync("orderDetail");
  19299. }
  19300. uni.$u.updateActivePageOnShow();
  19301. });
  19302. const __returned__ = { detail, playGlobalSound, getBookInfo, auditBook, getBookInfoAndAuditInfo, list, current, handleSectionChange, auditData, handleAuditSelected, scannedBooks, checkIsbn, handleScan, handleScanCode, auditInfoRef, handleAudit, checkUserId, orderId, orderDetail, get isbnScan() {
  19303. return isbnScan;
  19304. }, set isbnScan(v) {
  19305. isbnScan = v;
  19306. }, ref: vue.ref, nextTick: vue.nextTick, get onLoad() {
  19307. return onLoad;
  19308. }, get onShow() {
  19309. return onShow;
  19310. }, AuditInfo, FileInfo };
  19311. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19312. return __returned__;
  19313. }
  19314. };
  19315. function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
  19316. const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$5);
  19317. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  19318. return vue.openBlock(), vue.createElementBlock("view", {
  19319. class: "book-audit",
  19320. onClick: $setup.playGlobalSound
  19321. }, [
  19322. vue.createElementVNode("view", {
  19323. class: "bg-white flex flex-a-c",
  19324. style: { "padding": "20rpx", "border-radius": "10rpx" }
  19325. }, [
  19326. vue.createElementVNode("image", {
  19327. src: $setup.detail.cover,
  19328. mode: "aspectFill",
  19329. style: { "width": "80px", "height": "100px" }
  19330. }, null, 8, ["src"]),
  19331. vue.createElementVNode("view", { class: "flex flex-d flex-1 ml-20" }, [
  19332. vue.createElementVNode(
  19333. "text",
  19334. { class: "common-title mb-20" },
  19335. vue.toDisplayString($setup.detail.bookName),
  19336. 1
  19337. /* TEXT */
  19338. ),
  19339. vue.createElementVNode("text", { class: "text-sm" }, [
  19340. vue.createTextVNode("ISBN: "),
  19341. vue.createElementVNode(
  19342. "text",
  19343. { class: "color-primary" },
  19344. vue.toDisplayString($setup.detail.isbn),
  19345. 1
  19346. /* TEXT */
  19347. )
  19348. ]),
  19349. vue.createElementVNode("text", { class: "text-sm mt-6" }, [
  19350. vue.createTextVNode("作者: "),
  19351. vue.createElementVNode(
  19352. "text",
  19353. null,
  19354. vue.toDisplayString($setup.detail.author),
  19355. 1
  19356. /* TEXT */
  19357. )
  19358. ]),
  19359. vue.createElementVNode("text", { class: "text-sm mt-6" }, [
  19360. vue.createTextVNode("出版社: "),
  19361. vue.createElementVNode(
  19362. "text",
  19363. null,
  19364. vue.toDisplayString($setup.detail.publish),
  19365. 1
  19366. /* TEXT */
  19367. )
  19368. ])
  19369. ])
  19370. ]),
  19371. vue.createElementVNode("view", {
  19372. class: "mt-20 bg-white price-info",
  19373. style: { "border-radius": "10rpx" }
  19374. }, [
  19375. vue.createElementVNode("view", { class: "flex" }, [
  19376. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  19377. vue.createElementVNode("text", { class: "label" }, "定价"),
  19378. vue.createElementVNode(
  19379. "text",
  19380. { class: "content" },
  19381. "¥" + vue.toDisplayString($setup.detail.price),
  19382. 1
  19383. /* TEXT */
  19384. )
  19385. ]),
  19386. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  19387. vue.createElementVNode("text", { class: "label" }, "回收折扣"),
  19388. vue.createElementVNode(
  19389. "text",
  19390. { class: "content" },
  19391. vue.toDisplayString($setup.detail.recycleDiscount) + "折",
  19392. 1
  19393. /* TEXT */
  19394. )
  19395. ])
  19396. ]),
  19397. vue.createElementVNode("view", { class: "flex flex-a-c" }, [
  19398. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  19399. vue.createElementVNode("text", { class: "label" }, "预估金额"),
  19400. vue.createElementVNode(
  19401. "text",
  19402. { class: "content" },
  19403. "¥" + vue.toDisplayString($setup.auditBook.expectMoney),
  19404. 1
  19405. /* TEXT */
  19406. )
  19407. ]),
  19408. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  19409. vue.createElementVNode("text", { class: "label" }, "审核金额"),
  19410. vue.createElementVNode(
  19411. "text",
  19412. { class: "content" },
  19413. "¥" + vue.toDisplayString($setup.auditBook.finalMoney || 0),
  19414. 1
  19415. /* TEXT */
  19416. )
  19417. ])
  19418. ])
  19419. ]),
  19420. vue.createElementVNode("view", { class: "mt-20" }, [
  19421. vue.createVNode(_component_u_subsection, {
  19422. list: $setup.list,
  19423. mode: "subsection",
  19424. current: $setup.current,
  19425. onChange: $setup.handleSectionChange
  19426. }, null, 8, ["list", "current"]),
  19427. vue.withDirectives(vue.createVNode($setup["AuditInfo"], {
  19428. detail: $setup.auditBook,
  19429. auditList: $setup.auditBook.auditCommentList,
  19430. ref: "auditInfoRef"
  19431. }, null, 8, ["detail", "auditList"]), [
  19432. [vue.vShow, $setup.current == 0]
  19433. ]),
  19434. vue.withDirectives(vue.createVNode($setup["FileInfo"], {
  19435. orderId: $setup.orderId,
  19436. annexType: 2,
  19437. isbn: $setup.isbnScan
  19438. }, null, 8, ["orderId", "isbn"]), [
  19439. [vue.vShow, $setup.current == 2]
  19440. ])
  19441. ]),
  19442. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  19443. vue.createVNode(_component_u_button, {
  19444. type: "warning",
  19445. size: "large",
  19446. onClick: $setup.handleScanCode
  19447. }, {
  19448. default: vue.withCtx(() => [
  19449. vue.createTextVNode("扫码")
  19450. ]),
  19451. _: 1
  19452. /* STABLE */
  19453. }),
  19454. vue.createVNode(_component_u_button, {
  19455. type: "primary",
  19456. size: "large",
  19457. onClick: $setup.handleAudit
  19458. }, {
  19459. default: vue.withCtx(() => [
  19460. vue.createTextVNode("确定")
  19461. ]),
  19462. _: 1
  19463. /* STABLE */
  19464. })
  19465. ])
  19466. ]);
  19467. }
  19468. const PagesIndexDetailBookAudit = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$Z], ["__scopeId", "data-v-376f8a68"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/book-audit.vue"]]);
  19469. const _sfc_main$Z = {
  19470. __name: "BookItem2",
  19471. props: {
  19472. item: Object,
  19473. showClose: {
  19474. type: Boolean,
  19475. default: false
  19476. }
  19477. },
  19478. emits: ["close"],
  19479. setup(__props, { expose: __expose, emit: __emit }) {
  19480. __expose();
  19481. const props2 = __props;
  19482. const emit2 = __emit;
  19483. const handleClose = () => {
  19484. emit2("close", props2.item.isbn);
  19485. };
  19486. const __returned__ = { props: props2, emit: emit2, handleClose, computed: vue.computed };
  19487. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19488. return __returned__;
  19489. }
  19490. };
  19491. function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
  19492. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  19493. return vue.openBlock(), vue.createElementBlock(
  19494. "view",
  19495. {
  19496. class: vue.normalizeClass(["card", { "card-close": $props.showClose }])
  19497. },
  19498. [
  19499. vue.createElementVNode("view", { class: "flex w100" }, [
  19500. vue.createElementVNode("view", { class: "flex-d" }, [
  19501. vue.createElementVNode("image", {
  19502. style: { "width": "70px", "height": "90px" },
  19503. src: $props.item.cover,
  19504. mode: "aspectFill"
  19505. }, null, 8, ["src"]),
  19506. !$props.showClose ? (vue.openBlock(), vue.createElementBlock(
  19507. "view",
  19508. {
  19509. key: 0,
  19510. class: "quantity mt-24"
  19511. },
  19512. "数量: " + vue.toDisplayString($props.item.num),
  19513. 1
  19514. /* TEXT */
  19515. )) : vue.createCommentVNode("v-if", true)
  19516. ]),
  19517. vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
  19518. vue.createElementVNode(
  19519. "view",
  19520. { class: "common-title mb-20" },
  19521. vue.toDisplayString($props.item.bookName),
  19522. 1
  19523. /* TEXT */
  19524. ),
  19525. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  19526. vue.createElementVNode(
  19527. "view",
  19528. { class: "isbn" },
  19529. "ISBN: " + vue.toDisplayString($props.item.isbn),
  19530. 1
  19531. /* TEXT */
  19532. ),
  19533. vue.createElementVNode(
  19534. "view",
  19535. { class: "set" },
  19536. "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "不是"),
  19537. 1
  19538. /* TEXT */
  19539. )
  19540. ]),
  19541. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  19542. vue.createElementVNode(
  19543. "view",
  19544. { class: "price" },
  19545. "定价: " + vue.toDisplayString($props.item.price),
  19546. 1
  19547. /* TEXT */
  19548. ),
  19549. vue.createElementVNode(
  19550. "view",
  19551. { class: "estimate" },
  19552. "预估单价: " + vue.toDisplayString($props.item.expectMoney || 0),
  19553. 1
  19554. /* TEXT */
  19555. )
  19556. ]),
  19557. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  19558. vue.createElementVNode(
  19559. "view",
  19560. { class: "discount" },
  19561. "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
  19562. 1
  19563. /* TEXT */
  19564. ),
  19565. vue.createElementVNode("view", { class: "review" }, [
  19566. vue.createTextVNode("审核金额: "),
  19567. vue.createElementVNode(
  19568. "text",
  19569. { class: "color-red" },
  19570. vue.toDisplayString($props.item.review || 0),
  19571. 1
  19572. /* TEXT */
  19573. )
  19574. ])
  19575. ])
  19576. ])
  19577. ]),
  19578. $props.showClose ? (vue.openBlock(), vue.createElementBlock("view", {
  19579. key: 0,
  19580. class: "quantity-icon mt-24"
  19581. }, [
  19582. vue.createVNode(_component_u_icon, {
  19583. name: "close-circle-fill",
  19584. size: "18",
  19585. color: "#999",
  19586. onClick: $setup.handleClose
  19587. })
  19588. ])) : vue.createCommentVNode("v-if", true)
  19589. ],
  19590. 2
  19591. /* CLASS */
  19592. );
  19593. }
  19594. const BookItem$1 = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$Y], ["__scopeId", "data-v-469f67ea"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/BookItem2.vue"]]);
  19595. const _sfc_main$Y = {
  19596. __name: "batch-audit",
  19597. setup(__props, { expose: __expose }) {
  19598. __expose();
  19599. const detailMap = vue.ref({});
  19600. const scannedBooksDetail = vue.ref([]);
  19601. const getBookInfo = (isbn) => {
  19602. if (detailMap.value[isbn]) {
  19603. scannedBooksDetail.value.push(detailMap.value[isbn]);
  19604. return;
  19605. }
  19606. uni.$u.http.get(`/app/book/getSimpleBookInfoByIsbn/${isbn}`).then((res2) => {
  19607. if (res2.code == 200) {
  19608. detailMap.value[isbn] = res2.data;
  19609. scannedBooksDetail.value.push(res2.data);
  19610. }
  19611. });
  19612. };
  19613. const handleClose = (index2, isbn) => {
  19614. scannedBooksDetail.value.splice(index2, 1);
  19615. scannedBooks.value = scannedBooks.value.filter((item) => item != isbn);
  19616. };
  19617. function checkIsbn(isbn) {
  19618. const isbn13Regex = /^(?:97[89]-?\d{1,5}-?\d{1,7}-?\d{1,6}-?\d)$/;
  19619. if (isbn13Regex.test(isbn)) {
  19620. return true;
  19621. }
  19622. return false;
  19623. }
  19624. const scannedBooks = vue.ref([]);
  19625. function handleScan(isbn) {
  19626. var _a;
  19627. if (!checkIsbn(isbn)) {
  19628. let text = `不是正确的ISBN码`;
  19629. uni.$u.ttsModule.speak(text);
  19630. return;
  19631. }
  19632. let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
  19633. if (isbns.includes(isbn)) {
  19634. let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
  19635. if (((_a = book.auditCommentList) == null ? void 0 : _a.length) > 0) {
  19636. let notAuditNum = book.auditCommentList.filter((item) => item.sts === 0).length || 0;
  19637. let scannedNum = scannedBooks.value.filter((item) => item == isbn).length || 0;
  19638. if (scannedNum >= notAuditNum) {
  19639. let text = `${isbn}已超出订单中的数量`;
  19640. return uni.$u.ttsModule.speak(text);
  19641. } else {
  19642. if (book.suit == 1) {
  19643. let text = `${isbn}请注意套装书是否齐全`;
  19644. uni.$u.ttsModule.speak(text);
  19645. }
  19646. if (book.bookWarn == 1) {
  19647. let text = `请注意${isbn}需要取出`;
  19648. uni.$u.ttsModule.speak(text);
  19649. }
  19650. scannedBooks.value.push(isbn);
  19651. getBookInfo(isbn);
  19652. }
  19653. }
  19654. } else {
  19655. let text = `此订单中不存在${isbn}这本书 `;
  19656. uni.$u.ttsModule.speak(text);
  19657. }
  19658. }
  19659. function handleScanCode() {
  19660. uni.scanCode({
  19661. success: (res2) => {
  19662. handleScan(res2.result);
  19663. }
  19664. });
  19665. }
  19666. const checkUserId = vue.ref();
  19667. const orderId = vue.ref();
  19668. const orderDetail = vue.ref({});
  19669. const showModal = vue.ref(false);
  19670. const isQualitySelected = vue.ref(false);
  19671. const showQualityModal = () => {
  19672. showModal.value = true;
  19673. };
  19674. const closeModal = () => {
  19675. showModal.value = false;
  19676. playGlobalSound();
  19677. };
  19678. function playGlobalSound() {
  19679. uni.$u.playClickSound();
  19680. }
  19681. const toggleQuality = () => {
  19682. isQualitySelected.value = !isQualitySelected.value;
  19683. };
  19684. const handleAudit = () => {
  19685. playGlobalSound();
  19686. if (!isQualitySelected.value) {
  19687. uni.$u.toast("请选择品相");
  19688. uni.$u.ttsModule.speak("请选择品相");
  19689. return;
  19690. }
  19691. let checkUserInfo = uni.getStorageSync("checkUserInfo");
  19692. if (checkUserInfo.userId) {
  19693. checkUserId.value = checkUserInfo.userId;
  19694. }
  19695. uni.$u.http.post("/app/orderinfo/checkOrderBatch", {
  19696. checkUserId: checkUserId.value,
  19697. orderId: orderId.value,
  19698. checkList: scannedBooks.value.map((isbn) => ({ sts: 1, com: "", isbn }))
  19699. }).then((res2) => {
  19700. if (res2.code == 200) {
  19701. uni.showToast({ title: "审核成功", icon: "none" });
  19702. uni.$u.ttsModule.speak("审核成功");
  19703. uni.navigateBack({ delta: 2 });
  19704. } else {
  19705. uni.$u.toast(res2.msg);
  19706. }
  19707. });
  19708. };
  19709. onLoad((options) => {
  19710. orderId.value = options.orderId;
  19711. orderDetail.value = uni.getStorageSync("orderDetail");
  19712. scannedBooks.value = uni.getStorageSync("scannedBooks");
  19713. scannedBooks.value.forEach((isbn) => {
  19714. getBookInfo(isbn);
  19715. });
  19716. uni.$u.useGlobalEvent((e) => {
  19717. if (e.barcode) {
  19718. handleScan(e.barcode);
  19719. }
  19720. });
  19721. });
  19722. onShow(() => {
  19723. var _a;
  19724. uni.$u.updateActivePageOnShow();
  19725. checkUserId.value = (_a = uni.getStorageSync("userInfo")) == null ? void 0 : _a.userId;
  19726. orderDetail.value = uni.getStorageSync("orderDetail");
  19727. });
  19728. 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() {
  19729. return onLoad;
  19730. }, get onShow() {
  19731. return onShow;
  19732. }, BookItem: BookItem$1 };
  19733. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19734. return __returned__;
  19735. }
  19736. };
  19737. function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
  19738. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  19739. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$3);
  19740. return vue.openBlock(), vue.createElementBlock("view", { class: "batch-audit" }, [
  19741. (vue.openBlock(true), vue.createElementBlock(
  19742. vue.Fragment,
  19743. null,
  19744. vue.renderList($setup.scannedBooksDetail, (item, index2) => {
  19745. return vue.openBlock(), vue.createBlock($setup["BookItem"], {
  19746. key: item.isbn,
  19747. item,
  19748. showClose: "",
  19749. onClose: (isbn) => $setup.handleClose(index2, isbn)
  19750. }, null, 8, ["item", "onClose"]);
  19751. }),
  19752. 128
  19753. /* KEYED_FRAGMENT */
  19754. )),
  19755. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  19756. vue.createVNode(_component_u_button, {
  19757. type: "warning",
  19758. size: "large",
  19759. onClick: $setup.handleScanCode
  19760. }, {
  19761. default: vue.withCtx(() => [
  19762. vue.createTextVNode("扫码")
  19763. ]),
  19764. _: 1
  19765. /* STABLE */
  19766. }),
  19767. vue.createVNode(_component_u_button, {
  19768. type: "primary",
  19769. size: "large",
  19770. onClick: $setup.showQualityModal
  19771. }, {
  19772. default: vue.withCtx(() => [
  19773. vue.createTextVNode("确定")
  19774. ]),
  19775. _: 1
  19776. /* STABLE */
  19777. })
  19778. ]),
  19779. vue.createVNode(_component_u_modal, {
  19780. show: $setup.showModal,
  19781. title: "品相选择",
  19782. onCancel: $setup.closeModal,
  19783. showCancelButton: true,
  19784. closeOnClickOverlay: true,
  19785. onConfirm: $setup.handleAudit
  19786. }, {
  19787. default: vue.withCtx(() => [
  19788. vue.createElementVNode("view", {
  19789. class: "quality-selector",
  19790. onClick: $setup.playGlobalSound
  19791. }, [
  19792. vue.createElementVNode(
  19793. "view",
  19794. {
  19795. class: vue.normalizeClass(["quality-circle", { selected: $setup.isQualitySelected }]),
  19796. onClick: $setup.toggleQuality
  19797. },
  19798. [
  19799. vue.createElementVNode("text", null, "良好")
  19800. ],
  19801. 2
  19802. /* CLASS */
  19803. )
  19804. ])
  19805. ]),
  19806. _: 1
  19807. /* STABLE */
  19808. }, 8, ["show"])
  19809. ]);
  19810. }
  19811. const PagesIndexDetailBatchAudit = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$X], ["__scopeId", "data-v-bc156c69"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/batch-audit.vue"]]);
  19812. const _sfc_main$X = {
  19813. __name: "sender",
  19814. setup(__props, { expose: __expose }) {
  19815. __expose();
  19816. function playGlobalSound() {
  19817. uni.$u.playClickSound();
  19818. }
  19819. const otherParams = vue.ref({
  19820. search: ""
  19821. });
  19822. const scrollRef = vue.ref(null);
  19823. const refreshList = () => {
  19824. var _a;
  19825. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  19826. };
  19827. let dataList = vue.ref([]);
  19828. const updateList = (data, page2) => {
  19829. dataList.value = data;
  19830. if (!isSearch.value)
  19831. return;
  19832. if (data.length > 0) {
  19833. uni.$u.ttsModule.speak("查询到" + data.length + "条数据");
  19834. } else {
  19835. uni.$u.ttsModule.speak("未查询到数据");
  19836. }
  19837. isSearch.value = false;
  19838. };
  19839. const isSearch = vue.ref(false);
  19840. const handleSearch = () => {
  19841. isSearch.value = true;
  19842. refreshList();
  19843. };
  19844. const __returned__ = { playGlobalSound, otherParams, scrollRef, refreshList, get dataList() {
  19845. return dataList;
  19846. }, set dataList(v) {
  19847. dataList = v;
  19848. }, updateList, isSearch, handleSearch, reactive: vue.reactive, PageScroll: pageScroll, OrderItem: orderItem, ref: vue.ref, get onLoad() {
  19849. return onLoad;
  19850. } };
  19851. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19852. return __returned__;
  19853. }
  19854. };
  19855. function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
  19856. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  19857. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  19858. return vue.openBlock(), vue.createElementBlock("view", {
  19859. class: "common-page",
  19860. style: { "padding": "0" },
  19861. onClick: $setup.playGlobalSound
  19862. }, [
  19863. vue.createVNode($setup["PageScroll"], {
  19864. requestStr: "/app/orderinfo/getOrderListByUserInfo",
  19865. onUpdateList: $setup.updateList,
  19866. ref: "scrollRef",
  19867. otherParams: $setup.otherParams,
  19868. immediate: false
  19869. }, {
  19870. default: vue.withCtx(() => [
  19871. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  19872. default: vue.withCtx(() => [
  19873. vue.createElementVNode("view", { class: "search-area" }, [
  19874. vue.createVNode(_component_u_search, {
  19875. placeholder: "请输入发件人姓名或电话",
  19876. searchIconSize: 18,
  19877. bgColor: "#f6f7f6",
  19878. onSearch: $setup.handleSearch,
  19879. modelValue: $setup.otherParams.search,
  19880. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.otherParams.search = $event),
  19881. "custom-style": "font-size:32rpx",
  19882. "placeholder-style": "font-size:32rpx",
  19883. clearabled: true,
  19884. focus: false,
  19885. showAction: false,
  19886. height: 36
  19887. }, null, 8, ["modelValue"])
  19888. ])
  19889. ]),
  19890. _: 1
  19891. /* STABLE */
  19892. }),
  19893. $setup.dataList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  19894. key: 0,
  19895. class: "list-con"
  19896. }, [
  19897. (vue.openBlock(true), vue.createElementBlock(
  19898. vue.Fragment,
  19899. null,
  19900. vue.renderList($setup.dataList, (cell) => {
  19901. return vue.openBlock(), vue.createBlock($setup["OrderItem"], {
  19902. key: cell.id,
  19903. item: cell,
  19904. class: "mt-20"
  19905. }, null, 8, ["item"]);
  19906. }),
  19907. 128
  19908. /* KEYED_FRAGMENT */
  19909. ))
  19910. ])) : vue.createCommentVNode("v-if", true)
  19911. ]),
  19912. _: 1
  19913. /* STABLE */
  19914. }, 8, ["otherParams"])
  19915. ]);
  19916. }
  19917. const PagesIndexAuditSender = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$W], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/sender.vue"]]);
  19918. const _sfc_main$W = {
  19919. __name: "audit",
  19920. setup(__props, { expose: __expose }) {
  19921. __expose();
  19922. const otherParams = vue.ref({
  19923. sender: ""
  19924. });
  19925. const scrollRef = vue.ref(null);
  19926. const refreshList = () => {
  19927. var _a;
  19928. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  19929. };
  19930. let dataList = vue.ref([{
  19931. date: "2024-10-24",
  19932. orderNum: 423,
  19933. auditNum: 293,
  19934. trueNum: 323
  19935. }, {
  19936. date: "2024-10-24",
  19937. orderNum: 423,
  19938. auditNum: 293,
  19939. trueNum: 323
  19940. }, {
  19941. date: "2024-10-24",
  19942. orderNum: 423,
  19943. auditNum: 293,
  19944. trueNum: 323
  19945. }]);
  19946. const updateList = (data) => {
  19947. dataList.value = data;
  19948. };
  19949. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  19950. return dataList;
  19951. }, set dataList(v) {
  19952. dataList = v;
  19953. }, updateList, reactive: vue.reactive, PageScroll: pageScroll, ref: vue.ref, get onLoad() {
  19954. return onLoad;
  19955. } };
  19956. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19957. return __returned__;
  19958. }
  19959. };
  19960. function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
  19961. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  19962. return vue.openBlock(), vue.createElementBlock("view", {
  19963. class: "common-page",
  19964. style: { "padding": "0" }
  19965. }, [
  19966. vue.createVNode($setup["PageScroll"], {
  19967. requestStr: "/team/token/shop/invite/page",
  19968. onUpdateList: $setup.updateList,
  19969. ref: "scrollRef",
  19970. otherParams: $setup.otherParams
  19971. }, {
  19972. default: vue.withCtx(() => [
  19973. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  19974. default: vue.withCtx(() => [
  19975. vue.createElementVNode("view", { class: "search-area flex-a" }, [
  19976. vue.createElementVNode("view", { class: "text-item flex-1" }, "审核日期"),
  19977. vue.createElementVNode("view", { class: "text-item flex-1" }, "订单数量"),
  19978. vue.createElementVNode("view", { class: "text-item flex-1" }, "审书数量"),
  19979. vue.createElementVNode("view", { class: "text-item flex-1" }, "实际回收")
  19980. ])
  19981. ]),
  19982. _: 1
  19983. /* STABLE */
  19984. }),
  19985. vue.createElementVNode("view", { class: "list-con" }, [
  19986. (vue.openBlock(true), vue.createElementBlock(
  19987. vue.Fragment,
  19988. null,
  19989. vue.renderList($setup.dataList, (item, index2) => {
  19990. return vue.openBlock(), vue.createElementBlock("view", {
  19991. key: index2,
  19992. class: "flex-a"
  19993. }, [
  19994. vue.createElementVNode(
  19995. "view",
  19996. { class: "text-item flex-1" },
  19997. vue.toDisplayString(item.date),
  19998. 1
  19999. /* TEXT */
  20000. ),
  20001. vue.createElementVNode(
  20002. "view",
  20003. { class: "text-item flex-1" },
  20004. vue.toDisplayString(item.orderNum),
  20005. 1
  20006. /* TEXT */
  20007. ),
  20008. vue.createElementVNode(
  20009. "view",
  20010. { class: "text-item flex-1" },
  20011. vue.toDisplayString(item.auditNum),
  20012. 1
  20013. /* TEXT */
  20014. ),
  20015. vue.createElementVNode(
  20016. "view",
  20017. { class: "text-item flex-1" },
  20018. vue.toDisplayString(item.trueNum),
  20019. 1
  20020. /* TEXT */
  20021. )
  20022. ]);
  20023. }),
  20024. 128
  20025. /* KEYED_FRAGMENT */
  20026. ))
  20027. ])
  20028. ]),
  20029. _: 1
  20030. /* STABLE */
  20031. }, 8, ["otherParams"])
  20032. ]);
  20033. }
  20034. const PagesIndexStatisticAudit = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$V], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/audit.vue"]]);
  20035. const icons = {
  20036. "id": "2852637",
  20037. "name": "uniui图标库",
  20038. "font_family": "uniicons",
  20039. "css_prefix_text": "uniui-",
  20040. "description": "",
  20041. "glyphs": [
  20042. {
  20043. "icon_id": "25027049",
  20044. "name": "yanse",
  20045. "font_class": "color",
  20046. "unicode": "e6cf",
  20047. "unicode_decimal": 59087
  20048. },
  20049. {
  20050. "icon_id": "25027048",
  20051. "name": "wallet",
  20052. "font_class": "wallet",
  20053. "unicode": "e6b1",
  20054. "unicode_decimal": 59057
  20055. },
  20056. {
  20057. "icon_id": "25015720",
  20058. "name": "settings-filled",
  20059. "font_class": "settings-filled",
  20060. "unicode": "e6ce",
  20061. "unicode_decimal": 59086
  20062. },
  20063. {
  20064. "icon_id": "25015434",
  20065. "name": "shimingrenzheng-filled",
  20066. "font_class": "auth-filled",
  20067. "unicode": "e6cc",
  20068. "unicode_decimal": 59084
  20069. },
  20070. {
  20071. "icon_id": "24934246",
  20072. "name": "shop-filled",
  20073. "font_class": "shop-filled",
  20074. "unicode": "e6cd",
  20075. "unicode_decimal": 59085
  20076. },
  20077. {
  20078. "icon_id": "24934159",
  20079. "name": "staff-filled-01",
  20080. "font_class": "staff-filled",
  20081. "unicode": "e6cb",
  20082. "unicode_decimal": 59083
  20083. },
  20084. {
  20085. "icon_id": "24932461",
  20086. "name": "VIP-filled",
  20087. "font_class": "vip-filled",
  20088. "unicode": "e6c6",
  20089. "unicode_decimal": 59078
  20090. },
  20091. {
  20092. "icon_id": "24932462",
  20093. "name": "plus_circle_fill",
  20094. "font_class": "plus-filled",
  20095. "unicode": "e6c7",
  20096. "unicode_decimal": 59079
  20097. },
  20098. {
  20099. "icon_id": "24932463",
  20100. "name": "folder_add-filled",
  20101. "font_class": "folder-add-filled",
  20102. "unicode": "e6c8",
  20103. "unicode_decimal": 59080
  20104. },
  20105. {
  20106. "icon_id": "24932464",
  20107. "name": "yanse-filled",
  20108. "font_class": "color-filled",
  20109. "unicode": "e6c9",
  20110. "unicode_decimal": 59081
  20111. },
  20112. {
  20113. "icon_id": "24932465",
  20114. "name": "tune-filled",
  20115. "font_class": "tune-filled",
  20116. "unicode": "e6ca",
  20117. "unicode_decimal": 59082
  20118. },
  20119. {
  20120. "icon_id": "24932455",
  20121. "name": "a-rilidaka-filled",
  20122. "font_class": "calendar-filled",
  20123. "unicode": "e6c0",
  20124. "unicode_decimal": 59072
  20125. },
  20126. {
  20127. "icon_id": "24932456",
  20128. "name": "notification-filled",
  20129. "font_class": "notification-filled",
  20130. "unicode": "e6c1",
  20131. "unicode_decimal": 59073
  20132. },
  20133. {
  20134. "icon_id": "24932457",
  20135. "name": "wallet-filled",
  20136. "font_class": "wallet-filled",
  20137. "unicode": "e6c2",
  20138. "unicode_decimal": 59074
  20139. },
  20140. {
  20141. "icon_id": "24932458",
  20142. "name": "paihangbang-filled",
  20143. "font_class": "medal-filled",
  20144. "unicode": "e6c3",
  20145. "unicode_decimal": 59075
  20146. },
  20147. {
  20148. "icon_id": "24932459",
  20149. "name": "gift-filled",
  20150. "font_class": "gift-filled",
  20151. "unicode": "e6c4",
  20152. "unicode_decimal": 59076
  20153. },
  20154. {
  20155. "icon_id": "24932460",
  20156. "name": "fire-filled",
  20157. "font_class": "fire-filled",
  20158. "unicode": "e6c5",
  20159. "unicode_decimal": 59077
  20160. },
  20161. {
  20162. "icon_id": "24928001",
  20163. "name": "refreshempty",
  20164. "font_class": "refreshempty",
  20165. "unicode": "e6bf",
  20166. "unicode_decimal": 59071
  20167. },
  20168. {
  20169. "icon_id": "24926853",
  20170. "name": "location-ellipse",
  20171. "font_class": "location-filled",
  20172. "unicode": "e6af",
  20173. "unicode_decimal": 59055
  20174. },
  20175. {
  20176. "icon_id": "24926735",
  20177. "name": "person-filled",
  20178. "font_class": "person-filled",
  20179. "unicode": "e69d",
  20180. "unicode_decimal": 59037
  20181. },
  20182. {
  20183. "icon_id": "24926703",
  20184. "name": "personadd-filled",
  20185. "font_class": "personadd-filled",
  20186. "unicode": "e698",
  20187. "unicode_decimal": 59032
  20188. },
  20189. {
  20190. "icon_id": "24923351",
  20191. "name": "back",
  20192. "font_class": "back",
  20193. "unicode": "e6b9",
  20194. "unicode_decimal": 59065
  20195. },
  20196. {
  20197. "icon_id": "24923352",
  20198. "name": "forward",
  20199. "font_class": "forward",
  20200. "unicode": "e6ba",
  20201. "unicode_decimal": 59066
  20202. },
  20203. {
  20204. "icon_id": "24923353",
  20205. "name": "arrowthinright",
  20206. "font_class": "arrow-right",
  20207. "unicode": "e6bb",
  20208. "unicode_decimal": 59067
  20209. },
  20210. {
  20211. "icon_id": "24923353",
  20212. "name": "arrowthinright",
  20213. "font_class": "arrowthinright",
  20214. "unicode": "e6bb",
  20215. "unicode_decimal": 59067
  20216. },
  20217. {
  20218. "icon_id": "24923354",
  20219. "name": "arrowthinleft",
  20220. "font_class": "arrow-left",
  20221. "unicode": "e6bc",
  20222. "unicode_decimal": 59068
  20223. },
  20224. {
  20225. "icon_id": "24923354",
  20226. "name": "arrowthinleft",
  20227. "font_class": "arrowthinleft",
  20228. "unicode": "e6bc",
  20229. "unicode_decimal": 59068
  20230. },
  20231. {
  20232. "icon_id": "24923355",
  20233. "name": "arrowthinup",
  20234. "font_class": "arrow-up",
  20235. "unicode": "e6bd",
  20236. "unicode_decimal": 59069
  20237. },
  20238. {
  20239. "icon_id": "24923355",
  20240. "name": "arrowthinup",
  20241. "font_class": "arrowthinup",
  20242. "unicode": "e6bd",
  20243. "unicode_decimal": 59069
  20244. },
  20245. {
  20246. "icon_id": "24923356",
  20247. "name": "arrowthindown",
  20248. "font_class": "arrow-down",
  20249. "unicode": "e6be",
  20250. "unicode_decimal": 59070
  20251. },
  20252. {
  20253. "icon_id": "24923356",
  20254. "name": "arrowthindown",
  20255. "font_class": "arrowthindown",
  20256. "unicode": "e6be",
  20257. "unicode_decimal": 59070
  20258. },
  20259. {
  20260. "icon_id": "24923349",
  20261. "name": "arrowdown",
  20262. "font_class": "bottom",
  20263. "unicode": "e6b8",
  20264. "unicode_decimal": 59064
  20265. },
  20266. {
  20267. "icon_id": "24923349",
  20268. "name": "arrowdown",
  20269. "font_class": "arrowdown",
  20270. "unicode": "e6b8",
  20271. "unicode_decimal": 59064
  20272. },
  20273. {
  20274. "icon_id": "24923346",
  20275. "name": "arrowright",
  20276. "font_class": "right",
  20277. "unicode": "e6b5",
  20278. "unicode_decimal": 59061
  20279. },
  20280. {
  20281. "icon_id": "24923346",
  20282. "name": "arrowright",
  20283. "font_class": "arrowright",
  20284. "unicode": "e6b5",
  20285. "unicode_decimal": 59061
  20286. },
  20287. {
  20288. "icon_id": "24923347",
  20289. "name": "arrowup",
  20290. "font_class": "top",
  20291. "unicode": "e6b6",
  20292. "unicode_decimal": 59062
  20293. },
  20294. {
  20295. "icon_id": "24923347",
  20296. "name": "arrowup",
  20297. "font_class": "arrowup",
  20298. "unicode": "e6b6",
  20299. "unicode_decimal": 59062
  20300. },
  20301. {
  20302. "icon_id": "24923348",
  20303. "name": "arrowleft",
  20304. "font_class": "left",
  20305. "unicode": "e6b7",
  20306. "unicode_decimal": 59063
  20307. },
  20308. {
  20309. "icon_id": "24923348",
  20310. "name": "arrowleft",
  20311. "font_class": "arrowleft",
  20312. "unicode": "e6b7",
  20313. "unicode_decimal": 59063
  20314. },
  20315. {
  20316. "icon_id": "24923334",
  20317. "name": "eye",
  20318. "font_class": "eye",
  20319. "unicode": "e651",
  20320. "unicode_decimal": 58961
  20321. },
  20322. {
  20323. "icon_id": "24923335",
  20324. "name": "eye-filled",
  20325. "font_class": "eye-filled",
  20326. "unicode": "e66a",
  20327. "unicode_decimal": 58986
  20328. },
  20329. {
  20330. "icon_id": "24923336",
  20331. "name": "eye-slash",
  20332. "font_class": "eye-slash",
  20333. "unicode": "e6b3",
  20334. "unicode_decimal": 59059
  20335. },
  20336. {
  20337. "icon_id": "24923337",
  20338. "name": "eye-slash-filled",
  20339. "font_class": "eye-slash-filled",
  20340. "unicode": "e6b4",
  20341. "unicode_decimal": 59060
  20342. },
  20343. {
  20344. "icon_id": "24923305",
  20345. "name": "info-filled",
  20346. "font_class": "info-filled",
  20347. "unicode": "e649",
  20348. "unicode_decimal": 58953
  20349. },
  20350. {
  20351. "icon_id": "24923299",
  20352. "name": "reload-01",
  20353. "font_class": "reload",
  20354. "unicode": "e6b2",
  20355. "unicode_decimal": 59058
  20356. },
  20357. {
  20358. "icon_id": "24923195",
  20359. "name": "mic_slash_fill",
  20360. "font_class": "micoff-filled",
  20361. "unicode": "e6b0",
  20362. "unicode_decimal": 59056
  20363. },
  20364. {
  20365. "icon_id": "24923165",
  20366. "name": "map-pin-ellipse",
  20367. "font_class": "map-pin-ellipse",
  20368. "unicode": "e6ac",
  20369. "unicode_decimal": 59052
  20370. },
  20371. {
  20372. "icon_id": "24923166",
  20373. "name": "map-pin",
  20374. "font_class": "map-pin",
  20375. "unicode": "e6ad",
  20376. "unicode_decimal": 59053
  20377. },
  20378. {
  20379. "icon_id": "24923167",
  20380. "name": "location",
  20381. "font_class": "location",
  20382. "unicode": "e6ae",
  20383. "unicode_decimal": 59054
  20384. },
  20385. {
  20386. "icon_id": "24923064",
  20387. "name": "starhalf",
  20388. "font_class": "starhalf",
  20389. "unicode": "e683",
  20390. "unicode_decimal": 59011
  20391. },
  20392. {
  20393. "icon_id": "24923065",
  20394. "name": "star",
  20395. "font_class": "star",
  20396. "unicode": "e688",
  20397. "unicode_decimal": 59016
  20398. },
  20399. {
  20400. "icon_id": "24923066",
  20401. "name": "star-filled",
  20402. "font_class": "star-filled",
  20403. "unicode": "e68f",
  20404. "unicode_decimal": 59023
  20405. },
  20406. {
  20407. "icon_id": "24899646",
  20408. "name": "a-rilidaka",
  20409. "font_class": "calendar",
  20410. "unicode": "e6a0",
  20411. "unicode_decimal": 59040
  20412. },
  20413. {
  20414. "icon_id": "24899647",
  20415. "name": "fire",
  20416. "font_class": "fire",
  20417. "unicode": "e6a1",
  20418. "unicode_decimal": 59041
  20419. },
  20420. {
  20421. "icon_id": "24899648",
  20422. "name": "paihangbang",
  20423. "font_class": "medal",
  20424. "unicode": "e6a2",
  20425. "unicode_decimal": 59042
  20426. },
  20427. {
  20428. "icon_id": "24899649",
  20429. "name": "font",
  20430. "font_class": "font",
  20431. "unicode": "e6a3",
  20432. "unicode_decimal": 59043
  20433. },
  20434. {
  20435. "icon_id": "24899650",
  20436. "name": "gift",
  20437. "font_class": "gift",
  20438. "unicode": "e6a4",
  20439. "unicode_decimal": 59044
  20440. },
  20441. {
  20442. "icon_id": "24899651",
  20443. "name": "link",
  20444. "font_class": "link",
  20445. "unicode": "e6a5",
  20446. "unicode_decimal": 59045
  20447. },
  20448. {
  20449. "icon_id": "24899652",
  20450. "name": "notification",
  20451. "font_class": "notification",
  20452. "unicode": "e6a6",
  20453. "unicode_decimal": 59046
  20454. },
  20455. {
  20456. "icon_id": "24899653",
  20457. "name": "staff",
  20458. "font_class": "staff",
  20459. "unicode": "e6a7",
  20460. "unicode_decimal": 59047
  20461. },
  20462. {
  20463. "icon_id": "24899654",
  20464. "name": "VIP",
  20465. "font_class": "vip",
  20466. "unicode": "e6a8",
  20467. "unicode_decimal": 59048
  20468. },
  20469. {
  20470. "icon_id": "24899655",
  20471. "name": "folder_add",
  20472. "font_class": "folder-add",
  20473. "unicode": "e6a9",
  20474. "unicode_decimal": 59049
  20475. },
  20476. {
  20477. "icon_id": "24899656",
  20478. "name": "tune",
  20479. "font_class": "tune",
  20480. "unicode": "e6aa",
  20481. "unicode_decimal": 59050
  20482. },
  20483. {
  20484. "icon_id": "24899657",
  20485. "name": "shimingrenzheng",
  20486. "font_class": "auth",
  20487. "unicode": "e6ab",
  20488. "unicode_decimal": 59051
  20489. },
  20490. {
  20491. "icon_id": "24899565",
  20492. "name": "person",
  20493. "font_class": "person",
  20494. "unicode": "e699",
  20495. "unicode_decimal": 59033
  20496. },
  20497. {
  20498. "icon_id": "24899566",
  20499. "name": "email-filled",
  20500. "font_class": "email-filled",
  20501. "unicode": "e69a",
  20502. "unicode_decimal": 59034
  20503. },
  20504. {
  20505. "icon_id": "24899567",
  20506. "name": "phone-filled",
  20507. "font_class": "phone-filled",
  20508. "unicode": "e69b",
  20509. "unicode_decimal": 59035
  20510. },
  20511. {
  20512. "icon_id": "24899568",
  20513. "name": "phone",
  20514. "font_class": "phone",
  20515. "unicode": "e69c",
  20516. "unicode_decimal": 59036
  20517. },
  20518. {
  20519. "icon_id": "24899570",
  20520. "name": "email",
  20521. "font_class": "email",
  20522. "unicode": "e69e",
  20523. "unicode_decimal": 59038
  20524. },
  20525. {
  20526. "icon_id": "24899571",
  20527. "name": "personadd",
  20528. "font_class": "personadd",
  20529. "unicode": "e69f",
  20530. "unicode_decimal": 59039
  20531. },
  20532. {
  20533. "icon_id": "24899558",
  20534. "name": "chatboxes-filled",
  20535. "font_class": "chatboxes-filled",
  20536. "unicode": "e692",
  20537. "unicode_decimal": 59026
  20538. },
  20539. {
  20540. "icon_id": "24899559",
  20541. "name": "contact",
  20542. "font_class": "contact",
  20543. "unicode": "e693",
  20544. "unicode_decimal": 59027
  20545. },
  20546. {
  20547. "icon_id": "24899560",
  20548. "name": "chatbubble-filled",
  20549. "font_class": "chatbubble-filled",
  20550. "unicode": "e694",
  20551. "unicode_decimal": 59028
  20552. },
  20553. {
  20554. "icon_id": "24899561",
  20555. "name": "contact-filled",
  20556. "font_class": "contact-filled",
  20557. "unicode": "e695",
  20558. "unicode_decimal": 59029
  20559. },
  20560. {
  20561. "icon_id": "24899562",
  20562. "name": "chatboxes",
  20563. "font_class": "chatboxes",
  20564. "unicode": "e696",
  20565. "unicode_decimal": 59030
  20566. },
  20567. {
  20568. "icon_id": "24899563",
  20569. "name": "chatbubble",
  20570. "font_class": "chatbubble",
  20571. "unicode": "e697",
  20572. "unicode_decimal": 59031
  20573. },
  20574. {
  20575. "icon_id": "24881290",
  20576. "name": "upload-filled",
  20577. "font_class": "upload-filled",
  20578. "unicode": "e68e",
  20579. "unicode_decimal": 59022
  20580. },
  20581. {
  20582. "icon_id": "24881292",
  20583. "name": "upload",
  20584. "font_class": "upload",
  20585. "unicode": "e690",
  20586. "unicode_decimal": 59024
  20587. },
  20588. {
  20589. "icon_id": "24881293",
  20590. "name": "weixin",
  20591. "font_class": "weixin",
  20592. "unicode": "e691",
  20593. "unicode_decimal": 59025
  20594. },
  20595. {
  20596. "icon_id": "24881274",
  20597. "name": "compose",
  20598. "font_class": "compose",
  20599. "unicode": "e67f",
  20600. "unicode_decimal": 59007
  20601. },
  20602. {
  20603. "icon_id": "24881275",
  20604. "name": "qq",
  20605. "font_class": "qq",
  20606. "unicode": "e680",
  20607. "unicode_decimal": 59008
  20608. },
  20609. {
  20610. "icon_id": "24881276",
  20611. "name": "download-filled",
  20612. "font_class": "download-filled",
  20613. "unicode": "e681",
  20614. "unicode_decimal": 59009
  20615. },
  20616. {
  20617. "icon_id": "24881277",
  20618. "name": "pengyouquan",
  20619. "font_class": "pyq",
  20620. "unicode": "e682",
  20621. "unicode_decimal": 59010
  20622. },
  20623. {
  20624. "icon_id": "24881279",
  20625. "name": "sound",
  20626. "font_class": "sound",
  20627. "unicode": "e684",
  20628. "unicode_decimal": 59012
  20629. },
  20630. {
  20631. "icon_id": "24881280",
  20632. "name": "trash-filled",
  20633. "font_class": "trash-filled",
  20634. "unicode": "e685",
  20635. "unicode_decimal": 59013
  20636. },
  20637. {
  20638. "icon_id": "24881281",
  20639. "name": "sound-filled",
  20640. "font_class": "sound-filled",
  20641. "unicode": "e686",
  20642. "unicode_decimal": 59014
  20643. },
  20644. {
  20645. "icon_id": "24881282",
  20646. "name": "trash",
  20647. "font_class": "trash",
  20648. "unicode": "e687",
  20649. "unicode_decimal": 59015
  20650. },
  20651. {
  20652. "icon_id": "24881284",
  20653. "name": "videocam-filled",
  20654. "font_class": "videocam-filled",
  20655. "unicode": "e689",
  20656. "unicode_decimal": 59017
  20657. },
  20658. {
  20659. "icon_id": "24881285",
  20660. "name": "spinner-cycle",
  20661. "font_class": "spinner-cycle",
  20662. "unicode": "e68a",
  20663. "unicode_decimal": 59018
  20664. },
  20665. {
  20666. "icon_id": "24881286",
  20667. "name": "weibo",
  20668. "font_class": "weibo",
  20669. "unicode": "e68b",
  20670. "unicode_decimal": 59019
  20671. },
  20672. {
  20673. "icon_id": "24881288",
  20674. "name": "videocam",
  20675. "font_class": "videocam",
  20676. "unicode": "e68c",
  20677. "unicode_decimal": 59020
  20678. },
  20679. {
  20680. "icon_id": "24881289",
  20681. "name": "download",
  20682. "font_class": "download",
  20683. "unicode": "e68d",
  20684. "unicode_decimal": 59021
  20685. },
  20686. {
  20687. "icon_id": "24879601",
  20688. "name": "help",
  20689. "font_class": "help",
  20690. "unicode": "e679",
  20691. "unicode_decimal": 59001
  20692. },
  20693. {
  20694. "icon_id": "24879602",
  20695. "name": "navigate-filled",
  20696. "font_class": "navigate-filled",
  20697. "unicode": "e67a",
  20698. "unicode_decimal": 59002
  20699. },
  20700. {
  20701. "icon_id": "24879603",
  20702. "name": "plusempty",
  20703. "font_class": "plusempty",
  20704. "unicode": "e67b",
  20705. "unicode_decimal": 59003
  20706. },
  20707. {
  20708. "icon_id": "24879604",
  20709. "name": "smallcircle",
  20710. "font_class": "smallcircle",
  20711. "unicode": "e67c",
  20712. "unicode_decimal": 59004
  20713. },
  20714. {
  20715. "icon_id": "24879605",
  20716. "name": "minus-filled",
  20717. "font_class": "minus-filled",
  20718. "unicode": "e67d",
  20719. "unicode_decimal": 59005
  20720. },
  20721. {
  20722. "icon_id": "24879606",
  20723. "name": "micoff",
  20724. "font_class": "micoff",
  20725. "unicode": "e67e",
  20726. "unicode_decimal": 59006
  20727. },
  20728. {
  20729. "icon_id": "24879588",
  20730. "name": "closeempty",
  20731. "font_class": "closeempty",
  20732. "unicode": "e66c",
  20733. "unicode_decimal": 58988
  20734. },
  20735. {
  20736. "icon_id": "24879589",
  20737. "name": "clear",
  20738. "font_class": "clear",
  20739. "unicode": "e66d",
  20740. "unicode_decimal": 58989
  20741. },
  20742. {
  20743. "icon_id": "24879590",
  20744. "name": "navigate",
  20745. "font_class": "navigate",
  20746. "unicode": "e66e",
  20747. "unicode_decimal": 58990
  20748. },
  20749. {
  20750. "icon_id": "24879591",
  20751. "name": "minus",
  20752. "font_class": "minus",
  20753. "unicode": "e66f",
  20754. "unicode_decimal": 58991
  20755. },
  20756. {
  20757. "icon_id": "24879592",
  20758. "name": "image",
  20759. "font_class": "image",
  20760. "unicode": "e670",
  20761. "unicode_decimal": 58992
  20762. },
  20763. {
  20764. "icon_id": "24879593",
  20765. "name": "mic",
  20766. "font_class": "mic",
  20767. "unicode": "e671",
  20768. "unicode_decimal": 58993
  20769. },
  20770. {
  20771. "icon_id": "24879594",
  20772. "name": "paperplane",
  20773. "font_class": "paperplane",
  20774. "unicode": "e672",
  20775. "unicode_decimal": 58994
  20776. },
  20777. {
  20778. "icon_id": "24879595",
  20779. "name": "close",
  20780. "font_class": "close",
  20781. "unicode": "e673",
  20782. "unicode_decimal": 58995
  20783. },
  20784. {
  20785. "icon_id": "24879596",
  20786. "name": "help-filled",
  20787. "font_class": "help-filled",
  20788. "unicode": "e674",
  20789. "unicode_decimal": 58996
  20790. },
  20791. {
  20792. "icon_id": "24879597",
  20793. "name": "plus-filled",
  20794. "font_class": "paperplane-filled",
  20795. "unicode": "e675",
  20796. "unicode_decimal": 58997
  20797. },
  20798. {
  20799. "icon_id": "24879598",
  20800. "name": "plus",
  20801. "font_class": "plus",
  20802. "unicode": "e676",
  20803. "unicode_decimal": 58998
  20804. },
  20805. {
  20806. "icon_id": "24879599",
  20807. "name": "mic-filled",
  20808. "font_class": "mic-filled",
  20809. "unicode": "e677",
  20810. "unicode_decimal": 58999
  20811. },
  20812. {
  20813. "icon_id": "24879600",
  20814. "name": "image-filled",
  20815. "font_class": "image-filled",
  20816. "unicode": "e678",
  20817. "unicode_decimal": 59e3
  20818. },
  20819. {
  20820. "icon_id": "24855900",
  20821. "name": "locked-filled",
  20822. "font_class": "locked-filled",
  20823. "unicode": "e668",
  20824. "unicode_decimal": 58984
  20825. },
  20826. {
  20827. "icon_id": "24855901",
  20828. "name": "info",
  20829. "font_class": "info",
  20830. "unicode": "e669",
  20831. "unicode_decimal": 58985
  20832. },
  20833. {
  20834. "icon_id": "24855903",
  20835. "name": "locked",
  20836. "font_class": "locked",
  20837. "unicode": "e66b",
  20838. "unicode_decimal": 58987
  20839. },
  20840. {
  20841. "icon_id": "24855884",
  20842. "name": "camera-filled",
  20843. "font_class": "camera-filled",
  20844. "unicode": "e658",
  20845. "unicode_decimal": 58968
  20846. },
  20847. {
  20848. "icon_id": "24855885",
  20849. "name": "chat-filled",
  20850. "font_class": "chat-filled",
  20851. "unicode": "e659",
  20852. "unicode_decimal": 58969
  20853. },
  20854. {
  20855. "icon_id": "24855886",
  20856. "name": "camera",
  20857. "font_class": "camera",
  20858. "unicode": "e65a",
  20859. "unicode_decimal": 58970
  20860. },
  20861. {
  20862. "icon_id": "24855887",
  20863. "name": "circle",
  20864. "font_class": "circle",
  20865. "unicode": "e65b",
  20866. "unicode_decimal": 58971
  20867. },
  20868. {
  20869. "icon_id": "24855888",
  20870. "name": "checkmarkempty",
  20871. "font_class": "checkmarkempty",
  20872. "unicode": "e65c",
  20873. "unicode_decimal": 58972
  20874. },
  20875. {
  20876. "icon_id": "24855889",
  20877. "name": "chat",
  20878. "font_class": "chat",
  20879. "unicode": "e65d",
  20880. "unicode_decimal": 58973
  20881. },
  20882. {
  20883. "icon_id": "24855890",
  20884. "name": "circle-filled",
  20885. "font_class": "circle-filled",
  20886. "unicode": "e65e",
  20887. "unicode_decimal": 58974
  20888. },
  20889. {
  20890. "icon_id": "24855891",
  20891. "name": "flag",
  20892. "font_class": "flag",
  20893. "unicode": "e65f",
  20894. "unicode_decimal": 58975
  20895. },
  20896. {
  20897. "icon_id": "24855892",
  20898. "name": "flag-filled",
  20899. "font_class": "flag-filled",
  20900. "unicode": "e660",
  20901. "unicode_decimal": 58976
  20902. },
  20903. {
  20904. "icon_id": "24855893",
  20905. "name": "gear-filled",
  20906. "font_class": "gear-filled",
  20907. "unicode": "e661",
  20908. "unicode_decimal": 58977
  20909. },
  20910. {
  20911. "icon_id": "24855894",
  20912. "name": "home",
  20913. "font_class": "home",
  20914. "unicode": "e662",
  20915. "unicode_decimal": 58978
  20916. },
  20917. {
  20918. "icon_id": "24855895",
  20919. "name": "home-filled",
  20920. "font_class": "home-filled",
  20921. "unicode": "e663",
  20922. "unicode_decimal": 58979
  20923. },
  20924. {
  20925. "icon_id": "24855896",
  20926. "name": "gear",
  20927. "font_class": "gear",
  20928. "unicode": "e664",
  20929. "unicode_decimal": 58980
  20930. },
  20931. {
  20932. "icon_id": "24855897",
  20933. "name": "smallcircle-filled",
  20934. "font_class": "smallcircle-filled",
  20935. "unicode": "e665",
  20936. "unicode_decimal": 58981
  20937. },
  20938. {
  20939. "icon_id": "24855898",
  20940. "name": "map-filled",
  20941. "font_class": "map-filled",
  20942. "unicode": "e666",
  20943. "unicode_decimal": 58982
  20944. },
  20945. {
  20946. "icon_id": "24855899",
  20947. "name": "map",
  20948. "font_class": "map",
  20949. "unicode": "e667",
  20950. "unicode_decimal": 58983
  20951. },
  20952. {
  20953. "icon_id": "24855825",
  20954. "name": "refresh-filled",
  20955. "font_class": "refresh-filled",
  20956. "unicode": "e656",
  20957. "unicode_decimal": 58966
  20958. },
  20959. {
  20960. "icon_id": "24855826",
  20961. "name": "refresh",
  20962. "font_class": "refresh",
  20963. "unicode": "e657",
  20964. "unicode_decimal": 58967
  20965. },
  20966. {
  20967. "icon_id": "24855808",
  20968. "name": "cloud-upload",
  20969. "font_class": "cloud-upload",
  20970. "unicode": "e645",
  20971. "unicode_decimal": 58949
  20972. },
  20973. {
  20974. "icon_id": "24855809",
  20975. "name": "cloud-download-filled",
  20976. "font_class": "cloud-download-filled",
  20977. "unicode": "e646",
  20978. "unicode_decimal": 58950
  20979. },
  20980. {
  20981. "icon_id": "24855810",
  20982. "name": "cloud-download",
  20983. "font_class": "cloud-download",
  20984. "unicode": "e647",
  20985. "unicode_decimal": 58951
  20986. },
  20987. {
  20988. "icon_id": "24855811",
  20989. "name": "cloud-upload-filled",
  20990. "font_class": "cloud-upload-filled",
  20991. "unicode": "e648",
  20992. "unicode_decimal": 58952
  20993. },
  20994. {
  20995. "icon_id": "24855813",
  20996. "name": "redo",
  20997. "font_class": "redo",
  20998. "unicode": "e64a",
  20999. "unicode_decimal": 58954
  21000. },
  21001. {
  21002. "icon_id": "24855814",
  21003. "name": "images-filled",
  21004. "font_class": "images-filled",
  21005. "unicode": "e64b",
  21006. "unicode_decimal": 58955
  21007. },
  21008. {
  21009. "icon_id": "24855815",
  21010. "name": "undo-filled",
  21011. "font_class": "undo-filled",
  21012. "unicode": "e64c",
  21013. "unicode_decimal": 58956
  21014. },
  21015. {
  21016. "icon_id": "24855816",
  21017. "name": "more",
  21018. "font_class": "more",
  21019. "unicode": "e64d",
  21020. "unicode_decimal": 58957
  21021. },
  21022. {
  21023. "icon_id": "24855817",
  21024. "name": "more-filled",
  21025. "font_class": "more-filled",
  21026. "unicode": "e64e",
  21027. "unicode_decimal": 58958
  21028. },
  21029. {
  21030. "icon_id": "24855818",
  21031. "name": "undo",
  21032. "font_class": "undo",
  21033. "unicode": "e64f",
  21034. "unicode_decimal": 58959
  21035. },
  21036. {
  21037. "icon_id": "24855819",
  21038. "name": "images",
  21039. "font_class": "images",
  21040. "unicode": "e650",
  21041. "unicode_decimal": 58960
  21042. },
  21043. {
  21044. "icon_id": "24855821",
  21045. "name": "paperclip",
  21046. "font_class": "paperclip",
  21047. "unicode": "e652",
  21048. "unicode_decimal": 58962
  21049. },
  21050. {
  21051. "icon_id": "24855822",
  21052. "name": "settings",
  21053. "font_class": "settings",
  21054. "unicode": "e653",
  21055. "unicode_decimal": 58963
  21056. },
  21057. {
  21058. "icon_id": "24855823",
  21059. "name": "search",
  21060. "font_class": "search",
  21061. "unicode": "e654",
  21062. "unicode_decimal": 58964
  21063. },
  21064. {
  21065. "icon_id": "24855824",
  21066. "name": "redo-filled",
  21067. "font_class": "redo-filled",
  21068. "unicode": "e655",
  21069. "unicode_decimal": 58965
  21070. },
  21071. {
  21072. "icon_id": "24841702",
  21073. "name": "list",
  21074. "font_class": "list",
  21075. "unicode": "e644",
  21076. "unicode_decimal": 58948
  21077. },
  21078. {
  21079. "icon_id": "24841489",
  21080. "name": "mail-open-filled",
  21081. "font_class": "mail-open-filled",
  21082. "unicode": "e63a",
  21083. "unicode_decimal": 58938
  21084. },
  21085. {
  21086. "icon_id": "24841491",
  21087. "name": "hand-thumbsdown-filled",
  21088. "font_class": "hand-down-filled",
  21089. "unicode": "e63c",
  21090. "unicode_decimal": 58940
  21091. },
  21092. {
  21093. "icon_id": "24841492",
  21094. "name": "hand-thumbsdown",
  21095. "font_class": "hand-down",
  21096. "unicode": "e63d",
  21097. "unicode_decimal": 58941
  21098. },
  21099. {
  21100. "icon_id": "24841493",
  21101. "name": "hand-thumbsup-filled",
  21102. "font_class": "hand-up-filled",
  21103. "unicode": "e63e",
  21104. "unicode_decimal": 58942
  21105. },
  21106. {
  21107. "icon_id": "24841494",
  21108. "name": "hand-thumbsup",
  21109. "font_class": "hand-up",
  21110. "unicode": "e63f",
  21111. "unicode_decimal": 58943
  21112. },
  21113. {
  21114. "icon_id": "24841496",
  21115. "name": "heart-filled",
  21116. "font_class": "heart-filled",
  21117. "unicode": "e641",
  21118. "unicode_decimal": 58945
  21119. },
  21120. {
  21121. "icon_id": "24841498",
  21122. "name": "mail-open",
  21123. "font_class": "mail-open",
  21124. "unicode": "e643",
  21125. "unicode_decimal": 58947
  21126. },
  21127. {
  21128. "icon_id": "24841488",
  21129. "name": "heart",
  21130. "font_class": "heart",
  21131. "unicode": "e639",
  21132. "unicode_decimal": 58937
  21133. },
  21134. {
  21135. "icon_id": "24839963",
  21136. "name": "loop",
  21137. "font_class": "loop",
  21138. "unicode": "e633",
  21139. "unicode_decimal": 58931
  21140. },
  21141. {
  21142. "icon_id": "24839866",
  21143. "name": "pulldown",
  21144. "font_class": "pulldown",
  21145. "unicode": "e632",
  21146. "unicode_decimal": 58930
  21147. },
  21148. {
  21149. "icon_id": "24813798",
  21150. "name": "scan",
  21151. "font_class": "scan",
  21152. "unicode": "e62a",
  21153. "unicode_decimal": 58922
  21154. },
  21155. {
  21156. "icon_id": "24813786",
  21157. "name": "bars",
  21158. "font_class": "bars",
  21159. "unicode": "e627",
  21160. "unicode_decimal": 58919
  21161. },
  21162. {
  21163. "icon_id": "24813788",
  21164. "name": "cart-filled",
  21165. "font_class": "cart-filled",
  21166. "unicode": "e629",
  21167. "unicode_decimal": 58921
  21168. },
  21169. {
  21170. "icon_id": "24813790",
  21171. "name": "checkbox",
  21172. "font_class": "checkbox",
  21173. "unicode": "e62b",
  21174. "unicode_decimal": 58923
  21175. },
  21176. {
  21177. "icon_id": "24813791",
  21178. "name": "checkbox-filled",
  21179. "font_class": "checkbox-filled",
  21180. "unicode": "e62c",
  21181. "unicode_decimal": 58924
  21182. },
  21183. {
  21184. "icon_id": "24813794",
  21185. "name": "shop",
  21186. "font_class": "shop",
  21187. "unicode": "e62f",
  21188. "unicode_decimal": 58927
  21189. },
  21190. {
  21191. "icon_id": "24813795",
  21192. "name": "headphones",
  21193. "font_class": "headphones",
  21194. "unicode": "e630",
  21195. "unicode_decimal": 58928
  21196. },
  21197. {
  21198. "icon_id": "24813796",
  21199. "name": "cart",
  21200. "font_class": "cart",
  21201. "unicode": "e631",
  21202. "unicode_decimal": 58929
  21203. }
  21204. ]
  21205. };
  21206. const getVal = (val) => {
  21207. const reg = /^[0-9]*$/g;
  21208. return typeof val === "number" || reg.test(val) ? val + "px" : val;
  21209. };
  21210. const _sfc_main$V = {
  21211. name: "UniIcons",
  21212. emits: ["click"],
  21213. props: {
  21214. type: {
  21215. type: String,
  21216. default: ""
  21217. },
  21218. color: {
  21219. type: String,
  21220. default: "#333333"
  21221. },
  21222. size: {
  21223. type: [Number, String],
  21224. default: 16
  21225. },
  21226. customPrefix: {
  21227. type: String,
  21228. default: ""
  21229. }
  21230. },
  21231. data() {
  21232. return {
  21233. icons: icons.glyphs
  21234. };
  21235. },
  21236. computed: {
  21237. unicode() {
  21238. let code2 = this.icons.find((v) => v.font_class === this.type);
  21239. if (code2) {
  21240. return unescape(`%u${code2.unicode}`);
  21241. }
  21242. return "";
  21243. },
  21244. iconSize() {
  21245. return getVal(this.size);
  21246. }
  21247. },
  21248. methods: {
  21249. _onClick() {
  21250. this.$emit("click");
  21251. }
  21252. }
  21253. };
  21254. function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
  21255. return vue.openBlock(), vue.createElementBlock(
  21256. "text",
  21257. {
  21258. style: vue.normalizeStyle({ color: $props.color, "font-size": $options.iconSize }),
  21259. class: vue.normalizeClass(["uni-icons", ["uniui-" + $props.type, $props.customPrefix, $props.customPrefix ? $props.type : ""]]),
  21260. onClick: _cache[0] || (_cache[0] = (...args) => $options._onClick && $options._onClick(...args))
  21261. },
  21262. null,
  21263. 6
  21264. /* CLASS, STYLE */
  21265. );
  21266. }
  21267. const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$U], ["__scopeId", "data-v-d31e1c47"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uni-icons/components/uni-icons/uni-icons.vue"]]);
  21268. let Calendar$1 = class Calendar {
  21269. constructor({
  21270. selected,
  21271. startDate,
  21272. endDate,
  21273. range: range2
  21274. } = {}) {
  21275. this.date = this.getDateObj(/* @__PURE__ */ new Date());
  21276. this.selected = selected || [];
  21277. this.startDate = startDate;
  21278. this.endDate = endDate;
  21279. this.range = range2;
  21280. this.cleanMultipleStatus();
  21281. this.weeks = {};
  21282. this.lastHover = false;
  21283. }
  21284. /**
  21285. * 设置日期
  21286. * @param {Object} date
  21287. */
  21288. setDate(date3) {
  21289. const selectDate = this.getDateObj(date3);
  21290. this.getWeeks(selectDate.fullDate);
  21291. }
  21292. /**
  21293. * 清理多选状态
  21294. */
  21295. cleanMultipleStatus() {
  21296. this.multipleStatus = {
  21297. before: "",
  21298. after: "",
  21299. data: []
  21300. };
  21301. }
  21302. setStartDate(startDate) {
  21303. this.startDate = startDate;
  21304. }
  21305. setEndDate(endDate) {
  21306. this.endDate = endDate;
  21307. }
  21308. getPreMonthObj(date3) {
  21309. date3 = fixIosDateFormat(date3);
  21310. date3 = new Date(date3);
  21311. const oldMonth = date3.getMonth();
  21312. date3.setMonth(oldMonth - 1);
  21313. const newMonth = date3.getMonth();
  21314. if (oldMonth !== 0 && newMonth - oldMonth === 0) {
  21315. date3.setMonth(newMonth - 1);
  21316. }
  21317. return this.getDateObj(date3);
  21318. }
  21319. getNextMonthObj(date3) {
  21320. date3 = fixIosDateFormat(date3);
  21321. date3 = new Date(date3);
  21322. const oldMonth = date3.getMonth();
  21323. date3.setMonth(oldMonth + 1);
  21324. const newMonth = date3.getMonth();
  21325. if (newMonth - oldMonth > 1) {
  21326. date3.setMonth(newMonth - 1);
  21327. }
  21328. return this.getDateObj(date3);
  21329. }
  21330. /**
  21331. * 获取指定格式Date对象
  21332. */
  21333. getDateObj(date3) {
  21334. date3 = fixIosDateFormat(date3);
  21335. date3 = new Date(date3);
  21336. return {
  21337. fullDate: getDate(date3),
  21338. year: date3.getFullYear(),
  21339. month: addZero(date3.getMonth() + 1),
  21340. date: addZero(date3.getDate()),
  21341. day: date3.getDay()
  21342. };
  21343. }
  21344. /**
  21345. * 获取上一个月日期集合
  21346. */
  21347. getPreMonthDays(amount2, dateObj) {
  21348. const result = [];
  21349. for (let i = amount2 - 1; i >= 0; i--) {
  21350. const month = dateObj.month > 1 ? dateObj.month - 1 : 12;
  21351. const year = month === 12 ? dateObj.year - 1 : dateObj.year;
  21352. const date3 = new Date(year, month, -i).getDate();
  21353. const fullDate = `${year}-${addZero(month)}-${addZero(date3)}`;
  21354. let multiples = this.multipleStatus.data;
  21355. let multiplesStatus = -1;
  21356. if (this.range && multiples) {
  21357. multiplesStatus = multiples.findIndex((item) => {
  21358. return this.dateEqual(item, fullDate);
  21359. });
  21360. }
  21361. const checked = multiplesStatus !== -1;
  21362. const extraInfo = this.selected && this.selected.find((item) => {
  21363. if (this.dateEqual(fullDate, item.date)) {
  21364. return item;
  21365. }
  21366. });
  21367. result.push({
  21368. fullDate,
  21369. year,
  21370. month,
  21371. date: date3,
  21372. multiple: this.range ? checked : false,
  21373. beforeMultiple: this.isLogicBefore(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  21374. afterMultiple: this.isLogicAfter(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  21375. disable: this.startDate && !dateCompare(this.startDate, fullDate) || this.endDate && !dateCompare(fullDate, this.endDate),
  21376. isToday: fullDate === this.date.fullDate,
  21377. userChecked: false,
  21378. extraInfo
  21379. });
  21380. }
  21381. return result;
  21382. }
  21383. /**
  21384. * 获取本月日期集合
  21385. */
  21386. getCurrentMonthDays(amount2, dateObj) {
  21387. const result = [];
  21388. const fullDate = this.date.fullDate;
  21389. for (let i = 1; i <= amount2; i++) {
  21390. const currentDate = `${dateObj.year}-${dateObj.month}-${addZero(i)}`;
  21391. const isToday = fullDate === currentDate;
  21392. const extraInfo = this.selected && this.selected.find((item) => {
  21393. if (this.dateEqual(currentDate, item.date)) {
  21394. return item;
  21395. }
  21396. });
  21397. if (this.startDate) {
  21398. dateCompare(this.startDate, currentDate);
  21399. }
  21400. if (this.endDate) {
  21401. dateCompare(currentDate, this.endDate);
  21402. }
  21403. let multiples = this.multipleStatus.data;
  21404. let multiplesStatus = -1;
  21405. if (this.range && multiples) {
  21406. multiplesStatus = multiples.findIndex((item) => {
  21407. return this.dateEqual(item, currentDate);
  21408. });
  21409. }
  21410. const checked = multiplesStatus !== -1;
  21411. result.push({
  21412. fullDate: currentDate,
  21413. year: dateObj.year,
  21414. month: dateObj.month,
  21415. date: i,
  21416. multiple: this.range ? checked : false,
  21417. beforeMultiple: this.isLogicBefore(currentDate, this.multipleStatus.before, this.multipleStatus.after),
  21418. afterMultiple: this.isLogicAfter(currentDate, this.multipleStatus.before, this.multipleStatus.after),
  21419. disable: this.startDate && !dateCompare(this.startDate, currentDate) || this.endDate && !dateCompare(currentDate, this.endDate),
  21420. isToday,
  21421. userChecked: false,
  21422. extraInfo
  21423. });
  21424. }
  21425. return result;
  21426. }
  21427. /**
  21428. * 获取下一个月日期集合
  21429. */
  21430. _getNextMonthDays(amount2, dateObj) {
  21431. const result = [];
  21432. dateObj.month + 1;
  21433. for (let i = 1; i <= amount2; i++) {
  21434. const month = dateObj.month === 12 ? 1 : dateObj.month * 1 + 1;
  21435. const year = month === 1 ? dateObj.year + 1 : dateObj.year;
  21436. const fullDate = `${year}-${addZero(month)}-${addZero(i)}`;
  21437. let multiples = this.multipleStatus.data;
  21438. let multiplesStatus = -1;
  21439. if (this.range && multiples) {
  21440. multiplesStatus = multiples.findIndex((item) => {
  21441. return this.dateEqual(item, fullDate);
  21442. });
  21443. }
  21444. const checked = multiplesStatus !== -1;
  21445. const extraInfo = this.selected && this.selected.find((item) => {
  21446. if (this.dateEqual(fullDate, item.date)) {
  21447. return item;
  21448. }
  21449. });
  21450. result.push({
  21451. fullDate,
  21452. year,
  21453. date: i,
  21454. month,
  21455. multiple: this.range ? checked : false,
  21456. beforeMultiple: this.isLogicBefore(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  21457. afterMultiple: this.isLogicAfter(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  21458. disable: this.startDate && !dateCompare(this.startDate, fullDate) || this.endDate && !dateCompare(fullDate, this.endDate),
  21459. isToday: fullDate === this.date.fullDate,
  21460. userChecked: false,
  21461. extraInfo
  21462. });
  21463. }
  21464. return result;
  21465. }
  21466. /**
  21467. * 获取当前日期详情
  21468. * @param {Object} date
  21469. */
  21470. getInfo(date3) {
  21471. if (!date3) {
  21472. date3 = /* @__PURE__ */ new Date();
  21473. }
  21474. return this.calendar.find((item) => item.fullDate === this.getDateObj(date3).fullDate);
  21475. }
  21476. /**
  21477. * 比较时间是否相等
  21478. */
  21479. dateEqual(before, after) {
  21480. before = new Date(fixIosDateFormat(before));
  21481. after = new Date(fixIosDateFormat(after));
  21482. return before.valueOf() === after.valueOf();
  21483. }
  21484. /**
  21485. * 比较真实起始日期
  21486. */
  21487. isLogicBefore(currentDate, before, after) {
  21488. let logicBefore = before;
  21489. if (before && after) {
  21490. logicBefore = dateCompare(before, after) ? before : after;
  21491. }
  21492. return this.dateEqual(logicBefore, currentDate);
  21493. }
  21494. isLogicAfter(currentDate, before, after) {
  21495. let logicAfter = after;
  21496. if (before && after) {
  21497. logicAfter = dateCompare(before, after) ? after : before;
  21498. }
  21499. return this.dateEqual(logicAfter, currentDate);
  21500. }
  21501. /**
  21502. * 获取日期范围内所有日期
  21503. * @param {Object} begin
  21504. * @param {Object} end
  21505. */
  21506. geDateAll(begin, end) {
  21507. var arr = [];
  21508. var ab = begin.split("-");
  21509. var ae = end.split("-");
  21510. var db = /* @__PURE__ */ new Date();
  21511. db.setFullYear(ab[0], ab[1] - 1, ab[2]);
  21512. var de = /* @__PURE__ */ new Date();
  21513. de.setFullYear(ae[0], ae[1] - 1, ae[2]);
  21514. var unixDb = db.getTime() - 24 * 60 * 60 * 1e3;
  21515. var unixDe = de.getTime() - 24 * 60 * 60 * 1e3;
  21516. for (var k = unixDb; k <= unixDe; ) {
  21517. k = k + 24 * 60 * 60 * 1e3;
  21518. arr.push(this.getDateObj(new Date(parseInt(k))).fullDate);
  21519. }
  21520. return arr;
  21521. }
  21522. /**
  21523. * 获取多选状态
  21524. */
  21525. setMultiple(fullDate) {
  21526. if (!this.range)
  21527. return;
  21528. let {
  21529. before,
  21530. after
  21531. } = this.multipleStatus;
  21532. if (before && after) {
  21533. if (!this.lastHover) {
  21534. this.lastHover = true;
  21535. return;
  21536. }
  21537. this.multipleStatus.before = fullDate;
  21538. this.multipleStatus.after = "";
  21539. this.multipleStatus.data = [];
  21540. this.multipleStatus.fulldate = "";
  21541. this.lastHover = false;
  21542. } else {
  21543. if (!before) {
  21544. this.multipleStatus.before = fullDate;
  21545. this.lastHover = false;
  21546. } else {
  21547. this.multipleStatus.after = fullDate;
  21548. if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
  21549. this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
  21550. } else {
  21551. this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
  21552. }
  21553. this.lastHover = true;
  21554. }
  21555. }
  21556. this.getWeeks(fullDate);
  21557. }
  21558. /**
  21559. * 鼠标 hover 更新多选状态
  21560. */
  21561. setHoverMultiple(fullDate) {
  21562. if (!this.range || this.lastHover)
  21563. return;
  21564. const { before } = this.multipleStatus;
  21565. if (!before) {
  21566. this.multipleStatus.before = fullDate;
  21567. } else {
  21568. this.multipleStatus.after = fullDate;
  21569. if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
  21570. this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
  21571. } else {
  21572. this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
  21573. }
  21574. }
  21575. this.getWeeks(fullDate);
  21576. }
  21577. /**
  21578. * 更新默认值多选状态
  21579. */
  21580. setDefaultMultiple(before, after) {
  21581. this.multipleStatus.before = before;
  21582. this.multipleStatus.after = after;
  21583. if (before && after) {
  21584. if (dateCompare(before, after)) {
  21585. this.multipleStatus.data = this.geDateAll(before, after);
  21586. this.getWeeks(after);
  21587. } else {
  21588. this.multipleStatus.data = this.geDateAll(after, before);
  21589. this.getWeeks(before);
  21590. }
  21591. }
  21592. }
  21593. /**
  21594. * 获取每周数据
  21595. * @param {Object} dateData
  21596. */
  21597. getWeeks(dateData) {
  21598. const {
  21599. year,
  21600. month
  21601. } = this.getDateObj(dateData);
  21602. const preMonthDayAmount = new Date(year, month - 1, 1).getDay();
  21603. const preMonthDays = this.getPreMonthDays(preMonthDayAmount, this.getDateObj(dateData));
  21604. const currentMonthDayAmount = new Date(year, month, 0).getDate();
  21605. const currentMonthDays = this.getCurrentMonthDays(currentMonthDayAmount, this.getDateObj(dateData));
  21606. const nextMonthDayAmount = 42 - preMonthDayAmount - currentMonthDayAmount;
  21607. const nextMonthDays = this._getNextMonthDays(nextMonthDayAmount, this.getDateObj(dateData));
  21608. const calendarDays = [...preMonthDays, ...currentMonthDays, ...nextMonthDays];
  21609. const weeks = new Array(6);
  21610. for (let i = 0; i < calendarDays.length; i++) {
  21611. const index2 = Math.floor(i / 7);
  21612. if (!weeks[index2]) {
  21613. weeks[index2] = new Array(7);
  21614. }
  21615. weeks[index2][i % 7] = calendarDays[i];
  21616. }
  21617. this.calendar = calendarDays;
  21618. this.weeks = weeks;
  21619. }
  21620. };
  21621. function getDateTime(date3, hideSecond) {
  21622. return `${getDate(date3)} ${getTime(date3, hideSecond)}`;
  21623. }
  21624. function getDate(date3) {
  21625. date3 = fixIosDateFormat(date3);
  21626. date3 = new Date(date3);
  21627. const year = date3.getFullYear();
  21628. const month = date3.getMonth() + 1;
  21629. const day = date3.getDate();
  21630. return `${year}-${addZero(month)}-${addZero(day)}`;
  21631. }
  21632. function getTime(date3, hideSecond) {
  21633. date3 = fixIosDateFormat(date3);
  21634. date3 = new Date(date3);
  21635. const hour = date3.getHours();
  21636. const minute = date3.getMinutes();
  21637. const second = date3.getSeconds();
  21638. return hideSecond ? `${addZero(hour)}:${addZero(minute)}` : `${addZero(hour)}:${addZero(minute)}:${addZero(second)}`;
  21639. }
  21640. function addZero(num) {
  21641. if (num < 10) {
  21642. num = `0${num}`;
  21643. }
  21644. return num;
  21645. }
  21646. function getDefaultSecond(hideSecond) {
  21647. return hideSecond ? "00:00" : "00:00:00";
  21648. }
  21649. function dateCompare(startDate, endDate) {
  21650. startDate = new Date(fixIosDateFormat(startDate));
  21651. endDate = new Date(fixIosDateFormat(endDate));
  21652. return startDate <= endDate;
  21653. }
  21654. function checkDate(date3) {
  21655. const dateReg = /((19|20)\d{2})(-|\/)\d{1,2}(-|\/)\d{1,2}/g;
  21656. return date3.match(dateReg);
  21657. }
  21658. 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])?$/;
  21659. function fixIosDateFormat(value2) {
  21660. if (typeof value2 === "string" && dateTimeReg.test(value2)) {
  21661. value2 = value2.replace(/-/g, "/");
  21662. }
  21663. return value2;
  21664. }
  21665. const _sfc_main$U = {
  21666. props: {
  21667. weeks: {
  21668. type: Object,
  21669. default() {
  21670. return {};
  21671. }
  21672. },
  21673. calendar: {
  21674. type: Object,
  21675. default: () => {
  21676. return {};
  21677. }
  21678. },
  21679. selected: {
  21680. type: Array,
  21681. default: () => {
  21682. return [];
  21683. }
  21684. },
  21685. checkHover: {
  21686. type: Boolean,
  21687. default: false
  21688. }
  21689. },
  21690. methods: {
  21691. choiceDate(weeks) {
  21692. this.$emit("change", weeks);
  21693. },
  21694. handleMousemove(weeks) {
  21695. this.$emit("handleMouse", weeks);
  21696. }
  21697. }
  21698. };
  21699. function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
  21700. return vue.openBlock(), vue.createElementBlock(
  21701. "view",
  21702. {
  21703. class: vue.normalizeClass(["uni-calendar-item__weeks-box", {
  21704. "uni-calendar-item--disable": $props.weeks.disable,
  21705. "uni-calendar-item--before-checked-x": $props.weeks.beforeMultiple,
  21706. "uni-calendar-item--multiple": $props.weeks.multiple,
  21707. "uni-calendar-item--after-checked-x": $props.weeks.afterMultiple
  21708. }]),
  21709. onClick: _cache[0] || (_cache[0] = ($event) => $options.choiceDate($props.weeks)),
  21710. onMouseenter: _cache[1] || (_cache[1] = ($event) => $options.handleMousemove($props.weeks))
  21711. },
  21712. [
  21713. vue.createElementVNode(
  21714. "view",
  21715. {
  21716. class: vue.normalizeClass(["uni-calendar-item__weeks-box-item", {
  21717. "uni-calendar-item--checked": $props.calendar.fullDate === $props.weeks.fullDate && ($props.calendar.userChecked || !$props.checkHover),
  21718. "uni-calendar-item--checked-range-text": $props.checkHover,
  21719. "uni-calendar-item--before-checked": $props.weeks.beforeMultiple,
  21720. "uni-calendar-item--multiple": $props.weeks.multiple,
  21721. "uni-calendar-item--after-checked": $props.weeks.afterMultiple,
  21722. "uni-calendar-item--disable": $props.weeks.disable
  21723. }])
  21724. },
  21725. [
  21726. $props.selected && $props.weeks.extraInfo ? (vue.openBlock(), vue.createElementBlock("text", {
  21727. key: 0,
  21728. class: "uni-calendar-item__weeks-box-circle"
  21729. })) : vue.createCommentVNode("v-if", true),
  21730. vue.createElementVNode(
  21731. "text",
  21732. { class: "uni-calendar-item__weeks-box-text uni-calendar-item__weeks-box-text-disable uni-calendar-item--checked-text" },
  21733. vue.toDisplayString($props.weeks.date),
  21734. 1
  21735. /* TEXT */
  21736. )
  21737. ],
  21738. 2
  21739. /* CLASS */
  21740. ),
  21741. vue.createElementVNode(
  21742. "view",
  21743. {
  21744. class: vue.normalizeClass({ "uni-calendar-item--today": $props.weeks.isToday })
  21745. },
  21746. null,
  21747. 2
  21748. /* CLASS */
  21749. )
  21750. ],
  21751. 34
  21752. /* CLASS, NEED_HYDRATION */
  21753. );
  21754. }
  21755. const calendarItem = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$T], ["__scopeId", "data-v-3c762a01"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue"]]);
  21756. const isObject$1 = (val) => val !== null && typeof val === "object";
  21757. const defaultDelimiters = ["{", "}"];
  21758. class BaseFormatter {
  21759. constructor() {
  21760. this._caches = /* @__PURE__ */ Object.create(null);
  21761. }
  21762. interpolate(message, values, delimiters = defaultDelimiters) {
  21763. if (!values) {
  21764. return [message];
  21765. }
  21766. let tokens = this._caches[message];
  21767. if (!tokens) {
  21768. tokens = parse(message, delimiters);
  21769. this._caches[message] = tokens;
  21770. }
  21771. return compile(tokens, values);
  21772. }
  21773. }
  21774. const RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  21775. const RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  21776. function parse(format2, [startDelimiter, endDelimiter]) {
  21777. const tokens = [];
  21778. let position = 0;
  21779. let text = "";
  21780. while (position < format2.length) {
  21781. let char = format2[position++];
  21782. if (char === startDelimiter) {
  21783. if (text) {
  21784. tokens.push({ type: "text", value: text });
  21785. }
  21786. text = "";
  21787. let sub = "";
  21788. char = format2[position++];
  21789. while (char !== void 0 && char !== endDelimiter) {
  21790. sub += char;
  21791. char = format2[position++];
  21792. }
  21793. const isClosed = char === endDelimiter;
  21794. const type2 = RE_TOKEN_LIST_VALUE.test(sub) ? "list" : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? "named" : "unknown";
  21795. tokens.push({ value: sub, type: type2 });
  21796. } else {
  21797. text += char;
  21798. }
  21799. }
  21800. text && tokens.push({ type: "text", value: text });
  21801. return tokens;
  21802. }
  21803. function compile(tokens, values) {
  21804. const compiled = [];
  21805. let index2 = 0;
  21806. const mode = Array.isArray(values) ? "list" : isObject$1(values) ? "named" : "unknown";
  21807. if (mode === "unknown") {
  21808. return compiled;
  21809. }
  21810. while (index2 < tokens.length) {
  21811. const token = tokens[index2];
  21812. switch (token.type) {
  21813. case "text":
  21814. compiled.push(token.value);
  21815. break;
  21816. case "list":
  21817. compiled.push(values[parseInt(token.value, 10)]);
  21818. break;
  21819. case "named":
  21820. if (mode === "named") {
  21821. compiled.push(values[token.value]);
  21822. } else {
  21823. {
  21824. console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`);
  21825. }
  21826. }
  21827. break;
  21828. case "unknown":
  21829. {
  21830. console.warn(`Detect 'unknown' type of token!`);
  21831. }
  21832. break;
  21833. }
  21834. index2++;
  21835. }
  21836. return compiled;
  21837. }
  21838. const LOCALE_ZH_HANS = "zh-Hans";
  21839. const LOCALE_ZH_HANT = "zh-Hant";
  21840. const LOCALE_EN = "en";
  21841. const LOCALE_FR = "fr";
  21842. const LOCALE_ES = "es";
  21843. const hasOwnProperty = Object.prototype.hasOwnProperty;
  21844. const hasOwn = (val, key) => hasOwnProperty.call(val, key);
  21845. const defaultFormatter = new BaseFormatter();
  21846. function include(str, parts) {
  21847. return !!parts.find((part) => str.indexOf(part) !== -1);
  21848. }
  21849. function startsWith(str, parts) {
  21850. return parts.find((part) => str.indexOf(part) === 0);
  21851. }
  21852. function normalizeLocale(locale, messages2) {
  21853. if (!locale) {
  21854. return;
  21855. }
  21856. locale = locale.trim().replace(/_/g, "-");
  21857. if (messages2 && messages2[locale]) {
  21858. return locale;
  21859. }
  21860. locale = locale.toLowerCase();
  21861. if (locale === "chinese") {
  21862. return LOCALE_ZH_HANS;
  21863. }
  21864. if (locale.indexOf("zh") === 0) {
  21865. if (locale.indexOf("-hans") > -1) {
  21866. return LOCALE_ZH_HANS;
  21867. }
  21868. if (locale.indexOf("-hant") > -1) {
  21869. return LOCALE_ZH_HANT;
  21870. }
  21871. if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) {
  21872. return LOCALE_ZH_HANT;
  21873. }
  21874. return LOCALE_ZH_HANS;
  21875. }
  21876. let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  21877. if (messages2 && Object.keys(messages2).length > 0) {
  21878. locales = Object.keys(messages2);
  21879. }
  21880. const lang = startsWith(locale, locales);
  21881. if (lang) {
  21882. return lang;
  21883. }
  21884. }
  21885. class I18n {
  21886. constructor({ locale, fallbackLocale, messages: messages2, watcher, formater: formater2 }) {
  21887. this.locale = LOCALE_EN;
  21888. this.fallbackLocale = LOCALE_EN;
  21889. this.message = {};
  21890. this.messages = {};
  21891. this.watchers = [];
  21892. if (fallbackLocale) {
  21893. this.fallbackLocale = fallbackLocale;
  21894. }
  21895. this.formater = formater2 || defaultFormatter;
  21896. this.messages = messages2 || {};
  21897. this.setLocale(locale || LOCALE_EN);
  21898. if (watcher) {
  21899. this.watchLocale(watcher);
  21900. }
  21901. }
  21902. setLocale(locale) {
  21903. const oldLocale = this.locale;
  21904. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  21905. if (!this.messages[this.locale]) {
  21906. this.messages[this.locale] = {};
  21907. }
  21908. this.message = this.messages[this.locale];
  21909. if (oldLocale !== this.locale) {
  21910. this.watchers.forEach((watcher) => {
  21911. watcher(this.locale, oldLocale);
  21912. });
  21913. }
  21914. }
  21915. getLocale() {
  21916. return this.locale;
  21917. }
  21918. watchLocale(fn) {
  21919. const index2 = this.watchers.push(fn) - 1;
  21920. return () => {
  21921. this.watchers.splice(index2, 1);
  21922. };
  21923. }
  21924. add(locale, message, override = true) {
  21925. const curMessages = this.messages[locale];
  21926. if (curMessages) {
  21927. if (override) {
  21928. Object.assign(curMessages, message);
  21929. } else {
  21930. Object.keys(message).forEach((key) => {
  21931. if (!hasOwn(curMessages, key)) {
  21932. curMessages[key] = message[key];
  21933. }
  21934. });
  21935. }
  21936. } else {
  21937. this.messages[locale] = message;
  21938. }
  21939. }
  21940. f(message, values, delimiters) {
  21941. return this.formater.interpolate(message, values, delimiters).join("");
  21942. }
  21943. t(key, locale, values) {
  21944. let message = this.message;
  21945. if (typeof locale === "string") {
  21946. locale = normalizeLocale(locale, this.messages);
  21947. locale && (message = this.messages[locale]);
  21948. } else {
  21949. values = locale;
  21950. }
  21951. if (!hasOwn(message, key)) {
  21952. console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`);
  21953. return key;
  21954. }
  21955. return this.formater.interpolate(message[key], values).join("");
  21956. }
  21957. }
  21958. function watchAppLocale(appVm, i18n) {
  21959. if (appVm.$watchLocale) {
  21960. appVm.$watchLocale((newLocale) => {
  21961. i18n.setLocale(newLocale);
  21962. });
  21963. } else {
  21964. appVm.$watch(() => appVm.$locale, (newLocale) => {
  21965. i18n.setLocale(newLocale);
  21966. });
  21967. }
  21968. }
  21969. function getDefaultLocale() {
  21970. if (typeof uni !== "undefined" && uni.getLocale) {
  21971. return uni.getLocale();
  21972. }
  21973. if (typeof global !== "undefined" && global.getLocale) {
  21974. return global.getLocale();
  21975. }
  21976. return LOCALE_EN;
  21977. }
  21978. function initVueI18n(locale, messages2 = {}, fallbackLocale, watcher) {
  21979. if (typeof locale !== "string") {
  21980. const options = [
  21981. messages2,
  21982. locale
  21983. ];
  21984. locale = options[0];
  21985. messages2 = options[1];
  21986. }
  21987. if (typeof locale !== "string") {
  21988. locale = getDefaultLocale();
  21989. }
  21990. if (typeof fallbackLocale !== "string") {
  21991. fallbackLocale = typeof __uniConfig !== "undefined" && __uniConfig.fallbackLocale || LOCALE_EN;
  21992. }
  21993. const i18n = new I18n({
  21994. locale,
  21995. fallbackLocale,
  21996. messages: messages2,
  21997. watcher
  21998. });
  21999. let t2 = (key, values) => {
  22000. if (typeof getApp !== "function") {
  22001. t2 = function(key2, values2) {
  22002. return i18n.t(key2, values2);
  22003. };
  22004. } else {
  22005. let isWatchedAppLocale = false;
  22006. t2 = function(key2, values2) {
  22007. const appVm = getApp().$vm;
  22008. if (appVm) {
  22009. appVm.$locale;
  22010. if (!isWatchedAppLocale) {
  22011. isWatchedAppLocale = true;
  22012. watchAppLocale(appVm, i18n);
  22013. }
  22014. }
  22015. return i18n.t(key2, values2);
  22016. };
  22017. }
  22018. return t2(key, values);
  22019. };
  22020. return {
  22021. i18n,
  22022. f(message, values, delimiters) {
  22023. return i18n.f(message, values, delimiters);
  22024. },
  22025. t(key, values) {
  22026. return t2(key, values);
  22027. },
  22028. add(locale2, message, override = true) {
  22029. return i18n.add(locale2, message, override);
  22030. },
  22031. watch(fn) {
  22032. return i18n.watchLocale(fn);
  22033. },
  22034. getLocale() {
  22035. return i18n.getLocale();
  22036. },
  22037. setLocale(newLocale) {
  22038. return i18n.setLocale(newLocale);
  22039. }
  22040. };
  22041. }
  22042. const en = {
  22043. "uni-datetime-picker.selectDate": "select date",
  22044. "uni-datetime-picker.selectTime": "select time",
  22045. "uni-datetime-picker.selectDateTime": "select date and time",
  22046. "uni-datetime-picker.startDate": "start date",
  22047. "uni-datetime-picker.endDate": "end date",
  22048. "uni-datetime-picker.startTime": "start time",
  22049. "uni-datetime-picker.endTime": "end time",
  22050. "uni-datetime-picker.ok": "ok",
  22051. "uni-datetime-picker.clear": "clear",
  22052. "uni-datetime-picker.cancel": "cancel",
  22053. "uni-datetime-picker.year": "-",
  22054. "uni-datetime-picker.month": "",
  22055. "uni-calender.MON": "MON",
  22056. "uni-calender.TUE": "TUE",
  22057. "uni-calender.WED": "WED",
  22058. "uni-calender.THU": "THU",
  22059. "uni-calender.FRI": "FRI",
  22060. "uni-calender.SAT": "SAT",
  22061. "uni-calender.SUN": "SUN",
  22062. "uni-calender.confirm": "confirm"
  22063. };
  22064. const zhHans = {
  22065. "uni-datetime-picker.selectDate": "选择日期",
  22066. "uni-datetime-picker.selectTime": "选择时间",
  22067. "uni-datetime-picker.selectDateTime": "选择日期时间",
  22068. "uni-datetime-picker.startDate": "开始日期",
  22069. "uni-datetime-picker.endDate": "结束日期",
  22070. "uni-datetime-picker.startTime": "开始时间",
  22071. "uni-datetime-picker.endTime": "结束时间",
  22072. "uni-datetime-picker.ok": "确定",
  22073. "uni-datetime-picker.clear": "清除",
  22074. "uni-datetime-picker.cancel": "取消",
  22075. "uni-datetime-picker.year": "年",
  22076. "uni-datetime-picker.month": "月",
  22077. "uni-calender.SUN": "日",
  22078. "uni-calender.MON": "一",
  22079. "uni-calender.TUE": "二",
  22080. "uni-calender.WED": "三",
  22081. "uni-calender.THU": "四",
  22082. "uni-calender.FRI": "五",
  22083. "uni-calender.SAT": "六",
  22084. "uni-calender.confirm": "确认"
  22085. };
  22086. const zhHant = {
  22087. "uni-datetime-picker.selectDate": "選擇日期",
  22088. "uni-datetime-picker.selectTime": "選擇時間",
  22089. "uni-datetime-picker.selectDateTime": "選擇日期時間",
  22090. "uni-datetime-picker.startDate": "開始日期",
  22091. "uni-datetime-picker.endDate": "結束日期",
  22092. "uni-datetime-picker.startTime": "開始时间",
  22093. "uni-datetime-picker.endTime": "結束时间",
  22094. "uni-datetime-picker.ok": "確定",
  22095. "uni-datetime-picker.clear": "清除",
  22096. "uni-datetime-picker.cancel": "取消",
  22097. "uni-datetime-picker.year": "年",
  22098. "uni-datetime-picker.month": "月",
  22099. "uni-calender.SUN": "日",
  22100. "uni-calender.MON": "一",
  22101. "uni-calender.TUE": "二",
  22102. "uni-calender.WED": "三",
  22103. "uni-calender.THU": "四",
  22104. "uni-calender.FRI": "五",
  22105. "uni-calender.SAT": "六",
  22106. "uni-calender.confirm": "確認"
  22107. };
  22108. const i18nMessages = {
  22109. en,
  22110. "zh-Hans": zhHans,
  22111. "zh-Hant": zhHant
  22112. };
  22113. const { t: t$1 } = initVueI18n(i18nMessages);
  22114. const _sfc_main$T = {
  22115. name: "UniDatetimePicker",
  22116. data() {
  22117. return {
  22118. indicatorStyle: `height: 50px;`,
  22119. visible: false,
  22120. fixNvueBug: {},
  22121. dateShow: true,
  22122. timeShow: true,
  22123. title: "日期和时间",
  22124. // 输入框当前时间
  22125. time: "",
  22126. // 当前的年月日时分秒
  22127. year: 1920,
  22128. month: 0,
  22129. day: 0,
  22130. hour: 0,
  22131. minute: 0,
  22132. second: 0,
  22133. // 起始时间
  22134. startYear: 1920,
  22135. startMonth: 1,
  22136. startDay: 1,
  22137. startHour: 0,
  22138. startMinute: 0,
  22139. startSecond: 0,
  22140. // 结束时间
  22141. endYear: 2120,
  22142. endMonth: 12,
  22143. endDay: 31,
  22144. endHour: 23,
  22145. endMinute: 59,
  22146. endSecond: 59
  22147. };
  22148. },
  22149. props: {
  22150. type: {
  22151. type: String,
  22152. default: "datetime"
  22153. },
  22154. value: {
  22155. type: [String, Number],
  22156. default: ""
  22157. },
  22158. modelValue: {
  22159. type: [String, Number],
  22160. default: ""
  22161. },
  22162. start: {
  22163. type: [Number, String],
  22164. default: ""
  22165. },
  22166. end: {
  22167. type: [Number, String],
  22168. default: ""
  22169. },
  22170. returnType: {
  22171. type: String,
  22172. default: "string"
  22173. },
  22174. disabled: {
  22175. type: [Boolean, String],
  22176. default: false
  22177. },
  22178. border: {
  22179. type: [Boolean, String],
  22180. default: true
  22181. },
  22182. hideSecond: {
  22183. type: [Boolean, String],
  22184. default: false
  22185. }
  22186. },
  22187. watch: {
  22188. modelValue: {
  22189. handler(newVal) {
  22190. if (newVal) {
  22191. this.parseValue(fixIosDateFormat(newVal));
  22192. this.initTime(false);
  22193. } else {
  22194. this.time = "";
  22195. this.parseValue(Date.now());
  22196. }
  22197. },
  22198. immediate: true
  22199. },
  22200. type: {
  22201. handler(newValue) {
  22202. if (newValue === "date") {
  22203. this.dateShow = true;
  22204. this.timeShow = false;
  22205. this.title = "日期";
  22206. } else if (newValue === "time") {
  22207. this.dateShow = false;
  22208. this.timeShow = true;
  22209. this.title = "时间";
  22210. } else {
  22211. this.dateShow = true;
  22212. this.timeShow = true;
  22213. this.title = "日期和时间";
  22214. }
  22215. },
  22216. immediate: true
  22217. },
  22218. start: {
  22219. handler(newVal) {
  22220. this.parseDatetimeRange(fixIosDateFormat(newVal), "start");
  22221. },
  22222. immediate: true
  22223. },
  22224. end: {
  22225. handler(newVal) {
  22226. this.parseDatetimeRange(fixIosDateFormat(newVal), "end");
  22227. },
  22228. immediate: true
  22229. },
  22230. // 月、日、时、分、秒可选范围变化后,检查当前值是否在范围内,不在则当前值重置为可选范围第一项
  22231. months(newVal) {
  22232. this.checkValue("month", this.month, newVal);
  22233. },
  22234. days(newVal) {
  22235. this.checkValue("day", this.day, newVal);
  22236. },
  22237. hours(newVal) {
  22238. this.checkValue("hour", this.hour, newVal);
  22239. },
  22240. minutes(newVal) {
  22241. this.checkValue("minute", this.minute, newVal);
  22242. },
  22243. seconds(newVal) {
  22244. this.checkValue("second", this.second, newVal);
  22245. }
  22246. },
  22247. computed: {
  22248. // 当前年、月、日、时、分、秒选择范围
  22249. years() {
  22250. return this.getCurrentRange("year");
  22251. },
  22252. months() {
  22253. return this.getCurrentRange("month");
  22254. },
  22255. days() {
  22256. return this.getCurrentRange("day");
  22257. },
  22258. hours() {
  22259. return this.getCurrentRange("hour");
  22260. },
  22261. minutes() {
  22262. return this.getCurrentRange("minute");
  22263. },
  22264. seconds() {
  22265. return this.getCurrentRange("second");
  22266. },
  22267. // picker 当前值数组
  22268. ymd() {
  22269. return [this.year - this.minYear, this.month - this.minMonth, this.day - this.minDay];
  22270. },
  22271. hms() {
  22272. return [this.hour - this.minHour, this.minute - this.minMinute, this.second - this.minSecond];
  22273. },
  22274. // 当前 date 是 start
  22275. currentDateIsStart() {
  22276. return this.year === this.startYear && this.month === this.startMonth && this.day === this.startDay;
  22277. },
  22278. // 当前 date 是 end
  22279. currentDateIsEnd() {
  22280. return this.year === this.endYear && this.month === this.endMonth && this.day === this.endDay;
  22281. },
  22282. // 当前年、月、日、时、分、秒的最小值和最大值
  22283. minYear() {
  22284. return this.startYear;
  22285. },
  22286. maxYear() {
  22287. return this.endYear;
  22288. },
  22289. minMonth() {
  22290. if (this.year === this.startYear) {
  22291. return this.startMonth;
  22292. } else {
  22293. return 1;
  22294. }
  22295. },
  22296. maxMonth() {
  22297. if (this.year === this.endYear) {
  22298. return this.endMonth;
  22299. } else {
  22300. return 12;
  22301. }
  22302. },
  22303. minDay() {
  22304. if (this.year === this.startYear && this.month === this.startMonth) {
  22305. return this.startDay;
  22306. } else {
  22307. return 1;
  22308. }
  22309. },
  22310. maxDay() {
  22311. if (this.year === this.endYear && this.month === this.endMonth) {
  22312. return this.endDay;
  22313. } else {
  22314. return this.daysInMonth(this.year, this.month);
  22315. }
  22316. },
  22317. minHour() {
  22318. if (this.type === "datetime") {
  22319. if (this.currentDateIsStart) {
  22320. return this.startHour;
  22321. } else {
  22322. return 0;
  22323. }
  22324. }
  22325. if (this.type === "time") {
  22326. return this.startHour;
  22327. }
  22328. },
  22329. maxHour() {
  22330. if (this.type === "datetime") {
  22331. if (this.currentDateIsEnd) {
  22332. return this.endHour;
  22333. } else {
  22334. return 23;
  22335. }
  22336. }
  22337. if (this.type === "time") {
  22338. return this.endHour;
  22339. }
  22340. },
  22341. minMinute() {
  22342. if (this.type === "datetime") {
  22343. if (this.currentDateIsStart && this.hour === this.startHour) {
  22344. return this.startMinute;
  22345. } else {
  22346. return 0;
  22347. }
  22348. }
  22349. if (this.type === "time") {
  22350. if (this.hour === this.startHour) {
  22351. return this.startMinute;
  22352. } else {
  22353. return 0;
  22354. }
  22355. }
  22356. },
  22357. maxMinute() {
  22358. if (this.type === "datetime") {
  22359. if (this.currentDateIsEnd && this.hour === this.endHour) {
  22360. return this.endMinute;
  22361. } else {
  22362. return 59;
  22363. }
  22364. }
  22365. if (this.type === "time") {
  22366. if (this.hour === this.endHour) {
  22367. return this.endMinute;
  22368. } else {
  22369. return 59;
  22370. }
  22371. }
  22372. },
  22373. minSecond() {
  22374. if (this.type === "datetime") {
  22375. if (this.currentDateIsStart && this.hour === this.startHour && this.minute === this.startMinute) {
  22376. return this.startSecond;
  22377. } else {
  22378. return 0;
  22379. }
  22380. }
  22381. if (this.type === "time") {
  22382. if (this.hour === this.startHour && this.minute === this.startMinute) {
  22383. return this.startSecond;
  22384. } else {
  22385. return 0;
  22386. }
  22387. }
  22388. },
  22389. maxSecond() {
  22390. if (this.type === "datetime") {
  22391. if (this.currentDateIsEnd && this.hour === this.endHour && this.minute === this.endMinute) {
  22392. return this.endSecond;
  22393. } else {
  22394. return 59;
  22395. }
  22396. }
  22397. if (this.type === "time") {
  22398. if (this.hour === this.endHour && this.minute === this.endMinute) {
  22399. return this.endSecond;
  22400. } else {
  22401. return 59;
  22402. }
  22403. }
  22404. },
  22405. /**
  22406. * for i18n
  22407. */
  22408. selectTimeText() {
  22409. return t$1("uni-datetime-picker.selectTime");
  22410. },
  22411. okText() {
  22412. return t$1("uni-datetime-picker.ok");
  22413. },
  22414. clearText() {
  22415. return t$1("uni-datetime-picker.clear");
  22416. },
  22417. cancelText() {
  22418. return t$1("uni-datetime-picker.cancel");
  22419. }
  22420. },
  22421. mounted() {
  22422. },
  22423. methods: {
  22424. /**
  22425. * @param {Object} item
  22426. * 小于 10 在前面加个 0
  22427. */
  22428. lessThanTen(item) {
  22429. return item < 10 ? "0" + item : item;
  22430. },
  22431. /**
  22432. * 解析时分秒字符串,例如:00:00:00
  22433. * @param {String} timeString
  22434. */
  22435. parseTimeType(timeString) {
  22436. if (timeString) {
  22437. let timeArr = timeString.split(":");
  22438. this.hour = Number(timeArr[0]);
  22439. this.minute = Number(timeArr[1]);
  22440. this.second = Number(timeArr[2]);
  22441. }
  22442. },
  22443. /**
  22444. * 解析选择器初始值,类型可以是字符串、时间戳,例如:2000-10-02、'08:30:00'、 1610695109000
  22445. * @param {String | Number} datetime
  22446. */
  22447. initPickerValue(datetime) {
  22448. let defaultValue = null;
  22449. if (datetime) {
  22450. defaultValue = this.compareValueWithStartAndEnd(datetime, this.start, this.end);
  22451. } else {
  22452. defaultValue = Date.now();
  22453. defaultValue = this.compareValueWithStartAndEnd(defaultValue, this.start, this.end);
  22454. }
  22455. this.parseValue(defaultValue);
  22456. },
  22457. /**
  22458. * 初始值规则:
  22459. * - 用户设置初始值 value
  22460. * - 设置了起始时间 start、终止时间 end,并 start < value < end,初始值为 value, 否则初始值为 start
  22461. * - 只设置了起始时间 start,并 start < value,初始值为 value,否则初始值为 start
  22462. * - 只设置了终止时间 end,并 value < end,初始值为 value,否则初始值为 end
  22463. * - 无起始终止时间,则初始值为 value
  22464. * - 无初始值 value,则初始值为当前本地时间 Date.now()
  22465. * @param {Object} value
  22466. * @param {Object} dateBase
  22467. */
  22468. compareValueWithStartAndEnd(value2, start, end) {
  22469. let winner = null;
  22470. value2 = this.superTimeStamp(value2);
  22471. start = this.superTimeStamp(start);
  22472. end = this.superTimeStamp(end);
  22473. if (start && end) {
  22474. if (value2 < start) {
  22475. winner = new Date(start);
  22476. } else if (value2 > end) {
  22477. winner = new Date(end);
  22478. } else {
  22479. winner = new Date(value2);
  22480. }
  22481. } else if (start && !end) {
  22482. winner = start <= value2 ? new Date(value2) : new Date(start);
  22483. } else if (!start && end) {
  22484. winner = value2 <= end ? new Date(value2) : new Date(end);
  22485. } else {
  22486. winner = new Date(value2);
  22487. }
  22488. return winner;
  22489. },
  22490. /**
  22491. * 转换为可比较的时间戳,接受日期、时分秒、时间戳
  22492. * @param {Object} value
  22493. */
  22494. superTimeStamp(value2) {
  22495. let dateBase = "";
  22496. if (this.type === "time" && value2 && typeof value2 === "string") {
  22497. const now2 = /* @__PURE__ */ new Date();
  22498. const year = now2.getFullYear();
  22499. const month = now2.getMonth() + 1;
  22500. const day = now2.getDate();
  22501. dateBase = year + "/" + month + "/" + day + " ";
  22502. }
  22503. if (Number(value2)) {
  22504. value2 = parseInt(value2);
  22505. dateBase = 0;
  22506. }
  22507. return this.createTimeStamp(dateBase + value2);
  22508. },
  22509. /**
  22510. * 解析默认值 value,字符串、时间戳
  22511. * @param {Object} defaultTime
  22512. */
  22513. parseValue(value2) {
  22514. if (!value2) {
  22515. return;
  22516. }
  22517. if (this.type === "time" && typeof value2 === "string") {
  22518. this.parseTimeType(value2);
  22519. } else {
  22520. let defaultDate = null;
  22521. defaultDate = new Date(value2);
  22522. if (this.type !== "time") {
  22523. this.year = defaultDate.getFullYear();
  22524. this.month = defaultDate.getMonth() + 1;
  22525. this.day = defaultDate.getDate();
  22526. }
  22527. if (this.type !== "date") {
  22528. this.hour = defaultDate.getHours();
  22529. this.minute = defaultDate.getMinutes();
  22530. this.second = defaultDate.getSeconds();
  22531. }
  22532. }
  22533. if (this.hideSecond) {
  22534. this.second = 0;
  22535. }
  22536. },
  22537. /**
  22538. * 解析可选择时间范围 start、end,年月日字符串、时间戳
  22539. * @param {Object} defaultTime
  22540. */
  22541. parseDatetimeRange(point, pointType) {
  22542. if (!point) {
  22543. if (pointType === "start") {
  22544. this.startYear = 1920;
  22545. this.startMonth = 1;
  22546. this.startDay = 1;
  22547. this.startHour = 0;
  22548. this.startMinute = 0;
  22549. this.startSecond = 0;
  22550. }
  22551. if (pointType === "end") {
  22552. this.endYear = 2120;
  22553. this.endMonth = 12;
  22554. this.endDay = 31;
  22555. this.endHour = 23;
  22556. this.endMinute = 59;
  22557. this.endSecond = 59;
  22558. }
  22559. return;
  22560. }
  22561. if (this.type === "time") {
  22562. const pointArr = point.split(":");
  22563. this[pointType + "Hour"] = Number(pointArr[0]);
  22564. this[pointType + "Minute"] = Number(pointArr[1]);
  22565. this[pointType + "Second"] = Number(pointArr[2]);
  22566. } else {
  22567. if (!point) {
  22568. pointType === "start" ? this.startYear = this.year - 60 : this.endYear = this.year + 60;
  22569. return;
  22570. }
  22571. if (Number(point)) {
  22572. point = parseInt(point);
  22573. }
  22574. const hasTime = /[0-9]:[0-9]/;
  22575. if (this.type === "datetime" && pointType === "end" && typeof point === "string" && !hasTime.test(
  22576. point
  22577. )) {
  22578. point = point + " 23:59:59";
  22579. }
  22580. const pointDate = new Date(point);
  22581. this[pointType + "Year"] = pointDate.getFullYear();
  22582. this[pointType + "Month"] = pointDate.getMonth() + 1;
  22583. this[pointType + "Day"] = pointDate.getDate();
  22584. if (this.type === "datetime") {
  22585. this[pointType + "Hour"] = pointDate.getHours();
  22586. this[pointType + "Minute"] = pointDate.getMinutes();
  22587. this[pointType + "Second"] = pointDate.getSeconds();
  22588. }
  22589. }
  22590. },
  22591. // 获取 年、月、日、时、分、秒 当前可选范围
  22592. getCurrentRange(value2) {
  22593. const range2 = [];
  22594. for (let i = this["min" + this.capitalize(value2)]; i <= this["max" + this.capitalize(value2)]; i++) {
  22595. range2.push(i);
  22596. }
  22597. return range2;
  22598. },
  22599. // 字符串首字母大写
  22600. capitalize(str) {
  22601. return str.charAt(0).toUpperCase() + str.slice(1);
  22602. },
  22603. // 检查当前值是否在范围内,不在则当前值重置为可选范围第一项
  22604. checkValue(name, value2, values) {
  22605. if (values.indexOf(value2) === -1) {
  22606. this[name] = values[0];
  22607. }
  22608. },
  22609. // 每个月的实际天数
  22610. daysInMonth(year, month) {
  22611. return new Date(year, month, 0).getDate();
  22612. },
  22613. //兼容 iOS、safari 日期格式
  22614. fixIosDateFormat(value2) {
  22615. if (typeof value2 === "string") {
  22616. value2 = value2.replace(/-/g, "/");
  22617. }
  22618. return value2;
  22619. },
  22620. /**
  22621. * 生成时间戳
  22622. * @param {Object} time
  22623. */
  22624. createTimeStamp(time) {
  22625. if (!time)
  22626. return;
  22627. if (typeof time === "number") {
  22628. return time;
  22629. } else {
  22630. time = time.replace(/-/g, "/");
  22631. if (this.type === "date") {
  22632. time = time + " 00:00:00";
  22633. }
  22634. return Date.parse(time);
  22635. }
  22636. },
  22637. /**
  22638. * 生成日期或时间的字符串
  22639. */
  22640. createDomSting() {
  22641. const yymmdd = this.year + "-" + this.lessThanTen(this.month) + "-" + this.lessThanTen(this.day);
  22642. let hhmmss = this.lessThanTen(this.hour) + ":" + this.lessThanTen(this.minute);
  22643. if (!this.hideSecond) {
  22644. hhmmss = hhmmss + ":" + this.lessThanTen(this.second);
  22645. }
  22646. if (this.type === "date") {
  22647. return yymmdd;
  22648. } else if (this.type === "time") {
  22649. return hhmmss;
  22650. } else {
  22651. return yymmdd + " " + hhmmss;
  22652. }
  22653. },
  22654. /**
  22655. * 初始化返回值,并抛出 change 事件
  22656. */
  22657. initTime(emit2 = true) {
  22658. this.time = this.createDomSting();
  22659. if (!emit2)
  22660. return;
  22661. if (this.returnType === "timestamp" && this.type !== "time") {
  22662. this.$emit("change", this.createTimeStamp(this.time));
  22663. this.$emit("input", this.createTimeStamp(this.time));
  22664. this.$emit("update:modelValue", this.createTimeStamp(this.time));
  22665. } else {
  22666. this.$emit("change", this.time);
  22667. this.$emit("input", this.time);
  22668. this.$emit("update:modelValue", this.time);
  22669. }
  22670. },
  22671. /**
  22672. * 用户选择日期或时间更新 data
  22673. * @param {Object} e
  22674. */
  22675. bindDateChange(e) {
  22676. const val = e.detail.value;
  22677. this.year = this.years[val[0]];
  22678. this.month = this.months[val[1]];
  22679. this.day = this.days[val[2]];
  22680. },
  22681. bindTimeChange(e) {
  22682. const val = e.detail.value;
  22683. this.hour = this.hours[val[0]];
  22684. this.minute = this.minutes[val[1]];
  22685. this.second = this.seconds[val[2]];
  22686. },
  22687. /**
  22688. * 初始化弹出层
  22689. */
  22690. initTimePicker() {
  22691. if (this.disabled)
  22692. return;
  22693. const value2 = fixIosDateFormat(this.time);
  22694. this.initPickerValue(value2);
  22695. this.visible = !this.visible;
  22696. },
  22697. /**
  22698. * 触发或关闭弹框
  22699. */
  22700. tiggerTimePicker(e) {
  22701. this.visible = !this.visible;
  22702. },
  22703. /**
  22704. * 用户点击“清空”按钮,清空当前值
  22705. */
  22706. clearTime() {
  22707. this.time = "";
  22708. this.$emit("change", this.time);
  22709. this.$emit("input", this.time);
  22710. this.$emit("update:modelValue", this.time);
  22711. this.tiggerTimePicker();
  22712. },
  22713. /**
  22714. * 用户点击“确定”按钮
  22715. */
  22716. setTime() {
  22717. this.initTime();
  22718. this.tiggerTimePicker();
  22719. }
  22720. }
  22721. };
  22722. function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
  22723. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker" }, [
  22724. vue.createElementVNode("view", {
  22725. onClick: _cache[0] || (_cache[0] = (...args) => $options.initTimePicker && $options.initTimePicker(...args))
  22726. }, [
  22727. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  22728. vue.createElementVNode(
  22729. "view",
  22730. {
  22731. class: vue.normalizeClass(["uni-datetime-picker-timebox-pointer", { "uni-datetime-picker-disabled": $props.disabled, "uni-datetime-picker-timebox": $props.border }])
  22732. },
  22733. [
  22734. vue.createElementVNode(
  22735. "text",
  22736. { class: "uni-datetime-picker-text" },
  22737. vue.toDisplayString($data.time),
  22738. 1
  22739. /* TEXT */
  22740. ),
  22741. !$data.time ? (vue.openBlock(), vue.createElementBlock("view", {
  22742. key: 0,
  22743. class: "uni-datetime-picker-time"
  22744. }, [
  22745. vue.createElementVNode(
  22746. "text",
  22747. { class: "uni-datetime-picker-text" },
  22748. vue.toDisplayString($options.selectTimeText),
  22749. 1
  22750. /* TEXT */
  22751. )
  22752. ])) : vue.createCommentVNode("v-if", true)
  22753. ],
  22754. 2
  22755. /* CLASS */
  22756. )
  22757. ], true)
  22758. ]),
  22759. $data.visible ? (vue.openBlock(), vue.createElementBlock("view", {
  22760. key: 0,
  22761. id: "mask",
  22762. class: "uni-datetime-picker-mask",
  22763. onClick: _cache[1] || (_cache[1] = (...args) => $options.tiggerTimePicker && $options.tiggerTimePicker(...args))
  22764. })) : vue.createCommentVNode("v-if", true),
  22765. $data.visible ? (vue.openBlock(), vue.createElementBlock(
  22766. "view",
  22767. {
  22768. key: 1,
  22769. class: vue.normalizeClass(["uni-datetime-picker-popup", [$data.dateShow && $data.timeShow ? "" : "fix-nvue-height"]]),
  22770. style: vue.normalizeStyle($data.fixNvueBug)
  22771. },
  22772. [
  22773. vue.createElementVNode("view", { class: "uni-title" }, [
  22774. vue.createElementVNode(
  22775. "text",
  22776. { class: "uni-datetime-picker-text" },
  22777. vue.toDisplayString($options.selectTimeText),
  22778. 1
  22779. /* TEXT */
  22780. )
  22781. ]),
  22782. $data.dateShow ? (vue.openBlock(), vue.createElementBlock("view", {
  22783. key: 0,
  22784. class: "uni-datetime-picker__container-box"
  22785. }, [
  22786. vue.createElementVNode("picker-view", {
  22787. class: "uni-datetime-picker-view",
  22788. "indicator-style": $data.indicatorStyle,
  22789. value: $options.ymd,
  22790. onChange: _cache[2] || (_cache[2] = (...args) => $options.bindDateChange && $options.bindDateChange(...args))
  22791. }, [
  22792. vue.createElementVNode("picker-view-column", null, [
  22793. (vue.openBlock(true), vue.createElementBlock(
  22794. vue.Fragment,
  22795. null,
  22796. vue.renderList($options.years, (item, index2) => {
  22797. return vue.openBlock(), vue.createElementBlock("view", {
  22798. class: "uni-datetime-picker-item",
  22799. key: index2
  22800. }, [
  22801. vue.createElementVNode(
  22802. "text",
  22803. { class: "uni-datetime-picker-item" },
  22804. vue.toDisplayString($options.lessThanTen(item)),
  22805. 1
  22806. /* TEXT */
  22807. )
  22808. ]);
  22809. }),
  22810. 128
  22811. /* KEYED_FRAGMENT */
  22812. ))
  22813. ]),
  22814. vue.createElementVNode("picker-view-column", null, [
  22815. (vue.openBlock(true), vue.createElementBlock(
  22816. vue.Fragment,
  22817. null,
  22818. vue.renderList($options.months, (item, index2) => {
  22819. return vue.openBlock(), vue.createElementBlock("view", {
  22820. class: "uni-datetime-picker-item",
  22821. key: index2
  22822. }, [
  22823. vue.createElementVNode(
  22824. "text",
  22825. { class: "uni-datetime-picker-item" },
  22826. vue.toDisplayString($options.lessThanTen(item)),
  22827. 1
  22828. /* TEXT */
  22829. )
  22830. ]);
  22831. }),
  22832. 128
  22833. /* KEYED_FRAGMENT */
  22834. ))
  22835. ]),
  22836. vue.createElementVNode("picker-view-column", null, [
  22837. (vue.openBlock(true), vue.createElementBlock(
  22838. vue.Fragment,
  22839. null,
  22840. vue.renderList($options.days, (item, index2) => {
  22841. return vue.openBlock(), vue.createElementBlock("view", {
  22842. class: "uni-datetime-picker-item",
  22843. key: index2
  22844. }, [
  22845. vue.createElementVNode(
  22846. "text",
  22847. { class: "uni-datetime-picker-item" },
  22848. vue.toDisplayString($options.lessThanTen(item)),
  22849. 1
  22850. /* TEXT */
  22851. )
  22852. ]);
  22853. }),
  22854. 128
  22855. /* KEYED_FRAGMENT */
  22856. ))
  22857. ])
  22858. ], 40, ["indicator-style", "value"]),
  22859. vue.createCommentVNode(" 兼容 nvue 不支持伪类 "),
  22860. vue.createElementVNode("text", { class: "uni-datetime-picker-sign sign-left" }, "-"),
  22861. vue.createElementVNode("text", { class: "uni-datetime-picker-sign sign-right" }, "-")
  22862. ])) : vue.createCommentVNode("v-if", true),
  22863. $data.timeShow ? (vue.openBlock(), vue.createElementBlock("view", {
  22864. key: 1,
  22865. class: "uni-datetime-picker__container-box"
  22866. }, [
  22867. vue.createElementVNode("picker-view", {
  22868. class: vue.normalizeClass(["uni-datetime-picker-view", [$props.hideSecond ? "time-hide-second" : ""]]),
  22869. "indicator-style": $data.indicatorStyle,
  22870. value: $options.hms,
  22871. onChange: _cache[3] || (_cache[3] = (...args) => $options.bindTimeChange && $options.bindTimeChange(...args))
  22872. }, [
  22873. vue.createElementVNode("picker-view-column", null, [
  22874. (vue.openBlock(true), vue.createElementBlock(
  22875. vue.Fragment,
  22876. null,
  22877. vue.renderList($options.hours, (item, index2) => {
  22878. return vue.openBlock(), vue.createElementBlock("view", {
  22879. class: "uni-datetime-picker-item",
  22880. key: index2
  22881. }, [
  22882. vue.createElementVNode(
  22883. "text",
  22884. { class: "uni-datetime-picker-item" },
  22885. vue.toDisplayString($options.lessThanTen(item)),
  22886. 1
  22887. /* TEXT */
  22888. )
  22889. ]);
  22890. }),
  22891. 128
  22892. /* KEYED_FRAGMENT */
  22893. ))
  22894. ]),
  22895. vue.createElementVNode("picker-view-column", null, [
  22896. (vue.openBlock(true), vue.createElementBlock(
  22897. vue.Fragment,
  22898. null,
  22899. vue.renderList($options.minutes, (item, index2) => {
  22900. return vue.openBlock(), vue.createElementBlock("view", {
  22901. class: "uni-datetime-picker-item",
  22902. key: index2
  22903. }, [
  22904. vue.createElementVNode(
  22905. "text",
  22906. { class: "uni-datetime-picker-item" },
  22907. vue.toDisplayString($options.lessThanTen(item)),
  22908. 1
  22909. /* TEXT */
  22910. )
  22911. ]);
  22912. }),
  22913. 128
  22914. /* KEYED_FRAGMENT */
  22915. ))
  22916. ]),
  22917. !$props.hideSecond ? (vue.openBlock(), vue.createElementBlock("picker-view-column", { key: 0 }, [
  22918. (vue.openBlock(true), vue.createElementBlock(
  22919. vue.Fragment,
  22920. null,
  22921. vue.renderList($options.seconds, (item, index2) => {
  22922. return vue.openBlock(), vue.createElementBlock("view", {
  22923. class: "uni-datetime-picker-item",
  22924. key: index2
  22925. }, [
  22926. vue.createElementVNode(
  22927. "text",
  22928. { class: "uni-datetime-picker-item" },
  22929. vue.toDisplayString($options.lessThanTen(item)),
  22930. 1
  22931. /* TEXT */
  22932. )
  22933. ]);
  22934. }),
  22935. 128
  22936. /* KEYED_FRAGMENT */
  22937. ))
  22938. ])) : vue.createCommentVNode("v-if", true)
  22939. ], 42, ["indicator-style", "value"]),
  22940. vue.createCommentVNode(" 兼容 nvue 不支持伪类 "),
  22941. vue.createElementVNode(
  22942. "text",
  22943. {
  22944. class: vue.normalizeClass(["uni-datetime-picker-sign", [$props.hideSecond ? "sign-center" : "sign-left"]])
  22945. },
  22946. ":",
  22947. 2
  22948. /* CLASS */
  22949. ),
  22950. !$props.hideSecond ? (vue.openBlock(), vue.createElementBlock("text", {
  22951. key: 0,
  22952. class: "uni-datetime-picker-sign sign-right"
  22953. }, ":")) : vue.createCommentVNode("v-if", true)
  22954. ])) : vue.createCommentVNode("v-if", true),
  22955. vue.createElementVNode("view", { class: "uni-datetime-picker-btn" }, [
  22956. vue.createElementVNode("view", {
  22957. onClick: _cache[4] || (_cache[4] = (...args) => $options.clearTime && $options.clearTime(...args))
  22958. }, [
  22959. vue.createElementVNode(
  22960. "text",
  22961. { class: "uni-datetime-picker-btn-text" },
  22962. vue.toDisplayString($options.clearText),
  22963. 1
  22964. /* TEXT */
  22965. )
  22966. ]),
  22967. vue.createElementVNode("view", { class: "uni-datetime-picker-btn-group" }, [
  22968. vue.createElementVNode("view", {
  22969. class: "uni-datetime-picker-cancel",
  22970. onClick: _cache[5] || (_cache[5] = (...args) => $options.tiggerTimePicker && $options.tiggerTimePicker(...args))
  22971. }, [
  22972. vue.createElementVNode(
  22973. "text",
  22974. { class: "uni-datetime-picker-btn-text" },
  22975. vue.toDisplayString($options.cancelText),
  22976. 1
  22977. /* TEXT */
  22978. )
  22979. ]),
  22980. vue.createElementVNode("view", {
  22981. onClick: _cache[6] || (_cache[6] = (...args) => $options.setTime && $options.setTime(...args))
  22982. }, [
  22983. vue.createElementVNode(
  22984. "text",
  22985. { class: "uni-datetime-picker-btn-text" },
  22986. vue.toDisplayString($options.okText),
  22987. 1
  22988. /* TEXT */
  22989. )
  22990. ])
  22991. ])
  22992. ])
  22993. ],
  22994. 6
  22995. /* CLASS, STYLE */
  22996. )) : vue.createCommentVNode("v-if", true)
  22997. ]);
  22998. }
  22999. const TimePicker = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$S], ["__scopeId", "data-v-1d532b70"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue"]]);
  23000. const { t } = initVueI18n(i18nMessages);
  23001. const _sfc_main$S = {
  23002. components: {
  23003. calendarItem,
  23004. timePicker: TimePicker
  23005. },
  23006. props: {
  23007. date: {
  23008. type: String,
  23009. default: ""
  23010. },
  23011. defTime: {
  23012. type: [String, Object],
  23013. default: ""
  23014. },
  23015. selectableTimes: {
  23016. type: [Object],
  23017. default() {
  23018. return {};
  23019. }
  23020. },
  23021. selected: {
  23022. type: Array,
  23023. default() {
  23024. return [];
  23025. }
  23026. },
  23027. startDate: {
  23028. type: String,
  23029. default: ""
  23030. },
  23031. endDate: {
  23032. type: String,
  23033. default: ""
  23034. },
  23035. startPlaceholder: {
  23036. type: String,
  23037. default: ""
  23038. },
  23039. endPlaceholder: {
  23040. type: String,
  23041. default: ""
  23042. },
  23043. range: {
  23044. type: Boolean,
  23045. default: false
  23046. },
  23047. hasTime: {
  23048. type: Boolean,
  23049. default: false
  23050. },
  23051. insert: {
  23052. type: Boolean,
  23053. default: true
  23054. },
  23055. showMonth: {
  23056. type: Boolean,
  23057. default: true
  23058. },
  23059. clearDate: {
  23060. type: Boolean,
  23061. default: true
  23062. },
  23063. checkHover: {
  23064. type: Boolean,
  23065. default: true
  23066. },
  23067. hideSecond: {
  23068. type: [Boolean],
  23069. default: false
  23070. },
  23071. pleStatus: {
  23072. type: Object,
  23073. default() {
  23074. return {
  23075. before: "",
  23076. after: "",
  23077. data: [],
  23078. fulldate: ""
  23079. };
  23080. }
  23081. },
  23082. defaultValue: {
  23083. type: [String, Object, Array],
  23084. default: ""
  23085. }
  23086. },
  23087. data() {
  23088. return {
  23089. show: false,
  23090. weeks: [],
  23091. calendar: {},
  23092. nowDate: {},
  23093. aniMaskShow: false,
  23094. firstEnter: true,
  23095. time: "",
  23096. timeRange: {
  23097. startTime: "",
  23098. endTime: ""
  23099. },
  23100. tempSingleDate: "",
  23101. tempRange: {
  23102. before: "",
  23103. after: ""
  23104. }
  23105. };
  23106. },
  23107. watch: {
  23108. date: {
  23109. immediate: true,
  23110. handler(newVal) {
  23111. if (!this.range) {
  23112. this.tempSingleDate = newVal;
  23113. setTimeout(() => {
  23114. this.init(newVal);
  23115. }, 100);
  23116. }
  23117. }
  23118. },
  23119. defTime: {
  23120. immediate: true,
  23121. handler(newVal) {
  23122. if (!this.range) {
  23123. this.time = newVal;
  23124. } else {
  23125. this.timeRange.startTime = newVal.start;
  23126. this.timeRange.endTime = newVal.end;
  23127. }
  23128. }
  23129. },
  23130. startDate(val) {
  23131. if (!this.cale) {
  23132. return;
  23133. }
  23134. this.cale.setStartDate(val);
  23135. this.cale.setDate(this.nowDate.fullDate);
  23136. this.weeks = this.cale.weeks;
  23137. },
  23138. endDate(val) {
  23139. if (!this.cale) {
  23140. return;
  23141. }
  23142. this.cale.setEndDate(val);
  23143. this.cale.setDate(this.nowDate.fullDate);
  23144. this.weeks = this.cale.weeks;
  23145. },
  23146. selected(newVal) {
  23147. if (!this.cale) {
  23148. return;
  23149. }
  23150. this.cale.setSelectInfo(this.nowDate.fullDate, newVal);
  23151. this.weeks = this.cale.weeks;
  23152. },
  23153. pleStatus: {
  23154. immediate: true,
  23155. handler(newVal) {
  23156. const {
  23157. before,
  23158. after,
  23159. fulldate,
  23160. which
  23161. } = newVal;
  23162. this.tempRange.before = before;
  23163. this.tempRange.after = after;
  23164. setTimeout(() => {
  23165. if (fulldate) {
  23166. this.cale.setHoverMultiple(fulldate);
  23167. if (before && after) {
  23168. this.cale.lastHover = true;
  23169. if (this.rangeWithinMonth(after, before))
  23170. return;
  23171. this.setDate(before);
  23172. } else {
  23173. this.cale.setMultiple(fulldate);
  23174. this.setDate(this.nowDate.fullDate);
  23175. this.calendar.fullDate = "";
  23176. this.cale.lastHover = false;
  23177. }
  23178. } else {
  23179. if (!this.cale) {
  23180. return;
  23181. }
  23182. this.cale.setDefaultMultiple(before, after);
  23183. if (which === "left" && before) {
  23184. this.setDate(before);
  23185. this.weeks = this.cale.weeks;
  23186. } else if (after) {
  23187. this.setDate(after);
  23188. this.weeks = this.cale.weeks;
  23189. }
  23190. this.cale.lastHover = true;
  23191. }
  23192. }, 16);
  23193. }
  23194. }
  23195. },
  23196. computed: {
  23197. timepickerStartTime() {
  23198. const activeDate = this.range ? this.tempRange.before : this.calendar.fullDate;
  23199. return activeDate === this.startDate ? this.selectableTimes.start : "";
  23200. },
  23201. timepickerEndTime() {
  23202. const activeDate = this.range ? this.tempRange.after : this.calendar.fullDate;
  23203. return activeDate === this.endDate ? this.selectableTimes.end : "";
  23204. },
  23205. /**
  23206. * for i18n
  23207. */
  23208. selectDateText() {
  23209. return t("uni-datetime-picker.selectDate");
  23210. },
  23211. startDateText() {
  23212. return this.startPlaceholder || t("uni-datetime-picker.startDate");
  23213. },
  23214. endDateText() {
  23215. return this.endPlaceholder || t("uni-datetime-picker.endDate");
  23216. },
  23217. okText() {
  23218. return t("uni-datetime-picker.ok");
  23219. },
  23220. yearText() {
  23221. return t("uni-datetime-picker.year");
  23222. },
  23223. monthText() {
  23224. return t("uni-datetime-picker.month");
  23225. },
  23226. MONText() {
  23227. return t("uni-calender.MON");
  23228. },
  23229. TUEText() {
  23230. return t("uni-calender.TUE");
  23231. },
  23232. WEDText() {
  23233. return t("uni-calender.WED");
  23234. },
  23235. THUText() {
  23236. return t("uni-calender.THU");
  23237. },
  23238. FRIText() {
  23239. return t("uni-calender.FRI");
  23240. },
  23241. SATText() {
  23242. return t("uni-calender.SAT");
  23243. },
  23244. SUNText() {
  23245. return t("uni-calender.SUN");
  23246. },
  23247. confirmText() {
  23248. return t("uni-calender.confirm");
  23249. }
  23250. },
  23251. created() {
  23252. this.cale = new Calendar$1({
  23253. selected: this.selected,
  23254. startDate: this.startDate,
  23255. endDate: this.endDate,
  23256. range: this.range
  23257. });
  23258. this.init(this.date);
  23259. },
  23260. methods: {
  23261. leaveCale() {
  23262. this.firstEnter = true;
  23263. },
  23264. handleMouse(weeks) {
  23265. if (weeks.disable)
  23266. return;
  23267. if (this.cale.lastHover)
  23268. return;
  23269. let {
  23270. before,
  23271. after
  23272. } = this.cale.multipleStatus;
  23273. if (!before)
  23274. return;
  23275. this.calendar = weeks;
  23276. this.cale.setHoverMultiple(this.calendar.fullDate);
  23277. this.weeks = this.cale.weeks;
  23278. if (this.firstEnter) {
  23279. this.$emit("firstEnterCale", this.cale.multipleStatus);
  23280. this.firstEnter = false;
  23281. }
  23282. },
  23283. rangeWithinMonth(A, B) {
  23284. const [yearA, monthA] = A.split("-");
  23285. const [yearB, monthB] = B.split("-");
  23286. return yearA === yearB && monthA === monthB;
  23287. },
  23288. // 蒙版点击事件
  23289. maskClick() {
  23290. this.close();
  23291. this.$emit("maskClose");
  23292. },
  23293. clearCalender() {
  23294. if (this.range) {
  23295. this.timeRange.startTime = "";
  23296. this.timeRange.endTime = "";
  23297. this.tempRange.before = "";
  23298. this.tempRange.after = "";
  23299. this.cale.multipleStatus.before = "";
  23300. this.cale.multipleStatus.after = "";
  23301. this.cale.multipleStatus.data = [];
  23302. this.cale.lastHover = false;
  23303. } else {
  23304. this.time = "";
  23305. this.tempSingleDate = "";
  23306. }
  23307. this.calendar.fullDate = "";
  23308. this.setDate(/* @__PURE__ */ new Date());
  23309. },
  23310. bindDateChange(e) {
  23311. const value2 = e.detail.value + "-1";
  23312. this.setDate(value2);
  23313. },
  23314. /**
  23315. * 初始化日期显示
  23316. * @param {Object} date
  23317. */
  23318. init(date3) {
  23319. if (!this.cale) {
  23320. return;
  23321. }
  23322. this.cale.setDate(date3 || /* @__PURE__ */ new Date());
  23323. this.weeks = this.cale.weeks;
  23324. this.nowDate = this.cale.getInfo(date3);
  23325. this.calendar = { ...this.nowDate };
  23326. if (!date3) {
  23327. this.calendar.fullDate = "";
  23328. if (this.defaultValue && !this.range) {
  23329. const defaultDate = new Date(this.defaultValue);
  23330. const fullDate = getDate(defaultDate);
  23331. const year = defaultDate.getFullYear();
  23332. const month = defaultDate.getMonth() + 1;
  23333. const date4 = defaultDate.getDate();
  23334. const day = defaultDate.getDay();
  23335. this.calendar = {
  23336. fullDate,
  23337. year,
  23338. month,
  23339. date: date4,
  23340. day
  23341. }, this.tempSingleDate = fullDate;
  23342. this.time = getTime(defaultDate, this.hideSecond);
  23343. }
  23344. }
  23345. },
  23346. /**
  23347. * 打开日历弹窗
  23348. */
  23349. open() {
  23350. if (this.clearDate && !this.insert) {
  23351. this.cale.cleanMultipleStatus();
  23352. this.init(this.date);
  23353. }
  23354. this.show = true;
  23355. this.$nextTick(() => {
  23356. setTimeout(() => {
  23357. this.aniMaskShow = true;
  23358. }, 50);
  23359. });
  23360. },
  23361. /**
  23362. * 关闭日历弹窗
  23363. */
  23364. close() {
  23365. this.aniMaskShow = false;
  23366. this.$nextTick(() => {
  23367. setTimeout(() => {
  23368. this.show = false;
  23369. this.$emit("close");
  23370. }, 300);
  23371. });
  23372. },
  23373. /**
  23374. * 确认按钮
  23375. */
  23376. confirm() {
  23377. this.setEmit("confirm");
  23378. this.close();
  23379. },
  23380. /**
  23381. * 变化触发
  23382. */
  23383. change() {
  23384. if (!this.insert)
  23385. return;
  23386. this.setEmit("change");
  23387. },
  23388. /**
  23389. * 选择月份触发
  23390. */
  23391. monthSwitch() {
  23392. let {
  23393. year,
  23394. month
  23395. } = this.nowDate;
  23396. this.$emit("monthSwitch", {
  23397. year,
  23398. month: Number(month)
  23399. });
  23400. },
  23401. /**
  23402. * 派发事件
  23403. * @param {Object} name
  23404. */
  23405. setEmit(name) {
  23406. if (!this.range) {
  23407. if (!this.calendar.fullDate) {
  23408. this.calendar = this.cale.getInfo(/* @__PURE__ */ new Date());
  23409. this.tempSingleDate = this.calendar.fullDate;
  23410. }
  23411. if (this.hasTime && !this.time) {
  23412. this.time = getTime(/* @__PURE__ */ new Date(), this.hideSecond);
  23413. }
  23414. }
  23415. let {
  23416. year,
  23417. month,
  23418. date: date3,
  23419. fullDate,
  23420. extraInfo
  23421. } = this.calendar;
  23422. this.$emit(name, {
  23423. range: this.cale.multipleStatus,
  23424. year,
  23425. month,
  23426. date: date3,
  23427. time: this.time,
  23428. timeRange: this.timeRange,
  23429. fulldate: fullDate,
  23430. extraInfo: extraInfo || {}
  23431. });
  23432. },
  23433. /**
  23434. * 选择天触发
  23435. * @param {Object} weeks
  23436. */
  23437. choiceDate(weeks) {
  23438. if (weeks.disable)
  23439. return;
  23440. this.calendar = weeks;
  23441. this.calendar.userChecked = true;
  23442. this.cale.setMultiple(this.calendar.fullDate, true);
  23443. this.weeks = this.cale.weeks;
  23444. this.tempSingleDate = this.calendar.fullDate;
  23445. const beforeDate = new Date(this.cale.multipleStatus.before).getTime();
  23446. const afterDate = new Date(this.cale.multipleStatus.after).getTime();
  23447. if (beforeDate > afterDate && afterDate) {
  23448. this.tempRange.before = this.cale.multipleStatus.after;
  23449. this.tempRange.after = this.cale.multipleStatus.before;
  23450. } else {
  23451. this.tempRange.before = this.cale.multipleStatus.before;
  23452. this.tempRange.after = this.cale.multipleStatus.after;
  23453. }
  23454. this.change();
  23455. },
  23456. changeMonth(type2) {
  23457. let newDate;
  23458. if (type2 === "pre") {
  23459. newDate = this.cale.getPreMonthObj(this.nowDate.fullDate).fullDate;
  23460. } else if (type2 === "next") {
  23461. newDate = this.cale.getNextMonthObj(this.nowDate.fullDate).fullDate;
  23462. }
  23463. this.setDate(newDate);
  23464. this.monthSwitch();
  23465. },
  23466. /**
  23467. * 设置日期
  23468. * @param {Object} date
  23469. */
  23470. setDate(date3) {
  23471. this.cale.setDate(date3);
  23472. this.weeks = this.cale.weeks;
  23473. this.nowDate = this.cale.getInfo(date3);
  23474. }
  23475. }
  23476. };
  23477. function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
  23478. const _component_calendar_item = vue.resolveComponent("calendar-item");
  23479. const _component_time_picker = vue.resolveComponent("time-picker");
  23480. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$3);
  23481. return vue.openBlock(), vue.createElementBlock(
  23482. "view",
  23483. {
  23484. class: "uni-calendar",
  23485. onMouseleave: _cache[9] || (_cache[9] = (...args) => $options.leaveCale && $options.leaveCale(...args))
  23486. },
  23487. [
  23488. !$props.insert && $data.show ? (vue.openBlock(), vue.createElementBlock(
  23489. "view",
  23490. {
  23491. key: 0,
  23492. class: vue.normalizeClass(["uni-calendar__mask", { "uni-calendar--mask-show": $data.aniMaskShow }]),
  23493. onClick: _cache[0] || (_cache[0] = (...args) => $options.maskClick && $options.maskClick(...args))
  23494. },
  23495. null,
  23496. 2
  23497. /* CLASS */
  23498. )) : vue.createCommentVNode("v-if", true),
  23499. $props.insert || $data.show ? (vue.openBlock(), vue.createElementBlock(
  23500. "view",
  23501. {
  23502. key: 1,
  23503. class: vue.normalizeClass(["uni-calendar__content", { "uni-calendar--fixed": !$props.insert, "uni-calendar--ani-show": $data.aniMaskShow, "uni-calendar__content-mobile": $data.aniMaskShow }])
  23504. },
  23505. [
  23506. vue.createElementVNode(
  23507. "view",
  23508. {
  23509. class: vue.normalizeClass(["uni-calendar__header", { "uni-calendar__header-mobile": !$props.insert }])
  23510. },
  23511. [
  23512. vue.createElementVNode("view", {
  23513. class: "uni-calendar__header-btn-box",
  23514. onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.changeMonth("pre"), ["stop"]))
  23515. }, [
  23516. vue.createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--left" })
  23517. ]),
  23518. vue.createElementVNode("picker", {
  23519. mode: "date",
  23520. value: $props.date,
  23521. fields: "month",
  23522. onChange: _cache[2] || (_cache[2] = (...args) => $options.bindDateChange && $options.bindDateChange(...args))
  23523. }, [
  23524. vue.createElementVNode(
  23525. "text",
  23526. { class: "uni-calendar__header-text" },
  23527. vue.toDisplayString(($data.nowDate.year || "") + $options.yearText + ($data.nowDate.month || "") + $options.monthText),
  23528. 1
  23529. /* TEXT */
  23530. )
  23531. ], 40, ["value"]),
  23532. vue.createElementVNode("view", {
  23533. class: "uni-calendar__header-btn-box",
  23534. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.changeMonth("next"), ["stop"]))
  23535. }, [
  23536. vue.createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--right" })
  23537. ]),
  23538. !$props.insert ? (vue.openBlock(), vue.createElementBlock("view", {
  23539. key: 0,
  23540. class: "dialog-close",
  23541. onClick: _cache[4] || (_cache[4] = (...args) => $options.close && $options.close(...args))
  23542. }, [
  23543. vue.createElementVNode("view", {
  23544. class: "dialog-close-plus",
  23545. "data-id": "close"
  23546. }),
  23547. vue.createElementVNode("view", {
  23548. class: "dialog-close-plus dialog-close-rotate",
  23549. "data-id": "close"
  23550. })
  23551. ])) : vue.createCommentVNode("v-if", true)
  23552. ],
  23553. 2
  23554. /* CLASS */
  23555. ),
  23556. vue.createElementVNode("view", { class: "uni-calendar__box" }, [
  23557. $props.showMonth ? (vue.openBlock(), vue.createElementBlock("view", {
  23558. key: 0,
  23559. class: "uni-calendar__box-bg"
  23560. }, [
  23561. vue.createElementVNode(
  23562. "text",
  23563. { class: "uni-calendar__box-bg-text" },
  23564. vue.toDisplayString($data.nowDate.month),
  23565. 1
  23566. /* TEXT */
  23567. )
  23568. ])) : vue.createCommentVNode("v-if", true),
  23569. vue.createElementVNode("view", {
  23570. class: "uni-calendar__weeks",
  23571. style: { "padding-bottom": "7px" }
  23572. }, [
  23573. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23574. vue.createElementVNode(
  23575. "text",
  23576. { class: "uni-calendar__weeks-day-text" },
  23577. vue.toDisplayString($options.SUNText),
  23578. 1
  23579. /* TEXT */
  23580. )
  23581. ]),
  23582. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23583. vue.createElementVNode(
  23584. "text",
  23585. { class: "uni-calendar__weeks-day-text" },
  23586. vue.toDisplayString($options.MONText),
  23587. 1
  23588. /* TEXT */
  23589. )
  23590. ]),
  23591. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23592. vue.createElementVNode(
  23593. "text",
  23594. { class: "uni-calendar__weeks-day-text" },
  23595. vue.toDisplayString($options.TUEText),
  23596. 1
  23597. /* TEXT */
  23598. )
  23599. ]),
  23600. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23601. vue.createElementVNode(
  23602. "text",
  23603. { class: "uni-calendar__weeks-day-text" },
  23604. vue.toDisplayString($options.WEDText),
  23605. 1
  23606. /* TEXT */
  23607. )
  23608. ]),
  23609. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23610. vue.createElementVNode(
  23611. "text",
  23612. { class: "uni-calendar__weeks-day-text" },
  23613. vue.toDisplayString($options.THUText),
  23614. 1
  23615. /* TEXT */
  23616. )
  23617. ]),
  23618. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23619. vue.createElementVNode(
  23620. "text",
  23621. { class: "uni-calendar__weeks-day-text" },
  23622. vue.toDisplayString($options.FRIText),
  23623. 1
  23624. /* TEXT */
  23625. )
  23626. ]),
  23627. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23628. vue.createElementVNode(
  23629. "text",
  23630. { class: "uni-calendar__weeks-day-text" },
  23631. vue.toDisplayString($options.SATText),
  23632. 1
  23633. /* TEXT */
  23634. )
  23635. ])
  23636. ]),
  23637. (vue.openBlock(true), vue.createElementBlock(
  23638. vue.Fragment,
  23639. null,
  23640. vue.renderList($data.weeks, (item, weekIndex) => {
  23641. return vue.openBlock(), vue.createElementBlock("view", {
  23642. class: "uni-calendar__weeks",
  23643. key: weekIndex
  23644. }, [
  23645. (vue.openBlock(true), vue.createElementBlock(
  23646. vue.Fragment,
  23647. null,
  23648. vue.renderList(item, (weeks, weeksIndex) => {
  23649. return vue.openBlock(), vue.createElementBlock("view", {
  23650. class: "uni-calendar__weeks-item",
  23651. key: weeksIndex
  23652. }, [
  23653. vue.createVNode(_component_calendar_item, {
  23654. class: "uni-calendar-item--hook",
  23655. weeks,
  23656. calendar: $data.calendar,
  23657. selected: $props.selected,
  23658. checkHover: $props.range,
  23659. onChange: $options.choiceDate,
  23660. onHandleMouse: $options.handleMouse
  23661. }, null, 8, ["weeks", "calendar", "selected", "checkHover", "onChange", "onHandleMouse"])
  23662. ]);
  23663. }),
  23664. 128
  23665. /* KEYED_FRAGMENT */
  23666. ))
  23667. ]);
  23668. }),
  23669. 128
  23670. /* KEYED_FRAGMENT */
  23671. ))
  23672. ]),
  23673. !$props.insert && !$props.range && $props.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  23674. key: 0,
  23675. class: "uni-date-changed uni-calendar--fixed-top",
  23676. style: { "padding": "0 80px" }
  23677. }, [
  23678. vue.createElementVNode(
  23679. "view",
  23680. { class: "uni-date-changed--time-date" },
  23681. vue.toDisplayString($data.tempSingleDate ? $data.tempSingleDate : $options.selectDateText),
  23682. 1
  23683. /* TEXT */
  23684. ),
  23685. vue.createVNode(_component_time_picker, {
  23686. type: "time",
  23687. start: $options.timepickerStartTime,
  23688. end: $options.timepickerEndTime,
  23689. modelValue: $data.time,
  23690. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.time = $event),
  23691. disabled: !$data.tempSingleDate,
  23692. border: false,
  23693. "hide-second": $props.hideSecond,
  23694. class: "time-picker-style"
  23695. }, null, 8, ["start", "end", "modelValue", "disabled", "hide-second"])
  23696. ])) : vue.createCommentVNode("v-if", true),
  23697. !$props.insert && $props.range && $props.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  23698. key: 1,
  23699. class: "uni-date-changed uni-calendar--fixed-top"
  23700. }, [
  23701. vue.createElementVNode("view", { class: "uni-date-changed--time-start" }, [
  23702. vue.createElementVNode(
  23703. "view",
  23704. { class: "uni-date-changed--time-date" },
  23705. vue.toDisplayString($data.tempRange.before ? $data.tempRange.before : $options.startDateText),
  23706. 1
  23707. /* TEXT */
  23708. ),
  23709. vue.createVNode(_component_time_picker, {
  23710. type: "time",
  23711. start: $options.timepickerStartTime,
  23712. modelValue: $data.timeRange.startTime,
  23713. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.timeRange.startTime = $event),
  23714. border: false,
  23715. "hide-second": $props.hideSecond,
  23716. disabled: !$data.tempRange.before,
  23717. class: "time-picker-style"
  23718. }, null, 8, ["start", "modelValue", "hide-second", "disabled"])
  23719. ]),
  23720. vue.createElementVNode("view", { style: { "line-height": "50px" } }, [
  23721. vue.createVNode(_component_uni_icons, {
  23722. type: "arrowthinright",
  23723. color: "#999"
  23724. })
  23725. ]),
  23726. vue.createElementVNode("view", { class: "uni-date-changed--time-end" }, [
  23727. vue.createElementVNode(
  23728. "view",
  23729. { class: "uni-date-changed--time-date" },
  23730. vue.toDisplayString($data.tempRange.after ? $data.tempRange.after : $options.endDateText),
  23731. 1
  23732. /* TEXT */
  23733. ),
  23734. vue.createVNode(_component_time_picker, {
  23735. type: "time",
  23736. end: $options.timepickerEndTime,
  23737. modelValue: $data.timeRange.endTime,
  23738. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.timeRange.endTime = $event),
  23739. border: false,
  23740. "hide-second": $props.hideSecond,
  23741. disabled: !$data.tempRange.after,
  23742. class: "time-picker-style"
  23743. }, null, 8, ["end", "modelValue", "hide-second", "disabled"])
  23744. ])
  23745. ])) : vue.createCommentVNode("v-if", true),
  23746. !$props.insert ? (vue.openBlock(), vue.createElementBlock("view", {
  23747. key: 2,
  23748. class: "uni-date-changed uni-date-btn--ok"
  23749. }, [
  23750. vue.createElementVNode(
  23751. "view",
  23752. {
  23753. class: "uni-datetime-picker--btn",
  23754. onClick: _cache[8] || (_cache[8] = (...args) => $options.confirm && $options.confirm(...args))
  23755. },
  23756. vue.toDisplayString($options.confirmText),
  23757. 1
  23758. /* TEXT */
  23759. )
  23760. ])) : vue.createCommentVNode("v-if", true)
  23761. ],
  23762. 2
  23763. /* CLASS */
  23764. )) : vue.createCommentVNode("v-if", true)
  23765. ],
  23766. 32
  23767. /* NEED_HYDRATION */
  23768. );
  23769. }
  23770. const Calendar = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$R], ["__scopeId", "data-v-1d379219"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue"]]);
  23771. const _sfc_main$R = {
  23772. name: "UniDatetimePicker",
  23773. options: {
  23774. virtualHost: true
  23775. },
  23776. components: {
  23777. Calendar,
  23778. TimePicker
  23779. },
  23780. data() {
  23781. return {
  23782. isRange: false,
  23783. hasTime: false,
  23784. displayValue: "",
  23785. inputDate: "",
  23786. calendarDate: "",
  23787. pickerTime: "",
  23788. calendarRange: {
  23789. startDate: "",
  23790. startTime: "",
  23791. endDate: "",
  23792. endTime: ""
  23793. },
  23794. displayRangeValue: {
  23795. startDate: "",
  23796. endDate: ""
  23797. },
  23798. tempRange: {
  23799. startDate: "",
  23800. startTime: "",
  23801. endDate: "",
  23802. endTime: ""
  23803. },
  23804. // 左右日历同步数据
  23805. startMultipleStatus: {
  23806. before: "",
  23807. after: "",
  23808. data: [],
  23809. fulldate: ""
  23810. },
  23811. endMultipleStatus: {
  23812. before: "",
  23813. after: "",
  23814. data: [],
  23815. fulldate: ""
  23816. },
  23817. pickerVisible: false,
  23818. pickerPositionStyle: null,
  23819. isEmitValue: false,
  23820. isPhone: false,
  23821. isFirstShow: true,
  23822. i18nT: () => {
  23823. }
  23824. };
  23825. },
  23826. props: {
  23827. type: {
  23828. type: String,
  23829. default: "datetime"
  23830. },
  23831. value: {
  23832. type: [String, Number, Array, Date],
  23833. default: ""
  23834. },
  23835. modelValue: {
  23836. type: [String, Number, Array, Date],
  23837. default: ""
  23838. },
  23839. start: {
  23840. type: [Number, String],
  23841. default: ""
  23842. },
  23843. end: {
  23844. type: [Number, String],
  23845. default: ""
  23846. },
  23847. returnType: {
  23848. type: String,
  23849. default: "string"
  23850. },
  23851. placeholder: {
  23852. type: String,
  23853. default: ""
  23854. },
  23855. startPlaceholder: {
  23856. type: String,
  23857. default: ""
  23858. },
  23859. endPlaceholder: {
  23860. type: String,
  23861. default: ""
  23862. },
  23863. rangeSeparator: {
  23864. type: String,
  23865. default: "-"
  23866. },
  23867. border: {
  23868. type: [Boolean],
  23869. default: true
  23870. },
  23871. disabled: {
  23872. type: [Boolean],
  23873. default: false
  23874. },
  23875. clearIcon: {
  23876. type: [Boolean],
  23877. default: true
  23878. },
  23879. hideSecond: {
  23880. type: [Boolean],
  23881. default: false
  23882. },
  23883. defaultValue: {
  23884. type: [String, Object, Array],
  23885. default: ""
  23886. }
  23887. },
  23888. watch: {
  23889. type: {
  23890. immediate: true,
  23891. handler(newVal) {
  23892. this.hasTime = newVal.indexOf("time") !== -1;
  23893. this.isRange = newVal.indexOf("range") !== -1;
  23894. }
  23895. },
  23896. modelValue: {
  23897. immediate: true,
  23898. handler(newVal) {
  23899. if (this.isEmitValue) {
  23900. this.isEmitValue = false;
  23901. return;
  23902. }
  23903. this.initPicker(newVal);
  23904. }
  23905. },
  23906. start: {
  23907. immediate: true,
  23908. handler(newVal) {
  23909. if (!newVal)
  23910. return;
  23911. this.calendarRange.startDate = getDate(newVal);
  23912. if (this.hasTime) {
  23913. this.calendarRange.startTime = getTime(newVal);
  23914. }
  23915. }
  23916. },
  23917. end: {
  23918. immediate: true,
  23919. handler(newVal) {
  23920. if (!newVal)
  23921. return;
  23922. this.calendarRange.endDate = getDate(newVal);
  23923. if (this.hasTime) {
  23924. this.calendarRange.endTime = getTime(newVal, this.hideSecond);
  23925. }
  23926. }
  23927. }
  23928. },
  23929. computed: {
  23930. timepickerStartTime() {
  23931. const activeDate = this.isRange ? this.tempRange.startDate : this.inputDate;
  23932. return activeDate === this.calendarRange.startDate ? this.calendarRange.startTime : "";
  23933. },
  23934. timepickerEndTime() {
  23935. const activeDate = this.isRange ? this.tempRange.endDate : this.inputDate;
  23936. return activeDate === this.calendarRange.endDate ? this.calendarRange.endTime : "";
  23937. },
  23938. mobileCalendarTime() {
  23939. const timeRange = {
  23940. start: this.tempRange.startTime,
  23941. end: this.tempRange.endTime
  23942. };
  23943. return this.isRange ? timeRange : this.pickerTime;
  23944. },
  23945. mobSelectableTime() {
  23946. return {
  23947. start: this.calendarRange.startTime,
  23948. end: this.calendarRange.endTime
  23949. };
  23950. },
  23951. datePopupWidth() {
  23952. return this.isRange ? 653 : 301;
  23953. },
  23954. /**
  23955. * for i18n
  23956. */
  23957. singlePlaceholderText() {
  23958. return this.placeholder || (this.type === "date" ? this.selectDateText : this.selectDateTimeText);
  23959. },
  23960. startPlaceholderText() {
  23961. return this.startPlaceholder || this.startDateText;
  23962. },
  23963. endPlaceholderText() {
  23964. return this.endPlaceholder || this.endDateText;
  23965. },
  23966. selectDateText() {
  23967. return this.i18nT("uni-datetime-picker.selectDate");
  23968. },
  23969. selectDateTimeText() {
  23970. return this.i18nT("uni-datetime-picker.selectDateTime");
  23971. },
  23972. selectTimeText() {
  23973. return this.i18nT("uni-datetime-picker.selectTime");
  23974. },
  23975. startDateText() {
  23976. return this.startPlaceholder || this.i18nT("uni-datetime-picker.startDate");
  23977. },
  23978. startTimeText() {
  23979. return this.i18nT("uni-datetime-picker.startTime");
  23980. },
  23981. endDateText() {
  23982. return this.endPlaceholder || this.i18nT("uni-datetime-picker.endDate");
  23983. },
  23984. endTimeText() {
  23985. return this.i18nT("uni-datetime-picker.endTime");
  23986. },
  23987. okText() {
  23988. return this.i18nT("uni-datetime-picker.ok");
  23989. },
  23990. clearText() {
  23991. return this.i18nT("uni-datetime-picker.clear");
  23992. },
  23993. showClearIcon() {
  23994. return this.clearIcon && !this.disabled && (this.displayValue || this.displayRangeValue.startDate && this.displayRangeValue.endDate);
  23995. }
  23996. },
  23997. created() {
  23998. this.initI18nT();
  23999. this.platform();
  24000. },
  24001. methods: {
  24002. initI18nT() {
  24003. const vueI18n = initVueI18n(i18nMessages);
  24004. this.i18nT = vueI18n.t;
  24005. },
  24006. initPicker(newVal) {
  24007. if (!newVal && !this.defaultValue || Array.isArray(newVal) && !newVal.length) {
  24008. this.$nextTick(() => {
  24009. this.clear(false);
  24010. });
  24011. return;
  24012. }
  24013. if (!Array.isArray(newVal) && !this.isRange) {
  24014. if (newVal) {
  24015. this.displayValue = this.inputDate = this.calendarDate = getDate(newVal);
  24016. if (this.hasTime) {
  24017. this.pickerTime = getTime(newVal, this.hideSecond);
  24018. this.displayValue = `${this.displayValue} ${this.pickerTime}`;
  24019. }
  24020. } else if (this.defaultValue) {
  24021. this.inputDate = this.calendarDate = getDate(this.defaultValue);
  24022. if (this.hasTime) {
  24023. this.pickerTime = getTime(this.defaultValue, this.hideSecond);
  24024. }
  24025. }
  24026. } else {
  24027. const [before, after] = newVal;
  24028. if (!before && !after)
  24029. return;
  24030. const beforeDate = getDate(before);
  24031. const beforeTime = getTime(before, this.hideSecond);
  24032. const afterDate = getDate(after);
  24033. const afterTime = getTime(after, this.hideSecond);
  24034. const startDate = beforeDate;
  24035. const endDate = afterDate;
  24036. this.displayRangeValue.startDate = this.tempRange.startDate = startDate;
  24037. this.displayRangeValue.endDate = this.tempRange.endDate = endDate;
  24038. if (this.hasTime) {
  24039. this.displayRangeValue.startDate = `${beforeDate} ${beforeTime}`;
  24040. this.displayRangeValue.endDate = `${afterDate} ${afterTime}`;
  24041. this.tempRange.startTime = beforeTime;
  24042. this.tempRange.endTime = afterTime;
  24043. }
  24044. const defaultRange = {
  24045. before: beforeDate,
  24046. after: afterDate
  24047. };
  24048. this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, defaultRange, {
  24049. which: "right"
  24050. });
  24051. this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, defaultRange, {
  24052. which: "left"
  24053. });
  24054. }
  24055. },
  24056. updateLeftCale(e) {
  24057. const left = this.$refs.left;
  24058. left.cale.setHoverMultiple(e.after);
  24059. left.setDate(this.$refs.left.nowDate.fullDate);
  24060. },
  24061. updateRightCale(e) {
  24062. const right = this.$refs.right;
  24063. right.cale.setHoverMultiple(e.after);
  24064. right.setDate(this.$refs.right.nowDate.fullDate);
  24065. },
  24066. platform() {
  24067. if (typeof navigator !== "undefined") {
  24068. this.isPhone = navigator.userAgent.toLowerCase().indexOf("mobile") !== -1;
  24069. return;
  24070. }
  24071. const { windowWidth } = uni.getSystemInfoSync();
  24072. this.isPhone = windowWidth <= 500;
  24073. this.windowWidth = windowWidth;
  24074. },
  24075. show() {
  24076. if (this.disabled) {
  24077. return;
  24078. }
  24079. this.platform();
  24080. if (this.isPhone) {
  24081. setTimeout(() => {
  24082. this.$refs.mobile.open();
  24083. }, 0);
  24084. return;
  24085. }
  24086. this.pickerPositionStyle = {
  24087. top: "10px"
  24088. };
  24089. const dateEditor = uni.createSelectorQuery().in(this).select(".uni-date-editor");
  24090. dateEditor.boundingClientRect((rect) => {
  24091. if (this.windowWidth - rect.left < this.datePopupWidth) {
  24092. this.pickerPositionStyle.right = 0;
  24093. }
  24094. }).exec();
  24095. setTimeout(() => {
  24096. this.pickerVisible = !this.pickerVisible;
  24097. if (!this.isPhone && this.isRange && this.isFirstShow) {
  24098. this.isFirstShow = false;
  24099. const {
  24100. startDate,
  24101. endDate
  24102. } = this.calendarRange;
  24103. if (startDate && endDate) {
  24104. if (this.diffDate(startDate, endDate) < 30) {
  24105. this.$refs.right.changeMonth("pre");
  24106. }
  24107. } else {
  24108. this.$refs.right.changeMonth("next");
  24109. this.$refs.right.cale.lastHover = false;
  24110. }
  24111. }
  24112. }, 50);
  24113. },
  24114. close() {
  24115. setTimeout(() => {
  24116. this.pickerVisible = false;
  24117. this.$emit("maskClick", this.value);
  24118. this.$refs.mobile && this.$refs.mobile.close();
  24119. }, 20);
  24120. },
  24121. setEmit(value2) {
  24122. if (this.returnType === "timestamp" || this.returnType === "date") {
  24123. if (!Array.isArray(value2)) {
  24124. if (!this.hasTime) {
  24125. value2 = value2 + " 00:00:00";
  24126. }
  24127. value2 = this.createTimestamp(value2);
  24128. if (this.returnType === "date") {
  24129. value2 = new Date(value2);
  24130. }
  24131. } else {
  24132. if (!this.hasTime) {
  24133. value2[0] = value2[0] + " 00:00:00";
  24134. value2[1] = value2[1] + " 00:00:00";
  24135. }
  24136. value2[0] = this.createTimestamp(value2[0]);
  24137. value2[1] = this.createTimestamp(value2[1]);
  24138. if (this.returnType === "date") {
  24139. value2[0] = new Date(value2[0]);
  24140. value2[1] = new Date(value2[1]);
  24141. }
  24142. }
  24143. }
  24144. this.$emit("update:modelValue", value2);
  24145. this.$emit("input", value2);
  24146. this.$emit("change", value2);
  24147. this.isEmitValue = true;
  24148. },
  24149. createTimestamp(date3) {
  24150. date3 = fixIosDateFormat(date3);
  24151. return Date.parse(new Date(date3));
  24152. },
  24153. singleChange(e) {
  24154. this.calendarDate = this.inputDate = e.fulldate;
  24155. if (this.hasTime)
  24156. return;
  24157. this.confirmSingleChange();
  24158. },
  24159. confirmSingleChange() {
  24160. if (!checkDate(this.inputDate)) {
  24161. const now2 = /* @__PURE__ */ new Date();
  24162. this.calendarDate = this.inputDate = getDate(now2);
  24163. this.pickerTime = getTime(now2, this.hideSecond);
  24164. }
  24165. let startLaterInputDate = false;
  24166. let startDate, startTime;
  24167. if (this.start) {
  24168. let startString = this.start;
  24169. if (typeof this.start === "number") {
  24170. startString = getDateTime(this.start, this.hideSecond);
  24171. }
  24172. [startDate, startTime] = startString.split(" ");
  24173. if (this.start && !dateCompare(startDate, this.inputDate)) {
  24174. startLaterInputDate = true;
  24175. this.inputDate = startDate;
  24176. }
  24177. }
  24178. let endEarlierInputDate = false;
  24179. let endDate, endTime;
  24180. if (this.end) {
  24181. let endString = this.end;
  24182. if (typeof this.end === "number") {
  24183. endString = getDateTime(this.end, this.hideSecond);
  24184. }
  24185. [endDate, endTime] = endString.split(" ");
  24186. if (this.end && !dateCompare(this.inputDate, endDate)) {
  24187. endEarlierInputDate = true;
  24188. this.inputDate = endDate;
  24189. }
  24190. }
  24191. if (this.hasTime) {
  24192. if (startLaterInputDate) {
  24193. this.pickerTime = startTime || getDefaultSecond(this.hideSecond);
  24194. }
  24195. if (endEarlierInputDate) {
  24196. this.pickerTime = endTime || getDefaultSecond(this.hideSecond);
  24197. }
  24198. if (!this.pickerTime) {
  24199. this.pickerTime = getTime(Date.now(), this.hideSecond);
  24200. }
  24201. this.displayValue = `${this.inputDate} ${this.pickerTime}`;
  24202. } else {
  24203. this.displayValue = this.inputDate;
  24204. }
  24205. this.setEmit(this.displayValue);
  24206. this.pickerVisible = false;
  24207. },
  24208. leftChange(e) {
  24209. const {
  24210. before,
  24211. after
  24212. } = e.range;
  24213. this.rangeChange(before, after);
  24214. const obj = {
  24215. before: e.range.before,
  24216. after: e.range.after,
  24217. data: e.range.data,
  24218. fulldate: e.fulldate
  24219. };
  24220. this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, obj);
  24221. },
  24222. rightChange(e) {
  24223. const {
  24224. before,
  24225. after
  24226. } = e.range;
  24227. this.rangeChange(before, after);
  24228. const obj = {
  24229. before: e.range.before,
  24230. after: e.range.after,
  24231. data: e.range.data,
  24232. fulldate: e.fulldate
  24233. };
  24234. this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, obj);
  24235. },
  24236. mobileChange(e) {
  24237. if (this.isRange) {
  24238. const { before, after } = e.range;
  24239. if (!before || !after) {
  24240. return;
  24241. }
  24242. this.handleStartAndEnd(before, after, true);
  24243. if (this.hasTime) {
  24244. const {
  24245. startTime,
  24246. endTime
  24247. } = e.timeRange;
  24248. this.tempRange.startTime = startTime;
  24249. this.tempRange.endTime = endTime;
  24250. }
  24251. this.confirmRangeChange();
  24252. } else {
  24253. if (this.hasTime) {
  24254. this.displayValue = e.fulldate + " " + e.time;
  24255. } else {
  24256. this.displayValue = e.fulldate;
  24257. }
  24258. this.setEmit(this.displayValue);
  24259. }
  24260. this.$refs.mobile.close();
  24261. },
  24262. rangeChange(before, after) {
  24263. if (!(before && after))
  24264. return;
  24265. this.handleStartAndEnd(before, after, true);
  24266. if (this.hasTime)
  24267. return;
  24268. this.confirmRangeChange();
  24269. },
  24270. confirmRangeChange() {
  24271. if (!this.tempRange.startDate || !this.tempRange.endDate) {
  24272. this.pickerVisible = false;
  24273. return;
  24274. }
  24275. if (!checkDate(this.tempRange.startDate)) {
  24276. this.tempRange.startDate = getDate(Date.now());
  24277. }
  24278. if (!checkDate(this.tempRange.endDate)) {
  24279. this.tempRange.endDate = getDate(Date.now());
  24280. }
  24281. let start, end;
  24282. let startDateLaterRangeStartDate = false;
  24283. let startDateLaterRangeEndDate = false;
  24284. let startDate, startTime;
  24285. if (this.start) {
  24286. let startString = this.start;
  24287. if (typeof this.start === "number") {
  24288. startString = getDateTime(this.start, this.hideSecond);
  24289. }
  24290. [startDate, startTime] = startString.split(" ");
  24291. if (this.start && !dateCompare(this.start, this.tempRange.startDate)) {
  24292. startDateLaterRangeStartDate = true;
  24293. this.tempRange.startDate = startDate;
  24294. }
  24295. if (this.start && !dateCompare(this.start, this.tempRange.endDate)) {
  24296. startDateLaterRangeEndDate = true;
  24297. this.tempRange.endDate = startDate;
  24298. }
  24299. }
  24300. let endDateEarlierRangeStartDate = false;
  24301. let endDateEarlierRangeEndDate = false;
  24302. let endDate, endTime;
  24303. if (this.end) {
  24304. let endString = this.end;
  24305. if (typeof this.end === "number") {
  24306. endString = getDateTime(this.end, this.hideSecond);
  24307. }
  24308. [endDate, endTime] = endString.split(" ");
  24309. if (this.end && !dateCompare(this.tempRange.startDate, this.end)) {
  24310. endDateEarlierRangeStartDate = true;
  24311. this.tempRange.startDate = endDate;
  24312. }
  24313. if (this.end && !dateCompare(this.tempRange.endDate, this.end)) {
  24314. endDateEarlierRangeEndDate = true;
  24315. this.tempRange.endDate = endDate;
  24316. }
  24317. }
  24318. if (!this.hasTime) {
  24319. start = this.displayRangeValue.startDate = this.tempRange.startDate;
  24320. end = this.displayRangeValue.endDate = this.tempRange.endDate;
  24321. } else {
  24322. if (startDateLaterRangeStartDate) {
  24323. this.tempRange.startTime = startTime || getDefaultSecond(this.hideSecond);
  24324. } else if (endDateEarlierRangeStartDate) {
  24325. this.tempRange.startTime = endTime || getDefaultSecond(this.hideSecond);
  24326. }
  24327. if (!this.tempRange.startTime) {
  24328. this.tempRange.startTime = getTime(Date.now(), this.hideSecond);
  24329. }
  24330. if (startDateLaterRangeEndDate) {
  24331. this.tempRange.endTime = startTime || getDefaultSecond(this.hideSecond);
  24332. } else if (endDateEarlierRangeEndDate) {
  24333. this.tempRange.endTime = endTime || getDefaultSecond(this.hideSecond);
  24334. }
  24335. if (!this.tempRange.endTime) {
  24336. this.tempRange.endTime = getTime(Date.now(), this.hideSecond);
  24337. }
  24338. start = this.displayRangeValue.startDate = `${this.tempRange.startDate} ${this.tempRange.startTime}`;
  24339. end = this.displayRangeValue.endDate = `${this.tempRange.endDate} ${this.tempRange.endTime}`;
  24340. }
  24341. if (!dateCompare(start, end)) {
  24342. [start, end] = [end, start];
  24343. }
  24344. this.displayRangeValue.startDate = start;
  24345. this.displayRangeValue.endDate = end;
  24346. const displayRange = [start, end];
  24347. this.setEmit(displayRange);
  24348. this.pickerVisible = false;
  24349. },
  24350. handleStartAndEnd(before, after, temp = false) {
  24351. if (!(before && after))
  24352. return;
  24353. const type2 = temp ? "tempRange" : "range";
  24354. const isStartEarlierEnd = dateCompare(before, after);
  24355. this[type2].startDate = isStartEarlierEnd ? before : after;
  24356. this[type2].endDate = isStartEarlierEnd ? after : before;
  24357. },
  24358. /**
  24359. * 比较时间大小
  24360. */
  24361. dateCompare(startDate, endDate) {
  24362. startDate = new Date(startDate.replace("-", "/").replace("-", "/"));
  24363. endDate = new Date(endDate.replace("-", "/").replace("-", "/"));
  24364. return startDate <= endDate;
  24365. },
  24366. /**
  24367. * 比较时间差
  24368. */
  24369. diffDate(startDate, endDate) {
  24370. startDate = new Date(startDate.replace("-", "/").replace("-", "/"));
  24371. endDate = new Date(endDate.replace("-", "/").replace("-", "/"));
  24372. const diff = (endDate - startDate) / (24 * 60 * 60 * 1e3);
  24373. return Math.abs(diff);
  24374. },
  24375. clear(needEmit = true) {
  24376. if (!this.isRange) {
  24377. this.displayValue = "";
  24378. this.inputDate = "";
  24379. this.pickerTime = "";
  24380. if (this.isPhone) {
  24381. this.$refs.mobile && this.$refs.mobile.clearCalender();
  24382. } else {
  24383. this.$refs.pcSingle && this.$refs.pcSingle.clearCalender();
  24384. }
  24385. if (needEmit) {
  24386. this.$emit("change", "");
  24387. this.$emit("input", "");
  24388. this.$emit("update:modelValue", "");
  24389. }
  24390. } else {
  24391. this.displayRangeValue.startDate = "";
  24392. this.displayRangeValue.endDate = "";
  24393. this.tempRange.startDate = "";
  24394. this.tempRange.startTime = "";
  24395. this.tempRange.endDate = "";
  24396. this.tempRange.endTime = "";
  24397. if (this.isPhone) {
  24398. this.$refs.mobile && this.$refs.mobile.clearCalender();
  24399. } else {
  24400. this.$refs.left && this.$refs.left.clearCalender();
  24401. this.$refs.right && this.$refs.right.clearCalender();
  24402. this.$refs.right && this.$refs.right.changeMonth("next");
  24403. }
  24404. if (needEmit) {
  24405. this.$emit("change", []);
  24406. this.$emit("input", []);
  24407. this.$emit("update:modelValue", []);
  24408. }
  24409. }
  24410. }
  24411. }
  24412. };
  24413. function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
  24414. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$3);
  24415. const _component_time_picker = vue.resolveComponent("time-picker");
  24416. const _component_Calendar = vue.resolveComponent("Calendar");
  24417. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-date" }, [
  24418. vue.createElementVNode("view", {
  24419. class: "uni-date-editor",
  24420. onClick: _cache[1] || (_cache[1] = (...args) => $options.show && $options.show(...args))
  24421. }, [
  24422. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  24423. vue.createElementVNode(
  24424. "view",
  24425. {
  24426. class: vue.normalizeClass(["uni-date-editor--x", { "uni-date-editor--x__disabled": $props.disabled, "uni-date-x--border": $props.border }])
  24427. },
  24428. [
  24429. !$data.isRange ? (vue.openBlock(), vue.createElementBlock("view", {
  24430. key: 0,
  24431. class: "uni-date-x uni-date-single"
  24432. }, [
  24433. vue.createVNode(_component_uni_icons, {
  24434. class: "icon-calendar",
  24435. type: "calendar",
  24436. color: "#c0c4cc",
  24437. size: "22"
  24438. }),
  24439. vue.createElementVNode(
  24440. "view",
  24441. { class: "uni-date__x-input" },
  24442. vue.toDisplayString($data.displayValue || $options.singlePlaceholderText),
  24443. 1
  24444. /* TEXT */
  24445. )
  24446. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  24447. key: 1,
  24448. class: "uni-date-x uni-date-range"
  24449. }, [
  24450. vue.createVNode(_component_uni_icons, {
  24451. class: "icon-calendar",
  24452. type: "calendar",
  24453. color: "#c0c4cc",
  24454. size: "22"
  24455. }),
  24456. vue.createElementVNode(
  24457. "view",
  24458. { class: "uni-date__x-input text-center" },
  24459. vue.toDisplayString($data.displayRangeValue.startDate || $options.startPlaceholderText),
  24460. 1
  24461. /* TEXT */
  24462. ),
  24463. vue.createElementVNode(
  24464. "view",
  24465. { class: "range-separator" },
  24466. vue.toDisplayString($props.rangeSeparator),
  24467. 1
  24468. /* TEXT */
  24469. ),
  24470. vue.createElementVNode(
  24471. "view",
  24472. { class: "uni-date__x-input text-center" },
  24473. vue.toDisplayString($data.displayRangeValue.endDate || $options.endPlaceholderText),
  24474. 1
  24475. /* TEXT */
  24476. )
  24477. ])),
  24478. $options.showClearIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  24479. key: 2,
  24480. class: "uni-date__icon-clear",
  24481. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clear && $options.clear(...args), ["stop"]))
  24482. }, [
  24483. vue.createVNode(_component_uni_icons, {
  24484. type: "clear",
  24485. color: "#c0c4cc",
  24486. size: "22"
  24487. })
  24488. ])) : vue.createCommentVNode("v-if", true)
  24489. ],
  24490. 2
  24491. /* CLASS */
  24492. )
  24493. ], true)
  24494. ]),
  24495. vue.withDirectives(vue.createElementVNode(
  24496. "view",
  24497. {
  24498. class: "uni-date-mask--pc",
  24499. onClick: _cache[2] || (_cache[2] = (...args) => $options.close && $options.close(...args))
  24500. },
  24501. null,
  24502. 512
  24503. /* NEED_PATCH */
  24504. ), [
  24505. [vue.vShow, $data.pickerVisible]
  24506. ]),
  24507. !$data.isPhone ? vue.withDirectives((vue.openBlock(), vue.createElementBlock(
  24508. "view",
  24509. {
  24510. key: 0,
  24511. ref: "datePicker",
  24512. class: "uni-date-picker__container"
  24513. },
  24514. [
  24515. !$data.isRange ? (vue.openBlock(), vue.createElementBlock(
  24516. "view",
  24517. {
  24518. key: 0,
  24519. class: "uni-date-single--x",
  24520. style: vue.normalizeStyle($data.pickerPositionStyle)
  24521. },
  24522. [
  24523. vue.createElementVNode("view", { class: "uni-popper__arrow" }),
  24524. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24525. key: 0,
  24526. class: "uni-date-changed popup-x-header"
  24527. }, [
  24528. vue.withDirectives(vue.createElementVNode("input", {
  24529. class: "uni-date__input text-center",
  24530. type: "text",
  24531. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.inputDate = $event),
  24532. placeholder: $options.selectDateText
  24533. }, null, 8, ["placeholder"]), [
  24534. [vue.vModelText, $data.inputDate]
  24535. ]),
  24536. vue.createVNode(_component_time_picker, {
  24537. type: "time",
  24538. modelValue: $data.pickerTime,
  24539. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.pickerTime = $event),
  24540. border: false,
  24541. disabled: !$data.inputDate,
  24542. start: $options.timepickerStartTime,
  24543. end: $options.timepickerEndTime,
  24544. hideSecond: $props.hideSecond,
  24545. style: { "width": "100%" }
  24546. }, {
  24547. default: vue.withCtx(() => [
  24548. vue.withDirectives(vue.createElementVNode("input", {
  24549. class: "uni-date__input text-center",
  24550. type: "text",
  24551. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.pickerTime = $event),
  24552. placeholder: $options.selectTimeText,
  24553. disabled: !$data.inputDate
  24554. }, null, 8, ["placeholder", "disabled"]), [
  24555. [vue.vModelText, $data.pickerTime]
  24556. ])
  24557. ]),
  24558. _: 1
  24559. /* STABLE */
  24560. }, 8, ["modelValue", "disabled", "start", "end", "hideSecond"])
  24561. ])) : vue.createCommentVNode("v-if", true),
  24562. vue.createVNode(_component_Calendar, {
  24563. ref: "pcSingle",
  24564. showMonth: false,
  24565. "start-date": $data.calendarRange.startDate,
  24566. "end-date": $data.calendarRange.endDate,
  24567. date: $data.calendarDate,
  24568. onChange: $options.singleChange,
  24569. "default-value": $props.defaultValue,
  24570. style: { "padding": "0 8px" }
  24571. }, null, 8, ["start-date", "end-date", "date", "onChange", "default-value"]),
  24572. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24573. key: 1,
  24574. class: "popup-x-footer"
  24575. }, [
  24576. vue.createElementVNode(
  24577. "text",
  24578. {
  24579. class: "confirm-text",
  24580. onClick: _cache[6] || (_cache[6] = (...args) => $options.confirmSingleChange && $options.confirmSingleChange(...args))
  24581. },
  24582. vue.toDisplayString($options.okText),
  24583. 1
  24584. /* TEXT */
  24585. )
  24586. ])) : vue.createCommentVNode("v-if", true)
  24587. ],
  24588. 4
  24589. /* STYLE */
  24590. )) : (vue.openBlock(), vue.createElementBlock(
  24591. "view",
  24592. {
  24593. key: 1,
  24594. class: "uni-date-range--x",
  24595. style: vue.normalizeStyle($data.pickerPositionStyle)
  24596. },
  24597. [
  24598. vue.createElementVNode("view", { class: "uni-popper__arrow" }),
  24599. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24600. key: 0,
  24601. class: "popup-x-header uni-date-changed"
  24602. }, [
  24603. vue.createElementVNode("view", { class: "popup-x-header--datetime" }, [
  24604. vue.withDirectives(vue.createElementVNode("input", {
  24605. class: "uni-date__input uni-date-range__input",
  24606. type: "text",
  24607. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.tempRange.startDate = $event),
  24608. placeholder: $options.startDateText
  24609. }, null, 8, ["placeholder"]), [
  24610. [vue.vModelText, $data.tempRange.startDate]
  24611. ]),
  24612. vue.createVNode(_component_time_picker, {
  24613. type: "time",
  24614. modelValue: $data.tempRange.startTime,
  24615. "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $data.tempRange.startTime = $event),
  24616. start: $options.timepickerStartTime,
  24617. border: false,
  24618. disabled: !$data.tempRange.startDate,
  24619. hideSecond: $props.hideSecond
  24620. }, {
  24621. default: vue.withCtx(() => [
  24622. vue.withDirectives(vue.createElementVNode("input", {
  24623. class: "uni-date__input uni-date-range__input",
  24624. type: "text",
  24625. "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.tempRange.startTime = $event),
  24626. placeholder: $options.startTimeText,
  24627. disabled: !$data.tempRange.startDate
  24628. }, null, 8, ["placeholder", "disabled"]), [
  24629. [vue.vModelText, $data.tempRange.startTime]
  24630. ])
  24631. ]),
  24632. _: 1
  24633. /* STABLE */
  24634. }, 8, ["modelValue", "start", "disabled", "hideSecond"])
  24635. ]),
  24636. vue.createVNode(_component_uni_icons, {
  24637. type: "arrowthinright",
  24638. color: "#999",
  24639. style: { "line-height": "40px" }
  24640. }),
  24641. vue.createElementVNode("view", { class: "popup-x-header--datetime" }, [
  24642. vue.withDirectives(vue.createElementVNode("input", {
  24643. class: "uni-date__input uni-date-range__input",
  24644. type: "text",
  24645. "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $data.tempRange.endDate = $event),
  24646. placeholder: $options.endDateText
  24647. }, null, 8, ["placeholder"]), [
  24648. [vue.vModelText, $data.tempRange.endDate]
  24649. ]),
  24650. vue.createVNode(_component_time_picker, {
  24651. type: "time",
  24652. modelValue: $data.tempRange.endTime,
  24653. "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $data.tempRange.endTime = $event),
  24654. end: $options.timepickerEndTime,
  24655. border: false,
  24656. disabled: !$data.tempRange.endDate,
  24657. hideSecond: $props.hideSecond
  24658. }, {
  24659. default: vue.withCtx(() => [
  24660. vue.withDirectives(vue.createElementVNode("input", {
  24661. class: "uni-date__input uni-date-range__input",
  24662. type: "text",
  24663. "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.tempRange.endTime = $event),
  24664. placeholder: $options.endTimeText,
  24665. disabled: !$data.tempRange.endDate
  24666. }, null, 8, ["placeholder", "disabled"]), [
  24667. [vue.vModelText, $data.tempRange.endTime]
  24668. ])
  24669. ]),
  24670. _: 1
  24671. /* STABLE */
  24672. }, 8, ["modelValue", "end", "disabled", "hideSecond"])
  24673. ])
  24674. ])) : vue.createCommentVNode("v-if", true),
  24675. vue.createElementVNode("view", { class: "popup-x-body" }, [
  24676. vue.createVNode(_component_Calendar, {
  24677. ref: "left",
  24678. showMonth: false,
  24679. "start-date": $data.calendarRange.startDate,
  24680. "end-date": $data.calendarRange.endDate,
  24681. range: true,
  24682. pleStatus: $data.endMultipleStatus,
  24683. onChange: $options.leftChange,
  24684. onFirstEnterCale: $options.updateRightCale,
  24685. style: { "padding": "0 8px" }
  24686. }, null, 8, ["start-date", "end-date", "pleStatus", "onChange", "onFirstEnterCale"]),
  24687. vue.createVNode(_component_Calendar, {
  24688. ref: "right",
  24689. showMonth: false,
  24690. "start-date": $data.calendarRange.startDate,
  24691. "end-date": $data.calendarRange.endDate,
  24692. range: true,
  24693. onChange: $options.rightChange,
  24694. pleStatus: $data.startMultipleStatus,
  24695. onFirstEnterCale: $options.updateLeftCale,
  24696. style: { "padding": "0 8px", "border-left": "1px solid #F1F1F1" }
  24697. }, null, 8, ["start-date", "end-date", "onChange", "pleStatus", "onFirstEnterCale"])
  24698. ]),
  24699. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24700. key: 1,
  24701. class: "popup-x-footer"
  24702. }, [
  24703. vue.createElementVNode(
  24704. "text",
  24705. {
  24706. onClick: _cache[13] || (_cache[13] = (...args) => $options.clear && $options.clear(...args))
  24707. },
  24708. vue.toDisplayString($options.clearText),
  24709. 1
  24710. /* TEXT */
  24711. ),
  24712. vue.createElementVNode(
  24713. "text",
  24714. {
  24715. class: "confirm-text",
  24716. onClick: _cache[14] || (_cache[14] = (...args) => $options.confirmRangeChange && $options.confirmRangeChange(...args))
  24717. },
  24718. vue.toDisplayString($options.okText),
  24719. 1
  24720. /* TEXT */
  24721. )
  24722. ])) : vue.createCommentVNode("v-if", true)
  24723. ],
  24724. 4
  24725. /* STYLE */
  24726. ))
  24727. ],
  24728. 512
  24729. /* NEED_PATCH */
  24730. )), [
  24731. [vue.vShow, $data.pickerVisible]
  24732. ]) : vue.createCommentVNode("v-if", true),
  24733. $data.isPhone ? (vue.openBlock(), vue.createBlock(_component_Calendar, {
  24734. key: 1,
  24735. ref: "mobile",
  24736. clearDate: false,
  24737. date: $data.calendarDate,
  24738. defTime: $options.mobileCalendarTime,
  24739. "start-date": $data.calendarRange.startDate,
  24740. "end-date": $data.calendarRange.endDate,
  24741. selectableTimes: $options.mobSelectableTime,
  24742. startPlaceholder: $props.startPlaceholder,
  24743. endPlaceholder: $props.endPlaceholder,
  24744. "default-value": $props.defaultValue,
  24745. pleStatus: $data.endMultipleStatus,
  24746. showMonth: false,
  24747. range: $data.isRange,
  24748. hasTime: $data.hasTime,
  24749. insert: false,
  24750. hideSecond: $props.hideSecond,
  24751. onConfirm: $options.mobileChange,
  24752. onMaskClose: $options.close
  24753. }, null, 8, ["date", "defTime", "start-date", "end-date", "selectableTimes", "startPlaceholder", "endPlaceholder", "default-value", "pleStatus", "range", "hasTime", "hideSecond", "onConfirm", "onMaskClose"])) : vue.createCommentVNode("v-if", true)
  24754. ]);
  24755. }
  24756. const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$Q], ["__scopeId", "data-v-9802168a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue"]]);
  24757. const _sfc_main$Q = {
  24758. __name: "after-sale",
  24759. setup(__props, { expose: __expose }) {
  24760. __expose();
  24761. const otherParams = vue.ref({
  24762. sender: ""
  24763. });
  24764. const scrollRef = vue.ref(null);
  24765. const refreshList = () => {
  24766. var _a;
  24767. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  24768. };
  24769. let dataList = vue.ref([{
  24770. date: "2024-10-24",
  24771. orderNum: 423,
  24772. auditNum: 293,
  24773. trueNum: 323
  24774. }, {
  24775. date: "2024-10-24",
  24776. orderNum: 423,
  24777. auditNum: 293,
  24778. trueNum: 323
  24779. }, {
  24780. date: "2024-10-24",
  24781. orderNum: 423,
  24782. auditNum: 293,
  24783. trueNum: 323
  24784. }]);
  24785. const updateList = (data) => {
  24786. dataList.value = data;
  24787. };
  24788. const form = vue.reactive({
  24789. startTime: "",
  24790. endTime: ""
  24791. });
  24792. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  24793. return dataList;
  24794. }, set dataList(v) {
  24795. dataList = v;
  24796. }, updateList, form, reactive: vue.reactive, PageScroll: pageScroll, ref: vue.ref, get onLoad() {
  24797. return onLoad;
  24798. } };
  24799. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  24800. return __returned__;
  24801. }
  24802. };
  24803. function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
  24804. const _component_uni_datetime_picker = resolveEasycom(vue.resolveDynamicComponent("uni-datetime-picker"), __easycom_0$2);
  24805. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  24806. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$2);
  24807. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  24808. return vue.openBlock(), vue.createElementBlock("view", {
  24809. class: "common-page",
  24810. style: { "padding": "0" }
  24811. }, [
  24812. vue.createVNode($setup["PageScroll"], {
  24813. requestStr: "/team/token/shop/invite/page",
  24814. onUpdateList: $setup.updateList,
  24815. ref: "scrollRef",
  24816. otherParams: $setup.otherParams
  24817. }, {
  24818. default: vue.withCtx(() => [
  24819. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  24820. default: vue.withCtx(() => [
  24821. vue.createElementVNode("view", { class: "search-area flex-d" }, [
  24822. vue.createElementVNode("view", { class: "flex-a mb-12" }, [
  24823. vue.createElementVNode("text", { class: "font-13 mr-10" }, "开始时间:"),
  24824. vue.createVNode(_component_uni_datetime_picker, {
  24825. type: "datetime",
  24826. modelValue: $setup.form.startTime,
  24827. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.startTime = $event)
  24828. }, null, 8, ["modelValue"])
  24829. ]),
  24830. vue.createElementVNode("view", { class: "flex-a" }, [
  24831. vue.createElementVNode("text", { class: "font-13 mr-10" }, "结束时间:"),
  24832. vue.createVNode(_component_uni_datetime_picker, {
  24833. type: "datetime",
  24834. modelValue: $setup.form.endTime,
  24835. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.endTime = $event)
  24836. }, null, 8, ["modelValue"]),
  24837. vue.createVNode(_component_u_button, {
  24838. type: "primary",
  24839. "custom-style": "width:160rpx;height:72rpx;margin-left:10px"
  24840. }, {
  24841. default: vue.withCtx(() => [
  24842. vue.createTextVNode("查询")
  24843. ]),
  24844. _: 1
  24845. /* STABLE */
  24846. })
  24847. ]),
  24848. vue.createVNode(_component_u_divider),
  24849. vue.createElementVNode("view", { class: "flex-a" }, [
  24850. vue.createElementVNode("view", { class: "text-item flex-1" }, "审核日期"),
  24851. vue.createElementVNode("view", { class: "text-item flex-1" }, "订单数量"),
  24852. vue.createElementVNode("view", { class: "text-item flex-1" }, "审书数量"),
  24853. vue.createElementVNode("view", { class: "text-item flex-1" }, "实际回收")
  24854. ])
  24855. ])
  24856. ]),
  24857. _: 1
  24858. /* STABLE */
  24859. }),
  24860. vue.createElementVNode("view", { class: "list-con" }, [
  24861. (vue.openBlock(true), vue.createElementBlock(
  24862. vue.Fragment,
  24863. null,
  24864. vue.renderList($setup.dataList, (item, index2) => {
  24865. return vue.openBlock(), vue.createElementBlock("view", {
  24866. key: index2,
  24867. class: "flex-a"
  24868. }, [
  24869. vue.createElementVNode(
  24870. "view",
  24871. { class: "text-item flex-1" },
  24872. vue.toDisplayString(item.date),
  24873. 1
  24874. /* TEXT */
  24875. ),
  24876. vue.createElementVNode(
  24877. "view",
  24878. { class: "text-item flex-1" },
  24879. vue.toDisplayString(item.orderNum),
  24880. 1
  24881. /* TEXT */
  24882. ),
  24883. vue.createElementVNode(
  24884. "view",
  24885. { class: "text-item flex-1" },
  24886. vue.toDisplayString(item.auditNum),
  24887. 1
  24888. /* TEXT */
  24889. ),
  24890. vue.createElementVNode(
  24891. "view",
  24892. { class: "text-item flex-1" },
  24893. vue.toDisplayString(item.trueNum),
  24894. 1
  24895. /* TEXT */
  24896. )
  24897. ]);
  24898. }),
  24899. 128
  24900. /* KEYED_FRAGMENT */
  24901. ))
  24902. ])
  24903. ]),
  24904. _: 1
  24905. /* STABLE */
  24906. }, 8, ["otherParams"])
  24907. ]);
  24908. }
  24909. const PagesIndexStatisticAfterSale = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$P], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/after-sale.vue"]]);
  24910. const _sfc_main$P = {
  24911. __name: "package",
  24912. setup(__props, { expose: __expose }) {
  24913. __expose();
  24914. const otherParams = vue.ref({
  24915. sender: ""
  24916. });
  24917. const scrollRef = vue.ref(null);
  24918. const refreshList = () => {
  24919. var _a;
  24920. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  24921. };
  24922. let dataList = vue.ref([{
  24923. date: "2024-10-24",
  24924. orderNum: 423
  24925. }, {
  24926. date: "2024-10-24",
  24927. orderNum: 423
  24928. }, {
  24929. date: "2024-10-24",
  24930. orderNum: 423
  24931. }]);
  24932. const updateList = (data) => {
  24933. dataList.value = data;
  24934. };
  24935. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  24936. return dataList;
  24937. }, set dataList(v) {
  24938. dataList = v;
  24939. }, updateList, reactive: vue.reactive, PageScroll: pageScroll, ref: vue.ref, get onLoad() {
  24940. return onLoad;
  24941. } };
  24942. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  24943. return __returned__;
  24944. }
  24945. };
  24946. function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
  24947. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  24948. return vue.openBlock(), vue.createElementBlock("view", {
  24949. class: "common-page",
  24950. style: { "padding": "0" }
  24951. }, [
  24952. vue.createVNode($setup["PageScroll"], {
  24953. requestStr: "/team/token/shop/invite/page",
  24954. onUpdateList: $setup.updateList,
  24955. ref: "scrollRef",
  24956. otherParams: $setup.otherParams
  24957. }, {
  24958. default: vue.withCtx(() => [
  24959. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  24960. default: vue.withCtx(() => [
  24961. vue.createElementVNode("view", { class: "search-area flex-a" }, [
  24962. vue.createElementVNode("view", { class: "text-item flex-1" }, "审核日期"),
  24963. vue.createElementVNode("view", { class: "text-item flex-1" }, "数量")
  24964. ])
  24965. ]),
  24966. _: 1
  24967. /* STABLE */
  24968. }),
  24969. vue.createElementVNode("view", { class: "list-con" }, [
  24970. (vue.openBlock(true), vue.createElementBlock(
  24971. vue.Fragment,
  24972. null,
  24973. vue.renderList($setup.dataList, (item, index2) => {
  24974. return vue.openBlock(), vue.createElementBlock("view", {
  24975. key: index2,
  24976. class: "flex-a"
  24977. }, [
  24978. vue.createElementVNode(
  24979. "view",
  24980. { class: "text-item flex-1" },
  24981. vue.toDisplayString(item.date),
  24982. 1
  24983. /* TEXT */
  24984. ),
  24985. vue.createElementVNode(
  24986. "view",
  24987. { class: "text-item flex-1" },
  24988. vue.toDisplayString(item.orderNum),
  24989. 1
  24990. /* TEXT */
  24991. )
  24992. ]);
  24993. }),
  24994. 128
  24995. /* KEYED_FRAGMENT */
  24996. ))
  24997. ])
  24998. ]),
  24999. _: 1
  25000. /* STABLE */
  25001. }, 8, ["otherParams"])
  25002. ]);
  25003. }
  25004. const PagesIndexStatisticPackage = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$O], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/package.vue"]]);
  25005. const _sfc_main$O = {
  25006. name: "GoodIn"
  25007. };
  25008. function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
  25009. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  25010. vue.createCommentVNode(" 开发中提示 "),
  25011. vue.createElementVNode("view", { class: "developing" }, [
  25012. vue.createElementVNode("text", null, "开发中")
  25013. ])
  25014. ]);
  25015. }
  25016. const PagesIndexWmsMediumIn = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$N], ["__scopeId", "data-v-04e21b6f"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/medium-in.vue"]]);
  25017. const _sfc_main$N = {
  25018. name: "GoodIn"
  25019. };
  25020. function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
  25021. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  25022. vue.createCommentVNode(" 开发中提示 "),
  25023. vue.createElementVNode("view", { class: "developing" }, [
  25024. vue.createElementVNode("text", null, "开发中")
  25025. ])
  25026. ]);
  25027. }
  25028. const PagesIndexWmsGoodIn = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$M], ["__scopeId", "data-v-701c6544"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/good-in.vue"]]);
  25029. const _sfc_main$M = {
  25030. name: "GoodIn"
  25031. };
  25032. function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
  25033. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  25034. vue.createCommentVNode(" 开发中提示 "),
  25035. vue.createElementVNode("view", { class: "developing" }, [
  25036. vue.createElementVNode("text", null, "开发中")
  25037. ])
  25038. ]);
  25039. }
  25040. const PagesIndexWmsSecondaryIn = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$L], ["__scopeId", "data-v-52deef37"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/secondary-in.vue"]]);
  25041. const MIN_DISTANCE = 10;
  25042. function getDirection(x, y) {
  25043. if (x > y && x > MIN_DISTANCE) {
  25044. return "horizontal";
  25045. }
  25046. if (y > x && y > MIN_DISTANCE) {
  25047. return "vertical";
  25048. }
  25049. return "";
  25050. }
  25051. const touch = {
  25052. methods: {
  25053. getTouchPoint(e) {
  25054. if (!e) {
  25055. return {
  25056. x: 0,
  25057. y: 0
  25058. };
  25059. }
  25060. if (e.touches && e.touches[0]) {
  25061. return {
  25062. x: e.touches[0].pageX,
  25063. y: e.touches[0].pageY
  25064. };
  25065. }
  25066. if (e.changedTouches && e.changedTouches[0]) {
  25067. return {
  25068. x: e.changedTouches[0].pageX,
  25069. y: e.changedTouches[0].pageY
  25070. };
  25071. }
  25072. return {
  25073. x: e.clientX || 0,
  25074. y: e.clientY || 0
  25075. };
  25076. },
  25077. resetTouchStatus() {
  25078. this.direction = "";
  25079. this.deltaX = 0;
  25080. this.deltaY = 0;
  25081. this.offsetX = 0;
  25082. this.offsetY = 0;
  25083. },
  25084. touchStart(event) {
  25085. this.resetTouchStatus();
  25086. const touch2 = this.getTouchPoint(event);
  25087. this.startX = touch2.x;
  25088. this.startY = touch2.y;
  25089. },
  25090. touchMove(event) {
  25091. const touch2 = this.getTouchPoint(event);
  25092. this.deltaX = touch2.x - this.startX;
  25093. this.deltaY = touch2.y - this.startY;
  25094. this.offsetX = Math.abs(this.deltaX);
  25095. this.offsetY = Math.abs(this.deltaY);
  25096. this.direction = this.direction || getDirection(this.offsetX, this.offsetY);
  25097. }
  25098. }
  25099. };
  25100. const props$7 = {
  25101. props: {
  25102. // 控制打开或者关闭
  25103. show: {
  25104. type: Boolean,
  25105. default: props$E.swipeActionItem.show
  25106. },
  25107. // 标识符,如果是v-for,可用index索引值
  25108. name: {
  25109. type: [String, Number],
  25110. default: props$E.swipeActionItem.name
  25111. },
  25112. // 是否禁用
  25113. disabled: {
  25114. type: Boolean,
  25115. default: props$E.swipeActionItem.disabled
  25116. },
  25117. // 是否自动关闭其他swipe按钮组
  25118. autoClose: {
  25119. type: Boolean,
  25120. default: props$E.swipeActionItem.autoClose
  25121. },
  25122. // 滑动距离阈值,只有大于此值,才被认为是要打开菜单
  25123. threshold: {
  25124. type: Number,
  25125. default: props$E.swipeActionItem.threshold
  25126. },
  25127. // 右侧按钮内容
  25128. options: {
  25129. type: Array,
  25130. default() {
  25131. return uni.$u.props.swipeActionItem.rightOptions;
  25132. }
  25133. },
  25134. // 动画过渡时间,单位ms
  25135. duration: {
  25136. type: [String, Number],
  25137. default: props$E.swipeActionItem.duration
  25138. }
  25139. }
  25140. };
  25141. const wxs = {
  25142. methods: {
  25143. // 关闭时执行
  25144. closeHandler() {
  25145. this.status = "close";
  25146. },
  25147. setState(status) {
  25148. this.status = status;
  25149. },
  25150. closeOther() {
  25151. this.parent && this.parent.closeOther(this);
  25152. }
  25153. }
  25154. };
  25155. const block0 = (Comp) => {
  25156. (Comp.$wxs || (Comp.$wxs = [])).push("wxs");
  25157. (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxs"] = "f1d6d7d8";
  25158. };
  25159. const _sfc_main$L = {
  25160. name: "u-swipe-action-item",
  25161. emits: ["click"],
  25162. mixins: [mpMixin, mixin, props$7, touch],
  25163. mixins: [mpMixin, mixin, props$7, touch, wxs],
  25164. data() {
  25165. return {
  25166. // 按钮的尺寸信息
  25167. size: {},
  25168. // 父组件u-swipe-action的参数
  25169. parentData: {
  25170. autoClose: true
  25171. },
  25172. // 当前状态,open-打开,close-关闭
  25173. status: "close"
  25174. };
  25175. },
  25176. watch: {
  25177. // 由于wxs无法直接读取外部的值,需要在外部值变化时,重新执行赋值逻辑
  25178. wxsInit(newValue, oldValue) {
  25179. this.queryRect();
  25180. }
  25181. },
  25182. computed: {
  25183. wxsInit() {
  25184. return [this.disabled, this.autoClose, this.threshold, this.options, this.duration];
  25185. }
  25186. },
  25187. mounted() {
  25188. this.init();
  25189. },
  25190. methods: {
  25191. init() {
  25192. this.updateParentData();
  25193. uni.$u.sleep().then(() => {
  25194. this.queryRect();
  25195. });
  25196. },
  25197. updateParentData() {
  25198. this.getParentData("u-swipe-action");
  25199. },
  25200. // 查询节点
  25201. queryRect() {
  25202. this.$uGetRect(".u-swipe-action-item__right__button", true).then((buttons) => {
  25203. this.size = {
  25204. buttons,
  25205. show: this.show,
  25206. disabled: this.disabled,
  25207. threshold: this.threshold,
  25208. duration: this.duration
  25209. };
  25210. });
  25211. },
  25212. // 按钮被点击
  25213. buttonClickHandler(item, index2) {
  25214. this.$emit("click", {
  25215. index: index2,
  25216. name: this.name
  25217. });
  25218. }
  25219. }
  25220. };
  25221. function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
  25222. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  25223. return vue.openBlock(), vue.createElementBlock(
  25224. "view",
  25225. {
  25226. class: "u-swipe-action-item",
  25227. ref: "u-swipe-action-item"
  25228. },
  25229. [
  25230. vue.createElementVNode("view", { class: "u-swipe-action-item__right" }, [
  25231. vue.renderSlot(_ctx.$slots, "button", {}, () => [
  25232. (vue.openBlock(true), vue.createElementBlock(
  25233. vue.Fragment,
  25234. null,
  25235. vue.renderList(_ctx.options, (item, index2) => {
  25236. return vue.openBlock(), vue.createElementBlock("view", {
  25237. key: index2,
  25238. class: "u-swipe-action-item__right__button",
  25239. ref_for: true,
  25240. ref: `u-swipe-action-item__right__button-${index2}`,
  25241. style: vue.normalizeStyle([{
  25242. alignItems: item.style && item.style.borderRadius ? "center" : "stretch"
  25243. }]),
  25244. onClick: ($event) => $options.buttonClickHandler(item, index2)
  25245. }, [
  25246. vue.createElementVNode(
  25247. "view",
  25248. {
  25249. class: "u-swipe-action-item__right__button__wrapper",
  25250. style: vue.normalizeStyle([{
  25251. backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : "#C7C6CD",
  25252. borderRadius: item.style && item.style.borderRadius ? item.style.borderRadius : "0",
  25253. padding: item.style && item.style.borderRadius ? "0" : "0 15px"
  25254. }, item.style])
  25255. },
  25256. [
  25257. item.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  25258. key: 0,
  25259. name: item.icon,
  25260. color: item.style && item.style.color ? item.style.color : "#ffffff",
  25261. size: item.iconSize ? _ctx.$u.addUnit(item.iconSize) : item.style && item.style.fontSize ? _ctx.$u.getPx(item.style.fontSize) * 1.2 : 17,
  25262. customStyle: {
  25263. marginRight: item.text ? "2px" : 0
  25264. }
  25265. }, null, 8, ["name", "color", "size", "customStyle"])) : vue.createCommentVNode("v-if", true),
  25266. item.text ? (vue.openBlock(), vue.createElementBlock(
  25267. "text",
  25268. {
  25269. key: 1,
  25270. class: "u-swipe-action-item__right__button__wrapper__text u-line-1",
  25271. style: vue.normalizeStyle([{
  25272. color: item.style && item.style.color ? item.style.color : "#ffffff",
  25273. fontSize: item.style && item.style.fontSize ? item.style.fontSize : "16px",
  25274. lineHeight: item.style && item.style.fontSize ? item.style.fontSize : "16px"
  25275. }])
  25276. },
  25277. vue.toDisplayString(item.text),
  25278. 5
  25279. /* TEXT, STYLE */
  25280. )) : vue.createCommentVNode("v-if", true)
  25281. ],
  25282. 4
  25283. /* STYLE */
  25284. )
  25285. ], 12, ["onClick"]);
  25286. }),
  25287. 128
  25288. /* KEYED_FRAGMENT */
  25289. ))
  25290. ], true)
  25291. ]),
  25292. vue.createElementVNode("view", {
  25293. class: "u-swipe-action-item__content",
  25294. onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.wxs.touchstart && _ctx.wxs.touchstart(...args)),
  25295. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.wxs.touchmove && _ctx.wxs.touchmove(...args)),
  25296. onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.wxs.touchend && _ctx.wxs.touchend(...args)),
  25297. status: vue.wp($data.status),
  25298. "change:status": _ctx.wxs.statusChange,
  25299. size: vue.wp($data.size),
  25300. "change:size": _ctx.wxs.sizeChange
  25301. }, [
  25302. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  25303. ], 40, ["status", "change:status", "size", "change:size"])
  25304. ],
  25305. 512
  25306. /* NEED_PATCH */
  25307. );
  25308. }
  25309. if (typeof block0 === "function")
  25310. block0(_sfc_main$L);
  25311. const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$K], ["__scopeId", "data-v-ed3ce04a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-swipe-action-item/u-swipe-action-item.vue"]]);
  25312. const props$6 = {
  25313. props: {
  25314. // 是否自动关闭其他swipe按钮组
  25315. autoClose: {
  25316. type: Boolean,
  25317. default: props$E.swipeAction.autoClose
  25318. }
  25319. }
  25320. };
  25321. const _sfc_main$K = {
  25322. name: "u-swipe-action",
  25323. mixins: [mpMixin, mixin, props$6],
  25324. data() {
  25325. return {};
  25326. },
  25327. provide() {
  25328. return {
  25329. swipeAction: this
  25330. };
  25331. },
  25332. computed: {
  25333. // 这里computed的变量,都是子组件u-swipe-action-item需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
  25334. // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-swipe-action-item)
  25335. // 拉取父组件新的变化后的参数
  25336. parentData() {
  25337. return [this.autoClose];
  25338. }
  25339. },
  25340. watch: {
  25341. // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
  25342. parentData() {
  25343. if (this.children.length) {
  25344. this.children.map((child) => {
  25345. typeof child.updateParentData === "function" && child.updateParentData();
  25346. });
  25347. }
  25348. }
  25349. },
  25350. created() {
  25351. this.children = [];
  25352. },
  25353. methods: {
  25354. closeOther(child) {
  25355. if (this.autoClose) {
  25356. this.children.map((item, index2) => {
  25357. if (child !== item) {
  25358. item.closeHandler();
  25359. }
  25360. });
  25361. }
  25362. }
  25363. }
  25364. };
  25365. function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
  25366. return vue.openBlock(), vue.createElementBlock("view", { class: "u-swipe-action" }, [
  25367. vue.renderSlot(_ctx.$slots, "default")
  25368. ]);
  25369. }
  25370. const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$J], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-swipe-action/u-swipe-action.vue"]]);
  25371. const _sfc_main$J = {
  25372. __name: "BadItem",
  25373. props: {
  25374. data: {
  25375. type: Object,
  25376. required: true,
  25377. default: () => ({
  25378. orderNo: "",
  25379. badCount: "",
  25380. logisticsNo: "",
  25381. checkDate: "",
  25382. operator: ""
  25383. })
  25384. }
  25385. },
  25386. emits: ["delete", "edit"],
  25387. setup(__props, { expose: __expose, emit: __emit }) {
  25388. __expose();
  25389. const props2 = __props;
  25390. const emit2 = __emit;
  25391. const options = vue.ref([
  25392. {
  25393. text: "删除",
  25394. style: {
  25395. backgroundColor: "#ff4444"
  25396. }
  25397. }
  25398. ]);
  25399. const handleAction = (e) => {
  25400. if (e.index === 0) {
  25401. uni.showModal({
  25402. title: "提示",
  25403. content: "确定要删除该订单吗?",
  25404. success: (res2) => {
  25405. if (res2.confirm) {
  25406. emit2("delete");
  25407. }
  25408. }
  25409. });
  25410. }
  25411. };
  25412. const __returned__ = { props: props2, emit: emit2, options, handleAction, ref: vue.ref };
  25413. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25414. return __returned__;
  25415. }
  25416. };
  25417. function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
  25418. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  25419. const _component_u_swipe_action_item = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action-item"), __easycom_1);
  25420. const _component_u_swipe_action = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action"), __easycom_2);
  25421. return vue.openBlock(), vue.createElementBlock("view", { class: "bad-item" }, [
  25422. vue.createVNode(_component_u_swipe_action, null, {
  25423. default: vue.withCtx(() => [
  25424. vue.createVNode(_component_u_swipe_action_item, {
  25425. options: $setup.options,
  25426. onClick: $setup.handleAction
  25427. }, {
  25428. default: vue.withCtx(() => [
  25429. vue.createElementVNode("view", { class: "item-content" }, [
  25430. vue.createElementVNode("view", { class: "item-row" }, [
  25431. vue.createElementVNode("text", { class: "label" }, "订单编号:"),
  25432. vue.createElementVNode(
  25433. "text",
  25434. { class: "value" },
  25435. vue.toDisplayString($props.data.orderId),
  25436. 1
  25437. /* TEXT */
  25438. ),
  25439. vue.createVNode(_component_u_icon, {
  25440. name: "edit-pen",
  25441. color: "#4CAF50",
  25442. size: "20",
  25443. class: "edit-icon",
  25444. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("edit"))
  25445. })
  25446. ]),
  25447. vue.createElementVNode("view", { class: "item-row" }, [
  25448. vue.createElementVNode("text", { class: "label" }, "不良数量:"),
  25449. vue.createElementVNode(
  25450. "text",
  25451. { class: "value" },
  25452. vue.toDisplayString($props.data.badNum),
  25453. 1
  25454. /* TEXT */
  25455. )
  25456. ]),
  25457. vue.createElementVNode("view", { class: "item-row" }, [
  25458. vue.createElementVNode("text", { class: "label" }, "物流单号:"),
  25459. vue.createElementVNode(
  25460. "text",
  25461. { class: "value" },
  25462. vue.toDisplayString($props.data.waybillCode),
  25463. 1
  25464. /* TEXT */
  25465. )
  25466. ]),
  25467. vue.createElementVNode("view", { class: "item-row" }, [
  25468. vue.createElementVNode("text", { class: "label" }, "验货完成日期:"),
  25469. vue.createElementVNode(
  25470. "text",
  25471. { class: "value" },
  25472. vue.toDisplayString($props.data.auditFinishTime),
  25473. 1
  25474. /* TEXT */
  25475. )
  25476. ]),
  25477. vue.createElementVNode("view", { class: "item-row" }, [
  25478. vue.createElementVNode("text", { class: "label" }, "录入人:"),
  25479. vue.createElementVNode(
  25480. "text",
  25481. { class: "value" },
  25482. vue.toDisplayString($props.data.auditUserName),
  25483. 1
  25484. /* TEXT */
  25485. )
  25486. ])
  25487. ])
  25488. ]),
  25489. _: 1
  25490. /* STABLE */
  25491. }, 8, ["options"])
  25492. ]),
  25493. _: 1
  25494. /* STABLE */
  25495. })
  25496. ]);
  25497. }
  25498. const BadItem = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$I], ["__scopeId", "data-v-93494456"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/components/BadItem.vue"]]);
  25499. class VolumeTTS {
  25500. constructor(opts) {
  25501. __publicField(this, "ttsParams", {
  25502. lang: "zh-CN",
  25503. speed: 1,
  25504. // 将 0-10 转换为 0-1
  25505. pitch: 1,
  25506. // 将 0-10 转换为 0-1
  25507. volume: 1
  25508. });
  25509. __publicField(this, "TTSModule");
  25510. __publicField(this, "platform", uni.getSystemInfoSync().platform);
  25511. let audioConfig = uni.getStorageSync("audioConfig");
  25512. if (opts) {
  25513. this.ttsParams = opts;
  25514. } else if (audioConfig) {
  25515. this.ttsParams = {
  25516. lang: "zh-CN",
  25517. speed: audioConfig.audioSpeed / 10,
  25518. pitch: audioConfig.audioVolume,
  25519. volume: 1
  25520. };
  25521. }
  25522. this.init();
  25523. }
  25524. init() {
  25525. this.TTSModule = requireNativePlugin("nrb-tts-plugin");
  25526. this.TTSModule && this.TTSModule.init(
  25527. {
  25528. lang: "zh",
  25529. country: "CN"
  25530. },
  25531. (res2) => {
  25532. if (res2.success == 0) {
  25533. formatAppLog("log", "at utils/VolumeTTS.js:39", "TTS初始化成功");
  25534. }
  25535. }
  25536. );
  25537. }
  25538. //加一个text的预处理,将text中的数字替换成 零一二三四五六七八九十
  25539. preprocessText(text) {
  25540. const digitMap = {
  25541. 0: "零",
  25542. 1: "一",
  25543. 2: "二",
  25544. 3: "三",
  25545. 4: "四",
  25546. 5: "五",
  25547. 6: "六",
  25548. 7: "七",
  25549. 8: "八",
  25550. 9: "九"
  25551. };
  25552. return text.replace(/\d+/g, (match) => {
  25553. return match.split("").map((digit) => digitMap[digit] || digit).join("");
  25554. });
  25555. }
  25556. speak(text) {
  25557. text = this.preprocessText(text);
  25558. let opts = this.platform == "ios" ? {
  25559. rate: this.ttsParams.speed,
  25560. lang: "zh-CN",
  25561. volume: 1
  25562. } : {
  25563. pitch: this.ttsParams.pitch,
  25564. speechRate: this.ttsParams.speed,
  25565. queueMode: 1
  25566. };
  25567. this.TTSModule.speak(text, opts, (e) => {
  25568. formatAppLog("log", "at utils/VolumeTTS.js:98", e, "读取成功");
  25569. });
  25570. }
  25571. stop() {
  25572. if (this.TTSModule) {
  25573. this.TTSModule.stop();
  25574. }
  25575. }
  25576. }
  25577. const _sfc_main$I = {
  25578. __name: "RemarkDialog",
  25579. props: {
  25580. visible: {
  25581. type: Boolean,
  25582. default: false
  25583. },
  25584. initialValue: {
  25585. type: String,
  25586. default: ""
  25587. }
  25588. },
  25589. emits: ["update:visible", "confirm"],
  25590. setup(__props, { expose: __expose, emit: __emit }) {
  25591. __expose();
  25592. const props2 = __props;
  25593. function playGlobalSound() {
  25594. uni.$u.playClickSound();
  25595. }
  25596. const emit2 = __emit;
  25597. const remarkText = vue.ref("");
  25598. const quickTags = vue.ref(["少书", "多书", "子母件", "书单不符"]);
  25599. vue.watch(() => props2.visible, (newVal) => {
  25600. if (newVal) {
  25601. remarkText.value = props2.initialValue;
  25602. }
  25603. });
  25604. const appendTag = (tag) => {
  25605. remarkText.value += remarkText.value ? " " + tag : tag;
  25606. };
  25607. const onClose = () => {
  25608. emit2("update:visible", false);
  25609. };
  25610. const onConfirm = () => {
  25611. emit2("confirm", remarkText.value);
  25612. onClose();
  25613. };
  25614. const __returned__ = { props: props2, playGlobalSound, emit: emit2, remarkText, quickTags, appendTag, onClose, onConfirm, ref: vue.ref, watch: vue.watch };
  25615. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25616. return __returned__;
  25617. }
  25618. };
  25619. function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
  25620. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$2);
  25621. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  25622. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  25623. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  25624. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  25625. show: $props.visible,
  25626. onClose: $setup.onClose,
  25627. mode: "center",
  25628. round: "10",
  25629. closeOnClickOverlay: false
  25630. }, {
  25631. default: vue.withCtx(() => [
  25632. vue.createElementVNode("view", {
  25633. class: "remark-dialog",
  25634. onClick: $setup.playGlobalSound
  25635. }, [
  25636. vue.createElementVNode("view", { class: "dialog-title" }, "编辑备注"),
  25637. vue.createCommentVNode(" 备注输入框 "),
  25638. vue.createElementVNode("view", { class: "dialog-content mb-30" }, [
  25639. vue.createVNode(_component_u_textarea, {
  25640. modelValue: $setup.remarkText,
  25641. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.remarkText = $event),
  25642. placeholder: "请输入",
  25643. maxlength: 200,
  25644. height: "100",
  25645. count: ""
  25646. }, null, 8, ["modelValue"]),
  25647. vue.createCommentVNode(" 快速输入标签 "),
  25648. vue.createElementVNode("view", { class: "quick-tags mt-10" }, [
  25649. vue.createElementVNode("text", { class: "common-title" }, "快速填入"),
  25650. vue.createElementVNode("view", { class: "tags-container flex-w mt-20" }, [
  25651. (vue.openBlock(true), vue.createElementBlock(
  25652. vue.Fragment,
  25653. null,
  25654. vue.renderList($setup.quickTags, (tag, index2) => {
  25655. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  25656. key: index2,
  25657. text: tag,
  25658. plain: "",
  25659. size: "mini",
  25660. type: "primary",
  25661. onClick: ($event) => $setup.appendTag(tag),
  25662. class: "tag-item"
  25663. }, null, 8, ["text", "onClick"]);
  25664. }),
  25665. 128
  25666. /* KEYED_FRAGMENT */
  25667. ))
  25668. ])
  25669. ])
  25670. ]),
  25671. vue.createCommentVNode(" 底部按钮 "),
  25672. vue.createElementVNode("view", { class: "dialog-footer" }, [
  25673. vue.createVNode(_component_u_button, {
  25674. plain: "",
  25675. onClick: $setup.onClose,
  25676. class: "footer-btn"
  25677. }, {
  25678. default: vue.withCtx(() => [
  25679. vue.createTextVNode("取消")
  25680. ]),
  25681. _: 1
  25682. /* STABLE */
  25683. }),
  25684. vue.createVNode(_component_u_button, {
  25685. type: "primary",
  25686. onClick: $setup.onConfirm,
  25687. class: "footer-btn"
  25688. }, {
  25689. default: vue.withCtx(() => [
  25690. vue.createTextVNode("确定")
  25691. ]),
  25692. _: 1
  25693. /* STABLE */
  25694. })
  25695. ])
  25696. ])
  25697. ]),
  25698. _: 1
  25699. /* STABLE */
  25700. }, 8, ["show"]);
  25701. }
  25702. const RemarkDialog = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$H], ["__scopeId", "data-v-73050f50"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/components/RemarkDialog.vue"]]);
  25703. const _sfc_main$H = {
  25704. __name: "bad-in",
  25705. setup(__props, { expose: __expose }) {
  25706. __expose();
  25707. const waybillCode = vue.ref();
  25708. const formData = vue.reactive({
  25709. godownName: "",
  25710. godownId: "",
  25711. positionCode: ""
  25712. });
  25713. function playGlobalSound() {
  25714. uni.$u.playClickSound();
  25715. }
  25716. const ordersMap = vue.ref([]);
  25717. const codeMap = vue.ref([]);
  25718. function getDetailByCode2(code2) {
  25719. if (codeMap.value.includes(code2)) {
  25720. uni.$u.ttsModule.speak("重复扫描");
  25721. return;
  25722. }
  25723. uni.$u.http.get("/app/stock/searchOrder?waybillCode=" + code2).then((res2) => {
  25724. if (res2.code == 200) {
  25725. ordersMap.value.unshift(res2.data);
  25726. codeMap.value.push(code2);
  25727. } else if (res2.code == 601) {
  25728. uni.$u.ttsModule.speak(res2.msg);
  25729. uni.showModal({
  25730. title: "提示",
  25731. content: res2.msg,
  25732. showCancel: false,
  25733. success: () => {
  25734. playGlobalSound();
  25735. }
  25736. });
  25737. } else {
  25738. uni.$u.toast(res2.msg);
  25739. }
  25740. });
  25741. }
  25742. const remarkVisible = vue.ref(false);
  25743. const currentRemark = vue.ref("");
  25744. const currentEditIndex = vue.ref(-1);
  25745. const goBack = () => {
  25746. if (ordersMap.value.length > 0) {
  25747. uni.showModal({
  25748. title: "退出确认",
  25749. content: "是否确认放弃本次入库?",
  25750. success: (res2) => {
  25751. playGlobalSound();
  25752. if (res2.confirm) {
  25753. uni.navigateBack();
  25754. }
  25755. }
  25756. });
  25757. } else {
  25758. uni.navigateBack();
  25759. }
  25760. };
  25761. const onSubmit = () => {
  25762. if (!formData.godownId || !formData.positionCode) {
  25763. uni.$u.toast("请先选择仓库和库位");
  25764. uni.$u.ttsModule.speak("请先选择仓库和库位");
  25765. return;
  25766. }
  25767. uni.showModal({
  25768. title: "提交确认",
  25769. content: "是否确认提交本次入库?",
  25770. success: (res2) => {
  25771. playGlobalSound();
  25772. if (res2.confirm) {
  25773. handleSubmitConfirm();
  25774. }
  25775. }
  25776. });
  25777. };
  25778. const handleSubmitConfirm = async () => {
  25779. uni.showLoading({
  25780. title: "提交中..."
  25781. });
  25782. let orderInfo = ordersMap.value.map((item) => {
  25783. return {
  25784. orderId: item.orderId,
  25785. waybillCode: item.waybillCode,
  25786. bookNum: item.badNum,
  25787. remark: item.remark
  25788. };
  25789. });
  25790. if (orderInfo.length == 0) {
  25791. uni.hideLoading();
  25792. uni.$u.ttsModule.speak("请添加订单数据");
  25793. return;
  25794. }
  25795. uni.$u.http.post("/app/stock/addBatch", {
  25796. godownId: formData.godownId,
  25797. positionCode: formData.positionCode,
  25798. orderInfo
  25799. }).then((res2) => {
  25800. if (res2.code == 200) {
  25801. uni.$u.toast("入库成功");
  25802. uni.$u.ttsModule.speak("入库成功");
  25803. clearData();
  25804. } else {
  25805. uni.$u.toast(res2.msg);
  25806. }
  25807. }).finally(() => {
  25808. uni.hideLoading();
  25809. });
  25810. };
  25811. const clearData = () => {
  25812. ordersMap.value.length = 0;
  25813. waybillCode.value = "";
  25814. formData.godownName = "";
  25815. formData.positionCode = "";
  25816. formData.godownId = "";
  25817. };
  25818. const editOrder = (index2) => {
  25819. openRemarkDialog(index2);
  25820. };
  25821. const openScan = () => {
  25822. uni.scanCode({
  25823. success: (res2) => {
  25824. waybillCode.value = res2.result;
  25825. getDetailByCode2(res2.result);
  25826. },
  25827. fail: (err) => {
  25828. uni.showToast({
  25829. title: "扫码失败",
  25830. icon: "error"
  25831. });
  25832. }
  25833. });
  25834. };
  25835. function selectLocation() {
  25836. if (!formData.godownId) {
  25837. uni.$u.toast("请先选择仓库");
  25838. uni.$u.ttsModule.speak("请先选择仓库");
  25839. return;
  25840. }
  25841. uni.navigateTo({
  25842. url: "/pages/index/wms/location-select?godownId=" + formData.godownId + "&positionCode=" + formData.positionCode
  25843. });
  25844. }
  25845. const deleteOrder = (index2) => {
  25846. ordersMap.value.splice(index2, 1);
  25847. };
  25848. vue.onMounted(() => {
  25849. uni.$u.useGlobalEvent((e) => {
  25850. if (e.barcode) {
  25851. waybillCode.value = e.barcode;
  25852. getDetailByCode2(e.barcode);
  25853. }
  25854. });
  25855. uni.$on("updateLocation", (locationCode) => {
  25856. formData.positionCode = locationCode;
  25857. });
  25858. uni.$on("updateWarehouse", (data) => {
  25859. formData.godownName = data.godownName;
  25860. formData.godownId = data.id;
  25861. });
  25862. });
  25863. onShow(() => {
  25864. uni.$u.updateActivePageOnShow();
  25865. });
  25866. vue.onUnmounted(() => {
  25867. uni.$off("updateLocation");
  25868. uni.$off("updateWarehouse");
  25869. });
  25870. const openRemarkDialog = (index2, remark = "") => {
  25871. currentEditIndex.value = index2;
  25872. currentRemark.value = remark;
  25873. remarkVisible.value = true;
  25874. };
  25875. const handleRemarkConfirm = (remark) => {
  25876. if (currentEditIndex.value >= 0) {
  25877. ordersMap.value[currentEditIndex.value].remark = remark;
  25878. }
  25879. currentEditIndex.value = -1;
  25880. currentRemark.value = "";
  25881. };
  25882. const selectWarehouse = () => {
  25883. uni.navigateTo({
  25884. url: "/pages/index/wms/warehouse-select?godownId=" + formData.godownId
  25885. });
  25886. };
  25887. 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() {
  25888. return onShow;
  25889. }, BadItem, get VolumeTTS() {
  25890. return VolumeTTS;
  25891. }, RemarkDialog };
  25892. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25893. return __returned__;
  25894. }
  25895. };
  25896. function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
  25897. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  25898. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$9);
  25899. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  25900. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  25901. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  25902. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$6);
  25903. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  25904. const _directive_permission = vue.resolveDirective("permission");
  25905. return vue.openBlock(), vue.createElementBlock("view", {
  25906. class: "common-page",
  25907. style: { "padding": "0" },
  25908. onClick: $setup.playGlobalSound
  25909. }, [
  25910. vue.createCommentVNode(" 顶部导航栏 "),
  25911. vue.createElementVNode("view", { class: "header" }, [
  25912. vue.createVNode(_component_u_navbar, {
  25913. title: "不良入库",
  25914. border: false,
  25915. fixed: "",
  25916. "safe-area-inset-top": ""
  25917. }, {
  25918. left: vue.withCtx(() => [
  25919. vue.createVNode(_component_u_icon, {
  25920. name: "arrow-left",
  25921. color: "#333333",
  25922. size: "20",
  25923. onClick: $setup.goBack
  25924. })
  25925. ]),
  25926. right: vue.withCtx(() => [
  25927. vue.withDirectives(vue.createVNode(
  25928. _component_u_text,
  25929. {
  25930. type: "primary",
  25931. text: "提交",
  25932. onClick: $setup.onSubmit
  25933. },
  25934. null,
  25935. 512
  25936. /* NEED_PATCH */
  25937. ), [
  25938. [_directive_permission, "app:wms:badIn:submit"]
  25939. ])
  25940. ]),
  25941. _: 1
  25942. /* STABLE */
  25943. })
  25944. ]),
  25945. vue.createCommentVNode(" 主要内容区域 "),
  25946. vue.createElementVNode("view", { class: "content" }, [
  25947. vue.createCommentVNode(" 订单基本信息 "),
  25948. vue.createElementVNode("view", { class: "info-section" }, [
  25949. vue.createVNode(_component_u_form, {
  25950. model: $setup.formData,
  25951. ref: "formRef",
  25952. "label-width": "80px",
  25953. "label-position": "left"
  25954. }, {
  25955. default: vue.withCtx(() => [
  25956. vue.createVNode(_component_u_form_item, {
  25957. label: "订单总数",
  25958. required: ""
  25959. }, {
  25960. default: vue.withCtx(() => [
  25961. vue.createElementVNode(
  25962. "span",
  25963. null,
  25964. vue.toDisplayString($setup.ordersMap.length),
  25965. 1
  25966. /* TEXT */
  25967. )
  25968. ]),
  25969. _: 1
  25970. /* STABLE */
  25971. }),
  25972. vue.createVNode(_component_u_form_item, {
  25973. label: "仓库",
  25974. required: ""
  25975. }, {
  25976. default: vue.withCtx(() => [
  25977. vue.createElementVNode("view", {
  25978. onClick: $setup.selectWarehouse,
  25979. style: { "width": "100%" }
  25980. }, [
  25981. vue.createVNode(_component_u_input, {
  25982. modelValue: $setup.formData.godownName,
  25983. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.godownName = $event),
  25984. readonly: "",
  25985. "custom-style": "font-size:32rpx",
  25986. placeholder: "请选择仓库",
  25987. suffixIcon: "arrow-right"
  25988. }, null, 8, ["modelValue"])
  25989. ])
  25990. ]),
  25991. _: 1
  25992. /* STABLE */
  25993. }),
  25994. vue.createVNode(_component_u_form_item, {
  25995. label: "库位",
  25996. required: ""
  25997. }, {
  25998. default: vue.withCtx(() => [
  25999. vue.createElementVNode("view", {
  26000. onClick: $setup.selectLocation,
  26001. style: { "width": "100%" }
  26002. }, [
  26003. vue.createVNode(_component_u_input, {
  26004. modelValue: $setup.formData.positionCode,
  26005. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.positionCode = $event),
  26006. readonly: "",
  26007. "custom-style": "font-size:32rpx",
  26008. placeholder: "请选择库位",
  26009. suffixIcon: "arrow-right"
  26010. }, null, 8, ["modelValue"])
  26011. ])
  26012. ]),
  26013. _: 1
  26014. /* STABLE */
  26015. })
  26016. ]),
  26017. _: 1
  26018. /* STABLE */
  26019. }, 8, ["model"])
  26020. ]),
  26021. vue.createCommentVNode(" 订单列表 "),
  26022. vue.createElementVNode("view", { class: "order-list" }, [
  26023. (vue.openBlock(true), vue.createElementBlock(
  26024. vue.Fragment,
  26025. null,
  26026. vue.renderList($setup.ordersMap, (order, index2) => {
  26027. return vue.openBlock(), vue.createBlock($setup["BadItem"], {
  26028. key: index2,
  26029. data: order,
  26030. onDelete: ($event) => $setup.deleteOrder(index2),
  26031. onEdit: ($event) => $setup.editOrder(index2)
  26032. }, null, 8, ["data", "onDelete", "onEdit"]);
  26033. }),
  26034. 128
  26035. /* KEYED_FRAGMENT */
  26036. ))
  26037. ]),
  26038. vue.createCommentVNode(" 底部扫码输入框 "),
  26039. vue.createElementVNode("view", {
  26040. class: "fixed-bottom pad-20",
  26041. style: { "background": "#ffffff" }
  26042. }, [
  26043. vue.createVNode(_component_u_search, {
  26044. placeholder: "请输入物流单号",
  26045. searchIconSize: 24,
  26046. bgColor: "#f6f7f6",
  26047. onSearch: _cache[2] || (_cache[2] = ($event) => $setup.getDetailByCode($setup.waybillCode)),
  26048. modelValue: $setup.waybillCode,
  26049. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.waybillCode = $event),
  26050. "custom-style": "font-size:32rpx",
  26051. "placeholder-style": "font-size:32rpx",
  26052. clearabled: true,
  26053. focus: false,
  26054. showAction: false,
  26055. height: 42
  26056. }, null, 8, ["modelValue"]),
  26057. vue.createVNode(_component_u_icon, {
  26058. name: "scan",
  26059. size: "32",
  26060. color: "#19be6b",
  26061. onClick: $setup.openScan
  26062. })
  26063. ])
  26064. ]),
  26065. vue.createCommentVNode(" 备注弹窗 "),
  26066. vue.createVNode($setup["RemarkDialog"], {
  26067. visible: $setup.remarkVisible,
  26068. "onUpdate:visible": _cache[4] || (_cache[4] = ($event) => $setup.remarkVisible = $event),
  26069. "initial-value": $setup.currentRemark,
  26070. onConfirm: $setup.handleRemarkConfirm
  26071. }, null, 8, ["visible", "initial-value"])
  26072. ]);
  26073. }
  26074. const PagesIndexWmsBadIn = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$G], ["__scopeId", "data-v-04095d32"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-in.vue"]]);
  26075. const _sfc_main$G = {
  26076. __name: "bad-out",
  26077. setup(__props, { expose: __expose }) {
  26078. __expose();
  26079. const searchText = vue.ref("");
  26080. const searchType = vue.ref("1");
  26081. function playGlobalSound() {
  26082. uni.$u.playClickSound();
  26083. }
  26084. const onSearch = () => {
  26085. uni.navigateTo({
  26086. url: `/pages/index/wms/bad-out-order?searchText=${searchText.value}&searchType=${searchType.value}`
  26087. });
  26088. };
  26089. const openScan = () => {
  26090. uni.scanCode({
  26091. success: (res2) => {
  26092. searchText.value = res2.result;
  26093. onSearch();
  26094. },
  26095. fail: (err) => {
  26096. uni.showToast({
  26097. title: "扫码失败",
  26098. icon: "error"
  26099. });
  26100. }
  26101. });
  26102. };
  26103. onLoad(() => {
  26104. uni.$u.useGlobalEvent((e) => {
  26105. if (e.barcode) {
  26106. searchText.value = e.barcode;
  26107. onSearch();
  26108. }
  26109. });
  26110. });
  26111. onShow(() => {
  26112. uni.$u.updateActivePageOnShow();
  26113. });
  26114. const __returned__ = { searchText, searchType, playGlobalSound, onSearch, openScan, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, get onLoad() {
  26115. return onLoad;
  26116. }, get onShow() {
  26117. return onShow;
  26118. } };
  26119. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26120. return __returned__;
  26121. }
  26122. };
  26123. function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
  26124. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
  26125. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$5);
  26126. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  26127. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  26128. return vue.openBlock(), vue.createElementBlock("view", {
  26129. class: "container flex-d h100",
  26130. onClick: $setup.playGlobalSound
  26131. }, [
  26132. vue.createCommentVNode(" 库位列表 "),
  26133. vue.createElementVNode("view", { class: "location-list flex-1" }, [
  26134. vue.createElementVNode("view", { class: "no-data flex-c mt-60" }, "请输入快递单号/订单编号")
  26135. ]),
  26136. vue.createCommentVNode(" 底部搜索框 "),
  26137. vue.createElementVNode("view", {
  26138. class: "pad-20 flex flex-column",
  26139. style: { "background": "#ffffff" }
  26140. }, [
  26141. vue.createVNode(_component_u_radio_group, {
  26142. modelValue: $setup.searchType,
  26143. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchType = $event),
  26144. class: "mb-20 ml-20"
  26145. }, {
  26146. default: vue.withCtx(() => [
  26147. vue.createVNode(_component_u_radio, {
  26148. label: "查订单",
  26149. name: "1",
  26150. "label-size": "17"
  26151. }),
  26152. vue.createVNode(_component_u_radio, {
  26153. label: "查物流",
  26154. "custom-style": "margin-left:20px",
  26155. name: "2",
  26156. "label-size": "17"
  26157. })
  26158. ]),
  26159. _: 1
  26160. /* STABLE */
  26161. }, 8, ["modelValue"]),
  26162. vue.createElementVNode("view", { class: "flex-a" }, [
  26163. vue.createVNode(_component_u_search, {
  26164. modelValue: $setup.searchText,
  26165. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.searchText = $event),
  26166. placeholder: "请输入快递单号/订单编号",
  26167. "show-action": false,
  26168. clearabled: true,
  26169. onSearch: $setup.onSearch,
  26170. height: "40"
  26171. }, null, 8, ["modelValue"]),
  26172. vue.createVNode(_component_u_icon, {
  26173. name: "scan",
  26174. size: "28",
  26175. color: "#19be6b",
  26176. onClick: $setup.openScan
  26177. })
  26178. ])
  26179. ])
  26180. ]);
  26181. }
  26182. const PagesIndexWmsBadOut = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$F], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-out.vue"]]);
  26183. const _sfc_main$F = {
  26184. __name: "BadOutCard",
  26185. props: {
  26186. item: Object
  26187. },
  26188. setup(__props, { expose: __expose }) {
  26189. __expose();
  26190. const props2 = __props;
  26191. const __returned__ = { props: props2 };
  26192. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26193. return __returned__;
  26194. }
  26195. };
  26196. function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
  26197. var _a;
  26198. return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [
  26199. vue.createElementVNode("view", { class: "flex w100" }, [
  26200. vue.createElementVNode("view", { class: "flex-d" }, [
  26201. vue.createElementVNode("image", {
  26202. style: { "width": "80px", "height": "100px" },
  26203. src: $props.item.cover,
  26204. mode: "aspectFill"
  26205. }, null, 8, ["src"]),
  26206. vue.createElementVNode(
  26207. "view",
  26208. { class: "quantity mt-20" },
  26209. "数量: " + vue.toDisplayString($props.item.num),
  26210. 1
  26211. /* TEXT */
  26212. )
  26213. ]),
  26214. vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
  26215. vue.createElementVNode(
  26216. "view",
  26217. { class: "common-title mb-20" },
  26218. vue.toDisplayString($props.item.bookName),
  26219. 1
  26220. /* TEXT */
  26221. ),
  26222. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  26223. vue.createElementVNode(
  26224. "view",
  26225. { class: "isbn" },
  26226. "ISBN: " + vue.toDisplayString($props.item.isbn),
  26227. 1
  26228. /* TEXT */
  26229. ),
  26230. vue.createElementVNode(
  26231. "view",
  26232. { class: "set" },
  26233. "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "否"),
  26234. 1
  26235. /* TEXT */
  26236. )
  26237. ]),
  26238. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  26239. vue.createElementVNode(
  26240. "view",
  26241. { class: "discount" },
  26242. "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
  26243. 1
  26244. /* TEXT */
  26245. ),
  26246. vue.createElementVNode(
  26247. "view",
  26248. { class: "review" },
  26249. "审核金额: " + vue.toDisplayString($props.item.finalMoney),
  26250. 1
  26251. /* TEXT */
  26252. )
  26253. ]),
  26254. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  26255. vue.createElementVNode(
  26256. "view",
  26257. { class: "price" },
  26258. "定价: " + vue.toDisplayString($props.item.bookPrice),
  26259. 1
  26260. /* TEXT */
  26261. ),
  26262. vue.createElementVNode(
  26263. "view",
  26264. { class: "estimate" },
  26265. "预估单价: " + vue.toDisplayString($props.item.expectMoney),
  26266. 1
  26267. /* TEXT */
  26268. )
  26269. ]),
  26270. vue.createElementVNode(
  26271. "view",
  26272. { class: "quality mb-10" },
  26273. " 品相: 良好(" + vue.toDisplayString($props.item.goodNum) + ") 、 一般(" + vue.toDisplayString($props.item.generalNum) + ") 、 极差(" + vue.toDisplayString($props.item.badNum) + ") ",
  26274. 1
  26275. /* TEXT */
  26276. ),
  26277. vue.createElementVNode(
  26278. "view",
  26279. { class: "reason color-red" },
  26280. "原因: " + vue.toDisplayString((_a = $props.item.auditCommentList) == null ? void 0 : _a.filter((item) => item.sts == 3).map((item) => item.com).join(";")),
  26281. 1
  26282. /* TEXT */
  26283. )
  26284. ])
  26285. ])
  26286. ]);
  26287. }
  26288. const BadOutCard = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$E], ["__scopeId", "data-v-e52c1f77"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/components/BadOutCard.vue"]]);
  26289. const _sfc_main$E = {
  26290. __name: "bad-out-order",
  26291. setup(__props, { expose: __expose }) {
  26292. __expose();
  26293. const searchText = vue.ref("");
  26294. const searchType = vue.ref("1");
  26295. const errorMsg = vue.ref("");
  26296. const hasData = vue.ref(false);
  26297. function playGlobalSound() {
  26298. uni.$u.playClickSound();
  26299. }
  26300. const locationInfo = vue.ref({
  26301. positionCode: "",
  26302. waybillCode: "",
  26303. orderId: "",
  26304. badNum: "",
  26305. remark: "",
  26306. refundWaybillCode: ""
  26307. });
  26308. const badList = vue.ref([]);
  26309. onLoad((options) => {
  26310. searchType.value = options.searchType || "1";
  26311. if (options.searchText) {
  26312. searchText.value = options.searchText;
  26313. onSearch();
  26314. }
  26315. uni.$u.useGlobalEvent((e) => {
  26316. if (e.barcode) {
  26317. searchText.value = e.barcode;
  26318. onSearch();
  26319. }
  26320. });
  26321. });
  26322. const getSearchType = (text) => {
  26323. return /^[0-9]+$/.test(text) ? 1 : 2;
  26324. };
  26325. const onSearch = async () => {
  26326. if (!searchText.value) {
  26327. errorMsg.value = "请输入运单号或订单编号";
  26328. hasData.value = false;
  26329. return;
  26330. }
  26331. try {
  26332. const res2 = await uni.$u.http.post("/app/stock/findOrderOutStock", {
  26333. search: searchText.value,
  26334. searchType: searchType.value
  26335. });
  26336. if (res2.code == 200) {
  26337. const data = res2.data;
  26338. errorMsg.value = "";
  26339. hasData.value = true;
  26340. locationInfo.value = {
  26341. positionCode: data.positionCode || "",
  26342. waybillCode: data.waybillCode || "",
  26343. orderId: data.orderId || "",
  26344. badNum: data.badNum || "",
  26345. remark: data.remark || "",
  26346. refundWaybillCode: data.refundWaybillCode || ""
  26347. };
  26348. badList.value = data.detailVoList || [];
  26349. } else {
  26350. errorMsg.value = res2.msg || "未找到相关数据";
  26351. hasData.value = false;
  26352. return;
  26353. }
  26354. } catch (error2) {
  26355. errorMsg.value = error2.message || "获取数据失败";
  26356. hasData.value = false;
  26357. uni.showToast({
  26358. title: "获取数据失败",
  26359. icon: "none"
  26360. });
  26361. }
  26362. };
  26363. const openScan = () => {
  26364. uni.scanCode({
  26365. success: (res2) => {
  26366. searchText.value = res2.result;
  26367. onSearch();
  26368. },
  26369. fail: (err) => {
  26370. uni.showToast({
  26371. title: "扫码失败",
  26372. icon: "error"
  26373. });
  26374. }
  26375. });
  26376. };
  26377. onShow(() => {
  26378. uni.$u.updateActivePageOnShow();
  26379. });
  26380. const onConfirm = () => {
  26381. uni.showModal({
  26382. title: "确认提示",
  26383. content: "是否确认出库?",
  26384. success: async (res2) => {
  26385. if (res2.confirm) {
  26386. uni.$u.http.post("/app/stock/outStock", {
  26387. orderId: locationInfo.value.orderId,
  26388. positionCode: locationInfo.value.positionCode,
  26389. outputRemark: locationInfo.value.remark
  26390. }).then((res3) => {
  26391. if (res3.code == 200) {
  26392. uni.showToast({
  26393. title: "出库成功",
  26394. icon: "success"
  26395. });
  26396. uni.$u.ttsModule.speak("出库成功");
  26397. searchText.value = "";
  26398. locationInfo.value = {
  26399. positionCode: "",
  26400. waybillCode: "",
  26401. orderId: "",
  26402. badNum: "",
  26403. remark: ""
  26404. };
  26405. badList.value = [];
  26406. } else {
  26407. uni.showToast({
  26408. title: res3.msg,
  26409. icon: "none"
  26410. });
  26411. uni.$u.ttsModule.speak(res3.msg);
  26412. }
  26413. });
  26414. }
  26415. }
  26416. });
  26417. };
  26418. const remarkVisible = vue.ref(false);
  26419. const currentRemark = vue.ref("");
  26420. const currentEditIndex = vue.ref(-1);
  26421. const openRemarkDialog = (index2, remark = "") => {
  26422. currentEditIndex.value = index2;
  26423. currentRemark.value = remark;
  26424. remarkVisible.value = true;
  26425. };
  26426. const handleRemarkConfirm = (remark) => {
  26427. if (currentEditIndex.value >= 0) {
  26428. orders.value[currentEditIndex.value].remark = remark;
  26429. }
  26430. currentEditIndex.value = -1;
  26431. currentRemark.value = "";
  26432. };
  26433. 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() {
  26434. return onLoad;
  26435. }, get onShow() {
  26436. return onShow;
  26437. } };
  26438. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26439. return __returned__;
  26440. }
  26441. };
  26442. function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
  26443. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  26444. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  26445. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  26446. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  26447. return vue.openBlock(), vue.createElementBlock("view", {
  26448. class: "container",
  26449. onClick: $setup.playGlobalSound
  26450. }, [
  26451. vue.createCommentVNode(" 搜索框 "),
  26452. vue.createVNode(_component_u_sticky, null, {
  26453. default: vue.withCtx(() => [
  26454. vue.createElementVNode("view", { class: "search-area flex-c mb-20" }, [
  26455. vue.createVNode(_component_u_search, {
  26456. modelValue: $setup.searchText,
  26457. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  26458. placeholder: $setup.searchType == "1" ? "请输入订单编号" : "请输入运单号",
  26459. "show-action": false,
  26460. clearabled: true,
  26461. onSearch: $setup.onSearch,
  26462. height: "40"
  26463. }, null, 8, ["modelValue", "placeholder"]),
  26464. vue.createVNode(_component_u_icon, {
  26465. name: "scan",
  26466. size: "28",
  26467. color: "#19be6b",
  26468. onClick: $setup.openScan
  26469. })
  26470. ])
  26471. ]),
  26472. _: 1
  26473. /* STABLE */
  26474. }),
  26475. vue.createElementVNode("view", { class: "content" }, [
  26476. vue.createCommentVNode(" 错误提示 "),
  26477. $setup.errorMsg ? (vue.openBlock(), vue.createElementBlock("view", {
  26478. key: 0,
  26479. class: "error-section"
  26480. }, [
  26481. vue.createVNode(_component_u_icon, {
  26482. name: "info-circle",
  26483. color: "#fa3534",
  26484. size: "20"
  26485. }),
  26486. vue.createElementVNode(
  26487. "text",
  26488. { class: "error-text" },
  26489. vue.toDisplayString($setup.errorMsg),
  26490. 1
  26491. /* TEXT */
  26492. )
  26493. ])) : vue.createCommentVNode("v-if", true),
  26494. vue.createCommentVNode(" 基本信息 "),
  26495. $setup.hasData ? (vue.openBlock(), vue.createElementBlock(
  26496. vue.Fragment,
  26497. { key: 1 },
  26498. [
  26499. vue.createElementVNode("view", { class: "info-section" }, [
  26500. vue.createElementVNode(
  26501. "view",
  26502. { class: "info-item" },
  26503. "库位:" + vue.toDisplayString($setup.locationInfo.positionCode),
  26504. 1
  26505. /* TEXT */
  26506. ),
  26507. vue.createElementVNode(
  26508. "view",
  26509. { class: "info-item" },
  26510. "物流单号:" + vue.toDisplayString($setup.locationInfo.waybillCode || "-"),
  26511. 1
  26512. /* TEXT */
  26513. ),
  26514. vue.createElementVNode(
  26515. "view",
  26516. { class: "info-item" },
  26517. "退回物流:" + vue.toDisplayString($setup.locationInfo.refundWaybillCode || "-"),
  26518. 1
  26519. /* TEXT */
  26520. ),
  26521. vue.createElementVNode(
  26522. "view",
  26523. { class: "info-item" },
  26524. "订单编号:" + vue.toDisplayString($setup.locationInfo.orderId),
  26525. 1
  26526. /* TEXT */
  26527. ),
  26528. vue.createElementVNode(
  26529. "view",
  26530. { class: "info-item" },
  26531. "订单商品:" + vue.toDisplayString($setup.locationInfo.badNum),
  26532. 1
  26533. /* TEXT */
  26534. ),
  26535. vue.createElementVNode(
  26536. "view",
  26537. { class: "info-item" },
  26538. "备注信息:" + vue.toDisplayString($setup.locationInfo.remark || "-"),
  26539. 1
  26540. /* TEXT */
  26541. )
  26542. ]),
  26543. vue.createCommentVNode(" 极差商品列表 "),
  26544. vue.createElementVNode("view", { class: "bad-list" }, [
  26545. vue.createElementVNode("view", { class: "list-title mb-6" }, "极差"),
  26546. (vue.openBlock(true), vue.createElementBlock(
  26547. vue.Fragment,
  26548. null,
  26549. vue.renderList($setup.badList, (item, index2) => {
  26550. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  26551. vue.createVNode($setup["BadOutCard"], {
  26552. item,
  26553. index: index2
  26554. }, null, 8, ["item", "index"])
  26555. ]);
  26556. }),
  26557. 128
  26558. /* KEYED_FRAGMENT */
  26559. ))
  26560. ])
  26561. ],
  26562. 64
  26563. /* STABLE_FRAGMENT */
  26564. )) : vue.createCommentVNode("v-if", true)
  26565. ]),
  26566. vue.createCommentVNode(" 底部按钮 "),
  26567. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  26568. vue.createVNode(_component_u_button, {
  26569. size: "large",
  26570. type: "warning",
  26571. text: "反馈",
  26572. onClick: $setup.openRemarkDialog
  26573. }),
  26574. vue.createVNode(_component_u_button, {
  26575. size: "large",
  26576. type: "primary",
  26577. text: "确定出库",
  26578. onClick: $setup.onConfirm
  26579. })
  26580. ]),
  26581. vue.createCommentVNode(" 备注弹窗 "),
  26582. vue.createVNode($setup["RemarkDialog"], {
  26583. visible: $setup.remarkVisible,
  26584. "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => $setup.remarkVisible = $event),
  26585. "initial-value": $setup.currentRemark,
  26586. onConfirm: $setup.handleRemarkConfirm
  26587. }, null, 8, ["visible", "initial-value"])
  26588. ]);
  26589. }
  26590. const PagesIndexWmsBadOutOrder = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$D], ["__scopeId", "data-v-43bc1c65"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-out-order.vue"]]);
  26591. const _sfc_main$D = {
  26592. __name: "bad-off",
  26593. setup(__props, { expose: __expose }) {
  26594. __expose();
  26595. const searchText = vue.ref("");
  26596. function playGlobalSound() {
  26597. uni.$u.playClickSound();
  26598. }
  26599. const taskList = vue.ref([]);
  26600. const loading = vue.ref(false);
  26601. const taskStatusEnum = {
  26602. 1: "待作业",
  26603. 2: "作业中",
  26604. 3: "已完成",
  26605. 4: "已关闭"
  26606. };
  26607. const getTaskStatusText = (status) => {
  26608. return taskStatusEnum[status] || "未知状态";
  26609. };
  26610. const fetchTaskList = async () => {
  26611. loading.value = true;
  26612. try {
  26613. const response = await uni.$u.http.post("/app/appstock/getNeedStockList");
  26614. formatAppLog("log", "at pages/index/wms/bad-off.vue:82", response);
  26615. taskList.value = response;
  26616. if (response.code === 200) {
  26617. taskList.value = response.data || [];
  26618. } else {
  26619. uni.showToast({
  26620. title: response.msg || "获取任务列表失败",
  26621. icon: "none"
  26622. });
  26623. }
  26624. } catch (error2) {
  26625. uni.showToast({
  26626. title: "获取任务列表失败",
  26627. icon: "none"
  26628. });
  26629. } finally {
  26630. loading.value = false;
  26631. }
  26632. };
  26633. const onSearch = () => {
  26634. fetchTaskList();
  26635. };
  26636. const openScan = () => {
  26637. uni.scanCode({
  26638. success: (res2) => {
  26639. searchText.value = res2.result;
  26640. onSearch();
  26641. },
  26642. fail: (err) => {
  26643. uni.showToast({
  26644. title: "扫码失败",
  26645. icon: "error"
  26646. });
  26647. }
  26648. });
  26649. };
  26650. const handleTaskClick = (task) => {
  26651. uni.showModal({
  26652. title: "领取确认",
  26653. content: "是否确认领取下架任务?",
  26654. cancelText: "取消",
  26655. confirmText: "确认",
  26656. success: async (res2) => {
  26657. playGlobalSound();
  26658. if (res2.confirm) {
  26659. try {
  26660. const response = await uni.$u.http.post(`/app/appstock/lockStockTask?taskCode=${task.taskCode}`);
  26661. if (response.code === 200) {
  26662. uni.navigateTo({
  26663. url: `/pages/index/wms/task-detail?taskCode=${task.taskCode}`
  26664. });
  26665. } else {
  26666. uni.showToast({
  26667. title: response.msg || "任务锁定失败",
  26668. icon: "none"
  26669. });
  26670. }
  26671. } catch (error2) {
  26672. uni.showToast({
  26673. title: error2,
  26674. icon: "none"
  26675. });
  26676. }
  26677. }
  26678. }
  26679. });
  26680. };
  26681. vue.onMounted(() => {
  26682. fetchTaskList();
  26683. });
  26684. const __returned__ = { searchText, playGlobalSound, taskList, loading, taskStatusEnum, getTaskStatusText, fetchTaskList, onSearch, openScan, handleTaskClick, ref: vue.ref, onMounted: vue.onMounted };
  26685. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26686. return __returned__;
  26687. }
  26688. };
  26689. function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
  26690. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  26691. return vue.openBlock(), vue.createElementBlock("view", {
  26692. class: "container",
  26693. onClick: $setup.playGlobalSound
  26694. }, [
  26695. vue.createCommentVNode(" 任务列表 "),
  26696. vue.createElementVNode("view", { class: "task-list" }, [
  26697. !$setup.loading ? (vue.openBlock(), vue.createElementBlock(
  26698. vue.Fragment,
  26699. { key: 0 },
  26700. [
  26701. $setup.taskList.length > 0 ? (vue.openBlock(true), vue.createElementBlock(
  26702. vue.Fragment,
  26703. { key: 0 },
  26704. vue.renderList($setup.taskList, (item, index2) => {
  26705. return vue.openBlock(), vue.createElementBlock("view", {
  26706. key: index2,
  26707. class: "task-card",
  26708. onClick: ($event) => $setup.handleTaskClick(item)
  26709. }, [
  26710. vue.createElementVNode("view", { class: "task-header" }, [
  26711. vue.createElementVNode(
  26712. "text",
  26713. { class: "task-no" },
  26714. "作业单号:" + vue.toDisplayString(item.taskCode),
  26715. 1
  26716. /* TEXT */
  26717. )
  26718. ]),
  26719. vue.createElementVNode("view", { class: "task-content" }, [
  26720. vue.createElementVNode("view", { class: "flex-a mb-10" }, [
  26721. vue.createElementVNode("text", { class: "label" }, "仓库:"),
  26722. vue.createElementVNode(
  26723. "text",
  26724. { class: "value" },
  26725. vue.toDisplayString(item.godownName),
  26726. 1
  26727. /* TEXT */
  26728. )
  26729. ]),
  26730. vue.createElementVNode("view", { class: "flex-a mb-10" }, [
  26731. vue.createElementVNode("text", { class: "label" }, "订单数量:"),
  26732. vue.createElementVNode(
  26733. "text",
  26734. { class: "value" },
  26735. vue.toDisplayString(item.orderNum),
  26736. 1
  26737. /* TEXT */
  26738. )
  26739. ]),
  26740. vue.createElementVNode("view", { class: "flex-a mb-10" }, [
  26741. vue.createElementVNode("text", { class: "label" }, "创建时间:"),
  26742. vue.createElementVNode(
  26743. "text",
  26744. { class: "value" },
  26745. vue.toDisplayString(item.createTime),
  26746. 1
  26747. /* TEXT */
  26748. )
  26749. ]),
  26750. vue.createElementVNode("view", { class: "flex-a" }, [
  26751. vue.createElementVNode("text", { class: "label" }, "作业状态:"),
  26752. vue.createElementVNode(
  26753. "text",
  26754. { class: "value" },
  26755. vue.toDisplayString($setup.getTaskStatusText(item.taskStatus)),
  26756. 1
  26757. /* TEXT */
  26758. )
  26759. ])
  26760. ])
  26761. ], 8, ["onClick"]);
  26762. }),
  26763. 128
  26764. /* KEYED_FRAGMENT */
  26765. )) : (vue.openBlock(), vue.createElementBlock("view", {
  26766. key: 1,
  26767. class: "empty-state"
  26768. }, [
  26769. vue.createElementVNode("text", null, "暂无任务数据")
  26770. ]))
  26771. ],
  26772. 64
  26773. /* STABLE_FRAGMENT */
  26774. )) : (vue.openBlock(), vue.createElementBlock("view", {
  26775. key: 1,
  26776. class: "loading-state"
  26777. }, [
  26778. vue.createVNode(_component_u_loading_icon),
  26779. vue.createElementVNode("text", null, "加载中...")
  26780. ]))
  26781. ])
  26782. ]);
  26783. }
  26784. const PagesIndexWmsBadOff = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__scopeId", "data-v-58677b56"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-off.vue"]]);
  26785. const _sfc_main$C = {
  26786. __name: "order-query",
  26787. setup(__props, { expose: __expose }) {
  26788. __expose();
  26789. const query = vue.reactive({
  26790. searchType: 2,
  26791. search: ""
  26792. });
  26793. const orderQuery = () => {
  26794. if (!query.search) {
  26795. uni.$u.toast("请输入快递单号/订单编号");
  26796. return;
  26797. }
  26798. uni.navigateTo({
  26799. url: `/pages/index/wms/order-query-list?id=${query.search}`
  26800. });
  26801. };
  26802. function openScan() {
  26803. uni.scanCode({
  26804. success: (res2) => {
  26805. query.search = res2.result;
  26806. orderQuery();
  26807. }
  26808. });
  26809. }
  26810. onLoad(() => {
  26811. uni.$u.useGlobalEvent((e) => {
  26812. if (e.barcode) {
  26813. query.search = e.barcode;
  26814. orderQuery();
  26815. }
  26816. });
  26817. });
  26818. onShow(() => {
  26819. uni.$u.updateActivePageOnShow();
  26820. });
  26821. const __returned__ = { query, orderQuery, openScan, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  26822. return onLoad;
  26823. }, get onShow() {
  26824. return onShow;
  26825. } };
  26826. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26827. return __returned__;
  26828. }
  26829. };
  26830. function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
  26831. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  26832. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  26833. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  26834. vue.createCommentVNode(" 底部扫码输入框 "),
  26835. vue.createElementVNode("view", {
  26836. class: "fixed-bottom pad-20",
  26837. style: { "background": "#ffffff" }
  26838. }, [
  26839. vue.createVNode(_component_u_search, {
  26840. placeholder: "请输入快递单号/订单编号",
  26841. searchIconSize: 24,
  26842. bgColor: "#f6f7f6",
  26843. onSearch: $setup.orderQuery,
  26844. modelValue: $setup.query.search,
  26845. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.query.search = $event),
  26846. "custom-style": "font-size:32rpx",
  26847. "placeholder-style": "font-size:32rpx",
  26848. clearabled: true,
  26849. focus: false,
  26850. showAction: false,
  26851. height: 42
  26852. }, null, 8, ["modelValue"]),
  26853. vue.createVNode(_component_u_icon, {
  26854. name: "scan",
  26855. size: "34",
  26856. color: "#19be6b",
  26857. onClick: $setup.openScan
  26858. })
  26859. ])
  26860. ]);
  26861. }
  26862. const PagesIndexWmsOrderQuery = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__scopeId", "data-v-c65e1cc0"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/order-query.vue"]]);
  26863. const props$5 = {
  26864. props: {
  26865. // 是否显示圆点
  26866. isDot: {
  26867. type: Boolean,
  26868. default: props$E.badge.isDot
  26869. },
  26870. // 显示的内容
  26871. value: {
  26872. type: [Number, String],
  26873. default: props$E.badge.value
  26874. },
  26875. // 显示的内容
  26876. modelValue: {
  26877. type: [Number, String],
  26878. default: props$E.badge.modelValue
  26879. },
  26880. // 是否显示
  26881. show: {
  26882. type: Boolean,
  26883. default: props$E.badge.show
  26884. },
  26885. // 最大值,超过最大值会显示 '{max}+'
  26886. max: {
  26887. type: [Number, String],
  26888. default: props$E.badge.max
  26889. },
  26890. // 主题类型,error|warning|success|primary
  26891. type: {
  26892. type: String,
  26893. default: props$E.badge.type
  26894. },
  26895. // 当数值为 0 时,是否展示 Badge
  26896. showZero: {
  26897. type: Boolean,
  26898. default: props$E.badge.showZero
  26899. },
  26900. // 背景颜色,优先级比type高,如设置,type参数会失效
  26901. bgColor: {
  26902. type: [String, null],
  26903. default: props$E.badge.bgColor
  26904. },
  26905. // 字体颜色
  26906. color: {
  26907. type: [String, null],
  26908. default: props$E.badge.color
  26909. },
  26910. // 徽标形状,circle-四角均为圆角,horn-左下角为直角
  26911. shape: {
  26912. type: String,
  26913. default: props$E.badge.shape
  26914. },
  26915. // 设置数字的显示方式,overflow|ellipsis|limit
  26916. // overflow会根据max字段判断,超出显示`${max}+`
  26917. // ellipsis会根据max判断,超出显示`${max}...`
  26918. // limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数
  26919. numberType: {
  26920. type: String,
  26921. default: props$E.badge.numberType
  26922. },
  26923. // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
  26924. offset: {
  26925. type: Array,
  26926. default: props$E.badge.offset
  26927. },
  26928. // 是否反转背景和字体颜色
  26929. inverted: {
  26930. type: Boolean,
  26931. default: props$E.badge.inverted
  26932. },
  26933. // 是否绝对定位
  26934. absolute: {
  26935. type: Boolean,
  26936. default: props$E.badge.absolute
  26937. }
  26938. }
  26939. };
  26940. const _sfc_main$B = {
  26941. name: "u-badge",
  26942. mixins: [mpMixin, props$5, mixin],
  26943. computed: {
  26944. // 是否将badge中心与父组件右上角重合
  26945. boxStyle() {
  26946. let style = {};
  26947. return style;
  26948. },
  26949. // 整个组件的样式
  26950. badgeStyle() {
  26951. const style = {};
  26952. if (this.color) {
  26953. style.color = this.color;
  26954. }
  26955. if (this.bgColor && !this.inverted) {
  26956. style.backgroundColor = this.bgColor;
  26957. }
  26958. if (this.absolute) {
  26959. style.position = "absolute";
  26960. if (this.offset.length) {
  26961. const top = this.offset[0];
  26962. const right = this.offset[1] || top;
  26963. style.top = uni.$u.addUnit(top);
  26964. style.right = uni.$u.addUnit(right);
  26965. }
  26966. }
  26967. return style;
  26968. },
  26969. showValue() {
  26970. switch (this.numberType) {
  26971. case "overflow":
  26972. return Number(this.value) > Number(this.max) ? this.max + "+" : this.value;
  26973. case "ellipsis":
  26974. return Number(this.value) > Number(this.max) ? "..." : this.value;
  26975. case "limit":
  26976. 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;
  26977. default:
  26978. return Number(this.value);
  26979. }
  26980. }
  26981. }
  26982. };
  26983. function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
  26984. return _ctx.show && ((Number(_ctx.value) === 0 ? _ctx.showZero : true) || _ctx.isDot) ? (vue.openBlock(), vue.createElementBlock(
  26985. "text",
  26986. {
  26987. key: 0,
  26988. 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"]),
  26989. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), $options.badgeStyle])
  26990. },
  26991. vue.toDisplayString(_ctx.isDot ? "" : $options.showValue),
  26992. 7
  26993. /* TEXT, CLASS, STYLE */
  26994. )) : vue.createCommentVNode("v-if", true);
  26995. }
  26996. const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__scopeId", "data-v-06cca9b7"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-badge/u-badge.vue"]]);
  26997. const props$4 = {
  26998. props: {
  26999. // 滑块的移动过渡时间,单位ms
  27000. duration: {
  27001. type: Number,
  27002. default: props$E.tabs.duration
  27003. },
  27004. // tabs标签数组
  27005. list: {
  27006. type: Array,
  27007. default: props$E.tabs.list
  27008. },
  27009. // 滑块颜色
  27010. lineColor: {
  27011. type: String,
  27012. default: props$E.tabs.lineColor
  27013. },
  27014. // 菜单选择中时的样式
  27015. activeStyle: {
  27016. type: [String, Object],
  27017. default: props$E.tabs.activeStyle
  27018. },
  27019. // 菜单非选中时的样式
  27020. inactiveStyle: {
  27021. type: [String, Object],
  27022. default: props$E.tabs.inactiveStyle
  27023. },
  27024. // 滑块长度
  27025. lineWidth: {
  27026. type: [String, Number],
  27027. default: props$E.tabs.lineWidth
  27028. },
  27029. // 滑块高度
  27030. lineHeight: {
  27031. type: [String, Number],
  27032. default: props$E.tabs.lineHeight
  27033. },
  27034. // 滑块背景显示大小,当滑块背景设置为图片时使用
  27035. lineBgSize: {
  27036. type: String,
  27037. default: props$E.tabs.lineBgSize
  27038. },
  27039. // 菜单item的样式
  27040. itemStyle: {
  27041. type: [String, Object],
  27042. default: props$E.tabs.itemStyle
  27043. },
  27044. // 菜单是否可滚动
  27045. scrollable: {
  27046. type: Boolean,
  27047. default: props$E.tabs.scrollable
  27048. },
  27049. // 当前选中标签的索引
  27050. current: {
  27051. type: [Number, String],
  27052. default: props$E.tabs.current
  27053. },
  27054. // 默认读取的键名
  27055. keyName: {
  27056. type: String,
  27057. default: props$E.tabs.keyName
  27058. }
  27059. }
  27060. };
  27061. const _sfc_main$A = {
  27062. name: "u-tabs",
  27063. mixins: [mpMixin, mixin, props$4],
  27064. data() {
  27065. return {
  27066. firstTime: true,
  27067. scrollLeft: 0,
  27068. scrollViewWidth: 0,
  27069. lineOffsetLeft: 0,
  27070. tabsRect: {
  27071. left: 0
  27072. },
  27073. innerCurrent: 0,
  27074. moving: false
  27075. };
  27076. },
  27077. watch: {
  27078. current: {
  27079. immediate: true,
  27080. handler(newValue, oldValue) {
  27081. if (newValue !== this.innerCurrent) {
  27082. this.innerCurrent = newValue;
  27083. this.$nextTick(() => {
  27084. this.resize();
  27085. });
  27086. }
  27087. }
  27088. },
  27089. // list变化时,重新渲染list各项信息
  27090. list() {
  27091. this.$nextTick(() => {
  27092. this.resize();
  27093. });
  27094. }
  27095. },
  27096. computed: {
  27097. textStyle() {
  27098. return (index2) => {
  27099. const style = {};
  27100. const customeStyle = index2 === this.innerCurrent ? uni.$u.addStyle(this.activeStyle) : uni.$u.addStyle(
  27101. this.inactiveStyle
  27102. );
  27103. if (this.list[index2].disabled) {
  27104. style.color = "#c8c9cc";
  27105. }
  27106. return uni.$u.deepMerge(customeStyle, style);
  27107. };
  27108. },
  27109. propsBadge() {
  27110. return uni.$u.props.badge;
  27111. }
  27112. },
  27113. async mounted() {
  27114. this.init();
  27115. },
  27116. emits: ["click", "change"],
  27117. methods: {
  27118. setLineLeft() {
  27119. const tabItem = this.list[this.innerCurrent];
  27120. if (!tabItem) {
  27121. return;
  27122. }
  27123. let lineOffsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => total + curr.rect.width, 0);
  27124. const lineWidth = uni.$u.getPx(this.lineWidth);
  27125. this.lineOffsetLeft = lineOffsetLeft + (tabItem.rect.width - lineWidth) / 2;
  27126. if (this.firstTime) {
  27127. setTimeout(() => {
  27128. this.firstTime = false;
  27129. }, 10);
  27130. }
  27131. },
  27132. // nvue下设置滑块的位置
  27133. animation(x, duration = 0) {
  27134. },
  27135. // 点击某一个标签
  27136. clickHandler(item, index2) {
  27137. this.$emit("click", {
  27138. ...item,
  27139. index: index2
  27140. });
  27141. if (item.disabled)
  27142. return;
  27143. this.innerCurrent = index2;
  27144. this.resize();
  27145. this.$emit("change", {
  27146. ...item,
  27147. index: index2
  27148. });
  27149. },
  27150. init() {
  27151. uni.$u.sleep().then(() => {
  27152. this.resize();
  27153. });
  27154. },
  27155. setScrollLeft() {
  27156. const tabRect = this.list[this.innerCurrent];
  27157. const offsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => {
  27158. return total + curr.rect.width;
  27159. }, 0);
  27160. const windowWidth = uni.$u.sys().windowWidth;
  27161. let scrollLeft = offsetLeft - (this.tabsRect.width - tabRect.rect.width) / 2 - (windowWidth - this.tabsRect.right) / 2 + this.tabsRect.left / 2;
  27162. scrollLeft = Math.min(scrollLeft, this.scrollViewWidth - this.tabsRect.width);
  27163. this.scrollLeft = Math.max(0, scrollLeft);
  27164. },
  27165. // 获取所有标签的尺寸
  27166. resize() {
  27167. if (this.list.length === 0) {
  27168. return;
  27169. }
  27170. Promise.all([this.getTabsRect(), this.getAllItemRect()]).then(([tabsRect, itemRect = []]) => {
  27171. this.tabsRect = tabsRect;
  27172. this.scrollViewWidth = 0;
  27173. itemRect.map((item, index2) => {
  27174. this.scrollViewWidth += item.width;
  27175. this.list[index2].rect = item;
  27176. });
  27177. this.setLineLeft();
  27178. this.setScrollLeft();
  27179. });
  27180. },
  27181. // 获取导航菜单的尺寸
  27182. getTabsRect() {
  27183. return new Promise((resolve) => {
  27184. this.queryRect("u-tabs__wrapper__scroll-view").then((size) => resolve(size));
  27185. });
  27186. },
  27187. // 获取所有标签的尺寸
  27188. getAllItemRect() {
  27189. return new Promise((resolve) => {
  27190. const promiseAllArr = this.list.map((item, index2) => this.queryRect(
  27191. `u-tabs__wrapper__nav__item-${index2}`,
  27192. true
  27193. ));
  27194. Promise.all(promiseAllArr).then((sizes) => resolve(sizes));
  27195. });
  27196. },
  27197. // 获取各个标签的尺寸
  27198. queryRect(el, item) {
  27199. return new Promise((resolve) => {
  27200. this.$uGetRect(`.${el}`).then((size) => {
  27201. resolve(size);
  27202. });
  27203. });
  27204. }
  27205. }
  27206. };
  27207. function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
  27208. const _component_u_badge = resolveEasycom(vue.resolveDynamicComponent("u-badge"), __easycom_0$1);
  27209. return vue.openBlock(), vue.createElementBlock("view", { class: "u-tabs" }, [
  27210. vue.createElementVNode("view", { class: "u-tabs__wrapper" }, [
  27211. vue.renderSlot(_ctx.$slots, "left", {}, void 0, true),
  27212. vue.createElementVNode("view", { class: "u-tabs__wrapper__scroll-view-wrapper" }, [
  27213. vue.createElementVNode("scroll-view", {
  27214. "scroll-x": _ctx.scrollable,
  27215. "scroll-left": $data.scrollLeft,
  27216. "scroll-with-animation": "",
  27217. class: "u-tabs__wrapper__scroll-view",
  27218. "show-scrollbar": false,
  27219. ref: "u-tabs__wrapper__scroll-view"
  27220. }, [
  27221. vue.createElementVNode(
  27222. "view",
  27223. {
  27224. class: "u-tabs__wrapper__nav",
  27225. ref: "u-tabs__wrapper__nav"
  27226. },
  27227. [
  27228. (vue.openBlock(true), vue.createElementBlock(
  27229. vue.Fragment,
  27230. null,
  27231. vue.renderList(_ctx.list, (item, index2) => {
  27232. return vue.openBlock(), vue.createElementBlock("view", {
  27233. class: vue.normalizeClass(["u-tabs__wrapper__nav__item", [`u-tabs__wrapper__nav__item-${index2}`, item.disabled && "u-tabs__wrapper__nav__item--disabled"]]),
  27234. key: index2,
  27235. onClick: ($event) => $options.clickHandler(item, index2),
  27236. ref_for: true,
  27237. ref: `u-tabs__wrapper__nav__item-${index2}`,
  27238. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.itemStyle), { flex: _ctx.scrollable ? "" : 1 }])
  27239. }, [
  27240. vue.createElementVNode(
  27241. "text",
  27242. {
  27243. class: vue.normalizeClass([[item.disabled && "u-tabs__wrapper__nav__item__text--disabled"], "u-tabs__wrapper__nav__item__text"]),
  27244. style: vue.normalizeStyle([$options.textStyle(index2)])
  27245. },
  27246. vue.toDisplayString(item[_ctx.keyName]),
  27247. 7
  27248. /* TEXT, CLASS, STYLE */
  27249. ),
  27250. vue.createVNode(_component_u_badge, {
  27251. show: !!(item.badge && (item.badge.show || item.badge.isDot || item.badge.value)),
  27252. isDot: item.badge && item.badge.isDot || $options.propsBadge.isDot,
  27253. value: item.badge && item.badge.value || $options.propsBadge.value,
  27254. max: item.badge && item.badge.max || $options.propsBadge.max,
  27255. type: item.badge && item.badge.type || $options.propsBadge.type,
  27256. showZero: item.badge && item.badge.showZero || $options.propsBadge.showZero,
  27257. bgColor: item.badge && item.badge.bgColor || $options.propsBadge.bgColor,
  27258. color: item.badge && item.badge.color || $options.propsBadge.color,
  27259. shape: item.badge && item.badge.shape || $options.propsBadge.shape,
  27260. numberType: item.badge && item.badge.numberType || $options.propsBadge.numberType,
  27261. inverted: item.badge && item.badge.inverted || $options.propsBadge.inverted,
  27262. customStyle: "margin-left: 4px;"
  27263. }, null, 8, ["show", "isDot", "value", "max", "type", "showZero", "bgColor", "color", "shape", "numberType", "inverted"])
  27264. ], 14, ["onClick"]);
  27265. }),
  27266. 128
  27267. /* KEYED_FRAGMENT */
  27268. )),
  27269. vue.createElementVNode(
  27270. "view",
  27271. {
  27272. class: "u-tabs__wrapper__nav__line",
  27273. ref: "u-tabs__wrapper__nav__line",
  27274. style: vue.normalizeStyle([{
  27275. width: _ctx.$u.addUnit(_ctx.lineWidth),
  27276. transform: `translate(${$data.lineOffsetLeft}px)`,
  27277. transitionDuration: `${$data.firstTime ? 0 : _ctx.duration}ms`,
  27278. height: _ctx.$u.addUnit(_ctx.lineHeight),
  27279. background: _ctx.lineColor,
  27280. backgroundSize: _ctx.lineBgSize
  27281. }])
  27282. },
  27283. null,
  27284. 4
  27285. /* STYLE */
  27286. )
  27287. ],
  27288. 512
  27289. /* NEED_PATCH */
  27290. )
  27291. ], 8, ["scroll-x", "scroll-left"])
  27292. ]),
  27293. vue.renderSlot(_ctx.$slots, "right", {}, void 0, true)
  27294. ])
  27295. ]);
  27296. }
  27297. const __easycom_4$1 = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__scopeId", "data-v-02b0c54f"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-tabs/u-tabs.vue"]]);
  27298. const _sfc_main$z = {
  27299. __name: "order-query-list",
  27300. setup(__props, { expose: __expose }) {
  27301. __expose();
  27302. const list1 = vue.reactive([{
  27303. name: "商品明细"
  27304. }, {
  27305. name: "操作记录"
  27306. }]);
  27307. const activeTab = vue.ref(0);
  27308. const query = vue.reactive({
  27309. searchType: 2,
  27310. search: ""
  27311. });
  27312. const determineSearchType = (search) => {
  27313. const isNumberString = /^\d+$/.test(search.toString());
  27314. return isNumberString ? 1 : 2;
  27315. };
  27316. const detail = vue.ref({});
  27317. const orderQuery = () => {
  27318. if (!query.search) {
  27319. uni.$u.toast("请输入快递单号/订单编号");
  27320. uni.$u.ttsModule.speak("请输入快递单号/订单编号");
  27321. return;
  27322. }
  27323. query.searchType = determineSearchType(query.search);
  27324. uni.$u.http.get("/app/stock/findOrder", { params: query }).then((res2) => {
  27325. if (res2.code == 200) {
  27326. detail.value = res2.data;
  27327. uni.$u.ttsModule.speak("查询成功");
  27328. getOperationLogs(res2.data.orderId);
  27329. } else {
  27330. uni.$u.toast(res2.msg);
  27331. uni.$u.ttsModule.speak(res2.msg);
  27332. }
  27333. });
  27334. };
  27335. const operationLogs = vue.ref([]);
  27336. const getOperationLogs = (orderId) => {
  27337. uni.$u.http.get("/app/stock/getGodownStocklog", { params: { orderId } }).then((res2) => {
  27338. if (res2.code == 200) {
  27339. operationLogs.value = res2.data;
  27340. }
  27341. });
  27342. };
  27343. function handleTabChange(tab) {
  27344. activeTab.value = tab.index;
  27345. }
  27346. function openScan() {
  27347. uni.scanCode({
  27348. success: (res2) => {
  27349. query.search = res2.result;
  27350. orderQuery();
  27351. }
  27352. });
  27353. }
  27354. onLoad((options) => {
  27355. if (options.id) {
  27356. query.search = options.id;
  27357. orderQuery();
  27358. }
  27359. uni.$u.useGlobalEvent((e) => {
  27360. if (e.barcode) {
  27361. getDetailByCode(e.barcode);
  27362. }
  27363. });
  27364. });
  27365. onShow(() => {
  27366. uni.$u.updateActivePageOnShow();
  27367. });
  27368. const __returned__ = { list1, activeTab, query, determineSearchType, detail, orderQuery, operationLogs, getOperationLogs, handleTabChange, openScan, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  27369. return onLoad;
  27370. }, get onShow() {
  27371. return onShow;
  27372. }, BookInfo };
  27373. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27374. return __returned__;
  27375. }
  27376. };
  27377. function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
  27378. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_4$1);
  27379. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27380. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27381. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27382. $setup.detail.orderId ? (vue.openBlock(), vue.createElementBlock("view", {
  27383. key: 0,
  27384. class: "header"
  27385. }, [
  27386. vue.createElementVNode("view", { class: "flex-d" }, [
  27387. vue.createElementVNode(
  27388. "text",
  27389. null,
  27390. "订单编号: " + vue.toDisplayString($setup.detail.orderId),
  27391. 1
  27392. /* TEXT */
  27393. ),
  27394. vue.createElementVNode(
  27395. "text",
  27396. { class: "mt-16" },
  27397. "库位: " + vue.toDisplayString($setup.detail.positionCode),
  27398. 1
  27399. /* TEXT */
  27400. )
  27401. ]),
  27402. vue.createElementVNode("view", { class: "status" }, [
  27403. vue.createElementVNode(
  27404. "text",
  27405. null,
  27406. vue.toDisplayString($setup.detail.stockStatus == 1 ? "已入库" : "已出库"),
  27407. 1
  27408. /* TEXT */
  27409. )
  27410. ])
  27411. ])) : vue.createCommentVNode("v-if", true),
  27412. $setup.detail.orderId ? (vue.openBlock(), vue.createElementBlock("view", {
  27413. key: 1,
  27414. style: { "background-color": "#ffffff" },
  27415. class: "pad-5 mt-20 content-info"
  27416. }, [
  27417. vue.createVNode(_component_u_tabs, {
  27418. list: $setup.list1,
  27419. modelValue: $setup.activeTab,
  27420. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.activeTab = $event),
  27421. itemStyle: { height: "44px", width: "48%" },
  27422. onChange: $setup.handleTabChange
  27423. }, null, 8, ["list", "modelValue"]),
  27424. $setup.activeTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  27425. key: 0,
  27426. class: "product-details"
  27427. }, [
  27428. vue.createVNode($setup["BookInfo"], {
  27429. bookList: $setup.detail.detailVoList,
  27430. detail: $setup.detail,
  27431. isShow: false
  27432. }, null, 8, ["bookList", "detail"])
  27433. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  27434. key: 1,
  27435. class: "operation-logs mt-20"
  27436. }, [
  27437. (vue.openBlock(true), vue.createElementBlock(
  27438. vue.Fragment,
  27439. null,
  27440. vue.renderList($setup.operationLogs, (log, index2) => {
  27441. return vue.openBlock(), vue.createElementBlock("view", {
  27442. key: index2,
  27443. class: "log-item"
  27444. }, [
  27445. vue.createElementVNode(
  27446. "text",
  27447. null,
  27448. vue.toDisplayString(log.createTime),
  27449. 1
  27450. /* TEXT */
  27451. ),
  27452. vue.createElementVNode(
  27453. "text",
  27454. null,
  27455. vue.toDisplayString(log.createName),
  27456. 1
  27457. /* TEXT */
  27458. ),
  27459. vue.createElementVNode(
  27460. "text",
  27461. null,
  27462. vue.toDisplayString(log.content),
  27463. 1
  27464. /* TEXT */
  27465. )
  27466. ]);
  27467. }),
  27468. 128
  27469. /* KEYED_FRAGMENT */
  27470. ))
  27471. ]))
  27472. ])) : vue.createCommentVNode("v-if", true),
  27473. vue.createCommentVNode(" 底部扫码输入框 "),
  27474. vue.createElementVNode("view", {
  27475. class: "fixed-bottom pad-20",
  27476. style: { "background": "#ffffff" }
  27477. }, [
  27478. vue.createVNode(_component_u_search, {
  27479. placeholder: "请输入快递单号/订单编号",
  27480. searchIconSize: 24,
  27481. bgColor: "#f6f7f6",
  27482. onSearch: $setup.orderQuery,
  27483. modelValue: $setup.query.search,
  27484. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.query.search = $event),
  27485. "custom-style": "font-size:32rpx",
  27486. "placeholder-style": "font-size:32rpx",
  27487. clearabled: true,
  27488. focus: false,
  27489. showAction: false,
  27490. height: 42
  27491. }, null, 8, ["modelValue"]),
  27492. vue.createVNode(_component_u_icon, {
  27493. name: "scan",
  27494. size: "34",
  27495. color: "#19be6b",
  27496. onClick: $setup.openScan
  27497. })
  27498. ])
  27499. ]);
  27500. }
  27501. const PagesIndexWmsOrderQueryList = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__scopeId", "data-v-13461b03"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/order-query-list.vue"]]);
  27502. const _sfc_main$y = {
  27503. __name: "location-order",
  27504. setup(__props, { expose: __expose }) {
  27505. __expose();
  27506. const positionCode = vue.ref("");
  27507. const onSearch = () => {
  27508. if (positionCode.value) {
  27509. uni.navigateTo({
  27510. url: "/pages/index/wms/location-order-list?positionCode=" + positionCode.value
  27511. });
  27512. } else {
  27513. uni.$u.toast("请输入库位编号");
  27514. }
  27515. };
  27516. function openScan() {
  27517. uni.scanCode({
  27518. success: (res2) => {
  27519. positionCode.value = res2.result;
  27520. onSearch();
  27521. }
  27522. });
  27523. }
  27524. onLoad(() => {
  27525. uni.$u.useGlobalEvent((e) => {
  27526. if (e.barcode) {
  27527. positionCode.value = e.barcode;
  27528. onSearch();
  27529. }
  27530. });
  27531. });
  27532. onShow(() => {
  27533. uni.$u.updateActivePageOnShow();
  27534. });
  27535. const __returned__ = { positionCode, onSearch, openScan, ref: vue.ref, get onLoad() {
  27536. return onLoad;
  27537. }, get onShow() {
  27538. return onShow;
  27539. } };
  27540. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27541. return __returned__;
  27542. }
  27543. };
  27544. function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
  27545. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27546. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27547. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27548. vue.createCommentVNode(" 底部扫码输入框 "),
  27549. vue.createElementVNode("view", {
  27550. class: "fixed-bottom pad-20",
  27551. style: { "background": "#ffffff" }
  27552. }, [
  27553. vue.createVNode(_component_u_search, {
  27554. placeholder: "请输入库位编号",
  27555. searchIconSize: 24,
  27556. bgColor: "#f6f7f6",
  27557. onSearch: $setup.onSearch,
  27558. modelValue: $setup.positionCode,
  27559. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.positionCode = $event),
  27560. clearabled: true,
  27561. focus: false,
  27562. showAction: false,
  27563. height: 42
  27564. }, null, 8, ["modelValue"]),
  27565. vue.createVNode(_component_u_icon, {
  27566. name: "scan",
  27567. size: "32",
  27568. color: "#19be6b",
  27569. onClick: $setup.openScan
  27570. })
  27571. ])
  27572. ]);
  27573. }
  27574. const PagesIndexWmsLocationOrder = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__scopeId", "data-v-38a6ed3a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/location-order.vue"]]);
  27575. const _imports_0$1 = "/static/img/share.png";
  27576. const _sfc_main$x = {
  27577. __name: "LocationOrderItem",
  27578. props: {
  27579. item: {
  27580. type: Object,
  27581. required: true
  27582. },
  27583. isCheck: {
  27584. type: Boolean,
  27585. default: false
  27586. },
  27587. isLink: {
  27588. type: Boolean,
  27589. default: true
  27590. }
  27591. },
  27592. emits: ["select"],
  27593. setup(__props, { expose: __expose, emit: __emit }) {
  27594. __expose();
  27595. const props2 = __props;
  27596. const emit2 = __emit;
  27597. const toggleSelect = () => {
  27598. emit2("select", props2.item);
  27599. };
  27600. const handleQuickJump = () => {
  27601. uni.navigateTo({
  27602. url: `/pages/index/wms/order-query-list?id=${props2.item.orderId}`
  27603. });
  27604. };
  27605. const __returned__ = { props: props2, emit: emit2, toggleSelect, handleQuickJump };
  27606. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27607. return __returned__;
  27608. }
  27609. };
  27610. function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
  27611. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27612. return vue.openBlock(), vue.createElementBlock("view", { class: "order-item" }, [
  27613. vue.createElementVNode("view", { class: "order-header" }, [
  27614. vue.createElementVNode("view", { class: "order-info" }, [
  27615. vue.createElementVNode("view", { class: "info-row" }, [
  27616. vue.createElementVNode("text", { class: "label" }, "订单编号:"),
  27617. vue.createElementVNode(
  27618. "text",
  27619. { class: "value" },
  27620. vue.toDisplayString($props.item.orderId),
  27621. 1
  27622. /* TEXT */
  27623. )
  27624. ]),
  27625. vue.createElementVNode("view", { class: "info-row" }, [
  27626. vue.createElementVNode("text", { class: "label" }, "不良数量:"),
  27627. vue.createElementVNode(
  27628. "text",
  27629. { class: "value" },
  27630. vue.toDisplayString($props.item.badNum),
  27631. 1
  27632. /* TEXT */
  27633. )
  27634. ]),
  27635. vue.createElementVNode("view", { class: "info-row" }, [
  27636. vue.createElementVNode("text", { class: "label" }, "物流单号:"),
  27637. vue.createElementVNode(
  27638. "text",
  27639. { class: "value" },
  27640. vue.toDisplayString($props.item.waybillCode),
  27641. 1
  27642. /* TEXT */
  27643. )
  27644. ]),
  27645. vue.createElementVNode("view", { class: "info-row" }, [
  27646. vue.createElementVNode("text", { class: "label" }, "验货完成日期:"),
  27647. vue.createElementVNode(
  27648. "text",
  27649. { class: "value" },
  27650. vue.toDisplayString($props.item.auditFinishTime),
  27651. 1
  27652. /* TEXT */
  27653. )
  27654. ]),
  27655. vue.createElementVNode("view", { class: "info-row" }, [
  27656. vue.createElementVNode("text", { class: "label" }, "录入人:"),
  27657. vue.createElementVNode(
  27658. "text",
  27659. { class: "value" },
  27660. vue.toDisplayString($props.item.auditUserName),
  27661. 1
  27662. /* TEXT */
  27663. )
  27664. ])
  27665. ]),
  27666. $props.isCheck ? (vue.openBlock(), vue.createElementBlock("view", {
  27667. key: 0,
  27668. class: "check-icon"
  27669. }, [
  27670. vue.createVNode(_component_u_icon, {
  27671. name: $props.item.checked ? "checkmark-circle-fill" : "checkmark-circle",
  27672. color: $props.item.checked ? "#19be6b" : "#c8c9cc",
  27673. size: "28",
  27674. onClick: $setup.toggleSelect
  27675. }, null, 8, ["name", "color"])
  27676. ])) : vue.createCommentVNode("v-if", true),
  27677. $props.isLink ? (vue.openBlock(), vue.createElementBlock("view", {
  27678. key: 1,
  27679. class: "flex flex-d flex-a-c flex-j-c quick-jump",
  27680. onClick: $setup.handleQuickJump
  27681. }, [
  27682. vue.createElementVNode("image", {
  27683. src: _imports_0$1,
  27684. mode: "widthFix",
  27685. style: { "width": "30px" }
  27686. }),
  27687. vue.createElementVNode("text", { style: { "font-size": "28rpx", "color": "#19be6b" } }, "快速跳转")
  27688. ])) : vue.createCommentVNode("v-if", true)
  27689. ])
  27690. ]);
  27691. }
  27692. const LocationOrderItem = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__scopeId", "data-v-b4edd1b0"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/components/LocationOrderItem.vue"]]);
  27693. const _sfc_main$w = {
  27694. __name: "location-order-list",
  27695. setup(__props, { expose: __expose }) {
  27696. __expose();
  27697. const orderCode = vue.ref("");
  27698. const originList = vue.ref([]);
  27699. const orderList = vue.ref([]);
  27700. const detail = vue.ref({});
  27701. const getOrderListByPositionCode = (positionCode) => {
  27702. uni.$u.http.get("/app/stock/getOrderByPositionCode?positionCode=" + positionCode).then((res2) => {
  27703. if (res2.code == 200) {
  27704. detail.value = res2.data;
  27705. orderList.value = res2.data.godownStockLogResults;
  27706. originList.value = res2.data.godownStockLogResults;
  27707. if (originList.value.length > 0) {
  27708. uni.$u.ttsModule.speak("查询到" + originList.value.length + "条订单");
  27709. } else {
  27710. uni.$u.toast("暂无订单");
  27711. uni.$u.ttsModule.speak("暂无订单");
  27712. }
  27713. } else {
  27714. uni.$u.toast(res2.msg);
  27715. uni.$u.ttsModule.speak(res2.msg);
  27716. }
  27717. });
  27718. };
  27719. const onSearch = () => {
  27720. if (!orderCode.value) {
  27721. orderList.value = originList.value;
  27722. uni.$u.toast("请输入订单号或物流单号");
  27723. return;
  27724. }
  27725. const searchValue = String(orderCode.value).trim();
  27726. const isNumeric = /^[0-9]+$/.test(searchValue);
  27727. const result = originList.value.filter((item) => {
  27728. if (isNumeric) {
  27729. return item.orderId === orderCode.value;
  27730. } else {
  27731. return item.waybillCode === orderCode.value;
  27732. }
  27733. });
  27734. orderList.value = result;
  27735. };
  27736. function openScan() {
  27737. uni.scanCode({
  27738. success: (res2) => {
  27739. orderCode.value = res2.result;
  27740. onSearch();
  27741. }
  27742. });
  27743. }
  27744. onLoad((options) => {
  27745. if (options.positionCode) {
  27746. getOrderListByPositionCode(options.positionCode);
  27747. }
  27748. uni.$u.useGlobalEvent((e) => {
  27749. if (e.barcode) {
  27750. orderCode.value = res.result;
  27751. onSearch();
  27752. }
  27753. });
  27754. });
  27755. onShow(() => {
  27756. uni.$u.updateActivePageOnShow();
  27757. });
  27758. const __returned__ = { orderCode, originList, orderList, detail, getOrderListByPositionCode, onSearch, openScan, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  27759. return onLoad;
  27760. }, get onShow() {
  27761. return onShow;
  27762. }, LocationOrderItem };
  27763. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27764. return __returned__;
  27765. }
  27766. };
  27767. function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
  27768. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27769. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27770. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27771. vue.createElementVNode("view", { class: "header" }, [
  27772. vue.createElementVNode("view", { class: "flex-d" }, [
  27773. vue.createElementVNode(
  27774. "text",
  27775. null,
  27776. "仓库: " + vue.toDisplayString($setup.detail.godownName),
  27777. 1
  27778. /* TEXT */
  27779. ),
  27780. vue.createElementVNode(
  27781. "text",
  27782. { class: "mt-16" },
  27783. "库位编号: " + vue.toDisplayString($setup.detail.positionCode),
  27784. 1
  27785. /* TEXT */
  27786. ),
  27787. vue.createElementVNode(
  27788. "text",
  27789. { class: "mt-16" },
  27790. "订单数量: " + vue.toDisplayString($setup.originList.length),
  27791. 1
  27792. /* TEXT */
  27793. )
  27794. ])
  27795. ]),
  27796. vue.createElementVNode("view", { class: "product-details" }, [
  27797. (vue.openBlock(true), vue.createElementBlock(
  27798. vue.Fragment,
  27799. null,
  27800. vue.renderList($setup.orderList, (item, index2) => {
  27801. return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
  27802. key: index2,
  27803. item
  27804. }, null, 8, ["item"]);
  27805. }),
  27806. 128
  27807. /* KEYED_FRAGMENT */
  27808. ))
  27809. ]),
  27810. vue.createCommentVNode(" 底部扫码输入框 "),
  27811. vue.createElementVNode("view", {
  27812. class: "fixed-bottom pad-20",
  27813. style: { "background": "#ffffff" }
  27814. }, [
  27815. vue.createVNode(_component_u_search, {
  27816. placeholder: "请输入快递单号/订单编号",
  27817. searchIconSize: 24,
  27818. bgColor: "#f6f7f6",
  27819. onSearch: $setup.onSearch,
  27820. modelValue: $setup.orderCode,
  27821. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.orderCode = $event),
  27822. clearabled: true,
  27823. focus: false,
  27824. showAction: false,
  27825. height: 42
  27826. }, null, 8, ["modelValue"]),
  27827. vue.createVNode(_component_u_icon, {
  27828. name: "scan",
  27829. size: "36",
  27830. color: "#19be6b",
  27831. onClick: $setup.openScan
  27832. })
  27833. ])
  27834. ]);
  27835. }
  27836. const PagesIndexWmsLocationOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$v], ["__scopeId", "data-v-3e424560"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/location-order-list.vue"]]);
  27837. const _sfc_main$v = {
  27838. __name: "location-select",
  27839. setup(__props, { expose: __expose }) {
  27840. __expose();
  27841. const searchText = vue.ref("");
  27842. function playGlobalSound() {
  27843. uni.$u.playClickSound();
  27844. }
  27845. const locations = vue.ref([]);
  27846. function getLocationListByGodownId(godownId2, code2 = "", type2 = "") {
  27847. uni.$u.http.get("/app/stock/getGodownPosition?godownId=" + godownId2 + "&code=" + code2).then((res2) => {
  27848. if (res2.code == 200) {
  27849. locations.value = res2.data;
  27850. if (type2 == "select") {
  27851. setTimeout(() => {
  27852. locations.value.forEach((item) => {
  27853. if (item == code2) {
  27854. selectLocation(item);
  27855. }
  27856. });
  27857. }, 500);
  27858. }
  27859. }
  27860. });
  27861. }
  27862. const scrollHeight = vue.ref(0);
  27863. const onSearch = () => {
  27864. getLocationListByGodownId(godownId.value, searchText.value);
  27865. };
  27866. const openScan = () => {
  27867. uni.scanCode({
  27868. success: (res2) => {
  27869. searchText.value = res2.result;
  27870. onSearch();
  27871. },
  27872. fail: (err) => {
  27873. uni.showToast({
  27874. title: "扫码失败",
  27875. icon: "error"
  27876. });
  27877. }
  27878. });
  27879. };
  27880. const selectLocation = (item) => {
  27881. uni.$emit("updateLocation", item);
  27882. uni.navigateBack();
  27883. };
  27884. const godownId = vue.ref("");
  27885. const positionCode = vue.ref("");
  27886. onLoad((opts) => {
  27887. godownId.value = opts.godownId;
  27888. positionCode.value = opts.positionCode;
  27889. getLocationListByGodownId(godownId.value);
  27890. scrollHeight.value = uni.getSystemInfoSync().windowHeight - 44 - 60;
  27891. uni.$u.useGlobalEvent((e) => {
  27892. if (e.barcode) {
  27893. searchText.value = e.barcode;
  27894. getLocationListByGodownId(godownId.value, e.barcode, "select");
  27895. }
  27896. });
  27897. });
  27898. onShow(() => {
  27899. uni.$u.updateActivePageOnShow();
  27900. });
  27901. const __returned__ = { searchText, playGlobalSound, locations, getLocationListByGodownId, scrollHeight, onSearch, openScan, selectLocation, godownId, positionCode, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, get onLoad() {
  27902. return onLoad;
  27903. }, get onShow() {
  27904. return onShow;
  27905. } };
  27906. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27907. return __returned__;
  27908. }
  27909. };
  27910. function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
  27911. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27912. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27913. return vue.openBlock(), vue.createElementBlock("view", {
  27914. class: "container",
  27915. onClick: $setup.playGlobalSound
  27916. }, [
  27917. vue.createCommentVNode(" 库位列表 "),
  27918. vue.createElementVNode(
  27919. "scroll-view",
  27920. {
  27921. "scroll-y": "",
  27922. class: "location-list",
  27923. style: vue.normalizeStyle({ height: $setup.scrollHeight + "px" })
  27924. },
  27925. [
  27926. (vue.openBlock(true), vue.createElementBlock(
  27927. vue.Fragment,
  27928. null,
  27929. vue.renderList($setup.locations, (item, index2) => {
  27930. return vue.openBlock(), vue.createElementBlock("view", {
  27931. key: index2,
  27932. class: vue.normalizeClass(["location-item", item === $setup.positionCode ? "location-item-selected" : ""]),
  27933. "hover-class": "location-item-hover",
  27934. onClick: ($event) => $setup.selectLocation(item)
  27935. }, [
  27936. vue.createElementVNode(
  27937. "text",
  27938. null,
  27939. vue.toDisplayString(item),
  27940. 1
  27941. /* TEXT */
  27942. )
  27943. ], 10, ["onClick"]);
  27944. }),
  27945. 128
  27946. /* KEYED_FRAGMENT */
  27947. ))
  27948. ],
  27949. 4
  27950. /* STYLE */
  27951. ),
  27952. vue.createCommentVNode(" 底部搜索框 "),
  27953. vue.createElementVNode("view", {
  27954. class: "fixed-bottom pad-20",
  27955. style: { "background": "#ffffff" }
  27956. }, [
  27957. vue.createVNode(_component_u_search, {
  27958. modelValue: $setup.searchText,
  27959. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  27960. placeholder: "请输入库位条码",
  27961. "show-action": false,
  27962. clearabled: true,
  27963. onSearch: $setup.onSearch,
  27964. height: "40",
  27965. onClick: _cache[1] || (_cache[1] = ($event) => $setup.searchText = "")
  27966. }, null, 8, ["modelValue"]),
  27967. vue.createVNode(_component_u_icon, {
  27968. name: "scan",
  27969. size: "28",
  27970. color: "#19be6b",
  27971. onClick: $setup.openScan
  27972. })
  27973. ])
  27974. ]);
  27975. }
  27976. const PagesIndexWmsLocationSelect = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$u], ["__scopeId", "data-v-b26ec186"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/location-select.vue"]]);
  27977. const _sfc_main$u = {
  27978. __name: "warehouse-select",
  27979. setup(__props, { expose: __expose }) {
  27980. __expose();
  27981. function playGlobalSound() {
  27982. uni.$u.playClickSound();
  27983. }
  27984. const searchText = vue.ref("");
  27985. const warehouses = vue.ref([]);
  27986. function getGodownListByName(name = "") {
  27987. uni.$u.http.post("/app/appUser/searchGodown?name=" + name).then((res2) => {
  27988. if (res2.code == 200) {
  27989. warehouses.value = res2.data;
  27990. }
  27991. });
  27992. }
  27993. getGodownListByName();
  27994. const onSearch = () => {
  27995. getGodownListByName(searchText.value);
  27996. };
  27997. const selectWarehouse = (item) => {
  27998. uni.$emit("updateWarehouse", item);
  27999. uni.navigateBack();
  28000. };
  28001. const selectedId = vue.ref();
  28002. onLoad((options) => {
  28003. if (options.godownId) {
  28004. selectedId.value = options.godownId;
  28005. }
  28006. });
  28007. const __returned__ = { playGlobalSound, searchText, warehouses, getGodownListByName, onSearch, selectWarehouse, selectedId, ref: vue.ref, computed: vue.computed, get onLoad() {
  28008. return onLoad;
  28009. } };
  28010. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28011. return __returned__;
  28012. }
  28013. };
  28014. function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
  28015. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  28016. return vue.openBlock(), vue.createElementBlock("view", {
  28017. class: "container",
  28018. onClick: $setup.playGlobalSound
  28019. }, [
  28020. vue.createCommentVNode(" 搜索框 "),
  28021. vue.createElementVNode("view", { class: "search-area" }, [
  28022. vue.createVNode(_component_u_search, {
  28023. modelValue: $setup.searchText,
  28024. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  28025. placeholder: "请输入仓库名称",
  28026. "show-action": false,
  28027. clearabled: true,
  28028. onChange: $setup.onSearch,
  28029. height: "40",
  28030. "placeholder-style": "font-size:16px"
  28031. }, null, 8, ["modelValue"])
  28032. ]),
  28033. vue.createCommentVNode(" 仓库列表 "),
  28034. vue.createElementVNode("view", { class: "warehouse-list" }, [
  28035. (vue.openBlock(true), vue.createElementBlock(
  28036. vue.Fragment,
  28037. null,
  28038. vue.renderList($setup.warehouses, (item, index2) => {
  28039. return vue.openBlock(), vue.createElementBlock("view", {
  28040. key: index2,
  28041. class: vue.normalizeClass(["warehouse-item", { "warehouse-item-active": item.id == $setup.selectedId }]),
  28042. "hover-class": "warehouse-item-hover",
  28043. onClick: ($event) => $setup.selectWarehouse(item)
  28044. }, [
  28045. vue.createElementVNode(
  28046. "text",
  28047. null,
  28048. vue.toDisplayString(index2 + 1) + "." + vue.toDisplayString(item.godownName),
  28049. 1
  28050. /* TEXT */
  28051. )
  28052. ], 10, ["onClick"]);
  28053. }),
  28054. 128
  28055. /* KEYED_FRAGMENT */
  28056. ))
  28057. ])
  28058. ]);
  28059. }
  28060. const PagesIndexWmsWarehouseSelect = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$t], ["__scopeId", "data-v-c3e02812"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/warehouse-select.vue"]]);
  28061. const _sfc_main$t = {
  28062. __name: "speedy-check",
  28063. setup(__props, { expose: __expose }) {
  28064. __expose();
  28065. const goBack = () => {
  28066. uni.navigateBack();
  28067. };
  28068. const showCheckMethodPicker = vue.ref(false);
  28069. const checkMethod = vue.ref("增加数量");
  28070. const resetType = vue.ref(0);
  28071. const checkMethodOptions = ["增加数量", "减少数量", "实际数量"];
  28072. const getUserDefaultWarehouse = () => {
  28073. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
  28074. if (res2.code == 200) {
  28075. getWarehouseLocationList(res2.data.id);
  28076. }
  28077. });
  28078. };
  28079. const location2 = vue.ref("");
  28080. const showLocationPopup = vue.ref(false);
  28081. const locationList = vue.ref([]);
  28082. const selectedLocation = vue.ref("");
  28083. const godownId = vue.ref();
  28084. const getWarehouseLocationList = (id) => {
  28085. godownId.value = id;
  28086. uni.$u.http.get("/app/stock/getGodownPosition?godownId=" + id).then((res2) => {
  28087. if (res2.code == 200) {
  28088. locationList.value = res2.data;
  28089. }
  28090. });
  28091. };
  28092. const searchValue = vue.ref("");
  28093. const products = vue.ref([]);
  28094. const onCheckMethodConfirm = (e) => {
  28095. checkMethod.value = e.value[0];
  28096. showCheckMethodPicker.value = false;
  28097. resetType.value = e.indexs[0] + 1;
  28098. };
  28099. const handleLocationSelect = () => {
  28100. showLocationPopup.value = true;
  28101. selectedLocation.value = location2.value;
  28102. };
  28103. const onLocationConfirm = () => {
  28104. if (selectedLocation.value) {
  28105. location2.value = selectedLocation.value;
  28106. showLocationPopup.value = false;
  28107. selectedLocation.value = "";
  28108. } else {
  28109. uni.$u.toast("请选择库位");
  28110. }
  28111. };
  28112. const selectLocation = (item) => {
  28113. selectedLocation.value = item;
  28114. };
  28115. const onSubmit = () => {
  28116. if (products.value.length === 0) {
  28117. uni.$u.toast("请添加盘点订单");
  28118. return;
  28119. }
  28120. const params = {
  28121. godownId: godownId.value,
  28122. positionCode: location2.value,
  28123. orderInfo: products.value.map((item) => ({
  28124. orderId: item.orderId,
  28125. waybillCode: item.waybillCode,
  28126. bookNum: item.badNum,
  28127. remark: item.remark || ""
  28128. })),
  28129. resetType: resetType.value
  28130. };
  28131. uni.$u.http.post("/app/stock/resetStock", params).then((res2) => {
  28132. if (res2.code === 200) {
  28133. uni.$u.toast("盘点成功");
  28134. location2.value = "";
  28135. products.value = [];
  28136. searchValue.value = "";
  28137. } else {
  28138. uni.$u.toast(res2.msg || "提交失败");
  28139. }
  28140. }).catch((err) => {
  28141. uni.$u.toast("提交失败");
  28142. formatAppLog("error", "at pages/index/wms/speedy-check.vue:229", err);
  28143. });
  28144. };
  28145. const onSearch = () => {
  28146. if (!searchValue.value) {
  28147. uni.$u.toast("请输入快递单号或订单编号");
  28148. return;
  28149. }
  28150. const searchType = /^[0-9]+$/.test(searchValue.value) ? 1 : 2;
  28151. uni.$u.http.get("/app/stock/searchBadOrderForReset", {
  28152. params: {
  28153. searchType,
  28154. search: searchValue.value
  28155. }
  28156. }).then((res2) => {
  28157. if (res2.code === 200) {
  28158. const exists = products.value.some(
  28159. (item) => item.orderId === res2.data.orderId || item.waybillCode === res2.data.waybillCode
  28160. );
  28161. if (exists) {
  28162. uni.$u.toast("该订单已添加");
  28163. return;
  28164. }
  28165. products.value.push(res2.data);
  28166. searchValue.value = "";
  28167. } else {
  28168. uni.$u.toast(res2.msg || "查询失败");
  28169. }
  28170. }).catch((err) => {
  28171. uni.$u.toast("查询失败");
  28172. formatAppLog("error", "at pages/index/wms/speedy-check.vue:271", err);
  28173. });
  28174. };
  28175. const dealScanText = (scanText) => {
  28176. let isLocation = scanText.indexOf("-") > -1 && scanText.length == 9;
  28177. if (isLocation) {
  28178. if (locationList.value.includes(scanText)) {
  28179. location2.value = scanText;
  28180. } else {
  28181. uni.$u.toast("库位不存在");
  28182. }
  28183. } else {
  28184. searchValue.value = scanText;
  28185. onSearch();
  28186. }
  28187. };
  28188. const openScan = () => {
  28189. uni.scanCode({
  28190. success: (res2) => {
  28191. dealScanText(res2.result);
  28192. },
  28193. fail: (err) => {
  28194. uni.showToast({
  28195. title: "扫码失败",
  28196. icon: "error"
  28197. });
  28198. }
  28199. });
  28200. };
  28201. function handleAdd() {
  28202. if (!location2.value) {
  28203. uni.$u.toast("请选择库位");
  28204. return;
  28205. }
  28206. uni.navigateTo({
  28207. url: "/pages/index/wms/speedy-check-add?location=" + location2.value
  28208. });
  28209. }
  28210. const close = () => {
  28211. showLocationPopup.value = false;
  28212. };
  28213. const open2 = () => {
  28214. showLocationPopup.value = true;
  28215. };
  28216. onLoad(() => {
  28217. getUserDefaultWarehouse();
  28218. uni.$on("selectedProducts", (list) => {
  28219. products.value = list;
  28220. });
  28221. uni.$u.useGlobalEvent((e) => {
  28222. if (e.barcode) {
  28223. dealScanText(e.barcode);
  28224. }
  28225. });
  28226. });
  28227. onShow(() => {
  28228. uni.$u.updateActivePageOnShow();
  28229. });
  28230. onUnload(() => {
  28231. uni.$off("selectedProducts");
  28232. });
  28233. 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() {
  28234. return onLoad;
  28235. }, get onUnload() {
  28236. return onUnload;
  28237. }, get onShow() {
  28238. return onShow;
  28239. }, LocationOrderItem };
  28240. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28241. return __returned__;
  28242. }
  28243. };
  28244. function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
  28245. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28246. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  28247. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  28248. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  28249. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$2);
  28250. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$9);
  28251. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  28252. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_7);
  28253. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  28254. const _directive_permission = vue.resolveDirective("permission");
  28255. return vue.openBlock(), vue.createElementBlock("view", {
  28256. class: "container",
  28257. style: { "padding-top": "44px", "padding-bottom": "10px" }
  28258. }, [
  28259. vue.createVNode(_component_u_navbar, {
  28260. title: "快速盘点",
  28261. border: false,
  28262. fixed: "",
  28263. "safe-area-inset-top": "",
  28264. bgColor: "#22ac38",
  28265. titleStyle: "font-size:36rpx;color:#fff"
  28266. }, {
  28267. left: vue.withCtx(() => [
  28268. vue.createVNode(_component_u_icon, {
  28269. name: "arrow-left",
  28270. color: "#fff",
  28271. size: "20",
  28272. onClick: $setup.goBack
  28273. })
  28274. ]),
  28275. right: vue.withCtx(() => [
  28276. vue.withDirectives((vue.openBlock(), vue.createElementBlock("text", {
  28277. style: { "color": "#ffffff" },
  28278. onClick: $setup.onSubmit
  28279. }, [
  28280. vue.createTextVNode("提交")
  28281. ])), [
  28282. [_directive_permission, "app:wms:speedyCheck:confirm"]
  28283. ])
  28284. ]),
  28285. _: 1
  28286. /* STABLE */
  28287. }),
  28288. vue.createCommentVNode(" 盘点信息选择区域 "),
  28289. vue.createElementVNode("view", {
  28290. class: "select-area",
  28291. style: { "margin-top": "44px" }
  28292. }, [
  28293. vue.createVNode(_component_u_cell_group, { border: true }, {
  28294. default: vue.withCtx(() => [
  28295. vue.createVNode(_component_u_cell, {
  28296. title: "盘点方式",
  28297. value: $setup.checkMethod,
  28298. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showCheckMethodPicker = true),
  28299. isLink: true,
  28300. border: true
  28301. }, null, 8, ["value"]),
  28302. vue.createVNode(_component_u_cell, {
  28303. title: "目标库位",
  28304. value: $setup.location,
  28305. onClick: $setup.handleLocationSelect,
  28306. isLink: true,
  28307. border: true
  28308. }, null, 8, ["value"])
  28309. ]),
  28310. _: 1
  28311. /* STABLE */
  28312. })
  28313. ]),
  28314. vue.createCommentVNode(" 盘点方式选择器 "),
  28315. vue.createVNode(_component_u_picker, {
  28316. show: $setup.showCheckMethodPicker,
  28317. columns: [$setup.checkMethodOptions],
  28318. onConfirm: $setup.onCheckMethodConfirm,
  28319. onCancel: _cache[1] || (_cache[1] = ($event) => $setup.showCheckMethodPicker = false),
  28320. showToolbar: true,
  28321. title: "选择盘点方式",
  28322. closeOnClickOverlay: true,
  28323. cancelText: "取消",
  28324. confirmText: "确定",
  28325. itemHeight: 44,
  28326. visibleItemCount: 5
  28327. }, null, 8, ["show", "columns"]),
  28328. vue.createCommentVNode(" 库位选择弹出层 "),
  28329. vue.createVNode(_component_u_popup, {
  28330. show: $setup.showLocationPopup,
  28331. mode: "bottom",
  28332. onClose: $setup.close,
  28333. onOpen: $setup.open,
  28334. closeOnClickOverlay: true,
  28335. round: 10,
  28336. safeAreaInsetBottom: true
  28337. }, {
  28338. default: vue.withCtx(() => [
  28339. vue.createElementVNode("view", { class: "location-popup" }, [
  28340. vue.createElementVNode("view", { class: "location-popup-header" }, [
  28341. vue.createElementVNode("text", { style: { "flex": "1" } }, "选择库位"),
  28342. vue.createVNode(_component_u_text, {
  28343. style: { "width": "40px", "flex": "none" },
  28344. type: "primary",
  28345. text: "确定",
  28346. onClick: $setup.onLocationConfirm
  28347. })
  28348. ]),
  28349. vue.createElementVNode("view", { class: "location-popup-content" }, [
  28350. vue.createVNode(_component_u_input, {
  28351. modelValue: $setup.selectedLocation,
  28352. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.selectedLocation = $event),
  28353. placeholder: "请输入库位",
  28354. customStyle: "background-color: #f6f6f6; border-radius: 4px;"
  28355. }, null, 8, ["modelValue"]),
  28356. vue.createElementVNode("view", { class: "location-list" }, [
  28357. (vue.openBlock(true), vue.createElementBlock(
  28358. vue.Fragment,
  28359. null,
  28360. vue.renderList($setup.locationList, (item, index2) => {
  28361. return vue.openBlock(), vue.createElementBlock("view", {
  28362. class: vue.normalizeClass(["location-item", { "location-item--selected": $setup.selectedLocation === item }]),
  28363. key: index2,
  28364. onClick: ($event) => $setup.selectLocation(item)
  28365. }, [
  28366. vue.createElementVNode(
  28367. "text",
  28368. null,
  28369. vue.toDisplayString(item),
  28370. 1
  28371. /* TEXT */
  28372. ),
  28373. $setup.selectedLocation === item ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  28374. key: 0,
  28375. name: "checkmark",
  28376. color: "#19be6b",
  28377. size: "16"
  28378. })) : vue.createCommentVNode("v-if", true)
  28379. ], 10, ["onClick"]);
  28380. }),
  28381. 128
  28382. /* KEYED_FRAGMENT */
  28383. ))
  28384. ])
  28385. ])
  28386. ])
  28387. ]),
  28388. _: 1
  28389. /* STABLE */
  28390. }, 8, ["show"]),
  28391. vue.createCommentVNode(" 订单列表 "),
  28392. vue.createElementVNode("view", { class: "product-details" }, [
  28393. (vue.openBlock(true), vue.createElementBlock(
  28394. vue.Fragment,
  28395. null,
  28396. vue.renderList($setup.products, (item, index2) => {
  28397. return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
  28398. isLink: _ctx.isLink,
  28399. key: index2,
  28400. item
  28401. }, null, 8, ["isLink", "item"]);
  28402. }),
  28403. 128
  28404. /* KEYED_FRAGMENT */
  28405. ))
  28406. ]),
  28407. vue.createElementVNode("view", {
  28408. class: "add-btn",
  28409. onClick: $setup.handleAdd
  28410. }, [
  28411. vue.createVNode(_component_u_icon, {
  28412. name: "plus-circle",
  28413. size: "40",
  28414. color: "#19be6b"
  28415. })
  28416. ]),
  28417. vue.createCommentVNode(" 底部扫码输入框 "),
  28418. vue.createElementVNode("view", {
  28419. class: "fixed-bottom pad-20",
  28420. style: { "background": "#ffffff" }
  28421. }, [
  28422. vue.createVNode(_component_u_search, {
  28423. placeholder: "请输入快递单号/订单编号",
  28424. modelValue: $setup.searchValue,
  28425. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.searchValue = $event),
  28426. onSearch: $setup.onSearch,
  28427. "show-action": false,
  28428. "custom-style": "margin-right:10px"
  28429. }, null, 8, ["modelValue"]),
  28430. vue.createVNode(_component_u_icon, {
  28431. name: "scan",
  28432. size: "28",
  28433. color: "#19be6b",
  28434. onClick: $setup.openScan
  28435. })
  28436. ])
  28437. ]);
  28438. }
  28439. const PagesIndexWmsSpeedyCheck = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__scopeId", "data-v-283ebe02"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/speedy-check.vue"]]);
  28440. const _sfc_main$s = {
  28441. __name: "BookItemOrder",
  28442. props: {
  28443. book: Object,
  28444. index: Number
  28445. },
  28446. emits: ["remove"],
  28447. setup(__props, { expose: __expose, emit: __emit }) {
  28448. __expose();
  28449. const props2 = __props;
  28450. const emit2 = __emit;
  28451. const removeBook = () => {
  28452. emit2("remove", { book: props2.book, index: props2.index });
  28453. };
  28454. const __returned__ = { props: props2, emit: emit2, removeBook };
  28455. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28456. return __returned__;
  28457. }
  28458. };
  28459. function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
  28460. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28461. return vue.openBlock(), vue.createElementBlock("view", { class: "book-item" }, [
  28462. vue.createElementVNode("image", {
  28463. class: "book-image",
  28464. src: $props.book.cover,
  28465. mode: "aspectFill"
  28466. }, null, 8, ["src"]),
  28467. vue.createElementVNode("view", { class: "book-info" }, [
  28468. vue.createElementVNode("view", { class: "book-title" }, [
  28469. vue.createElementVNode(
  28470. "text",
  28471. null,
  28472. vue.toDisplayString($props.book.bookName),
  28473. 1
  28474. /* TEXT */
  28475. ),
  28476. vue.createVNode(_component_u_icon, {
  28477. name: "close",
  28478. size: "18",
  28479. onClick: $setup.removeBook
  28480. })
  28481. ]),
  28482. vue.createElementVNode("view", { class: "flex-a flex-1" }, [
  28483. vue.createElementVNode("view", { class: "book-details flex-d" }, [
  28484. vue.createElementVNode(
  28485. "text",
  28486. null,
  28487. "ISBN: " + vue.toDisplayString($props.book.isbn),
  28488. 1
  28489. /* TEXT */
  28490. ),
  28491. vue.createElementVNode(
  28492. "text",
  28493. null,
  28494. "定价: " + vue.toDisplayString($props.book.price),
  28495. 1
  28496. /* TEXT */
  28497. ),
  28498. vue.createElementVNode(
  28499. "text",
  28500. null,
  28501. "折扣: " + vue.toDisplayString($props.book.recycleDiscount),
  28502. 1
  28503. /* TEXT */
  28504. )
  28505. ]),
  28506. vue.createElementVNode("view", { class: "book-stats flex-d ml-20" }, [
  28507. vue.createElementVNode(
  28508. "text",
  28509. null,
  28510. "数量: " + vue.toDisplayString($props.book.quantity),
  28511. 1
  28512. /* TEXT */
  28513. ),
  28514. vue.createElementVNode(
  28515. "text",
  28516. null,
  28517. "预估单价: " + vue.toDisplayString($props.book.expectPrice),
  28518. 1
  28519. /* TEXT */
  28520. ),
  28521. vue.createElementVNode(
  28522. "text",
  28523. { style: { "color": "#ff0000" } },
  28524. "审核金额: " + vue.toDisplayString($props.book.auditPrice),
  28525. 1
  28526. /* TEXT */
  28527. )
  28528. ])
  28529. ])
  28530. ])
  28531. ]);
  28532. }
  28533. const BookItem = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$r], ["__scopeId", "data-v-97928f7a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/components/BookItemOrder.vue"]]);
  28534. const _sfc_main$r = {
  28535. __name: "check-order",
  28536. setup(__props, { expose: __expose }) {
  28537. __expose();
  28538. const bookList = vue.ref([]);
  28539. const totalBooks = vue.computed(() => bookList.value.reduce((sum, book) => sum + parseFloat(book.quantity), 0));
  28540. const totalPrice = vue.computed(() => bookList.value.reduce((sum, book) => sum + parseFloat(book.auditPrice), 0).toFixed(2));
  28541. const removeBook = ({ book, index: index2 }) => {
  28542. bookList.value.splice(index2, 1);
  28543. };
  28544. const handleSubmit = () => {
  28545. if (bookList.value.length === 0) {
  28546. uni.$u.toast("请先添加书籍");
  28547. return;
  28548. }
  28549. uni.$u.http.post("/app/offlineorder/submitOfflineOrder", bookList.value).then((res2) => {
  28550. if (res2.code == 200) {
  28551. uni.$u.toast("提交成功");
  28552. bookList.value.length = 0;
  28553. }
  28554. });
  28555. };
  28556. const handleScan = () => {
  28557. uni.scanCode({
  28558. success: (res2) => {
  28559. handleBarcode(res2.result);
  28560. formatAppLog("log", "at pages/index/offline/check-order.vue:52", "扫码结果:", res2.result);
  28561. },
  28562. fail: (res2) => {
  28563. formatAppLog("log", "at pages/index/offline/check-order.vue:56", "扫码失败:", res2);
  28564. uni.$u.toast("扫码失败");
  28565. }
  28566. });
  28567. };
  28568. const handleBarcode = (barcode) => {
  28569. formatAppLog("log", "at pages/index/offline/check-order.vue:63", "扫码结果:", barcode);
  28570. uni.$u.http.get(`/app/offlineorder/getBookInfo/${barcode}`).then((res2) => {
  28571. if (res2.code == 200) {
  28572. res2.data.quantity = 1;
  28573. let item = bookList.value.find((item2) => item2.isbn === res2.data.isbn);
  28574. if (item) {
  28575. item.quantity += 1;
  28576. item.auditPrice = (item.expectPrice * item.quantity).toFixed(2);
  28577. return;
  28578. } else {
  28579. res2.data.auditPrice = (res2.data.expectPrice * res2.data.quantity).toFixed(2);
  28580. bookList.value.push(res2.data);
  28581. }
  28582. }
  28583. });
  28584. };
  28585. onLoad(() => {
  28586. uni.$u.useGlobalEvent((e) => {
  28587. handleBarcode(e.barcode);
  28588. });
  28589. });
  28590. onShow(() => {
  28591. uni.$u.updateActivePageOnShow();
  28592. });
  28593. const __returned__ = { bookList, totalBooks, totalPrice, removeBook, handleSubmit, handleScan, handleBarcode, ref: vue.ref, computed: vue.computed, get onLoad() {
  28594. return onLoad;
  28595. }, get onShow() {
  28596. return onShow;
  28597. }, BookItem };
  28598. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28599. return __returned__;
  28600. }
  28601. };
  28602. function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
  28603. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  28604. const _directive_permission = vue.resolveDirective("permission");
  28605. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  28606. vue.createElementVNode("view", { class: "book-list" }, [
  28607. (vue.openBlock(true), vue.createElementBlock(
  28608. vue.Fragment,
  28609. null,
  28610. vue.renderList($setup.bookList, (book, index2) => {
  28611. return vue.openBlock(), vue.createBlock($setup["BookItem"], {
  28612. key: index2,
  28613. book,
  28614. onRemove: $setup.removeBook
  28615. }, null, 8, ["book"]);
  28616. }),
  28617. 128
  28618. /* KEYED_FRAGMENT */
  28619. ))
  28620. ]),
  28621. vue.createCommentVNode(" 底部信息和按钮 "),
  28622. vue.createElementVNode("view", {
  28623. class: "footer fixed-bottom flex-d",
  28624. style: { "padding-top": "10rpx" }
  28625. }, [
  28626. $setup.bookList.length > 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  28627. key: 0,
  28628. class: "pad-10"
  28629. }, [
  28630. vue.createTextVNode("共 "),
  28631. vue.createElementVNode(
  28632. "text",
  28633. { style: { "color": "#ff0000" } },
  28634. vue.toDisplayString($setup.totalBooks),
  28635. 1
  28636. /* TEXT */
  28637. ),
  28638. vue.createTextVNode(" 本,预估回收价 "),
  28639. vue.createElementVNode(
  28640. "text",
  28641. { style: { "color": "#ff0000" } },
  28642. "¥" + vue.toDisplayString($setup.totalPrice),
  28643. 1
  28644. /* TEXT */
  28645. )
  28646. ])) : vue.createCommentVNode("v-if", true),
  28647. vue.createElementVNode("view", { class: "flex-a mt-12" }, [
  28648. vue.withDirectives(vue.createVNode(
  28649. _component_u_button,
  28650. {
  28651. size: "large",
  28652. type: "primary",
  28653. text: "提交",
  28654. onClick: $setup.handleSubmit
  28655. },
  28656. null,
  28657. 512
  28658. /* NEED_PATCH */
  28659. ), [
  28660. [_directive_permission, "app:offline:checkOrder:confirm"]
  28661. ]),
  28662. vue.createVNode(_component_u_button, {
  28663. size: "large",
  28664. type: "warning",
  28665. text: "扫码",
  28666. onClick: $setup.handleScan
  28667. })
  28668. ])
  28669. ])
  28670. ]);
  28671. }
  28672. const PagesIndexOfflineCheckOrder = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__scopeId", "data-v-8fea8cdb"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/offline/check-order.vue"]]);
  28673. const _sfc_main$q = {
  28674. __name: "check-record",
  28675. setup(__props, { expose: __expose }) {
  28676. __expose();
  28677. const scrollRef = vue.ref(null);
  28678. const refreshList = () => {
  28679. var _a;
  28680. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  28681. };
  28682. let dataList = vue.ref([]);
  28683. const updateList = (data) => {
  28684. dataList.value = data;
  28685. };
  28686. const __returned__ = { scrollRef, refreshList, get dataList() {
  28687. return dataList;
  28688. }, set dataList(v) {
  28689. dataList = v;
  28690. }, updateList, PageScroll: pageScroll, ref: vue.ref };
  28691. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28692. return __returned__;
  28693. }
  28694. };
  28695. function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
  28696. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  28697. return vue.openBlock(), vue.createElementBlock("view", {
  28698. class: "common-page",
  28699. style: { "padding": "0" }
  28700. }, [
  28701. vue.createVNode(
  28702. $setup["PageScroll"],
  28703. {
  28704. requestStr: "/app/offlineorder/getUserStat",
  28705. onUpdateList: $setup.updateList,
  28706. ref: "scrollRef"
  28707. },
  28708. {
  28709. default: vue.withCtx(() => [
  28710. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  28711. default: vue.withCtx(() => [
  28712. vue.createElementVNode("view", { class: "search-area flex-a" }, [
  28713. vue.createElementVNode("view", { class: "text-item flex-1" }, "核单时间"),
  28714. vue.createElementVNode("view", { class: "text-item flex-1" }, "核单数量"),
  28715. vue.createElementVNode("view", { class: "text-item flex-1" }, "核单本数"),
  28716. vue.createElementVNode("view", { class: "text-item flex-1" }, "预估金额")
  28717. ])
  28718. ]),
  28719. _: 1
  28720. /* STABLE */
  28721. }),
  28722. vue.createElementVNode("view", { class: "list-con" }, [
  28723. (vue.openBlock(true), vue.createElementBlock(
  28724. vue.Fragment,
  28725. null,
  28726. vue.renderList($setup.dataList, (item, index2) => {
  28727. return vue.openBlock(), vue.createElementBlock("view", {
  28728. key: index2,
  28729. class: "flex-a"
  28730. }, [
  28731. vue.createElementVNode(
  28732. "view",
  28733. { class: "text-item flex-1" },
  28734. vue.toDisplayString(item.statDate),
  28735. 1
  28736. /* TEXT */
  28737. ),
  28738. vue.createElementVNode(
  28739. "view",
  28740. { class: "text-item flex-1" },
  28741. vue.toDisplayString(item.totalNum),
  28742. 1
  28743. /* TEXT */
  28744. ),
  28745. vue.createElementVNode(
  28746. "view",
  28747. { class: "text-item flex-1" },
  28748. vue.toDisplayString(item.bookNum),
  28749. 1
  28750. /* TEXT */
  28751. ),
  28752. vue.createElementVNode(
  28753. "view",
  28754. { class: "text-item flex-1" },
  28755. vue.toDisplayString(item.expectAmount),
  28756. 1
  28757. /* TEXT */
  28758. )
  28759. ]);
  28760. }),
  28761. 128
  28762. /* KEYED_FRAGMENT */
  28763. ))
  28764. ])
  28765. ]),
  28766. _: 1
  28767. /* STABLE */
  28768. },
  28769. 512
  28770. /* NEED_PATCH */
  28771. )
  28772. ]);
  28773. }
  28774. const PagesIndexOfflineCheckRecord = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/offline/check-record.vue"]]);
  28775. const props$3 = {
  28776. props: {
  28777. // 内置图标名称,或图片路径,建议绝对路径
  28778. icon: {
  28779. type: String,
  28780. default: props$E.empty.icon
  28781. },
  28782. // 提示文字
  28783. text: {
  28784. type: String,
  28785. default: props$E.empty.text
  28786. },
  28787. // 文字颜色
  28788. textColor: {
  28789. type: String,
  28790. default: props$E.empty.textColor
  28791. },
  28792. // 文字大小
  28793. textSize: {
  28794. type: [String, Number],
  28795. default: props$E.empty.textSize
  28796. },
  28797. // 图标的颜色
  28798. iconColor: {
  28799. type: String,
  28800. default: props$E.empty.iconColor
  28801. },
  28802. // 图标的大小
  28803. iconSize: {
  28804. type: [String, Number],
  28805. default: props$E.empty.iconSize
  28806. },
  28807. // 选择预置的图标类型
  28808. mode: {
  28809. type: String,
  28810. default: props$E.empty.mode
  28811. },
  28812. // 图标宽度,单位px
  28813. width: {
  28814. type: [String, Number],
  28815. default: props$E.empty.width
  28816. },
  28817. // 图标高度,单位px
  28818. height: {
  28819. type: [String, Number],
  28820. default: props$E.empty.height
  28821. },
  28822. // 是否显示组件
  28823. show: {
  28824. type: Boolean,
  28825. default: props$E.empty.show
  28826. },
  28827. // 组件距离上一个元素之间的距离,默认px单位
  28828. marginTop: {
  28829. type: [String, Number],
  28830. default: props$E.empty.marginTop
  28831. }
  28832. }
  28833. };
  28834. const _sfc_main$p = {
  28835. name: "u-empty",
  28836. mixins: [mpMixin, mixin, props$3],
  28837. data() {
  28838. return {
  28839. icons: {
  28840. car: "购物车为空",
  28841. page: "页面不存在",
  28842. search: "没有搜索结果",
  28843. address: "没有收货地址",
  28844. wifi: "没有WiFi",
  28845. order: "订单为空",
  28846. coupon: "没有优惠券",
  28847. favor: "暂无收藏",
  28848. permission: "无权限",
  28849. history: "无历史记录",
  28850. news: "无新闻列表",
  28851. message: "消息列表为空",
  28852. list: "列表为空",
  28853. data: "数据为空",
  28854. comment: "暂无评论"
  28855. }
  28856. };
  28857. },
  28858. computed: {
  28859. // 组件样式
  28860. emptyStyle() {
  28861. const style = {};
  28862. style.marginTop = uni.$u.addUnit(this.marginTop);
  28863. return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style);
  28864. },
  28865. // 文本样式
  28866. textStyle() {
  28867. const style = {};
  28868. style.color = this.textColor;
  28869. style.fontSize = uni.$u.addUnit(this.textSize);
  28870. return style;
  28871. },
  28872. // 判断icon是否图片路径
  28873. isSrc() {
  28874. return this.icon.indexOf("/") >= 0;
  28875. }
  28876. }
  28877. };
  28878. function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
  28879. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28880. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  28881. "view",
  28882. {
  28883. key: 0,
  28884. class: "u-empty",
  28885. style: vue.normalizeStyle([$options.emptyStyle])
  28886. },
  28887. [
  28888. !$options.isSrc ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  28889. key: 0,
  28890. name: _ctx.mode === "message" ? "chat" : `empty-${_ctx.mode}`,
  28891. size: _ctx.iconSize,
  28892. color: _ctx.iconColor,
  28893. "margin-top": "14"
  28894. }, null, 8, ["name", "size", "color"])) : (vue.openBlock(), vue.createElementBlock("image", {
  28895. key: 1,
  28896. style: vue.normalizeStyle({
  28897. width: _ctx.$u.addUnit(_ctx.width),
  28898. height: _ctx.$u.addUnit(_ctx.height)
  28899. }),
  28900. src: _ctx.icon,
  28901. mode: "widthFix"
  28902. }, null, 12, ["src"])),
  28903. vue.createElementVNode(
  28904. "text",
  28905. {
  28906. class: "u-empty__text",
  28907. style: vue.normalizeStyle([$options.textStyle])
  28908. },
  28909. vue.toDisplayString(_ctx.text ? _ctx.text : $data.icons[_ctx.mode]),
  28910. 5
  28911. /* TEXT, STYLE */
  28912. ),
  28913. _ctx.$slots.default || _ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock("view", {
  28914. key: 2,
  28915. class: "u-empty__wrap"
  28916. }, [
  28917. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  28918. ])) : vue.createCommentVNode("v-if", true)
  28919. ],
  28920. 4
  28921. /* STYLE */
  28922. )) : vue.createCommentVNode("v-if", true);
  28923. }
  28924. const __easycom_3$1 = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__scopeId", "data-v-8dd5928e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-empty/u-empty.vue"]]);
  28925. const _sfc_main$o = {
  28926. __name: "scan-book",
  28927. setup(__props, { expose: __expose }) {
  28928. __expose();
  28929. const searchValue = vue.ref("");
  28930. const scannedISBN = vue.ref("");
  28931. const currentTab = vue.ref(0);
  28932. const tabsList = [
  28933. {
  28934. name: "简介"
  28935. },
  28936. {
  28937. name: "轨迹"
  28938. }
  28939. ];
  28940. const bookInfo = vue.ref(null);
  28941. const handleSearch = () => {
  28942. if (!searchValue.value)
  28943. return;
  28944. loadBookInfo(searchValue.value);
  28945. };
  28946. const handleScan = () => {
  28947. uni.scanCode({
  28948. success: (res2) => {
  28949. searchValue.value = res2.result;
  28950. scannedISBN.value = res2.result;
  28951. loadBookInfo(res2.result);
  28952. }
  28953. });
  28954. };
  28955. const loadBookInfo = (isbn) => {
  28956. uni.$u.http.get(`/app/book/getBookByIsbn/${isbn}`).then((res2) => {
  28957. if (res2.code == 200) {
  28958. bookInfo.value = res2.data;
  28959. }
  28960. });
  28961. };
  28962. onLoad(() => {
  28963. uni.$u.useGlobalEvent((e) => {
  28964. searchValue.value = e.barcode;
  28965. scannedISBN.value = e.barcode;
  28966. loadBookInfo(e.barcode);
  28967. });
  28968. });
  28969. onShow(() => {
  28970. uni.$u.updateActivePageOnShow();
  28971. });
  28972. const __returned__ = { searchValue, scannedISBN, currentTab, tabsList, bookInfo, handleSearch, handleScan, loadBookInfo, ref: vue.ref, get onLoad() {
  28973. return onLoad;
  28974. }, get onShow() {
  28975. return onShow;
  28976. } };
  28977. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28978. return __returned__;
  28979. }
  28980. };
  28981. function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
  28982. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28983. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  28984. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  28985. const _component_u_empty = resolveEasycom(vue.resolveDynamicComponent("u-empty"), __easycom_3$1);
  28986. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_4$1);
  28987. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  28988. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  28989. vue.createCommentVNode(" 顶部搜索框 "),
  28990. vue.createVNode(_component_u_sticky, null, {
  28991. default: vue.withCtx(() => [
  28992. vue.createElementVNode("view", { class: "search-area" }, [
  28993. vue.createVNode(_component_u_search, {
  28994. modelValue: $setup.searchValue,
  28995. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.searchValue = $event),
  28996. placeholder: "扫描/输入ISBN或SH码",
  28997. "show-action": true,
  28998. actionText: "查询",
  28999. onSearch: $setup.handleSearch,
  29000. onCustom: $setup.handleSearch
  29001. }, {
  29002. suffixIcon: vue.withCtx(() => [
  29003. $setup.searchValue ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  29004. key: 0,
  29005. name: "close",
  29006. size: "20",
  29007. onClick: _cache[0] || (_cache[0] = ($event) => $setup.searchValue = "")
  29008. })) : vue.createCommentVNode("v-if", true)
  29009. ]),
  29010. _: 1
  29011. /* STABLE */
  29012. }, 8, ["modelValue"])
  29013. ])
  29014. ]),
  29015. _: 1
  29016. /* STABLE */
  29017. }),
  29018. vue.createCommentVNode(" 已扫描ISBN显示 "),
  29019. $setup.scannedISBN ? (vue.openBlock(), vue.createElementBlock("view", {
  29020. key: 0,
  29021. class: "isbn-display"
  29022. }, [
  29023. vue.createElementVNode(
  29024. "text",
  29025. null,
  29026. "已查询ISBN:" + vue.toDisplayString($setup.scannedISBN),
  29027. 1
  29028. /* TEXT */
  29029. )
  29030. ])) : vue.createCommentVNode("v-if", true),
  29031. vue.createCommentVNode(" 内容区域 "),
  29032. vue.createElementVNode("view", { class: "content" }, [
  29033. vue.createCommentVNode(" 空状态 "),
  29034. !$setup.bookInfo ? (vue.openBlock(), vue.createElementBlock("view", {
  29035. key: 0,
  29036. class: "empty-state"
  29037. }, [
  29038. vue.createVNode(_component_u_empty, {
  29039. mode: "data",
  29040. text: "暂无扫描数据",
  29041. "margin-top": "100"
  29042. })
  29043. ])) : (vue.openBlock(), vue.createElementBlock(
  29044. vue.Fragment,
  29045. { key: 1 },
  29046. [
  29047. vue.createCommentVNode(" 书籍详情 "),
  29048. vue.createElementVNode("view", { class: "book-detail" }, [
  29049. vue.createElementVNode("view", { class: "common-card mb-20" }, [
  29050. vue.createElementVNode("view", { class: "flex flex-d flex-a-c" }, [
  29051. vue.createElementVNode("image", {
  29052. class: "book-image",
  29053. src: $setup.bookInfo.cover,
  29054. mode: "heightFix"
  29055. }, null, 8, ["src"]),
  29056. vue.createElementVNode(
  29057. "text",
  29058. { class: "ml-20 font-15" },
  29059. vue.toDisplayString($setup.bookInfo.bookName),
  29060. 1
  29061. /* TEXT */
  29062. )
  29063. ]),
  29064. vue.createElementVNode("view", { class: "book-status" }, [
  29065. vue.createElementVNode(
  29066. "text",
  29067. { class: "status-text" },
  29068. "状态:" + vue.toDisplayString($setup.bookInfo.recycleStatus ? "已加入回收书单" : "未加入回收书单"),
  29069. 1
  29070. /* TEXT */
  29071. ),
  29072. $setup.bookInfo.recycleTime ? (vue.openBlock(), vue.createElementBlock(
  29073. "text",
  29074. {
  29075. key: 0,
  29076. class: "time-text"
  29077. },
  29078. "加入时间:" + vue.toDisplayString($setup.bookInfo.recycleTime),
  29079. 1
  29080. /* TEXT */
  29081. )) : vue.createCommentVNode("v-if", true)
  29082. ])
  29083. ]),
  29084. vue.createCommentVNode(" 基本信息 "),
  29085. vue.createElementVNode("view", { class: "common-card info-section mb-20" }, [
  29086. vue.createElementVNode("view", { class: "price-info" }, [
  29087. vue.createElementVNode("text", { class: "label" }, "定价:"),
  29088. vue.createElementVNode(
  29089. "text",
  29090. { class: "price" },
  29091. "¥" + vue.toDisplayString($setup.bookInfo.price),
  29092. 1
  29093. /* TEXT */
  29094. ),
  29095. vue.createElementVNode(
  29096. "text",
  29097. { class: "recycle-price" },
  29098. "回收价:¥" + vue.toDisplayString($setup.bookInfo.expectPrice),
  29099. 1
  29100. /* TEXT */
  29101. )
  29102. ]),
  29103. vue.createElementVNode("view", { class: "book-info" }, [
  29104. vue.createElementVNode("view", { class: "info-item" }, [
  29105. vue.createElementVNode("text", { class: "label" }, "ISBN:"),
  29106. vue.createElementVNode(
  29107. "text",
  29108. null,
  29109. vue.toDisplayString($setup.bookInfo.isbn),
  29110. 1
  29111. /* TEXT */
  29112. )
  29113. ]),
  29114. vue.createElementVNode("view", { class: "info-item" }, [
  29115. vue.createElementVNode("text", { class: "label" }, "语言:"),
  29116. vue.createElementVNode(
  29117. "text",
  29118. null,
  29119. vue.toDisplayString($setup.bookInfo.lang || "-"),
  29120. 1
  29121. /* TEXT */
  29122. )
  29123. ]),
  29124. vue.createElementVNode("view", { class: "info-item" }, [
  29125. vue.createElementVNode("text", { class: "label" }, "作者:"),
  29126. vue.createElementVNode(
  29127. "text",
  29128. null,
  29129. vue.toDisplayString($setup.bookInfo.author),
  29130. 1
  29131. /* TEXT */
  29132. )
  29133. ]),
  29134. vue.createElementVNode("view", { class: "info-item" }, [
  29135. vue.createElementVNode("text", { class: "label" }, "出版社:"),
  29136. vue.createElementVNode(
  29137. "text",
  29138. null,
  29139. vue.toDisplayString($setup.bookInfo.publish),
  29140. 1
  29141. /* TEXT */
  29142. )
  29143. ]),
  29144. vue.createElementVNode("view", { class: "info-item" }, [
  29145. vue.createElementVNode("text", { class: "label" }, "出版时间:"),
  29146. vue.createElementVNode(
  29147. "text",
  29148. null,
  29149. vue.toDisplayString($setup.bookInfo.pubDate),
  29150. 1
  29151. /* TEXT */
  29152. )
  29153. ])
  29154. ])
  29155. ]),
  29156. vue.createCommentVNode(" 简介和轨迹 "),
  29157. vue.createElementVNode("view", {
  29158. class: "common-card tabs-section",
  29159. style: { "padding": "0" }
  29160. }, [
  29161. vue.createVNode(_component_u_tabs, {
  29162. list: $setup.tabsList,
  29163. modelValue: $setup.currentTab,
  29164. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.currentTab = $event),
  29165. lineColor: "#19be6b"
  29166. }, null, 8, ["modelValue"]),
  29167. vue.createElementVNode("view", { class: "tab-content" }, [
  29168. $setup.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  29169. key: 0,
  29170. class: "intro-content"
  29171. }, [
  29172. vue.createElementVNode("text", { class: "section-title" }, "内容简介:"),
  29173. vue.createElementVNode(
  29174. "text",
  29175. { class: "content-text" },
  29176. vue.toDisplayString($setup.bookInfo.contentBlurb),
  29177. 1
  29178. /* TEXT */
  29179. ),
  29180. vue.createElementVNode("text", { class: "section-title" }, "作者简介:"),
  29181. vue.createElementVNode(
  29182. "text",
  29183. { class: "content-text" },
  29184. vue.toDisplayString($setup.bookInfo.anthorBlurb),
  29185. 1
  29186. /* TEXT */
  29187. ),
  29188. vue.createElementVNode(
  29189. "text",
  29190. { class: "content-text" },
  29191. vue.toDisplayString($setup.bookInfo.catalog),
  29192. 1
  29193. /* TEXT */
  29194. )
  29195. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  29196. key: 1,
  29197. class: "track-content"
  29198. }, [
  29199. vue.createElementVNode(
  29200. "text",
  29201. null,
  29202. vue.toDisplayString($setup.bookInfo.track),
  29203. 1
  29204. /* TEXT */
  29205. )
  29206. ]))
  29207. ])
  29208. ])
  29209. ])
  29210. ],
  29211. 2112
  29212. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  29213. ))
  29214. ]),
  29215. vue.createCommentVNode(" 底部扫描按钮 "),
  29216. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  29217. vue.createVNode(_component_u_button, {
  29218. size: "large",
  29219. type: "primary",
  29220. text: "扫码(ISBN或SH码)",
  29221. onClick: $setup.handleScan
  29222. })
  29223. ])
  29224. ]);
  29225. }
  29226. const PagesIndexEntryScanBook = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$n], ["__scopeId", "data-v-04d3117d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/entry/scan-book.vue"]]);
  29227. const _sfc_main$n = {
  29228. __name: "book-weight",
  29229. setup(__props, { expose: __expose }) {
  29230. __expose();
  29231. const customStyle = {
  29232. height: "100rpx",
  29233. fontSize: "32rpx"
  29234. };
  29235. const labelStyle = {
  29236. fontSize: "32rpx"
  29237. };
  29238. const placeholderStyle2 = vue.ref("fontSize: 32rpx");
  29239. const form = vue.ref({
  29240. weight: "",
  29241. isbn: ""
  29242. });
  29243. const rules2 = {
  29244. weight: [
  29245. {
  29246. required: true,
  29247. message: "请输入重量",
  29248. trigger: "blur"
  29249. },
  29250. {
  29251. type: "number",
  29252. message: "重量必须是数字",
  29253. trigger: "blur"
  29254. }
  29255. ],
  29256. isbn: [{
  29257. required: true,
  29258. message: "请输入ISBN",
  29259. trigger: "blur"
  29260. }]
  29261. };
  29262. function handleScan() {
  29263. uni.scanCode({
  29264. success: (res2) => {
  29265. form.value.isbn = res2.result;
  29266. }
  29267. });
  29268. }
  29269. const formRef = vue.ref(null);
  29270. const submitForm = () => {
  29271. formRef.value.validate().then((valid) => {
  29272. if (valid) {
  29273. uni.$u.http.post("/app/weighChangeLog/add", form.value).then((res2) => {
  29274. if (res2.code == 200) {
  29275. uni.$u.toast("修改成功");
  29276. form.value.isbn = "";
  29277. form.value.weight = "";
  29278. } else {
  29279. uni.$u.toast(res2.msg);
  29280. }
  29281. });
  29282. }
  29283. });
  29284. };
  29285. onLoad(() => {
  29286. uni.$u.useGlobalEvent((e) => {
  29287. form.value.isbn = e.barcode;
  29288. });
  29289. });
  29290. onShow(() => {
  29291. uni.$u.updateActivePageOnShow();
  29292. });
  29293. const __returned__ = { customStyle, labelStyle, placeholderStyle: placeholderStyle2, form, rules: rules2, handleScan, formRef, submitForm, ref: vue.ref, get onLoad() {
  29294. return onLoad;
  29295. }, get onShow() {
  29296. return onShow;
  29297. } };
  29298. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29299. return __returned__;
  29300. }
  29301. };
  29302. function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
  29303. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  29304. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  29305. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$6);
  29306. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  29307. const _directive_permission = vue.resolveDirective("permission");
  29308. return vue.openBlock(), vue.createElementBlock("view", { class: "common-page" }, [
  29309. vue.createVNode(_component_u_form, {
  29310. model: $setup.form,
  29311. rules: $setup.rules,
  29312. ref: "formRef",
  29313. labelWidth: "90px",
  29314. errorType: "toast",
  29315. labelStyle: $setup.labelStyle
  29316. }, {
  29317. default: vue.withCtx(() => [
  29318. vue.createVNode(_component_u_form_item, {
  29319. label: "重量(克)",
  29320. prop: "weight",
  29321. required: ""
  29322. }, {
  29323. default: vue.withCtx(() => [
  29324. vue.createVNode(_component_u_input, {
  29325. placeholderStyle: $setup.placeholderStyle,
  29326. customStyle: $setup.customStyle,
  29327. modelValue: $setup.form.weight,
  29328. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.weight = $event),
  29329. placeholder: "请输入数值",
  29330. clearable: ""
  29331. }, null, 8, ["placeholderStyle", "modelValue"])
  29332. ]),
  29333. _: 1
  29334. /* STABLE */
  29335. }),
  29336. vue.createVNode(_component_u_form_item, {
  29337. label: "ISBN",
  29338. prop: "isbn",
  29339. required: ""
  29340. }, {
  29341. default: vue.withCtx(() => [
  29342. vue.createVNode(_component_u_input, {
  29343. placeholderStyle: $setup.placeholderStyle,
  29344. customStyle: $setup.customStyle,
  29345. modelValue: $setup.form.isbn,
  29346. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.isbn = $event),
  29347. placeholder: "请输入编码",
  29348. clearable: ""
  29349. }, null, 8, ["placeholderStyle", "modelValue"])
  29350. ]),
  29351. _: 1
  29352. /* STABLE */
  29353. })
  29354. ]),
  29355. _: 1
  29356. /* STABLE */
  29357. }, 8, ["model"]),
  29358. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  29359. vue.createVNode(_component_u_button, {
  29360. size: "large",
  29361. type: "warning",
  29362. text: "扫码",
  29363. onClick: $setup.handleScan
  29364. }),
  29365. vue.withDirectives(vue.createVNode(
  29366. _component_u_button,
  29367. {
  29368. size: "large",
  29369. type: "success",
  29370. text: "提交",
  29371. onClick: $setup.submitForm
  29372. },
  29373. null,
  29374. 512
  29375. /* NEED_PATCH */
  29376. ), [
  29377. [_directive_permission, "app:entry:bookWeight:confirm"]
  29378. ])
  29379. ])
  29380. ]);
  29381. }
  29382. const PagesIndexEntryBookWeight = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/entry/book-weight.vue"]]);
  29383. const placeholderStyle = "font-size:32rpx";
  29384. const _sfc_main$m = {
  29385. __name: "commodity-scan",
  29386. setup(__props, { expose: __expose }) {
  29387. __expose();
  29388. const customStyle = vue.reactive({
  29389. height: "90rpx"
  29390. });
  29391. const form = vue.ref({
  29392. "isbn": ""
  29393. });
  29394. function scanCode() {
  29395. uni.scanCode({
  29396. success: (res2) => {
  29397. form.value.isbn = res2.result;
  29398. handleSubmit();
  29399. },
  29400. fail: (err) => {
  29401. uni.$u.toast("扫码失败");
  29402. }
  29403. });
  29404. }
  29405. function handleSubmit() {
  29406. if (!form.value.isbn)
  29407. return uni.$u.toast("请输入ISBN");
  29408. uni.$u.http.post("/app/book/bookPushErp", form.value).then((res2) => {
  29409. formatAppLog("log", "at pages/index/entry/commodity-scan.vue:54", res2);
  29410. if (res2.code == 200) {
  29411. let text = form.value.isbn + res2.msg;
  29412. uni.$u.ttsModule.speak(text);
  29413. form.value.isbn = "";
  29414. } else {
  29415. uni.$u.ttsModule.speak(res2.msg);
  29416. }
  29417. }).catch((err) => {
  29418. uni.$u.toast("提交失败,请重试");
  29419. });
  29420. }
  29421. onLoad(() => {
  29422. uni.$u.useGlobalEvent((e) => {
  29423. if (e.barcode) {
  29424. form.value.isbn = e.barcode;
  29425. handleSubmit();
  29426. }
  29427. });
  29428. });
  29429. onShow(() => {
  29430. uni.$u.updateActivePageOnShow();
  29431. });
  29432. const __returned__ = { placeholderStyle, customStyle, form, scanCode, handleSubmit, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  29433. return onLoad;
  29434. }, get onShow() {
  29435. return onShow;
  29436. } };
  29437. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29438. return __returned__;
  29439. }
  29440. };
  29441. function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
  29442. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  29443. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  29444. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  29445. vue.createElementVNode("view", { class: "main-content" }, [
  29446. vue.createElementVNode("view", { class: "input-group" }, [
  29447. vue.createVNode(_component_u_input, {
  29448. customStyle: $setup.customStyle,
  29449. "placeholder-style": $setup.placeholderStyle,
  29450. modelValue: $setup.form.isbn,
  29451. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.isbn = $event),
  29452. placeholder: "扫描ISBN",
  29453. border: "surround"
  29454. }, null, 8, ["customStyle", "modelValue"]),
  29455. vue.createVNode(_component_u_button, {
  29456. customStyle: $setup.customStyle,
  29457. type: "info",
  29458. color: "#a4adb3",
  29459. onClick: $setup.handleSubmit,
  29460. text: "提交"
  29461. }, null, 8, ["customStyle"])
  29462. ])
  29463. ]),
  29464. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  29465. vue.createVNode(_component_u_button, {
  29466. size: "large",
  29467. type: "success",
  29468. onClick: $setup.scanCode,
  29469. text: "扫码",
  29470. class: "scan-button"
  29471. })
  29472. ])
  29473. ]);
  29474. }
  29475. const PagesIndexEntryCommodityScan = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-9a4165f6"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/entry/commodity-scan.vue"]]);
  29476. const props$2 = {
  29477. props: {
  29478. // 显示文字
  29479. title: {
  29480. type: String,
  29481. default: props$E.alert.title
  29482. },
  29483. // 主题,success/warning/info/error
  29484. type: {
  29485. type: String,
  29486. default: props$E.alert.type
  29487. },
  29488. // 辅助性文字
  29489. description: {
  29490. type: String,
  29491. default: props$E.alert.description
  29492. },
  29493. // 是否可关闭
  29494. closable: {
  29495. type: Boolean,
  29496. default: props$E.alert.closable
  29497. },
  29498. // 是否显示图标
  29499. showIcon: {
  29500. type: Boolean,
  29501. default: props$E.alert.showIcon
  29502. },
  29503. // 浅或深色调,light-浅色,dark-深色
  29504. effect: {
  29505. type: String,
  29506. default: props$E.alert.effect
  29507. },
  29508. // 文字是否居中
  29509. center: {
  29510. type: Boolean,
  29511. default: props$E.alert.center
  29512. },
  29513. // 字体大小
  29514. fontSize: {
  29515. type: [String, Number],
  29516. default: props$E.alert.fontSize
  29517. }
  29518. }
  29519. };
  29520. const _sfc_main$l = {
  29521. name: "u-alert",
  29522. mixins: [mpMixin, mixin, props$2],
  29523. data() {
  29524. return {
  29525. show: true
  29526. };
  29527. },
  29528. computed: {
  29529. iconColor() {
  29530. return this.effect === "light" ? this.type : "#fff";
  29531. },
  29532. // 不同主题对应不同的图标
  29533. iconName() {
  29534. switch (this.type) {
  29535. case "success":
  29536. return "checkmark-circle-fill";
  29537. case "error":
  29538. return "close-circle-fill";
  29539. case "warning":
  29540. return "error-circle-fill";
  29541. case "info":
  29542. return "info-circle-fill";
  29543. case "primary":
  29544. return "more-circle-fill";
  29545. default:
  29546. return "error-circle-fill";
  29547. }
  29548. }
  29549. },
  29550. methods: {
  29551. // 点击内容
  29552. clickHandler() {
  29553. this.$emit("click");
  29554. },
  29555. // 点击关闭按钮
  29556. closeHandler() {
  29557. this.show = false;
  29558. }
  29559. }
  29560. };
  29561. function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
  29562. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  29563. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$6);
  29564. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  29565. mode: "fade",
  29566. show: $data.show
  29567. }, {
  29568. default: vue.withCtx(() => [
  29569. vue.createElementVNode(
  29570. "view",
  29571. {
  29572. class: vue.normalizeClass(["u-alert", [`u-alert--${_ctx.type}--${_ctx.effect}`]]),
  29573. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
  29574. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  29575. },
  29576. [
  29577. _ctx.showIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  29578. key: 0,
  29579. class: "u-alert__icon"
  29580. }, [
  29581. vue.createVNode(_component_u_icon, {
  29582. name: $options.iconName,
  29583. size: "18",
  29584. color: $options.iconColor
  29585. }, null, 8, ["name", "color"])
  29586. ])) : vue.createCommentVNode("v-if", true),
  29587. vue.createElementVNode(
  29588. "view",
  29589. {
  29590. class: "u-alert__content",
  29591. style: vue.normalizeStyle([{
  29592. paddingRight: _ctx.closable ? "20px" : 0
  29593. }])
  29594. },
  29595. [
  29596. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  29597. "text",
  29598. {
  29599. key: 0,
  29600. class: vue.normalizeClass(["u-alert__content__title", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
  29601. style: vue.normalizeStyle([{
  29602. fontSize: _ctx.$u.addUnit(_ctx.fontSize),
  29603. textAlign: _ctx.center ? "center" : "left"
  29604. }])
  29605. },
  29606. vue.toDisplayString(_ctx.title),
  29607. 7
  29608. /* TEXT, CLASS, STYLE */
  29609. )) : vue.createCommentVNode("v-if", true),
  29610. _ctx.description ? (vue.openBlock(), vue.createElementBlock(
  29611. "text",
  29612. {
  29613. key: 1,
  29614. class: vue.normalizeClass(["u-alert__content__desc", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
  29615. style: vue.normalizeStyle([{
  29616. fontSize: _ctx.$u.addUnit(_ctx.fontSize),
  29617. textAlign: _ctx.center ? "center" : "left"
  29618. }])
  29619. },
  29620. vue.toDisplayString(_ctx.description),
  29621. 7
  29622. /* TEXT, CLASS, STYLE */
  29623. )) : vue.createCommentVNode("v-if", true)
  29624. ],
  29625. 4
  29626. /* STYLE */
  29627. ),
  29628. _ctx.closable ? (vue.openBlock(), vue.createElementBlock("view", {
  29629. key: 1,
  29630. class: "u-alert__close",
  29631. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"]))
  29632. }, [
  29633. vue.createVNode(_component_u_icon, {
  29634. name: "close",
  29635. color: $options.iconColor,
  29636. size: "15"
  29637. }, null, 8, ["color"])
  29638. ])) : vue.createCommentVNode("v-if", true)
  29639. ],
  29640. 6
  29641. /* CLASS, STYLE */
  29642. )
  29643. ]),
  29644. _: 1
  29645. /* STABLE */
  29646. }, 8, ["show"]);
  29647. }
  29648. const __easycom_3 = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__scopeId", "data-v-158e540a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-alert/u-alert.vue"]]);
  29649. const _sfc_main$k = {
  29650. __name: "logistics-detail",
  29651. setup(__props, { expose: __expose }) {
  29652. __expose();
  29653. const logisticsInfo = vue.ref([]);
  29654. function getLogisticsDetail(orderId) {
  29655. uni.$u.http.get(`/app/orderinfo/getOrderExpressList?orderId=${orderId}`).then((res2) => {
  29656. if (res2.code == 200) {
  29657. logisticsInfo.value = res2.data;
  29658. }
  29659. });
  29660. }
  29661. function handleButtonClick(status, reason) {
  29662. uni.$u.http.post("/app/orderexception/update", {
  29663. id: id.value,
  29664. checkStatus: status,
  29665. refusalReason: reason
  29666. }).then((res2) => {
  29667. if (res2.code == 200) {
  29668. checkStatus.value = status;
  29669. uni.$u.toast("操作成功");
  29670. emit("refresh");
  29671. } else {
  29672. uni.$u.toast(res2.msg);
  29673. }
  29674. });
  29675. }
  29676. const checkStatus = vue.ref(0);
  29677. const id = vue.ref(0);
  29678. onLoad((e) => {
  29679. checkStatus.value = e.status;
  29680. id.value = e.id;
  29681. getLogisticsDetail(e.orderId);
  29682. });
  29683. const __returned__ = { logisticsInfo, getLogisticsDetail, handleButtonClick, checkStatus, id, ref: vue.ref, get onLoad() {
  29684. return onLoad;
  29685. }, ApproveButton, RejectButton };
  29686. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29687. return __returned__;
  29688. }
  29689. };
  29690. function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
  29691. const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_3);
  29692. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$4);
  29693. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  29694. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  29695. vue.createCommentVNode(" 物流公司信息 "),
  29696. vue.createVNode(_component_u_sticky, null, {
  29697. default: vue.withCtx(() => [
  29698. vue.createVNode(_component_u_alert, {
  29699. title: `物流公司:京东快递`,
  29700. type: "warning"
  29701. })
  29702. ]),
  29703. _: 1
  29704. /* STABLE */
  29705. }),
  29706. vue.createCommentVNode(" 自定义物流轨迹时间轴 "),
  29707. vue.createElementVNode("scroll-view", {
  29708. "scroll-y": "",
  29709. class: "timeline-container"
  29710. }, [
  29711. (vue.openBlock(true), vue.createElementBlock(
  29712. vue.Fragment,
  29713. null,
  29714. vue.renderList($setup.logisticsInfo, (item, index2) => {
  29715. return vue.openBlock(), vue.createElementBlock("view", {
  29716. key: index2,
  29717. class: "timeline-item"
  29718. }, [
  29719. vue.createElementVNode("view", { class: "timeline-icon" }, [
  29720. vue.createVNode(_component_u_icon, {
  29721. name: "map-fill",
  29722. color: "#19be6b",
  29723. size: "16"
  29724. })
  29725. ]),
  29726. vue.createElementVNode("view", { class: "timeline-content" }, [
  29727. vue.createElementVNode(
  29728. "text",
  29729. { class: "title" },
  29730. vue.toDisplayString(item.title),
  29731. 1
  29732. /* TEXT */
  29733. ),
  29734. vue.createElementVNode(
  29735. "text",
  29736. { class: "desc" },
  29737. vue.toDisplayString(item.description),
  29738. 1
  29739. /* TEXT */
  29740. ),
  29741. vue.createElementVNode(
  29742. "text",
  29743. { class: "time" },
  29744. vue.toDisplayString(item.time),
  29745. 1
  29746. /* TEXT */
  29747. )
  29748. ]),
  29749. index2 < $setup.logisticsInfo.length - 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  29750. key: 0,
  29751. class: "timeline-line"
  29752. })) : vue.createCommentVNode("v-if", true)
  29753. ]);
  29754. }),
  29755. 128
  29756. /* KEYED_FRAGMENT */
  29757. ))
  29758. ]),
  29759. vue.createCommentVNode(" 底部操作按钮 "),
  29760. $setup.checkStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  29761. key: 0,
  29762. class: "fixed-bottom"
  29763. }, [
  29764. vue.createVNode($setup["RejectButton"], {
  29765. size: "large",
  29766. onReject: _cache[0] || (_cache[0] = (reason) => $setup.handleButtonClick(3, reason))
  29767. }),
  29768. vue.createVNode($setup["ApproveButton"], {
  29769. size: "large",
  29770. onApprove: _cache[1] || (_cache[1] = ($event) => $setup.handleButtonClick(2))
  29771. })
  29772. ])) : vue.createCommentVNode("v-if", true)
  29773. ]);
  29774. }
  29775. const PagesIndexExpressLogisticsDetail = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-8e52fe94"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/logistics-detail.vue"]]);
  29776. const _imports_0 = "/static/img/location.png";
  29777. const _imports_1 = "/static/img/location-active.png";
  29778. const _sfc_main$j = {
  29779. __name: "task-detail",
  29780. setup(__props, { expose: __expose }) {
  29781. __expose();
  29782. const currentTask = vue.ref(0);
  29783. const totalTasks = vue.ref(0);
  29784. const curTaskInfo = vue.ref({});
  29785. const nextLocation = vue.ref("");
  29786. const orderList = vue.ref([]);
  29787. const ttsModule2 = vue.ref(null);
  29788. const taskCode = vue.ref("");
  29789. onUnload(() => {
  29790. ttsModule2.value.stop();
  29791. });
  29792. function playGlobalSound() {
  29793. uni.$u.playClickSound();
  29794. }
  29795. const searchText = vue.ref("");
  29796. const badList = vue.ref([]);
  29797. const handleNextTask = () => {
  29798. if (currentTask.value < totalTasks.value) {
  29799. currentTask.value++;
  29800. if (currentTask.value == totalTasks.value) {
  29801. ttsModule2.value.speak("任务完成");
  29802. } else {
  29803. curTaskInfo.value = orderList.value[currentTask.value];
  29804. badList.value = curTaskInfo.value.detailVoList || [];
  29805. let nextInfo = orderList.value[currentTask.value + 1];
  29806. nextLocation.value = nextInfo.positionCode;
  29807. }
  29808. }
  29809. };
  29810. const onSearch = () => {
  29811. uni.$u.http.get(`/app/appstock/getStockTaskDetail?taskCode=${taskCode.value}`).then((res2) => {
  29812. if (res2.code == 200) {
  29813. orderList.value = res2.data;
  29814. totalTasks.value = res2.data.length;
  29815. curTaskInfo.value = res2.data[currentTask.value];
  29816. badList.value = curTaskInfo.value.detailVoList || [];
  29817. }
  29818. });
  29819. };
  29820. const confirmStockTask = () => {
  29821. const params = {
  29822. positionCode: curTaskInfo.value.positionCode,
  29823. orderId: curTaskInfo.value.orderId,
  29824. taskCode: taskCode.value
  29825. };
  29826. uni.$u.http.post("/app/appstock/setStockTask", params).then((res2) => {
  29827. if (res2.code === 200) {
  29828. curTaskInfo.value.isCompleted = true;
  29829. orderList.value[currentTask.value] = curTaskInfo.value;
  29830. handleNextTask();
  29831. isFirstScan.value = false;
  29832. ttsModule2.value.speak("下架成功");
  29833. } else {
  29834. uni.showToast({
  29835. title: res2.msg,
  29836. icon: "error"
  29837. });
  29838. }
  29839. });
  29840. };
  29841. const unlockTask = () => {
  29842. uni.$u.http.post("/app/appstock/unlockStockTask?taskCode=" + taskCode.value).then((res2) => {
  29843. if (res2.code == 200) {
  29844. uni.showToast({
  29845. title: "解锁成功",
  29846. icon: "success"
  29847. });
  29848. } else {
  29849. uni.showToast({
  29850. title: res2.msg || "解锁失败",
  29851. icon: "error"
  29852. });
  29853. }
  29854. });
  29855. };
  29856. const onSubmit = () => {
  29857. uni.showModal({
  29858. title: "确认提示",
  29859. content: "是否确认提交本次下架?",
  29860. success: (res2) => {
  29861. playGlobalSound();
  29862. if (res2.confirm) {
  29863. uni.navigateBack();
  29864. ttsModule2.value.speak("任务已提交");
  29865. unlockTask();
  29866. }
  29867. }
  29868. });
  29869. };
  29870. function goBack() {
  29871. uni.showModal({
  29872. title: "确认提示",
  29873. content: "是否确认放弃本次下架?",
  29874. success: (res2) => {
  29875. playGlobalSound();
  29876. if (res2.confirm) {
  29877. uni.navigateBack();
  29878. ttsModule2.value.speak("任务已放弃");
  29879. unlockTask();
  29880. }
  29881. }
  29882. });
  29883. }
  29884. let isFirstScan = vue.ref(false);
  29885. const checkScanText = (scanText) => {
  29886. formatAppLog("log", "at pages/index/wms/task-detail.vue:227", scanText, "scanText");
  29887. let length = scanText ? scanText.length : 0;
  29888. let isPositionCode = scanText.indexOf("-") > -1 && length == 9;
  29889. let isWaybillCode = /^(?=.*[A-Z])(?=.*\d)[A-Z0-9]+$/.test(scanText);
  29890. let isOrderId = /^\d+$/.test(scanText);
  29891. if (isPositionCode) {
  29892. let positionCode = curTaskInfo.value.positionCode;
  29893. if (positionCode != scanText) {
  29894. uni.showToast({
  29895. title: "库位号不正确",
  29896. icon: "error"
  29897. });
  29898. } else {
  29899. isFirstScan.value = true;
  29900. curTaskInfo.value.isValid = true;
  29901. }
  29902. }
  29903. if (!isFirstScan.value) {
  29904. ttsModule2.value.speak("请先校验库位号");
  29905. return;
  29906. }
  29907. if (isWaybillCode || isOrderId) {
  29908. let waybillCode = curTaskInfo.value.waybillCode;
  29909. let orderId = curTaskInfo.value.orderId;
  29910. if (waybillCode == scanText || orderId == scanText) {
  29911. confirmStockTask();
  29912. } else {
  29913. uni.showToast({
  29914. title: "订单号或物流号不匹配",
  29915. icon: "error"
  29916. });
  29917. curTaskInfo.value.isValid = true;
  29918. }
  29919. }
  29920. };
  29921. const openScan = () => {
  29922. uni.scanCode({
  29923. success: (res2) => {
  29924. searchText.value = res2.result;
  29925. checkScanText(res2.result);
  29926. },
  29927. fail: (err) => {
  29928. uni.showToast({
  29929. title: "扫码失败",
  29930. icon: "error"
  29931. });
  29932. }
  29933. });
  29934. };
  29935. onLoad((opts) => {
  29936. taskCode.value = opts.taskCode;
  29937. onSearch();
  29938. ttsModule2.value = new VolumeTTS();
  29939. uni.$u.useGlobalEvent((e) => {
  29940. if (e.barcode) {
  29941. searchText.value = e.barcode;
  29942. checkScanText(e.barcode);
  29943. }
  29944. });
  29945. });
  29946. onShow(() => {
  29947. uni.$u.updateActivePageOnShow();
  29948. });
  29949. const __returned__ = { currentTask, totalTasks, curTaskInfo, nextLocation, orderList, ttsModule: ttsModule2, taskCode, playGlobalSound, searchText, badList, handleNextTask, onSearch, confirmStockTask, unlockTask, onSubmit, goBack, get isFirstScan() {
  29950. return isFirstScan;
  29951. }, set isFirstScan(v) {
  29952. isFirstScan = v;
  29953. }, checkScanText, openScan, ref: vue.ref, onMounted: vue.onMounted, BadOutCard, get VolumeTTS() {
  29954. return VolumeTTS;
  29955. }, get onLoad() {
  29956. return onLoad;
  29957. }, get onUnload() {
  29958. return onUnload;
  29959. }, get onShow() {
  29960. return onShow;
  29961. } };
  29962. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29963. return __returned__;
  29964. }
  29965. };
  29966. function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
  29967. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  29968. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$9);
  29969. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  29970. const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_3);
  29971. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  29972. return vue.openBlock(), vue.createElementBlock("view", {
  29973. class: "container",
  29974. onClick: $setup.playGlobalSound
  29975. }, [
  29976. vue.createCommentVNode(" 顶部导航栏 "),
  29977. vue.createVNode(_component_u_navbar, {
  29978. title: "下架任务",
  29979. border: false,
  29980. fixed: "",
  29981. "safe-area-inset-top": ""
  29982. }, {
  29983. left: vue.withCtx(() => [
  29984. vue.createVNode(_component_u_icon, {
  29985. name: "arrow-left",
  29986. color: "#333333",
  29987. size: "20",
  29988. onClick: $setup.goBack
  29989. })
  29990. ]),
  29991. right: vue.withCtx(() => [
  29992. vue.createVNode(_component_u_text, {
  29993. type: "primary",
  29994. text: "提交",
  29995. onClick: $setup.onSubmit
  29996. })
  29997. ]),
  29998. _: 1
  29999. /* STABLE */
  30000. }),
  30001. vue.createCommentVNode(" 任务进度 "),
  30002. vue.createElementVNode("view", { class: "progress-section" }, [
  30003. vue.createVNode(_component_u_alert, {
  30004. title: "当前任务",
  30005. type: "info",
  30006. center: ""
  30007. }),
  30008. vue.createElementVNode("view", {
  30009. class: "flex flex-j-c pad-10",
  30010. style: { "padding-right": "40rpx" }
  30011. }, [
  30012. vue.createCommentVNode(' <view class="next-task" @click="handleNextTask">\r\n <text>上一个</text>\r\n </view> '),
  30013. vue.createElementVNode("view", { class: "flex-c" }, [
  30014. vue.createElementVNode("text", null, [
  30015. vue.createTextVNode(
  30016. vue.toDisplayString($setup.currentTask),
  30017. 1
  30018. /* TEXT */
  30019. ),
  30020. vue.createElementVNode(
  30021. "text",
  30022. { class: "progress-text font-20 color-green" },
  30023. "/" + vue.toDisplayString($setup.totalTasks),
  30024. 1
  30025. /* TEXT */
  30026. )
  30027. ])
  30028. ]),
  30029. vue.createCommentVNode(' <view class="color-green" @click="handleNextTask">\r\n <text>下一个</text>\r\n </view> ')
  30030. ])
  30031. ]),
  30032. vue.createCommentVNode(" 库位信息 "),
  30033. vue.createElementVNode("view", {
  30034. class: "flex flex-j-b pad-10 next-location",
  30035. style: { "padding-right": "40rpx", "align-items": "center" }
  30036. }, [
  30037. vue.createElementVNode(
  30038. "view",
  30039. { class: "font-14 mb-20" },
  30040. vue.toDisplayString($setup.currentTask + 1) + "/" + vue.toDisplayString($setup.totalTasks),
  30041. 1
  30042. /* TEXT */
  30043. ),
  30044. vue.createElementVNode("view", { class: "flex-d" }, [
  30045. vue.createElementVNode(
  30046. "view",
  30047. { class: "font-20 text-center" },
  30048. vue.toDisplayString($setup.curTaskInfo.positionCode),
  30049. 1
  30050. /* TEXT */
  30051. ),
  30052. $setup.nextLocation ? (vue.openBlock(), vue.createElementBlock(
  30053. "view",
  30054. {
  30055. key: 0,
  30056. class: "location-detail font-13 mt-10"
  30057. },
  30058. "下一库位 " + vue.toDisplayString($setup.nextLocation || "无"),
  30059. 1
  30060. /* TEXT */
  30061. )) : vue.createCommentVNode("v-if", true)
  30062. ]),
  30063. !$setup.curTaskInfo.isValid ? (vue.openBlock(), vue.createElementBlock("image", {
  30064. key: 0,
  30065. src: _imports_0,
  30066. mode: "widthFix",
  30067. style: { "width": "70rpx", "height": "70rpx" }
  30068. })) : (vue.openBlock(), vue.createElementBlock("image", {
  30069. key: 1,
  30070. src: _imports_1,
  30071. mode: "widthFix",
  30072. style: { "width": "70rpx", "height": "70rpx" }
  30073. }))
  30074. ]),
  30075. vue.createCommentVNode(" 订单信息 "),
  30076. vue.createElementVNode("view", { class: "order-info" }, [
  30077. vue.createElementVNode(
  30078. "view",
  30079. { class: "info-item" },
  30080. "订单编号:" + vue.toDisplayString($setup.curTaskInfo.orderId),
  30081. 1
  30082. /* TEXT */
  30083. ),
  30084. vue.createElementVNode(
  30085. "view",
  30086. { class: "info-item" },
  30087. "物流单号:" + vue.toDisplayString($setup.curTaskInfo.waybillCode || "-"),
  30088. 1
  30089. /* TEXT */
  30090. ),
  30091. vue.createElementVNode(
  30092. "view",
  30093. { class: "info-item" },
  30094. "不良数量:" + vue.toDisplayString($setup.curTaskInfo.badNum),
  30095. 1
  30096. /* TEXT */
  30097. )
  30098. ]),
  30099. vue.createCommentVNode(" 极差商品列表 "),
  30100. vue.createElementVNode("view", { class: "bad-list" }, [
  30101. vue.createElementVNode("view", { class: "list-title mb-6 mt-20" }, "极差"),
  30102. (vue.openBlock(true), vue.createElementBlock(
  30103. vue.Fragment,
  30104. null,
  30105. vue.renderList($setup.badList, (item, index2) => {
  30106. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  30107. vue.createVNode($setup["BadOutCard"], { item }, null, 8, ["item"])
  30108. ]);
  30109. }),
  30110. 128
  30111. /* KEYED_FRAGMENT */
  30112. ))
  30113. ]),
  30114. vue.createCommentVNode(" 底部搜索框 "),
  30115. vue.createElementVNode("view", {
  30116. class: "fixed-bottom pad-20",
  30117. style: { "background": "#ffffff" }
  30118. }, [
  30119. vue.createVNode(_component_u_search, {
  30120. modelValue: $setup.searchText,
  30121. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  30122. placeholder: "请输入订单编号/物流单号/库位号",
  30123. "show-action": false,
  30124. clearabled: true,
  30125. onSearch: _cache[1] || (_cache[1] = ($event) => $setup.checkScanText($setup.searchText)),
  30126. height: "40"
  30127. }, null, 8, ["modelValue"]),
  30128. vue.createVNode(_component_u_icon, {
  30129. name: "scan",
  30130. size: "28",
  30131. color: "#19be6b",
  30132. onClick: $setup.openScan
  30133. })
  30134. ])
  30135. ]);
  30136. }
  30137. const PagesIndexWmsTaskDetail = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__scopeId", "data-v-ca763ad9"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/task-detail.vue"]]);
  30138. const _sfc_main$i = {
  30139. __name: "speedy-check-add",
  30140. setup(__props, { expose: __expose }) {
  30141. __expose();
  30142. const location2 = vue.ref("");
  30143. const products = vue.ref([]);
  30144. const orderNum = vue.ref("");
  30145. const godownName = vue.ref("");
  30146. const getOrderByPositionCode = (positionCode) => {
  30147. uni.$u.http.get("/app/stock/getOrderByPositionCode?positionCode=" + positionCode).then((res2) => {
  30148. if (res2.code === 200) {
  30149. const data = res2.data;
  30150. orderNum.value = data.orderNum;
  30151. godownName.value = data.godownName;
  30152. products.value = data.godownStockLogResults || [];
  30153. products.value.forEach((item) => {
  30154. item.checked = false;
  30155. });
  30156. } else {
  30157. uni.$u.toast(res2.msg);
  30158. }
  30159. });
  30160. };
  30161. onLoad((options) => {
  30162. if (options.location) {
  30163. location2.value = options.location;
  30164. getOrderByPositionCode(options.location);
  30165. }
  30166. });
  30167. const isAllSelected = vue.computed(() => {
  30168. return products.value.length > 0 && products.value.every((item) => item.checked);
  30169. });
  30170. const toggleItemSelect = (item) => {
  30171. item.checked = !item.checked;
  30172. };
  30173. const toggleSelectAll = () => {
  30174. const newState = !isAllSelected.value;
  30175. products.value.forEach((item) => {
  30176. item.checked = newState;
  30177. });
  30178. };
  30179. const onSubmit = () => {
  30180. const selectedItems = products.value.filter((item) => item.checked);
  30181. uni.$emit("selectedProducts", selectedItems);
  30182. goBack();
  30183. };
  30184. const goBack = () => {
  30185. uni.navigateBack({
  30186. delta: 1
  30187. });
  30188. };
  30189. const __returned__ = { location: location2, products, orderNum, godownName, getOrderByPositionCode, isAllSelected, toggleItemSelect, toggleSelectAll, onSubmit, goBack, ref: vue.ref, computed: vue.computed, get onLoad() {
  30190. return onLoad;
  30191. }, get onUnload() {
  30192. return onUnload;
  30193. }, LocationOrderItem };
  30194. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30195. return __returned__;
  30196. }
  30197. };
  30198. function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
  30199. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  30200. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_1$1);
  30201. return vue.openBlock(), vue.createElementBlock("view", {
  30202. class: "container",
  30203. style: { "padding-top": "84px", "padding-bottom": "10px" }
  30204. }, [
  30205. vue.createVNode(_component_u_navbar, {
  30206. title: "选择商品",
  30207. border: false,
  30208. fixed: "",
  30209. "safe-area-inset-top": "",
  30210. bgColor: "#22ac38",
  30211. titleStyle: "font-size:36rpx;color:#fff"
  30212. }, {
  30213. left: vue.withCtx(() => [
  30214. vue.createVNode(_component_u_icon, {
  30215. name: "arrow-left",
  30216. color: "#fff",
  30217. size: "20",
  30218. onClick: $setup.goBack
  30219. })
  30220. ]),
  30221. right: vue.withCtx(() => [
  30222. vue.createElementVNode("text", {
  30223. style: { "color": "#ffffff" },
  30224. onClick: $setup.onSubmit
  30225. }, "确定")
  30226. ]),
  30227. _: 1
  30228. /* STABLE */
  30229. }),
  30230. vue.createCommentVNode(" 库位显示 "),
  30231. vue.createElementVNode("view", { class: "location-info" }, [
  30232. vue.createElementVNode(
  30233. "text",
  30234. null,
  30235. "库位: " + vue.toDisplayString($setup.location),
  30236. 1
  30237. /* TEXT */
  30238. ),
  30239. $setup.godownName ? (vue.openBlock(), vue.createElementBlock(
  30240. "text",
  30241. { key: 0 },
  30242. "仓库: " + vue.toDisplayString($setup.godownName),
  30243. 1
  30244. /* TEXT */
  30245. )) : vue.createCommentVNode("v-if", true),
  30246. $setup.orderNum ? (vue.openBlock(), vue.createElementBlock(
  30247. "text",
  30248. { key: 1 },
  30249. "订单号: " + vue.toDisplayString($setup.orderNum),
  30250. 1
  30251. /* TEXT */
  30252. )) : vue.createCommentVNode("v-if", true)
  30253. ]),
  30254. vue.createCommentVNode(" 订单列表 "),
  30255. vue.createElementVNode("view", { class: "product-details" }, [
  30256. (vue.openBlock(true), vue.createElementBlock(
  30257. vue.Fragment,
  30258. null,
  30259. vue.renderList($setup.products, (item, index2) => {
  30260. return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
  30261. isCheck: "",
  30262. key: index2,
  30263. item,
  30264. onSelect: $setup.toggleItemSelect,
  30265. isLink: false
  30266. }, null, 8, ["item"]);
  30267. }),
  30268. 128
  30269. /* KEYED_FRAGMENT */
  30270. ))
  30271. ]),
  30272. vue.createCommentVNode(" 底部全选栏 "),
  30273. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  30274. vue.createElementVNode("view", {
  30275. class: "select-all",
  30276. onClick: $setup.toggleSelectAll
  30277. }, [
  30278. vue.createVNode(_component_u_icon, {
  30279. name: $setup.isAllSelected ? "checkmark-circle-fill" : "checkmark-circle",
  30280. color: $setup.isAllSelected ? "#19be6b" : "#c8c9cc",
  30281. size: "28"
  30282. }, null, 8, ["name", "color"]),
  30283. vue.createElementVNode("text", { class: "select-text" }, "全选")
  30284. ]),
  30285. vue.createElementVNode(
  30286. "text",
  30287. { class: "order-count" },
  30288. "订单总数: " + vue.toDisplayString($setup.products.length),
  30289. 1
  30290. /* TEXT */
  30291. )
  30292. ])
  30293. ]);
  30294. }
  30295. const PagesIndexWmsSpeedyCheckAdd = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-dabb4347"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/speedy-check-add.vue"]]);
  30296. const _sfc_main$h = {
  30297. __name: "user-info",
  30298. setup(__props, { expose: __expose }) {
  30299. __expose();
  30300. const userInfo = vue.ref({
  30301. avatar: "/static/images/avatar.jpg",
  30302. name: "无",
  30303. gender: "无",
  30304. birthday: "无",
  30305. education: "无",
  30306. school: "无",
  30307. username: "用户账号",
  30308. account: "fxt",
  30309. createTime: "2024-06-12 12:00:00",
  30310. lastLogin: "",
  30311. company: "无",
  30312. employeeId: "无",
  30313. position: "无",
  30314. phone: "18888888888",
  30315. email: "无",
  30316. address: "无"
  30317. });
  30318. function getUserInfo() {
  30319. uni.$u.http.get("/app/appUser/getUserInfoById").then((res2) => {
  30320. if (res2.code == 200) {
  30321. userInfo.value = res2.data;
  30322. }
  30323. });
  30324. }
  30325. getUserInfo();
  30326. function setAvatar(avatarfile) {
  30327. uni.$u.http.post("/app/appUser/setAvatar?avatarfile=" + avatarfile).then((res2) => {
  30328. if (res2.code == 200) {
  30329. userInfo.value.avatar = avatarfile;
  30330. uni.showToast({
  30331. title: "头像设置成功",
  30332. icon: "success"
  30333. });
  30334. }
  30335. });
  30336. }
  30337. const handleEditAvatar = () => {
  30338. const token = uni.getStorageSync("token");
  30339. uni.chooseImage({
  30340. count: 1,
  30341. success: (res2) => {
  30342. const filePath = res2.tempFilePaths[0];
  30343. uni.uploadFile({
  30344. url: `${baseUrl}/common/upload`,
  30345. filePath,
  30346. name: "file",
  30347. header: {
  30348. "Authorization": token
  30349. },
  30350. success: (uploadRes) => {
  30351. const data = JSON.parse(uploadRes.data);
  30352. if (data.code === 200) {
  30353. setAvatar(data.url);
  30354. } else {
  30355. uni.showToast({
  30356. title: "上传失败",
  30357. icon: "none"
  30358. });
  30359. }
  30360. },
  30361. fail: () => {
  30362. uni.showToast({
  30363. title: "上传失败",
  30364. icon: "none"
  30365. });
  30366. }
  30367. });
  30368. }
  30369. });
  30370. };
  30371. const __returned__ = { userInfo, getUserInfo, setAvatar, handleEditAvatar, ref: vue.ref, get baseUrl() {
  30372. return baseUrl;
  30373. } };
  30374. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30375. return __returned__;
  30376. }
  30377. };
  30378. function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  30379. const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$c);
  30380. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  30381. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  30382. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  30383. return vue.openBlock(), vue.createElementBlock("view", { class: "user-info-page" }, [
  30384. vue.createCommentVNode(" 头像区域 "),
  30385. vue.createElementVNode("view", { class: "avatar-section" }, [
  30386. vue.createElementVNode("view", { class: "avatar-wrap" }, [
  30387. vue.createElementVNode("text", null, "头像:"),
  30388. vue.createVNode(_component_u_avatar, {
  30389. size: 50,
  30390. src: $setup.userInfo.avatar
  30391. }, null, 8, ["src"]),
  30392. vue.createVNode(_component_u_button, {
  30393. type: "success",
  30394. style: { "width": "200rpx" },
  30395. size: "small",
  30396. onClick: $setup.handleEditAvatar
  30397. }, {
  30398. default: vue.withCtx(() => [
  30399. vue.createTextVNode("去修改")
  30400. ]),
  30401. _: 1
  30402. /* STABLE */
  30403. })
  30404. ])
  30405. ]),
  30406. vue.createCommentVNode(" 基本信息区域 "),
  30407. vue.createElementVNode("view", { class: "info-section" }, [
  30408. vue.createElementVNode("view", { class: "section-title" }, "基本信息"),
  30409. vue.createElementVNode("view", { class: "info-card" }, [
  30410. vue.createVNode(_component_u_cell_group, { border: false }, {
  30411. default: vue.withCtx(() => [
  30412. vue.createVNode(_component_u_cell, {
  30413. title: "姓名",
  30414. value: $setup.userInfo.nickName || "无"
  30415. }, null, 8, ["value"]),
  30416. vue.createVNode(_component_u_cell, {
  30417. title: "性别",
  30418. value: $setup.userInfo.sex == 0 ? "男" : $setup.userInfo.sex == 1 ? "女" : "未知"
  30419. }, null, 8, ["value"]),
  30420. vue.createVNode(_component_u_cell, {
  30421. title: "生日",
  30422. value: $setup.userInfo.birthday || "无"
  30423. }, null, 8, ["value"]),
  30424. vue.createVNode(_component_u_cell, {
  30425. title: "学历",
  30426. value: $setup.userInfo.education || "无"
  30427. }, null, 8, ["value"]),
  30428. vue.createVNode(_component_u_cell, {
  30429. title: "毕业学校",
  30430. value: $setup.userInfo.school || "无",
  30431. border: false
  30432. }, null, 8, ["value"])
  30433. ]),
  30434. _: 1
  30435. /* STABLE */
  30436. })
  30437. ])
  30438. ]),
  30439. vue.createCommentVNode(" 账号信息区域 "),
  30440. vue.createElementVNode("view", { class: "info-section" }, [
  30441. vue.createElementVNode("view", { class: "section-title" }, "用户账号"),
  30442. vue.createElementVNode("view", { class: "info-card" }, [
  30443. vue.createVNode(_component_u_cell_group, { border: false }, {
  30444. default: vue.withCtx(() => [
  30445. vue.createVNode(_component_u_cell, {
  30446. title: "账号",
  30447. value: $setup.userInfo.userName
  30448. }, null, 8, ["value"]),
  30449. vue.createVNode(_component_u_cell, {
  30450. title: "创建日期",
  30451. value: $setup.userInfo.createTime
  30452. }, null, 8, ["value"]),
  30453. vue.createVNode(_component_u_cell, {
  30454. title: "最近登录",
  30455. value: $setup.userInfo.loginDate || "--",
  30456. border: false
  30457. }, null, 8, ["value"])
  30458. ]),
  30459. _: 1
  30460. /* STABLE */
  30461. })
  30462. ])
  30463. ]),
  30464. vue.createCommentVNode(" 员工资料区域 "),
  30465. vue.createElementVNode("view", { class: "info-section" }, [
  30466. vue.createElementVNode("view", { class: "section-title" }, "员工资料"),
  30467. vue.createElementVNode("view", { class: "info-card" }, [
  30468. vue.createVNode(_component_u_cell_group, { border: false }, {
  30469. default: vue.withCtx(() => [
  30470. vue.createVNode(_component_u_cell, {
  30471. title: "公司",
  30472. value: $setup.userInfo.company || "无"
  30473. }, null, 8, ["value"]),
  30474. vue.createVNode(_component_u_cell, {
  30475. title: "员工编号",
  30476. value: $setup.userInfo.employeeId || "无"
  30477. }, null, 8, ["value"]),
  30478. vue.createVNode(_component_u_cell, {
  30479. title: "职位",
  30480. value: $setup.userInfo.position || "无",
  30481. border: false
  30482. }, null, 8, ["value"])
  30483. ]),
  30484. _: 1
  30485. /* STABLE */
  30486. })
  30487. ])
  30488. ]),
  30489. vue.createCommentVNode(" 联系方式区域 "),
  30490. vue.createElementVNode("view", { class: "info-section" }, [
  30491. vue.createElementVNode("view", { class: "section-title" }, "联系方式"),
  30492. vue.createElementVNode("view", { class: "info-card" }, [
  30493. vue.createVNode(_component_u_cell_group, { border: false }, {
  30494. default: vue.withCtx(() => [
  30495. vue.createVNode(_component_u_cell, {
  30496. title: "电话",
  30497. value: $setup.userInfo.phonenumber
  30498. }, null, 8, ["value"]),
  30499. vue.createVNode(_component_u_cell, {
  30500. title: "邮箱",
  30501. value: $setup.userInfo.email || "无"
  30502. }, null, 8, ["value"]),
  30503. vue.createVNode(_component_u_cell, {
  30504. title: "住址",
  30505. value: $setup.userInfo.address || "无",
  30506. border: false
  30507. }, null, 8, ["value"])
  30508. ]),
  30509. _: 1
  30510. /* STABLE */
  30511. })
  30512. ])
  30513. ])
  30514. ]);
  30515. }
  30516. const PagesMyPageUserInfo = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__scopeId", "data-v-804eca28"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/user-info.vue"]]);
  30517. const _sfc_main$g = {
  30518. __name: "warehouse",
  30519. setup(__props, { expose: __expose }) {
  30520. __expose();
  30521. const showPicker = vue.ref(false);
  30522. const selectedWarehouse = vue.ref("");
  30523. const warehouseList = vue.ref([]);
  30524. const getWarehouseList = () => {
  30525. uni.$u.http.post("/app/appUser/searchGodown?name=").then((res2) => {
  30526. if (res2.code == 200) {
  30527. warehouseList.value = res2.data.filter((v) => v.useStatus == 1).map((v) => ({
  30528. text: v.godownName,
  30529. value: v.id
  30530. }));
  30531. }
  30532. });
  30533. };
  30534. onLoad(() => {
  30535. getWarehouseList();
  30536. getWarehouse();
  30537. });
  30538. getWarehouseList();
  30539. const getWarehouse = () => {
  30540. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
  30541. var _a;
  30542. if (res2.code == 200) {
  30543. selectedWarehouse.value = (_a = res2.data) == null ? void 0 : _a.godownName;
  30544. }
  30545. });
  30546. };
  30547. const saveWarehouse = (godownId) => {
  30548. uni.$u.http.post("/app/appUser/bingowGodown?godownId=" + godownId).then((res2) => {
  30549. if (res2.code == 200) {
  30550. uni.showToast({
  30551. title: "设置默认仓库成功",
  30552. icon: "success"
  30553. });
  30554. }
  30555. });
  30556. };
  30557. const onConfirm = (e) => {
  30558. const [{
  30559. value: value2,
  30560. text
  30561. }] = e.value;
  30562. selectedWarehouse.value = text;
  30563. showPicker.value = false;
  30564. formatAppLog("log", "at pages/my/page/warehouse.vue:81", e, "xxxxxx");
  30565. saveWarehouse(value2);
  30566. };
  30567. const __returned__ = { showPicker, selectedWarehouse, warehouseList, getWarehouseList, getWarehouse, saveWarehouse, onConfirm, ref: vue.ref, get onLoad() {
  30568. return onLoad;
  30569. } };
  30570. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30571. return __returned__;
  30572. }
  30573. };
  30574. function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  30575. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  30576. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$2);
  30577. return vue.openBlock(), vue.createElementBlock("view", { class: "warehouse-select" }, [
  30578. vue.createElementVNode("view", {
  30579. class: "select-wrap",
  30580. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showPicker = true)
  30581. }, [
  30582. vue.createElementVNode("text", { class: "required-label" }, "*"),
  30583. vue.createElementVNode("text", { class: "label" }, "默认仓库"),
  30584. vue.createElementVNode("view", { class: "picker-value" }, [
  30585. vue.createElementVNode(
  30586. "text",
  30587. {
  30588. class: vue.normalizeClass(["value-text", !$setup.selectedWarehouse && "placeholder"])
  30589. },
  30590. vue.toDisplayString($setup.selectedWarehouse || "请选择仓库"),
  30591. 3
  30592. /* TEXT, CLASS */
  30593. ),
  30594. vue.createVNode(_component_u_icon, {
  30595. name: "arrow-right",
  30596. color: "#999",
  30597. size: "16"
  30598. })
  30599. ])
  30600. ]),
  30601. vue.createCommentVNode(" 仓库选择器 "),
  30602. vue.createVNode(_component_u_picker, {
  30603. show: $setup.showPicker,
  30604. columns: [$setup.warehouseList],
  30605. onConfirm: $setup.onConfirm,
  30606. onCancel: _cache[1] || (_cache[1] = ($event) => $setup.showPicker = false),
  30607. onClose: _cache[2] || (_cache[2] = ($event) => $setup.showPicker = false),
  30608. title: "选择仓库",
  30609. confirmText: "确定",
  30610. cancelText: "取消"
  30611. }, null, 8, ["show", "columns"])
  30612. ]);
  30613. }
  30614. const PagesMyPageWarehouse = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__scopeId", "data-v-972eecda"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/warehouse.vue"]]);
  30615. const _sfc_main$f = {
  30616. __name: "school",
  30617. setup(__props, { expose: __expose }) {
  30618. __expose();
  30619. const schoolName = vue.ref("");
  30620. const schoolList = vue.ref([]);
  30621. const getSchoolList = () => {
  30622. uni.$u.http.get("/app/appConf/getPadSchoolBroadcast").then((res2) => {
  30623. if (res2.code == 200) {
  30624. schoolList.value = res2.data;
  30625. }
  30626. });
  30627. };
  30628. getSchoolList();
  30629. const handleSubmit = () => {
  30630. if (schoolList.value.length === 0) {
  30631. uni.$u.toast("请至少添加一所学校");
  30632. return;
  30633. }
  30634. uni.$u.http.post("/app/appConf/setPadSchoolBroadcast", schoolList.value).then((res2) => {
  30635. if (res2.code == 200) {
  30636. uni.showToast({
  30637. title: "设置成功",
  30638. icon: "success"
  30639. });
  30640. }
  30641. });
  30642. };
  30643. const handleAddSchool = () => {
  30644. if (!schoolName.value.trim()) {
  30645. uni.$u.toast("请输入学校名称");
  30646. return;
  30647. }
  30648. schoolList.value.push({
  30649. schoolName: schoolName.value,
  30650. id: ""
  30651. });
  30652. schoolName.value = "";
  30653. };
  30654. const handleRemoveSchool = (index2) => {
  30655. schoolList.value.splice(index2, 1);
  30656. };
  30657. const __returned__ = { schoolName, schoolList, getSchoolList, handleSubmit, handleAddSchool, handleRemoveSchool, ref: vue.ref };
  30658. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30659. return __returned__;
  30660. }
  30661. };
  30662. function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  30663. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  30664. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  30665. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$3);
  30666. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  30667. return vue.openBlock(), vue.createElementBlock("view", { class: "school-add" }, [
  30668. vue.createCommentVNode(" 输入区域 "),
  30669. vue.createElementVNode("view", { class: "input-section" }, [
  30670. vue.createElementVNode("view", { class: "input-header" }, [
  30671. vue.createElementVNode("text", { class: "required" }, "*"),
  30672. vue.createElementVNode("text", { class: "label" }, "学校名称:"),
  30673. vue.createVNode(_component_u_input, {
  30674. modelValue: $setup.schoolName,
  30675. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.schoolName = $event),
  30676. placeholder: "请输入一个学校名称",
  30677. border: "false",
  30678. class: "input"
  30679. }, {
  30680. suffix: vue.withCtx(() => [
  30681. vue.createVNode(_component_u_icon, {
  30682. name: "plus",
  30683. size: "24",
  30684. color: "#666",
  30685. onClick: $setup.handleAddSchool
  30686. })
  30687. ]),
  30688. _: 1
  30689. /* STABLE */
  30690. }, 8, ["modelValue"])
  30691. ])
  30692. ]),
  30693. vue.createCommentVNode(" 学校列表 "),
  30694. vue.createElementVNode("view", { class: "school-list" }, [
  30695. (vue.openBlock(true), vue.createElementBlock(
  30696. vue.Fragment,
  30697. null,
  30698. vue.renderList($setup.schoolList, (item, index2) => {
  30699. return vue.openBlock(), vue.createElementBlock("view", {
  30700. class: "school-item",
  30701. key: index2
  30702. }, [
  30703. vue.createVNode(_component_u_tag, {
  30704. text: item.schoolName,
  30705. closable: "",
  30706. size: "large"
  30707. }, null, 8, ["text"])
  30708. ]);
  30709. }),
  30710. 128
  30711. /* KEYED_FRAGMENT */
  30712. ))
  30713. ]),
  30714. vue.createCommentVNode(" 底部提交按钮 "),
  30715. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  30716. vue.createVNode(_component_u_button, {
  30717. size: "large",
  30718. type: "success",
  30719. block: "",
  30720. onClick: $setup.handleSubmit
  30721. }, {
  30722. default: vue.withCtx(() => [
  30723. vue.createTextVNode("提交")
  30724. ]),
  30725. _: 1
  30726. /* STABLE */
  30727. })
  30728. ])
  30729. ]);
  30730. }
  30731. const PagesMyPageSchool = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__scopeId", "data-v-6d6c87ab"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/school.vue"]]);
  30732. const _sfc_main$e = {
  30733. __name: "audit-unfinished",
  30734. setup(__props, { expose: __expose }) {
  30735. __expose();
  30736. const list = vue.ref([]);
  30737. const updateList = (newList) => {
  30738. list.value = newList;
  30739. };
  30740. const __returned__ = { list, updateList, orderItem, pageScroll, ref: vue.ref };
  30741. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30742. return __returned__;
  30743. }
  30744. };
  30745. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  30746. return vue.openBlock(), vue.createElementBlock("view", { class: "audit-list" }, [
  30747. vue.createVNode($setup["pageScroll"], {
  30748. requestStr: "/app/orderinfo/myNeedCheckOrder",
  30749. onUpdateList: $setup.updateList
  30750. }, {
  30751. default: vue.withCtx(() => [
  30752. (vue.openBlock(true), vue.createElementBlock(
  30753. vue.Fragment,
  30754. null,
  30755. vue.renderList($setup.list, (item, index2) => {
  30756. return vue.openBlock(), vue.createBlock($setup["orderItem"], {
  30757. key: index2,
  30758. item
  30759. }, null, 8, ["item"]);
  30760. }),
  30761. 128
  30762. /* KEYED_FRAGMENT */
  30763. ))
  30764. ]),
  30765. _: 1
  30766. /* STABLE */
  30767. })
  30768. ]);
  30769. }
  30770. const PagesMyPageAuditUnfinished = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/audit-unfinished.vue"]]);
  30771. const _sfc_main$d = {
  30772. __name: "version",
  30773. setup(__props, { expose: __expose }) {
  30774. __expose();
  30775. const userInfo = vue.reactive({
  30776. version: "v_2024050400_1",
  30777. // Example version number
  30778. updateStatus: "已经是新版本"
  30779. // Example update status
  30780. });
  30781. function checkForUpdates() {
  30782. setTimeout(() => {
  30783. {
  30784. userInfo.updateStatus = "发现新版本,正在下载...";
  30785. downloadNewVersion();
  30786. }
  30787. }, 1e3);
  30788. }
  30789. function downloadNewVersion() {
  30790. setTimeout(() => {
  30791. userInfo.updateStatus = "下载完成,准备安装";
  30792. }, 2e3);
  30793. }
  30794. const __returned__ = { userInfo, checkForUpdates, downloadNewVersion, reactive: vue.reactive };
  30795. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30796. return __returned__;
  30797. }
  30798. };
  30799. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  30800. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  30801. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  30802. return vue.openBlock(), vue.createElementBlock("view", { class: "version-info-page" }, [
  30803. vue.createVNode(_component_u_cell_group, {
  30804. border: false,
  30805. customStyle: "background:#ffffff"
  30806. }, {
  30807. default: vue.withCtx(() => [
  30808. vue.createVNode(_component_u_cell, {
  30809. title: "当前版本号(正式版)",
  30810. value: $setup.userInfo.version || "无"
  30811. }, null, 8, ["value"]),
  30812. vue.createVNode(_component_u_cell, {
  30813. title: "检测更新",
  30814. value: $setup.userInfo.updateStatus || "无",
  30815. border: false,
  30816. onClick: $setup.checkForUpdates
  30817. }, null, 8, ["value"])
  30818. ]),
  30819. _: 1
  30820. /* STABLE */
  30821. })
  30822. ]);
  30823. }
  30824. const PagesMyPageVersion = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/version.vue"]]);
  30825. const props$1 = {
  30826. props: {
  30827. // 是否为加载中状态
  30828. loading: {
  30829. type: Boolean,
  30830. default: props$E.switch.loading
  30831. },
  30832. // 是否为禁用装填
  30833. disabled: {
  30834. type: Boolean,
  30835. default: props$E.switch.disabled
  30836. },
  30837. // 开关尺寸,单位px
  30838. size: {
  30839. type: [String, Number],
  30840. default: props$E.switch.size
  30841. },
  30842. // 打开时的背景颜色
  30843. activeColor: {
  30844. type: String,
  30845. default: props$E.switch.activeColor
  30846. },
  30847. // 关闭时的背景颜色
  30848. inactiveColor: {
  30849. type: String,
  30850. default: props$E.switch.inactiveColor
  30851. },
  30852. // 通过v-model双向绑定的值
  30853. modelValue: {
  30854. type: [Boolean, String, Number],
  30855. default: props$E.switch.value
  30856. },
  30857. // switch打开时的值
  30858. activeValue: {
  30859. type: [String, Number, Boolean],
  30860. default: props$E.switch.activeValue
  30861. },
  30862. // switch关闭时的值
  30863. inactiveValue: {
  30864. type: [String, Number, Boolean],
  30865. default: props$E.switch.inactiveValue
  30866. },
  30867. // 是否开启异步变更,开启后需要手动控制输入值
  30868. asyncChange: {
  30869. type: Boolean,
  30870. default: props$E.switch.asyncChange
  30871. },
  30872. // 圆点与外边框的距离
  30873. space: {
  30874. type: [String, Number],
  30875. default: props$E.switch.space
  30876. }
  30877. }
  30878. };
  30879. const _sfc_main$c = {
  30880. name: "u-switch",
  30881. mixins: [mpMixin, mixin, props$1],
  30882. watch: {
  30883. modelValue: {
  30884. immediate: true,
  30885. handler(n) {
  30886. if (n !== this.inactiveValue && n !== this.activeValue) {
  30887. uni.$u.error("v-model绑定的值必须为inactiveValue、activeValue二者之一");
  30888. }
  30889. }
  30890. }
  30891. },
  30892. data() {
  30893. return {
  30894. bgColor: "#ffffff"
  30895. };
  30896. },
  30897. computed: {
  30898. isActive() {
  30899. return this.modelValue === this.activeValue;
  30900. },
  30901. switchStyle() {
  30902. let style = {};
  30903. style.width = uni.$u.addUnit(this.size * 2 + 2);
  30904. style.height = uni.$u.addUnit(Number(this.size) + 2);
  30905. if (this.customInactiveColor) {
  30906. style.borderColor = "rgba(0, 0, 0, 0)";
  30907. }
  30908. style.backgroundColor = this.isActive ? this.activeColor : this.inactiveColor;
  30909. return style;
  30910. },
  30911. nodeStyle() {
  30912. let style = {};
  30913. style.width = uni.$u.addUnit(this.size - this.space);
  30914. style.height = uni.$u.addUnit(this.size - this.space);
  30915. const translateX = this.isActive ? uni.$u.addUnit(this.space) : uni.$u.addUnit(this.size);
  30916. style.transform = `translateX(-${translateX})`;
  30917. return style;
  30918. },
  30919. bgStyle() {
  30920. let style = {};
  30921. style.width = uni.$u.addUnit(Number(this.size) * 2 - this.size / 2);
  30922. style.height = uni.$u.addUnit(this.size);
  30923. style.backgroundColor = this.inactiveColor;
  30924. style.transform = `scale(${this.isActive ? 0 : 1})`;
  30925. return style;
  30926. },
  30927. customInactiveColor() {
  30928. return this.inactiveColor !== "#fff" && this.inactiveColor !== "#ffffff";
  30929. }
  30930. },
  30931. emits: ["update:modelValue", "change"],
  30932. methods: {
  30933. clickHandler() {
  30934. if (!this.disabled && !this.loading) {
  30935. const oldValue = this.isActive ? this.inactiveValue : this.activeValue;
  30936. if (!this.asyncChange) {
  30937. this.$emit("update:modelValue", oldValue);
  30938. }
  30939. this.$nextTick(() => {
  30940. this.$emit("change", oldValue);
  30941. });
  30942. }
  30943. }
  30944. }
  30945. };
  30946. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  30947. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  30948. return vue.openBlock(), vue.createElementBlock(
  30949. "view",
  30950. {
  30951. class: vue.normalizeClass(["u-switch", [_ctx.disabled && "u-switch--disabled"]]),
  30952. style: vue.normalizeStyle([$options.switchStyle, _ctx.$u.addStyle(_ctx.customStyle)]),
  30953. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  30954. },
  30955. [
  30956. vue.createElementVNode(
  30957. "view",
  30958. {
  30959. class: "u-switch__bg",
  30960. style: vue.normalizeStyle([$options.bgStyle])
  30961. },
  30962. null,
  30963. 4
  30964. /* STYLE */
  30965. ),
  30966. vue.createElementVNode(
  30967. "view",
  30968. {
  30969. class: vue.normalizeClass(["u-switch__node", [_ctx.modelValue && "u-switch__node--on"]]),
  30970. style: vue.normalizeStyle([$options.nodeStyle]),
  30971. ref: "u-switch__node"
  30972. },
  30973. [
  30974. vue.createVNode(_component_u_loading_icon, {
  30975. show: _ctx.loading,
  30976. mode: "circle",
  30977. timingFunction: "linear",
  30978. color: _ctx.modelValue ? _ctx.activeColor : "#AAABAD",
  30979. size: _ctx.size * 0.6
  30980. }, null, 8, ["show", "color", "size"])
  30981. ],
  30982. 6
  30983. /* CLASS, STYLE */
  30984. )
  30985. ],
  30986. 6
  30987. /* CLASS, STYLE */
  30988. );
  30989. }
  30990. const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-6ab257b3"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-switch/u-switch.vue"]]);
  30991. const props = {
  30992. props: {
  30993. // 最小可选值
  30994. min: {
  30995. type: [Number, String],
  30996. default: props$E.slider.min
  30997. },
  30998. // 最大可选值
  30999. max: {
  31000. type: [Number, String],
  31001. default: props$E.slider.max
  31002. },
  31003. // 步长,取值必须大于 0,并且可被(max - min)整除
  31004. step: {
  31005. type: [Number, String],
  31006. default: props$E.slider.step
  31007. },
  31008. // 当前取值
  31009. value: {
  31010. type: [Number, String],
  31011. default: props$E.slider.value
  31012. },
  31013. // 滑块右侧已选择部分的背景色
  31014. activeColor: {
  31015. type: String,
  31016. default: props$E.slider.activeColor
  31017. },
  31018. // 滑块左侧未选择部分的背景色
  31019. inactiveColor: {
  31020. type: String,
  31021. default: props$E.slider.inactiveColor
  31022. },
  31023. // 滑块的大小,取值范围为 12 - 28
  31024. blockSize: {
  31025. type: [Number, String],
  31026. default: props$E.slider.blockSize
  31027. },
  31028. // 滑块的颜色
  31029. blockColor: {
  31030. type: String,
  31031. default: props$E.slider.blockColor
  31032. },
  31033. // 禁用状态
  31034. disabled: {
  31035. type: Boolean,
  31036. default: props$E.slider.disabled
  31037. },
  31038. // 是否显示当前的选择值
  31039. showValue: {
  31040. type: Boolean,
  31041. default: props$E.slider.showValue
  31042. }
  31043. }
  31044. };
  31045. const _sfc_main$b = {
  31046. name: "u--slider",
  31047. mixins: [mpMixin, mixin, props],
  31048. methods: {
  31049. // 拖动过程中触发
  31050. changingHandler(e) {
  31051. const {
  31052. value: value2
  31053. } = e.detail;
  31054. this.$emit("input", value2);
  31055. this.$emit("changing", value2);
  31056. },
  31057. // 滑动结束时触发
  31058. changeHandler(e) {
  31059. const {
  31060. value: value2
  31061. } = e.detail;
  31062. this.$emit("input", value2);
  31063. this.$emit("change", value2);
  31064. }
  31065. }
  31066. };
  31067. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  31068. return vue.openBlock(), vue.createElementBlock(
  31069. "view",
  31070. {
  31071. class: "u-slider",
  31072. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  31073. },
  31074. [
  31075. vue.createElementVNode("slider", {
  31076. min: _ctx.min,
  31077. max: _ctx.max,
  31078. step: _ctx.step,
  31079. value: _ctx.value,
  31080. activeColor: _ctx.activeColor,
  31081. inactiveColor: _ctx.inactiveColor,
  31082. blockSize: _ctx.$u.getPx(_ctx.blockSize),
  31083. blockColor: _ctx.blockColor,
  31084. showValue: _ctx.showValue,
  31085. disabled: _ctx.disabled,
  31086. onChanging: _cache[0] || (_cache[0] = (...args) => $options.changingHandler && $options.changingHandler(...args)),
  31087. onChange: _cache[1] || (_cache[1] = (...args) => $options.changeHandler && $options.changeHandler(...args))
  31088. }, null, 40, ["min", "max", "step", "value", "activeColor", "inactiveColor", "blockSize", "blockColor", "showValue", "disabled"])
  31089. ],
  31090. 4
  31091. /* STYLE */
  31092. );
  31093. }
  31094. const __easycom_4 = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-7b84e269"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-slider/u-slider.vue"]]);
  31095. const _sfc_main$a = {
  31096. __name: "volume",
  31097. setup(__props, { expose: __expose }) {
  31098. __expose();
  31099. const settings = vue.ref({
  31100. audioStartSwitch: true,
  31101. audioStart: "书嗨,不辜负每一个爱书的人",
  31102. audioSpeed: 10,
  31103. audioVolume: 5,
  31104. "audioPlay": false,
  31105. "audioClick": false
  31106. });
  31107. function changeSpeed(value2) {
  31108. settings.value.audioSpeed = value2;
  31109. }
  31110. function changeVolume(value2) {
  31111. settings.value.audioVolume = value2;
  31112. }
  31113. const getVoiceBroadcast = () => {
  31114. uni.$u.http.get("/app/appConf/getAudioConfig").then((res2) => {
  31115. if (res2.code == 200) {
  31116. settings.value = res2.data;
  31117. }
  31118. });
  31119. };
  31120. getVoiceBroadcast();
  31121. const saveVoiceBroadcast = () => {
  31122. uni.$u.http.post("/app/appConf/setAudioConfig", settings.value).then((res2) => {
  31123. if (res2.code == 200) {
  31124. uni.showToast({
  31125. title: "设置成功",
  31126. icon: "success"
  31127. });
  31128. initTTS();
  31129. }
  31130. });
  31131. };
  31132. const tts = vue.ref(null);
  31133. const initTTS = () => {
  31134. let params = {
  31135. speed: settings.value.audioSpeed / 10,
  31136. // 将 0-10 转换为 0-1
  31137. pitch: settings.value.audioVolume,
  31138. // 将 0-10 转换为 0-1
  31139. volume: 1
  31140. };
  31141. tts.value = new VolumeTTS(params);
  31142. settings.value.audioStartSwitch && tts.value.speak(settings.value.audioStart);
  31143. };
  31144. function stopPlayback() {
  31145. tts.value && tts.value.stop();
  31146. uni.showToast({
  31147. title: "已停止播放",
  31148. icon: "none"
  31149. });
  31150. }
  31151. function restartApp() {
  31152. uni.showModal({
  31153. title: "提示",
  31154. content: "确定要重启应用吗?",
  31155. success: function(res2) {
  31156. if (res2.confirm) {
  31157. plus.runtime.restart();
  31158. }
  31159. }
  31160. });
  31161. }
  31162. function loadSettings() {
  31163. try {
  31164. const savedSettings = uni.getStorageSync("tts_settings");
  31165. if (savedSettings) {
  31166. Object.assign(settings, savedSettings);
  31167. }
  31168. } catch (error2) {
  31169. formatAppLog("error", "at pages/my/page/volume.vue:161", "加载设置失败:", error2);
  31170. }
  31171. }
  31172. function playClickSound2() {
  31173. if (!settings.audioClick)
  31174. return;
  31175. const audio = uni.createInnerAudioContext();
  31176. audio.src = "/static/audio/click.mp3";
  31177. audio.play();
  31178. }
  31179. vue.onMounted(async () => {
  31180. loadSettings();
  31181. });
  31182. 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() {
  31183. return VolumeTTS;
  31184. } };
  31185. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  31186. return __returned__;
  31187. }
  31188. };
  31189. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  31190. const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0);
  31191. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  31192. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  31193. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$2);
  31194. const _component_u_slider = resolveEasycom(vue.resolveDynamicComponent("u-slider"), __easycom_4);
  31195. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  31196. return vue.openBlock(), vue.createElementBlock("view", { class: "settings-container" }, [
  31197. vue.createCommentVNode(" 设置选项组 "),
  31198. vue.createElementVNode("view", { class: "settings-section" }, [
  31199. vue.createVNode(_component_u_cell_group, { border: false }, {
  31200. default: vue.withCtx(() => [
  31201. vue.createCommentVNode(" 语音播报设置 "),
  31202. vue.createVNode(_component_u_cell, {
  31203. title: "语音播报",
  31204. label: "控制除app启动提示外所有语音播报的开关",
  31205. "border-bottom": true
  31206. }, {
  31207. "right-icon": vue.withCtx(() => [
  31208. vue.createVNode(_component_u_switch, {
  31209. modelValue: $setup.settings.audioPlay,
  31210. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.settings.audioPlay = $event),
  31211. activeColor: "#4cd964"
  31212. }, null, 8, ["modelValue"])
  31213. ]),
  31214. _: 1
  31215. /* STABLE */
  31216. }),
  31217. vue.createCommentVNode(" 点击音效设置 "),
  31218. vue.createVNode(_component_u_cell, {
  31219. title: "点击音效",
  31220. "border-bottom": true
  31221. }, {
  31222. "right-icon": vue.withCtx(() => [
  31223. vue.createVNode(_component_u_switch, {
  31224. modelValue: $setup.settings.audioClick,
  31225. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.settings.audioClick = $event),
  31226. activeColor: "#4cd964"
  31227. }, null, 8, ["modelValue"])
  31228. ]),
  31229. _: 1
  31230. /* STABLE */
  31231. }),
  31232. vue.createCommentVNode(" 启动提示语设置 "),
  31233. vue.createVNode(_component_u_cell, {
  31234. title: "启动提示语",
  31235. "border-bottom": true
  31236. }, {
  31237. "right-icon": vue.withCtx(() => [
  31238. vue.createVNode(_component_u_switch, {
  31239. modelValue: $setup.settings.audioStartSwitch,
  31240. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.settings.audioStartSwitch = $event),
  31241. activeColor: "#4cd964"
  31242. }, null, 8, ["modelValue"])
  31243. ]),
  31244. _: 1
  31245. /* STABLE */
  31246. })
  31247. ]),
  31248. _: 1
  31249. /* STABLE */
  31250. }),
  31251. vue.createCommentVNode(" 启动提示语输入框 "),
  31252. vue.createElementVNode("view", { class: "input-section" }, [
  31253. vue.createVNode(_component_u_textarea, {
  31254. modelValue: $setup.settings.audioStart,
  31255. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.settings.audioStart = $event),
  31256. placeholder: "输入启动时要说的内容,比如:欢迎使用书嗨/很开心又见到你啦",
  31257. height: "100"
  31258. }, null, 8, ["modelValue"])
  31259. ]),
  31260. vue.createCommentVNode(" 语速设置 "),
  31261. vue.createElementVNode("view", { class: "slider-section" }, [
  31262. vue.createElementVNode("view", { class: "slider-title" }, [
  31263. vue.createElementVNode("text", null, "设置语速"),
  31264. vue.createElementVNode("text", { class: "subtitle" }, "(部分机型不支持)")
  31265. ]),
  31266. vue.createVNode(_component_u_slider, {
  31267. value: $setup.settings.audioSpeed,
  31268. max: 20,
  31269. min: 5,
  31270. step: 1,
  31271. showValue: "",
  31272. onChange: $setup.changeSpeed
  31273. }, null, 8, ["value"])
  31274. ]),
  31275. vue.createCommentVNode(" 音调设置 "),
  31276. vue.createElementVNode("view", { class: "slider-section" }, [
  31277. vue.createElementVNode("view", { class: "slider-title" }, [
  31278. vue.createElementVNode("text", null, "设置音调"),
  31279. vue.createElementVNode("text", { class: "subtitle" }, "(部分机型不支持)")
  31280. ]),
  31281. vue.createVNode(_component_u_slider, {
  31282. value: $setup.settings.audioVolume,
  31283. max: 10,
  31284. min: 1,
  31285. step: 1,
  31286. showValue: "",
  31287. onChange: $setup.changeVolume
  31288. }, null, 8, ["value"])
  31289. ]),
  31290. vue.createCommentVNode(" 操作按钮 "),
  31291. vue.createElementVNode("view", { class: "button-group" }, [
  31292. vue.createVNode(_component_u_button, {
  31293. type: "primary",
  31294. text: "保存设置并试听",
  31295. onClick: $setup.saveVoiceBroadcast
  31296. }),
  31297. vue.createVNode(_component_u_button, {
  31298. type: "warning",
  31299. text: "停止播放",
  31300. onClick: $setup.stopPlayback,
  31301. plain: true
  31302. }),
  31303. vue.createVNode(_component_u_button, {
  31304. type: "error",
  31305. text: "重启app",
  31306. onClick: $setup.restartApp,
  31307. plain: true
  31308. })
  31309. ])
  31310. ])
  31311. ]);
  31312. }
  31313. const PagesMyPageVolume = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__scopeId", "data-v-983b50b6"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/volume.vue"]]);
  31314. const _sfc_main$9 = {
  31315. __name: "book-display",
  31316. setup(__props, { expose: __expose }) {
  31317. __expose();
  31318. const settings = vue.reactive({
  31319. showRecyclePrice: false,
  31320. showRecycleStatus: false,
  31321. showStock: false,
  31322. showDetail: false
  31323. });
  31324. function loadSettings() {
  31325. uni.$u.http.get("/app/appConf/getBookShowConfig").then((res2) => {
  31326. if (res2.code == 200) {
  31327. Object.assign(settings, res2.data);
  31328. }
  31329. });
  31330. }
  31331. function saveSettings() {
  31332. uni.$u.http.post("/app/appConf/setBookShowConfig", settings).then((res2) => {
  31333. if (res2.code == 200) {
  31334. uni.showToast({
  31335. title: "设置已保存",
  31336. icon: "success"
  31337. });
  31338. } else {
  31339. uni.showToast({
  31340. title: "保存设置失败",
  31341. icon: "error"
  31342. });
  31343. }
  31344. });
  31345. }
  31346. vue.onMounted(() => {
  31347. loadSettings();
  31348. });
  31349. const __returned__ = { settings, loadSettings, saveSettings, reactive: vue.reactive, onMounted: vue.onMounted };
  31350. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  31351. return __returned__;
  31352. }
  31353. };
  31354. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  31355. const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0);
  31356. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$7);
  31357. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$4);
  31358. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  31359. return vue.openBlock(), vue.createElementBlock("view", { class: "settings-container" }, [
  31360. vue.createCommentVNode(" 设置列表 "),
  31361. vue.createVNode(_component_u_cell_group, {
  31362. border: false,
  31363. class: "settings-group"
  31364. }, {
  31365. default: vue.withCtx(() => [
  31366. vue.createVNode(_component_u_cell, {
  31367. title: "是否展示回收价",
  31368. "border-bottom": true
  31369. }, {
  31370. "right-icon": vue.withCtx(() => [
  31371. vue.createVNode(_component_u_switch, {
  31372. modelValue: $setup.settings.showRecyclePrice,
  31373. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.settings.showRecyclePrice = $event),
  31374. activeColor: "#4cd964"
  31375. }, null, 8, ["modelValue"])
  31376. ]),
  31377. _: 1
  31378. /* STABLE */
  31379. }),
  31380. vue.createVNode(_component_u_cell, {
  31381. title: "是否展示回收状态",
  31382. "border-bottom": true
  31383. }, {
  31384. "right-icon": vue.withCtx(() => [
  31385. vue.createVNode(_component_u_switch, {
  31386. modelValue: $setup.settings.showRecycleStatus,
  31387. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.settings.showRecycleStatus = $event),
  31388. activeColor: "#4cd964"
  31389. }, null, 8, ["modelValue"])
  31390. ]),
  31391. _: 1
  31392. /* STABLE */
  31393. }),
  31394. vue.createVNode(_component_u_cell, {
  31395. title: "是否展示库存信息",
  31396. "border-bottom": true
  31397. }, {
  31398. "right-icon": vue.withCtx(() => [
  31399. vue.createVNode(_component_u_switch, {
  31400. modelValue: $setup.settings.showStock,
  31401. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.settings.showStock = $event),
  31402. activeColor: "#4cd964"
  31403. }, null, 8, ["modelValue"])
  31404. ]),
  31405. _: 1
  31406. /* STABLE */
  31407. }),
  31408. vue.createVNode(_component_u_cell, {
  31409. title: "是否默认展开商品详情",
  31410. "border-bottom": false
  31411. }, {
  31412. "right-icon": vue.withCtx(() => [
  31413. vue.createVNode(_component_u_switch, {
  31414. modelValue: $setup.settings.showDetail,
  31415. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.settings.showDetail = $event),
  31416. activeColor: "#4cd964"
  31417. }, null, 8, ["modelValue"])
  31418. ]),
  31419. _: 1
  31420. /* STABLE */
  31421. })
  31422. ]),
  31423. _: 1
  31424. /* STABLE */
  31425. }),
  31426. vue.createVNode(_component_u_button, {
  31427. class: "mt-40",
  31428. type: "primary",
  31429. onClick: $setup.saveSettings
  31430. }, {
  31431. default: vue.withCtx(() => [
  31432. vue.createTextVNode("保存")
  31433. ]),
  31434. _: 1
  31435. /* STABLE */
  31436. })
  31437. ]);
  31438. }
  31439. const PagesMyPageBookDisplay = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__scopeId", "data-v-30e61b0d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/book-display.vue"]]);
  31440. const _sfc_main$8 = {
  31441. __name: "password",
  31442. setup(__props, { expose: __expose }) {
  31443. __expose();
  31444. const formRef = vue.ref(null);
  31445. const loading = vue.ref(false);
  31446. const showPassword = vue.reactive({
  31447. old: false,
  31448. new: false,
  31449. confirm: false
  31450. });
  31451. const formData = vue.reactive({
  31452. oldPassword: "",
  31453. newPassword: "",
  31454. confirmPassword: ""
  31455. });
  31456. const rules2 = {
  31457. oldPassword: [{
  31458. required: true,
  31459. message: "请输入原密码",
  31460. trigger: ["blur", "change"]
  31461. }, {
  31462. min: 6,
  31463. message: "密码长度不能小于6位",
  31464. trigger: ["blur", "change"]
  31465. }],
  31466. newPassword: [{
  31467. required: true,
  31468. message: "请输入新密码",
  31469. trigger: ["blur", "change"]
  31470. }, {
  31471. min: 6,
  31472. message: "密码长度不能小于6位",
  31473. trigger: ["blur", "change"]
  31474. }, {
  31475. validator: (rule, value2, callback) => {
  31476. if (value2 === formData.oldPassword) {
  31477. callback(new Error("新密码不能与原密码相同"));
  31478. } else {
  31479. callback();
  31480. }
  31481. },
  31482. trigger: ["blur", "change"]
  31483. }],
  31484. confirmPassword: [{
  31485. required: true,
  31486. message: "请再次输入新密码",
  31487. trigger: ["blur", "change"]
  31488. }, {
  31489. validator: (rule, value2, callback) => {
  31490. if (value2 !== formData.newPassword) {
  31491. callback(new Error("两次输入的密码不一致"));
  31492. } else {
  31493. callback();
  31494. }
  31495. },
  31496. trigger: ["blur", "change"]
  31497. }]
  31498. };
  31499. function submitForm() {
  31500. if (!formRef.value)
  31501. return;
  31502. formRef.value.validate().then((valid) => {
  31503. if (valid) {
  31504. loading.value = true;
  31505. uni.$u.http.post("/app/appUser/updatePwd", formData).then((res2) => {
  31506. if (res2.code == 200) {
  31507. uni.showModal({
  31508. title: "提示",
  31509. content: "密码修改成功,是否确定要退出重新登录?",
  31510. success: (res3) => {
  31511. if (res3.confirm) {
  31512. uni.clearStorageSync();
  31513. uni.reLaunch({
  31514. url: "/pages/login/login"
  31515. });
  31516. } else {
  31517. uni.navigateBack({
  31518. delta: 1
  31519. });
  31520. }
  31521. }
  31522. });
  31523. }
  31524. }).finally(() => {
  31525. loading.value = false;
  31526. });
  31527. }
  31528. });
  31529. }
  31530. function resetForm() {
  31531. if (!formRef.value)
  31532. return;
  31533. formRef.value.resetFields();
  31534. }
  31535. const __returned__ = { formRef, loading, showPassword, formData, rules: rules2, submitForm, resetForm, ref: vue.ref, reactive: vue.reactive };
  31536. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  31537. return __returned__;
  31538. }
  31539. };
  31540. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  31541. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  31542. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$b);
  31543. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$6);
  31544. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$5);
  31545. return vue.openBlock(), vue.createElementBlock("view", { class: "password-container" }, [
  31546. vue.createVNode(_component_u_form, {
  31547. model: $setup.formData,
  31548. rules: $setup.rules,
  31549. ref: "formRef",
  31550. labelPosition: "top",
  31551. borderBottom: true,
  31552. labelWidth: "300px",
  31553. "error-type": "toast"
  31554. }, {
  31555. default: vue.withCtx(() => [
  31556. vue.createVNode(_component_u_form_item, {
  31557. label: "原密码",
  31558. prop: "oldPassword",
  31559. borderBottom: ""
  31560. }, {
  31561. default: vue.withCtx(() => [
  31562. vue.createVNode(_component_u_input, {
  31563. modelValue: $setup.formData.oldPassword,
  31564. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.oldPassword = $event),
  31565. type: "password",
  31566. placeholder: "请输入原密码",
  31567. border: false
  31568. }, null, 8, ["modelValue"])
  31569. ]),
  31570. _: 1
  31571. /* STABLE */
  31572. }),
  31573. vue.createVNode(_component_u_form_item, {
  31574. label: "新密码",
  31575. prop: "newPassword",
  31576. borderBottom: ""
  31577. }, {
  31578. default: vue.withCtx(() => [
  31579. vue.createVNode(_component_u_input, {
  31580. modelValue: $setup.formData.newPassword,
  31581. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.newPassword = $event),
  31582. type: "password",
  31583. placeholder: "请输入新密码",
  31584. border: false
  31585. }, null, 8, ["modelValue"])
  31586. ]),
  31587. _: 1
  31588. /* STABLE */
  31589. }),
  31590. vue.createVNode(_component_u_form_item, {
  31591. label: "确认新密码",
  31592. prop: "confirmPassword",
  31593. borderBottom: ""
  31594. }, {
  31595. default: vue.withCtx(() => [
  31596. vue.createVNode(_component_u_input, {
  31597. modelValue: $setup.formData.confirmPassword,
  31598. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.confirmPassword = $event),
  31599. type: "password",
  31600. placeholder: "请再次输入新密码",
  31601. border: false
  31602. }, null, 8, ["modelValue"])
  31603. ]),
  31604. _: 1
  31605. /* STABLE */
  31606. })
  31607. ]),
  31608. _: 1
  31609. /* STABLE */
  31610. }, 8, ["model"]),
  31611. vue.createElementVNode("view", { class: "submit-btn" }, [
  31612. vue.createVNode(_component_u_button, {
  31613. type: "primary",
  31614. text: "修改密码",
  31615. onClick: $setup.submitForm,
  31616. loading: $setup.loading
  31617. }, null, 8, ["loading"])
  31618. ])
  31619. ]);
  31620. }
  31621. const PagesMyPagePassword = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__scopeId", "data-v-b88a898e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/password.vue"]]);
  31622. const _sfc_main$7 = {};
  31623. function _sfc_render$6(_ctx, _cache) {
  31624. return vue.openBlock(), vue.createElementBlock("view");
  31625. }
  31626. const PagesOrderStatPendingReview = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-review.vue"]]);
  31627. const _sfc_main$6 = {};
  31628. function _sfc_render$5(_ctx, _cache) {
  31629. return vue.openBlock(), vue.createElementBlock("view");
  31630. }
  31631. const PagesOrderStatPendingPick = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-pick.vue"]]);
  31632. const _sfc_main$5 = {};
  31633. function _sfc_render$4(_ctx, _cache) {
  31634. return vue.openBlock(), vue.createElementBlock("view");
  31635. }
  31636. const PagesOrderStatPendingSign = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-sign.vue"]]);
  31637. const _sfc_main$4 = {};
  31638. function _sfc_render$3(_ctx, _cache) {
  31639. return vue.openBlock(), vue.createElementBlock("view");
  31640. }
  31641. const PagesOrderStatPendingConfirm = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-confirm.vue"]]);
  31642. const _sfc_main$3 = {};
  31643. function _sfc_render$2(_ctx, _cache) {
  31644. return vue.openBlock(), vue.createElementBlock("view");
  31645. }
  31646. const PagesOrderStatPendingAudit = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-audit.vue"]]);
  31647. const _sfc_main$2 = {};
  31648. function _sfc_render$1(_ctx, _cache) {
  31649. return vue.openBlock(), vue.createElementBlock("view");
  31650. }
  31651. const PagesOrderStatPendingPayment = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-payment.vue"]]);
  31652. const _sfc_main$1 = {};
  31653. function _sfc_render(_ctx, _cache) {
  31654. return vue.openBlock(), vue.createElementBlock("view");
  31655. }
  31656. const PagesOrderStatReceiveStat = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/receive-stat.vue"]]);
  31657. __definePage("pages/login/login", PagesLoginLogin);
  31658. __definePage("pages/index/index", PagesIndexIndex);
  31659. __definePage("pages/my/my", PagesMyMy);
  31660. __definePage("pages/order/index", PagesOrderIndex);
  31661. __definePage("pages/book/index", PagesBookIndex);
  31662. __definePage("pages/index/express/transfer-sign", PagesIndexExpressTransferSign);
  31663. __definePage("pages/index/express/scan", PagesIndexExpressScan);
  31664. __definePage("pages/index/express/quick-check", PagesIndexExpressQuickCheck);
  31665. __definePage("pages/index/express/quick-unpack", PagesIndexExpressQuickUnpack);
  31666. __definePage("pages/index/express/route-exception", PagesIndexExpressRouteException);
  31667. __definePage("pages/index/express/warehouse-sign", PagesIndexExpressWarehouseSign);
  31668. __definePage("pages/index/express/weight-modify", PagesIndexExpressWeightModify);
  31669. __definePage("pages/index/audit/confirm-receipt", PagesIndexAuditConfirmReceipt);
  31670. __definePage("pages/index/audit/scan-order", PagesIndexAuditScanOrder);
  31671. __definePage("pages/index/audit/isbn-order", PagesIndexAuditIsbnOrder);
  31672. __definePage("pages/index/audit/express-order", PagesIndexAuditExpressOrder);
  31673. __definePage("pages/index/detail/user-orders", PagesIndexDetailUserOrders);
  31674. __definePage("pages/index/detail/index", PagesIndexDetailIndex);
  31675. __definePage("pages/index/detail/book-audit", PagesIndexDetailBookAudit);
  31676. __definePage("pages/index/detail/batch-audit", PagesIndexDetailBatchAudit);
  31677. __definePage("pages/index/audit/sender", PagesIndexAuditSender);
  31678. __definePage("pages/index/statistic/audit", PagesIndexStatisticAudit);
  31679. __definePage("pages/index/statistic/after-sale", PagesIndexStatisticAfterSale);
  31680. __definePage("pages/index/statistic/package", PagesIndexStatisticPackage);
  31681. __definePage("pages/index/wms/medium-in", PagesIndexWmsMediumIn);
  31682. __definePage("pages/index/wms/good-in", PagesIndexWmsGoodIn);
  31683. __definePage("pages/index/wms/secondary-in", PagesIndexWmsSecondaryIn);
  31684. __definePage("pages/index/wms/bad-in", PagesIndexWmsBadIn);
  31685. __definePage("pages/index/wms/bad-out", PagesIndexWmsBadOut);
  31686. __definePage("pages/index/wms/bad-out-order", PagesIndexWmsBadOutOrder);
  31687. __definePage("pages/index/wms/bad-off", PagesIndexWmsBadOff);
  31688. __definePage("pages/index/wms/order-query", PagesIndexWmsOrderQuery);
  31689. __definePage("pages/index/wms/order-query-list", PagesIndexWmsOrderQueryList);
  31690. __definePage("pages/index/wms/location-order", PagesIndexWmsLocationOrder);
  31691. __definePage("pages/index/wms/location-order-list", PagesIndexWmsLocationOrderList);
  31692. __definePage("pages/index/wms/location-select", PagesIndexWmsLocationSelect);
  31693. __definePage("pages/index/wms/warehouse-select", PagesIndexWmsWarehouseSelect);
  31694. __definePage("pages/index/wms/speedy-check", PagesIndexWmsSpeedyCheck);
  31695. __definePage("pages/index/offline/check-order", PagesIndexOfflineCheckOrder);
  31696. __definePage("pages/index/offline/check-record", PagesIndexOfflineCheckRecord);
  31697. __definePage("pages/index/entry/scan-book", PagesIndexEntryScanBook);
  31698. __definePage("pages/index/entry/book-weight", PagesIndexEntryBookWeight);
  31699. __definePage("pages/index/entry/commodity-scan", PagesIndexEntryCommodityScan);
  31700. __definePage("pages/index/express/logistics-detail", PagesIndexExpressLogisticsDetail);
  31701. __definePage("pages/index/wms/task-detail", PagesIndexWmsTaskDetail);
  31702. __definePage("pages/index/wms/speedy-check-add", PagesIndexWmsSpeedyCheckAdd);
  31703. __definePage("pages/my/page/user-info", PagesMyPageUserInfo);
  31704. __definePage("pages/my/page/warehouse", PagesMyPageWarehouse);
  31705. __definePage("pages/my/page/school", PagesMyPageSchool);
  31706. __definePage("pages/my/page/audit-unfinished", PagesMyPageAuditUnfinished);
  31707. __definePage("pages/my/page/version", PagesMyPageVersion);
  31708. __definePage("pages/my/page/volume", PagesMyPageVolume);
  31709. __definePage("pages/my/page/book-display", PagesMyPageBookDisplay);
  31710. __definePage("pages/my/page/password", PagesMyPagePassword);
  31711. __definePage("pages/order/stat/pending-review", PagesOrderStatPendingReview);
  31712. __definePage("pages/order/stat/pending-pick", PagesOrderStatPendingPick);
  31713. __definePage("pages/order/stat/pending-sign", PagesOrderStatPendingSign);
  31714. __definePage("pages/order/stat/pending-confirm", PagesOrderStatPendingConfirm);
  31715. __definePage("pages/order/stat/pending-audit", PagesOrderStatPendingAudit);
  31716. __definePage("pages/order/stat/pending-payment", PagesOrderStatPendingPayment);
  31717. __definePage("pages/order/stat/receive-stat", PagesOrderStatReceiveStat);
  31718. function useInit() {
  31719. var barcodeModel = requireNativePlugin("iData-BarcodePlugin-BarcodeModule");
  31720. barcodeModel.initScan((ret) => {
  31721. formatAppLog("log", "at utils/useBarcodeModule.js:9", "初始化扫描", ret);
  31722. });
  31723. }
  31724. const callbackRegistry = {
  31725. activePagePath: null,
  31726. callbacks: /* @__PURE__ */ new Map()
  31727. // 使用Map存储每个页面路径对应的回调函数
  31728. };
  31729. const globalEventHandler = function(e) {
  31730. if (!callbackRegistry.activePagePath)
  31731. return;
  31732. const callback = callbackRegistry.callbacks.get(callbackRegistry.activePagePath);
  31733. if (callback) {
  31734. callback(e);
  31735. }
  31736. };
  31737. let isGlobalListenerInitialized = false;
  31738. function initGlobalListener() {
  31739. if (isGlobalListenerInitialized)
  31740. return;
  31741. const globalEvent = requireNativePlugin("globalEvent");
  31742. globalEvent.removeEventListener("iDataBarcodeEvent", globalEventHandler);
  31743. globalEvent.addEventListener("iDataBarcodeEvent", globalEventHandler);
  31744. isGlobalListenerInitialized = true;
  31745. }
  31746. function useGlobalEvent(onChange) {
  31747. initGlobalListener();
  31748. const pages2 = getCurrentPages();
  31749. const currentPage = pages2[pages2.length - 1];
  31750. const pagePath = currentPage ? currentPage.route : null;
  31751. if (!pagePath) {
  31752. formatAppLog("error", "at utils/useBarcodeModule.js:62", "无法获取当前页面路径");
  31753. return () => {
  31754. };
  31755. }
  31756. callbackRegistry.activePagePath = pagePath;
  31757. callbackRegistry.callbacks.set(pagePath, onChange);
  31758. formatAppLog("log", "at utils/useBarcodeModule.js:72", `页面 ${pagePath} 已注册扫描回调`);
  31759. return () => {
  31760. callbackRegistry.callbacks.delete(pagePath);
  31761. formatAppLog("log", "at utils/useBarcodeModule.js:77", `页面 ${pagePath} 的扫描回调已移除`);
  31762. };
  31763. }
  31764. function updateActivePageOnShow() {
  31765. const pages2 = getCurrentPages();
  31766. const currentPage = pages2[pages2.length - 1];
  31767. const pagePath = currentPage ? currentPage.route : null;
  31768. if (!pagePath) {
  31769. formatAppLog("error", "at utils/useBarcodeModule.js:91", "无法获取当前页面路径");
  31770. return;
  31771. }
  31772. callbackRegistry.activePagePath = pagePath;
  31773. formatAppLog("log", "at utils/useBarcodeModule.js:97", `当前活跃页面已更新为: ${pagePath}`);
  31774. }
  31775. function useGlobalEventRemove() {
  31776. const globalEvent = requireNativePlugin("globalEvent");
  31777. globalEvent.removeEventListener("iDataBarcodeEvent", globalEventHandler);
  31778. isGlobalListenerInitialized = false;
  31779. callbackRegistry.callbacks.clear();
  31780. callbackRegistry.activePagePath = null;
  31781. formatAppLog("log", "at utils/useBarcodeModule.js:110", "全局扫描监听器已完全移除");
  31782. }
  31783. function useRouteMonitor(onChange) {
  31784. uni.addInterceptor("navigateTo", {
  31785. invoke(e) {
  31786. var _a;
  31787. const pages2 = getCurrentPages();
  31788. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  31789. onChange && onChange(e.url, from);
  31790. formatAppLog("log", "at utils/useRouteMonitor.js:18", "navigateTo", e.url, from);
  31791. return e;
  31792. }
  31793. });
  31794. uni.addInterceptor("redirectTo", {
  31795. invoke(e) {
  31796. var _a;
  31797. const pages2 = getCurrentPages();
  31798. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  31799. onChange && onChange(e.url, from);
  31800. formatAppLog("log", "at utils/useRouteMonitor.js:28", "redirectTo", e.url, from);
  31801. return e;
  31802. }
  31803. });
  31804. uni.addInterceptor("reLaunch", {
  31805. invoke(e) {
  31806. var _a;
  31807. const pages2 = getCurrentPages();
  31808. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  31809. onChange && onChange(e.url, from);
  31810. formatAppLog("log", "at utils/useRouteMonitor.js:38", "reLaunch", e.url, from);
  31811. return e;
  31812. }
  31813. });
  31814. uni.addInterceptor("switchTab", {
  31815. invoke(e) {
  31816. var _a;
  31817. const pages2 = getCurrentPages();
  31818. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  31819. onChange && onChange(e.url, from);
  31820. formatAppLog("log", "at utils/useRouteMonitor.js:48", "switchTab", e.url, from);
  31821. return e;
  31822. }
  31823. });
  31824. }
  31825. const audioContext = vue.ref(null);
  31826. const initClickSound = () => {
  31827. audioContext.value = uni.createInnerAudioContext();
  31828. audioContext.value.src = "/static/bap.mp3";
  31829. audioContext.value.volume = 0.8;
  31830. };
  31831. const playClickSound = () => {
  31832. if (audioContext.value) {
  31833. audioContext.value.play();
  31834. }
  31835. };
  31836. const _sfc_main = {
  31837. __name: "App",
  31838. setup(__props, { expose: __expose }) {
  31839. __expose();
  31840. onLaunch(() => {
  31841. let token = uni.getStorageSync("token");
  31842. if (token) {
  31843. let userInfo = uni.getStorageSync("userInfo");
  31844. if (userInfo) {
  31845. if (userInfo.userId) {
  31846. store.setUserInfo(userInfo);
  31847. }
  31848. }
  31849. }
  31850. useInit();
  31851. });
  31852. onShow(() => {
  31853. });
  31854. const __returned__ = { get onLaunch() {
  31855. return onLaunch;
  31856. }, get onShow() {
  31857. return onShow;
  31858. }, get onHide() {
  31859. return onHide;
  31860. }, get onUnload() {
  31861. return onUnload;
  31862. }, get store() {
  31863. return store;
  31864. }, get useGlobalEventRemove() {
  31865. return useGlobalEventRemove;
  31866. }, get useInit() {
  31867. return useInit;
  31868. }, get updateActivePageOnShow() {
  31869. return updateActivePageOnShow;
  31870. }, get useRouteMonitor() {
  31871. return useRouteMonitor;
  31872. }, get playClickSound() {
  31873. return playClickSound;
  31874. } };
  31875. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  31876. return __returned__;
  31877. }
  31878. };
  31879. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/书嗨项目/shuhi-app-fornt/App.vue"]]);
  31880. const { toString } = Object.prototype;
  31881. function isArray(val) {
  31882. return toString.call(val) === "[object Array]";
  31883. }
  31884. function isObject(val) {
  31885. return val !== null && typeof val === "object";
  31886. }
  31887. function isDate(val) {
  31888. return toString.call(val) === "[object Date]";
  31889. }
  31890. function isURLSearchParams(val) {
  31891. return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
  31892. }
  31893. function forEach(obj, fn) {
  31894. if (obj === null || typeof obj === "undefined") {
  31895. return;
  31896. }
  31897. if (typeof obj !== "object") {
  31898. obj = [obj];
  31899. }
  31900. if (isArray(obj)) {
  31901. for (let i = 0, l = obj.length; i < l; i++) {
  31902. fn.call(null, obj[i], i, obj);
  31903. }
  31904. } else {
  31905. for (const key in obj) {
  31906. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  31907. fn.call(null, obj[key], key, obj);
  31908. }
  31909. }
  31910. }
  31911. }
  31912. function isPlainObject(obj) {
  31913. return Object.prototype.toString.call(obj) === "[object Object]";
  31914. }
  31915. function deepMerge$1() {
  31916. const result = {};
  31917. function assignValue(val, key) {
  31918. if (typeof result[key] === "object" && typeof val === "object") {
  31919. result[key] = deepMerge$1(result[key], val);
  31920. } else if (typeof val === "object") {
  31921. result[key] = deepMerge$1({}, val);
  31922. } else {
  31923. result[key] = val;
  31924. }
  31925. }
  31926. for (let i = 0, l = arguments.length; i < l; i++) {
  31927. forEach(arguments[i], assignValue);
  31928. }
  31929. return result;
  31930. }
  31931. function isUndefined(val) {
  31932. return typeof val === "undefined";
  31933. }
  31934. function encode(val) {
  31935. return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
  31936. }
  31937. function buildURL(url2, params) {
  31938. if (!params) {
  31939. return url2;
  31940. }
  31941. let serializedParams;
  31942. if (isURLSearchParams(params)) {
  31943. serializedParams = params.toString();
  31944. } else {
  31945. const parts = [];
  31946. forEach(params, (val, key) => {
  31947. if (val === null || typeof val === "undefined") {
  31948. return;
  31949. }
  31950. if (isArray(val)) {
  31951. key = `${key}[]`;
  31952. } else {
  31953. val = [val];
  31954. }
  31955. forEach(val, (v) => {
  31956. if (isDate(v)) {
  31957. v = v.toISOString();
  31958. } else if (isObject(v)) {
  31959. v = JSON.stringify(v);
  31960. }
  31961. parts.push(`${encode(key)}=${encode(v)}`);
  31962. });
  31963. });
  31964. serializedParams = parts.join("&");
  31965. }
  31966. if (serializedParams) {
  31967. const hashmarkIndex = url2.indexOf("#");
  31968. if (hashmarkIndex !== -1) {
  31969. url2 = url2.slice(0, hashmarkIndex);
  31970. }
  31971. url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
  31972. }
  31973. return url2;
  31974. }
  31975. function isAbsoluteURL(url2) {
  31976. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
  31977. }
  31978. function combineURLs(baseURL, relativeURL) {
  31979. return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL;
  31980. }
  31981. function buildFullPath(baseURL, requestedURL) {
  31982. if (baseURL && !isAbsoluteURL(requestedURL)) {
  31983. return combineURLs(baseURL, requestedURL);
  31984. }
  31985. return requestedURL;
  31986. }
  31987. function settle(resolve, reject, response) {
  31988. const { validateStatus } = response.config;
  31989. const status = response.statusCode;
  31990. if (status && (!validateStatus || validateStatus(status))) {
  31991. resolve(response);
  31992. } else {
  31993. reject(response);
  31994. }
  31995. }
  31996. const mergeKeys$1 = (keys, config2) => {
  31997. const config3 = {};
  31998. keys.forEach((prop) => {
  31999. if (!isUndefined(config2[prop])) {
  32000. config3[prop] = config2[prop];
  32001. }
  32002. });
  32003. return config3;
  32004. };
  32005. const adapter = (config2) => new Promise((resolve, reject) => {
  32006. const fullPath = buildURL(buildFullPath(config2.baseURL, config2.url), config2.params);
  32007. const _config = {
  32008. url: fullPath,
  32009. header: config2.header,
  32010. complete: (response) => {
  32011. config2.fullPath = fullPath;
  32012. response.config = config2;
  32013. try {
  32014. if (typeof response.data === "string") {
  32015. response.data = JSON.parse(response.data);
  32016. }
  32017. } catch (e) {
  32018. }
  32019. settle(resolve, reject, response);
  32020. }
  32021. };
  32022. let requestTask;
  32023. if (config2.method === "UPLOAD") {
  32024. delete _config.header["content-type"];
  32025. delete _config.header["Content-Type"];
  32026. const otherConfig = {
  32027. filePath: config2.filePath,
  32028. name: config2.name
  32029. };
  32030. const optionalKeys = [
  32031. "files",
  32032. "timeout",
  32033. "formData"
  32034. ];
  32035. requestTask = uni.uploadFile({ ..._config, ...otherConfig, ...mergeKeys$1(optionalKeys, config2) });
  32036. } else if (config2.method === "DOWNLOAD") {
  32037. if (!isUndefined(config2.timeout)) {
  32038. _config.timeout = config2.timeout;
  32039. }
  32040. requestTask = uni.downloadFile(_config);
  32041. } else {
  32042. const optionalKeys = [
  32043. "data",
  32044. "method",
  32045. "timeout",
  32046. "dataType",
  32047. "responseType",
  32048. "sslVerify",
  32049. "firstIpv4"
  32050. ];
  32051. requestTask = uni.request({ ..._config, ...mergeKeys$1(optionalKeys, config2) });
  32052. }
  32053. if (config2.getTask) {
  32054. config2.getTask(requestTask, config2);
  32055. }
  32056. });
  32057. const dispatchRequest = (config2) => adapter(config2);
  32058. function InterceptorManager() {
  32059. this.handlers = [];
  32060. }
  32061. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  32062. this.handlers.push({
  32063. fulfilled,
  32064. rejected
  32065. });
  32066. return this.handlers.length - 1;
  32067. };
  32068. InterceptorManager.prototype.eject = function eject(id) {
  32069. if (this.handlers[id]) {
  32070. this.handlers[id] = null;
  32071. }
  32072. };
  32073. InterceptorManager.prototype.forEach = function forEach2(fn) {
  32074. this.handlers.forEach((h) => {
  32075. if (h !== null) {
  32076. fn(h);
  32077. }
  32078. });
  32079. };
  32080. const mergeKeys = (keys, globalsConfig, config2) => {
  32081. const config3 = {};
  32082. keys.forEach((prop) => {
  32083. if (!isUndefined(config2[prop])) {
  32084. config3[prop] = config2[prop];
  32085. } else if (!isUndefined(globalsConfig[prop])) {
  32086. config3[prop] = globalsConfig[prop];
  32087. }
  32088. });
  32089. return config3;
  32090. };
  32091. const mergeConfig = (globalsConfig, config2 = {}) => {
  32092. const method = config2.method || globalsConfig.method || "GET";
  32093. let config3 = {
  32094. baseURL: globalsConfig.baseURL || "",
  32095. method,
  32096. url: config2.url || "",
  32097. params: config2.params || {},
  32098. custom: { ...globalsConfig.custom || {}, ...config2.custom || {} },
  32099. header: deepMerge$1(globalsConfig.header || {}, config2.header || {})
  32100. };
  32101. const defaultToConfig2Keys = ["getTask", "validateStatus"];
  32102. config3 = { ...config3, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) };
  32103. if (method === "DOWNLOAD") {
  32104. if (!isUndefined(config2.timeout)) {
  32105. config3.timeout = config2.timeout;
  32106. } else if (!isUndefined(globalsConfig.timeout)) {
  32107. config3.timeout = globalsConfig.timeout;
  32108. }
  32109. } else if (method === "UPLOAD") {
  32110. delete config3.header["content-type"];
  32111. delete config3.header["Content-Type"];
  32112. const uploadKeys = [
  32113. "files",
  32114. "filePath",
  32115. "name",
  32116. "timeout",
  32117. "formData"
  32118. ];
  32119. uploadKeys.forEach((prop) => {
  32120. if (!isUndefined(config2[prop])) {
  32121. config3[prop] = config2[prop];
  32122. }
  32123. });
  32124. if (isUndefined(config3.timeout) && !isUndefined(globalsConfig.timeout)) {
  32125. config3.timeout = globalsConfig.timeout;
  32126. }
  32127. } else {
  32128. const defaultsKeys = [
  32129. "data",
  32130. "timeout",
  32131. "dataType",
  32132. "responseType",
  32133. "sslVerify",
  32134. "firstIpv4"
  32135. ];
  32136. config3 = { ...config3, ...mergeKeys(defaultsKeys, globalsConfig, config2) };
  32137. }
  32138. return config3;
  32139. };
  32140. const defaults = {
  32141. baseURL: "",
  32142. header: {},
  32143. method: "GET",
  32144. dataType: "json",
  32145. responseType: "text",
  32146. custom: {},
  32147. timeout: 6e4,
  32148. sslVerify: true,
  32149. firstIpv4: false,
  32150. validateStatus: function validateStatus(status) {
  32151. return status >= 200 && status < 300;
  32152. }
  32153. };
  32154. var clone = function() {
  32155. function _instanceof(obj, type2) {
  32156. return type2 != null && obj instanceof type2;
  32157. }
  32158. var nativeMap;
  32159. try {
  32160. nativeMap = Map;
  32161. } catch (_) {
  32162. nativeMap = function() {
  32163. };
  32164. }
  32165. var nativeSet;
  32166. try {
  32167. nativeSet = Set;
  32168. } catch (_) {
  32169. nativeSet = function() {
  32170. };
  32171. }
  32172. var nativePromise;
  32173. try {
  32174. nativePromise = Promise;
  32175. } catch (_) {
  32176. nativePromise = function() {
  32177. };
  32178. }
  32179. function clone2(parent, circular, depth, prototype, includeNonEnumerable) {
  32180. if (typeof circular === "object") {
  32181. depth = circular.depth;
  32182. prototype = circular.prototype;
  32183. includeNonEnumerable = circular.includeNonEnumerable;
  32184. circular = circular.circular;
  32185. }
  32186. var allParents = [];
  32187. var allChildren = [];
  32188. var useBuffer = typeof Buffer != "undefined";
  32189. if (typeof circular == "undefined")
  32190. circular = true;
  32191. if (typeof depth == "undefined")
  32192. depth = Infinity;
  32193. function _clone(parent2, depth2) {
  32194. if (parent2 === null)
  32195. return null;
  32196. if (depth2 === 0)
  32197. return parent2;
  32198. var child;
  32199. var proto;
  32200. if (typeof parent2 != "object") {
  32201. return parent2;
  32202. }
  32203. if (_instanceof(parent2, nativeMap)) {
  32204. child = new nativeMap();
  32205. } else if (_instanceof(parent2, nativeSet)) {
  32206. child = new nativeSet();
  32207. } else if (_instanceof(parent2, nativePromise)) {
  32208. child = new nativePromise(function(resolve, reject) {
  32209. parent2.then(function(value2) {
  32210. resolve(_clone(value2, depth2 - 1));
  32211. }, function(err) {
  32212. reject(_clone(err, depth2 - 1));
  32213. });
  32214. });
  32215. } else if (clone2.__isArray(parent2)) {
  32216. child = [];
  32217. } else if (clone2.__isRegExp(parent2)) {
  32218. child = new RegExp(parent2.source, __getRegExpFlags(parent2));
  32219. if (parent2.lastIndex)
  32220. child.lastIndex = parent2.lastIndex;
  32221. } else if (clone2.__isDate(parent2)) {
  32222. child = new Date(parent2.getTime());
  32223. } else if (useBuffer && Buffer.isBuffer(parent2)) {
  32224. if (Buffer.from) {
  32225. child = Buffer.from(parent2);
  32226. } else {
  32227. child = new Buffer(parent2.length);
  32228. parent2.copy(child);
  32229. }
  32230. return child;
  32231. } else if (_instanceof(parent2, Error)) {
  32232. child = Object.create(parent2);
  32233. } else {
  32234. if (typeof prototype == "undefined") {
  32235. proto = Object.getPrototypeOf(parent2);
  32236. child = Object.create(proto);
  32237. } else {
  32238. child = Object.create(prototype);
  32239. proto = prototype;
  32240. }
  32241. }
  32242. if (circular) {
  32243. var index2 = allParents.indexOf(parent2);
  32244. if (index2 != -1) {
  32245. return allChildren[index2];
  32246. }
  32247. allParents.push(parent2);
  32248. allChildren.push(child);
  32249. }
  32250. if (_instanceof(parent2, nativeMap)) {
  32251. parent2.forEach(function(value2, key) {
  32252. var keyChild = _clone(key, depth2 - 1);
  32253. var valueChild = _clone(value2, depth2 - 1);
  32254. child.set(keyChild, valueChild);
  32255. });
  32256. }
  32257. if (_instanceof(parent2, nativeSet)) {
  32258. parent2.forEach(function(value2) {
  32259. var entryChild = _clone(value2, depth2 - 1);
  32260. child.add(entryChild);
  32261. });
  32262. }
  32263. for (var i in parent2) {
  32264. var attrs = Object.getOwnPropertyDescriptor(parent2, i);
  32265. if (attrs) {
  32266. child[i] = _clone(parent2[i], depth2 - 1);
  32267. }
  32268. try {
  32269. var objProperty = Object.getOwnPropertyDescriptor(parent2, i);
  32270. if (objProperty.set === "undefined") {
  32271. continue;
  32272. }
  32273. child[i] = _clone(parent2[i], depth2 - 1);
  32274. } catch (e) {
  32275. if (e instanceof TypeError) {
  32276. continue;
  32277. } else if (e instanceof ReferenceError) {
  32278. continue;
  32279. }
  32280. }
  32281. }
  32282. if (Object.getOwnPropertySymbols) {
  32283. var symbols = Object.getOwnPropertySymbols(parent2);
  32284. for (var i = 0; i < symbols.length; i++) {
  32285. var symbol = symbols[i];
  32286. var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol);
  32287. if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
  32288. continue;
  32289. }
  32290. child[symbol] = _clone(parent2[symbol], depth2 - 1);
  32291. Object.defineProperty(child, symbol, descriptor);
  32292. }
  32293. }
  32294. if (includeNonEnumerable) {
  32295. var allPropertyNames = Object.getOwnPropertyNames(parent2);
  32296. for (var i = 0; i < allPropertyNames.length; i++) {
  32297. var propertyName = allPropertyNames[i];
  32298. var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName);
  32299. if (descriptor && descriptor.enumerable) {
  32300. continue;
  32301. }
  32302. child[propertyName] = _clone(parent2[propertyName], depth2 - 1);
  32303. Object.defineProperty(child, propertyName, descriptor);
  32304. }
  32305. }
  32306. return child;
  32307. }
  32308. return _clone(parent, depth);
  32309. }
  32310. clone2.clonePrototype = function clonePrototype(parent) {
  32311. if (parent === null)
  32312. return null;
  32313. var c = function() {
  32314. };
  32315. c.prototype = parent;
  32316. return new c();
  32317. };
  32318. function __objToStr(o) {
  32319. return Object.prototype.toString.call(o);
  32320. }
  32321. clone2.__objToStr = __objToStr;
  32322. function __isDate(o) {
  32323. return typeof o === "object" && __objToStr(o) === "[object Date]";
  32324. }
  32325. clone2.__isDate = __isDate;
  32326. function __isArray(o) {
  32327. return typeof o === "object" && __objToStr(o) === "[object Array]";
  32328. }
  32329. clone2.__isArray = __isArray;
  32330. function __isRegExp(o) {
  32331. return typeof o === "object" && __objToStr(o) === "[object RegExp]";
  32332. }
  32333. clone2.__isRegExp = __isRegExp;
  32334. function __getRegExpFlags(re) {
  32335. var flags = "";
  32336. if (re.global)
  32337. flags += "g";
  32338. if (re.ignoreCase)
  32339. flags += "i";
  32340. if (re.multiline)
  32341. flags += "m";
  32342. return flags;
  32343. }
  32344. clone2.__getRegExpFlags = __getRegExpFlags;
  32345. return clone2;
  32346. }();
  32347. class Request {
  32348. /**
  32349. * @param {Object} arg - 全局配置
  32350. * @param {String} arg.baseURL - 全局根路径
  32351. * @param {Object} arg.header - 全局header
  32352. * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
  32353. * @param {String} arg.dataType = [json] - 全局默认的dataType
  32354. * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持
  32355. * @param {Object} arg.custom - 全局默认的自定义参数
  32356. * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序
  32357. * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
  32358. * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
  32359. * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
  32360. * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
  32361. */
  32362. constructor(arg = {}) {
  32363. if (!isPlainObject(arg)) {
  32364. arg = {};
  32365. formatAppLog("warn", "at uni_modules/uview-plus/libs/luch-request/core/Request.js:39", "设置全局参数必须接收一个Object");
  32366. }
  32367. this.config = clone({ ...defaults, ...arg });
  32368. this.interceptors = {
  32369. request: new InterceptorManager(),
  32370. response: new InterceptorManager()
  32371. };
  32372. }
  32373. /**
  32374. * @Function
  32375. * @param {Request~setConfigCallback} f - 设置全局默认配置
  32376. */
  32377. setConfig(f) {
  32378. this.config = f(this.config);
  32379. }
  32380. middleware(config2) {
  32381. config2 = mergeConfig(this.config, config2);
  32382. const chain = [dispatchRequest, void 0];
  32383. let promise2 = Promise.resolve(config2);
  32384. this.interceptors.request.forEach((interceptor) => {
  32385. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  32386. });
  32387. this.interceptors.response.forEach((interceptor) => {
  32388. chain.push(interceptor.fulfilled, interceptor.rejected);
  32389. });
  32390. while (chain.length) {
  32391. promise2 = promise2.then(chain.shift(), chain.shift());
  32392. }
  32393. return promise2;
  32394. }
  32395. /**
  32396. * @Function
  32397. * @param {Object} config - 请求配置项
  32398. * @prop {String} options.url - 请求路径
  32399. * @prop {Object} options.data - 请求参数
  32400. * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
  32401. * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
  32402. * @prop {Object} [options.header = config.header] - 请求header
  32403. * @prop {Object} [options.method = config.method] - 请求方法
  32404. * @returns {Promise<unknown>}
  32405. */
  32406. request(config2 = {}) {
  32407. return this.middleware(config2);
  32408. }
  32409. get(url2, options = {}) {
  32410. return this.middleware({
  32411. url: url2,
  32412. method: "GET",
  32413. ...options
  32414. });
  32415. }
  32416. post(url2, data, options = {}) {
  32417. return this.middleware({
  32418. url: url2,
  32419. data,
  32420. method: "POST",
  32421. ...options
  32422. });
  32423. }
  32424. put(url2, data, options = {}) {
  32425. return this.middleware({
  32426. url: url2,
  32427. data,
  32428. method: "PUT",
  32429. ...options
  32430. });
  32431. }
  32432. delete(url2, data, options = {}) {
  32433. return this.middleware({
  32434. url: url2,
  32435. data,
  32436. method: "DELETE",
  32437. ...options
  32438. });
  32439. }
  32440. options(url2, data, options = {}) {
  32441. return this.middleware({
  32442. url: url2,
  32443. data,
  32444. method: "OPTIONS",
  32445. ...options
  32446. });
  32447. }
  32448. upload(url2, config2 = {}) {
  32449. config2.url = url2;
  32450. config2.method = "UPLOAD";
  32451. return this.middleware(config2);
  32452. }
  32453. download(url2, config2 = {}) {
  32454. config2.url = url2;
  32455. config2.method = "DOWNLOAD";
  32456. return this.middleware(config2);
  32457. }
  32458. }
  32459. class Router {
  32460. constructor() {
  32461. this.config = {
  32462. type: "navigateTo",
  32463. url: "",
  32464. delta: 1,
  32465. // navigateBack页面后退时,回退的层数
  32466. params: {},
  32467. // 传递的参数
  32468. animationType: "pop-in",
  32469. // 窗口动画,只在APP有效
  32470. animationDuration: 300,
  32471. // 窗口动画持续时间,单位毫秒,只在APP有效
  32472. intercept: false
  32473. // 是否需要拦截
  32474. };
  32475. this.route = this.route.bind(this);
  32476. }
  32477. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  32478. addRootPath(url2) {
  32479. return url2[0] === "/" ? url2 : `/${url2}`;
  32480. }
  32481. // 整合路由参数
  32482. mixinParam(url2, params) {
  32483. url2 = url2 && this.addRootPath(url2);
  32484. let query = "";
  32485. if (/.*\/.*\?.*=.*/.test(url2)) {
  32486. query = uni.$u.queryParams(params, false);
  32487. return url2 += `&${query}`;
  32488. }
  32489. query = uni.$u.queryParams(params);
  32490. return url2 += query;
  32491. }
  32492. // 对外的方法名称
  32493. async route(options = {}, params = {}) {
  32494. let mergeConfig2 = {};
  32495. if (typeof options === "string") {
  32496. mergeConfig2.url = this.mixinParam(options, params);
  32497. mergeConfig2.type = "navigateTo";
  32498. } else {
  32499. mergeConfig2 = uni.$u.deepMerge(this.config, options);
  32500. mergeConfig2.url = this.mixinParam(options.url, options.params);
  32501. }
  32502. if (mergeConfig2.url === uni.$u.page())
  32503. return;
  32504. if (params.intercept) {
  32505. this.config.intercept = params.intercept;
  32506. }
  32507. mergeConfig2.params = params;
  32508. mergeConfig2 = uni.$u.deepMerge(this.config, mergeConfig2);
  32509. if (typeof uni.$u.routeIntercept === "function") {
  32510. const isNext = await new Promise((resolve, reject) => {
  32511. uni.$u.routeIntercept(mergeConfig2, resolve);
  32512. });
  32513. isNext && this.openPage(mergeConfig2);
  32514. } else {
  32515. this.openPage(mergeConfig2);
  32516. }
  32517. }
  32518. // 执行路由跳转
  32519. openPage(config2) {
  32520. const {
  32521. url: url2,
  32522. type: type2,
  32523. delta,
  32524. animationType,
  32525. animationDuration
  32526. } = config2;
  32527. if (config2.type == "navigateTo" || config2.type == "to") {
  32528. uni.navigateTo({
  32529. url: url2,
  32530. animationType,
  32531. animationDuration
  32532. });
  32533. }
  32534. if (config2.type == "redirectTo" || config2.type == "redirect") {
  32535. uni.redirectTo({
  32536. url: url2
  32537. });
  32538. }
  32539. if (config2.type == "switchTab" || config2.type == "tab") {
  32540. uni.switchTab({
  32541. url: url2
  32542. });
  32543. }
  32544. if (config2.type == "reLaunch" || config2.type == "launch") {
  32545. uni.reLaunch({
  32546. url: url2
  32547. });
  32548. }
  32549. if (config2.type == "navigateBack" || config2.type == "back") {
  32550. uni.navigateBack({
  32551. delta
  32552. });
  32553. }
  32554. }
  32555. }
  32556. const route = new Router().route;
  32557. function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
  32558. const startRGB = hexToRgb(startColor, false);
  32559. const startR = startRGB[0];
  32560. const startG = startRGB[1];
  32561. const startB = startRGB[2];
  32562. const endRGB = hexToRgb(endColor, false);
  32563. const endR = endRGB[0];
  32564. const endG = endRGB[1];
  32565. const endB = endRGB[2];
  32566. const sR = (endR - startR) / step;
  32567. const sG = (endG - startG) / step;
  32568. const sB = (endB - startB) / step;
  32569. const colorArr = [];
  32570. for (let i = 0; i < step; i++) {
  32571. let hex = rgbToHex(`rgb(${Math.round(sR * i + startR)},${Math.round(sG * i + startG)},${Math.round(sB * i + startB)})`);
  32572. if (i === 0)
  32573. hex = rgbToHex(startColor);
  32574. if (i === step - 1)
  32575. hex = rgbToHex(endColor);
  32576. colorArr.push(hex);
  32577. }
  32578. return colorArr;
  32579. }
  32580. function hexToRgb(sColor, str = true) {
  32581. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  32582. sColor = String(sColor).toLowerCase();
  32583. if (sColor && reg.test(sColor)) {
  32584. if (sColor.length === 4) {
  32585. let sColorNew = "#";
  32586. for (let i = 1; i < 4; i += 1) {
  32587. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  32588. }
  32589. sColor = sColorNew;
  32590. }
  32591. const sColorChange = [];
  32592. for (let i = 1; i < 7; i += 2) {
  32593. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  32594. }
  32595. if (!str) {
  32596. return sColorChange;
  32597. }
  32598. return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`;
  32599. }
  32600. if (/^(rgb|RGB)/.test(sColor)) {
  32601. const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  32602. return arr.map((val) => Number(val));
  32603. }
  32604. return sColor;
  32605. }
  32606. function rgbToHex(rgb) {
  32607. const _this = rgb;
  32608. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  32609. if (/^(rgb|RGB)/.test(_this)) {
  32610. const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  32611. let strHex = "#";
  32612. for (let i = 0; i < aColor.length; i++) {
  32613. let hex = Number(aColor[i]).toString(16);
  32614. hex = String(hex).length == 1 ? `${0}${hex}` : hex;
  32615. if (hex === "0") {
  32616. hex += hex;
  32617. }
  32618. strHex += hex;
  32619. }
  32620. if (strHex.length !== 7) {
  32621. strHex = _this;
  32622. }
  32623. return strHex;
  32624. }
  32625. if (reg.test(_this)) {
  32626. const aNum = _this.replace(/#/, "").split("");
  32627. if (aNum.length === 6) {
  32628. return _this;
  32629. }
  32630. if (aNum.length === 3) {
  32631. let numHex = "#";
  32632. for (let i = 0; i < aNum.length; i += 1) {
  32633. numHex += aNum[i] + aNum[i];
  32634. }
  32635. return numHex;
  32636. }
  32637. } else {
  32638. return _this;
  32639. }
  32640. }
  32641. function colorToRgba(color2, alpha) {
  32642. color2 = rgbToHex(color2);
  32643. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  32644. let sColor = String(color2).toLowerCase();
  32645. if (sColor && reg.test(sColor)) {
  32646. if (sColor.length === 4) {
  32647. let sColorNew = "#";
  32648. for (let i = 1; i < 4; i += 1) {
  32649. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  32650. }
  32651. sColor = sColorNew;
  32652. }
  32653. const sColorChange = [];
  32654. for (let i = 1; i < 7; i += 2) {
  32655. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  32656. }
  32657. return `rgba(${sColorChange.join(",")},${alpha})`;
  32658. }
  32659. return sColor;
  32660. }
  32661. const colorGradient$1 = {
  32662. colorGradient,
  32663. hexToRgb,
  32664. rgbToHex,
  32665. colorToRgba
  32666. };
  32667. function email(value2) {
  32668. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value2);
  32669. }
  32670. function mobile(value2) {
  32671. return /^1[23456789]\d{9}$/.test(value2);
  32672. }
  32673. function url(value2) {
  32674. 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);
  32675. }
  32676. function date(value2) {
  32677. if (!value2)
  32678. return false;
  32679. if (number(value2))
  32680. value2 = +value2;
  32681. return !/Invalid|NaN/.test(new Date(value2).toString());
  32682. }
  32683. function dateISO(value2) {
  32684. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value2);
  32685. }
  32686. function number(value2) {
  32687. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value2);
  32688. }
  32689. function string(value2) {
  32690. return typeof value2 === "string";
  32691. }
  32692. function digits(value2) {
  32693. return /^\d+$/.test(value2);
  32694. }
  32695. function idCard(value2) {
  32696. 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(
  32697. value2
  32698. );
  32699. }
  32700. function carNo(value2) {
  32701. const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  32702. const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  32703. if (value2.length === 7) {
  32704. return creg.test(value2);
  32705. }
  32706. if (value2.length === 8) {
  32707. return xreg.test(value2);
  32708. }
  32709. return false;
  32710. }
  32711. function amount(value2) {
  32712. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value2);
  32713. }
  32714. function chinese(value2) {
  32715. const reg = /^[\u4e00-\u9fa5]+$/gi;
  32716. return reg.test(value2);
  32717. }
  32718. function letter(value2) {
  32719. return /^[a-zA-Z]*$/.test(value2);
  32720. }
  32721. function enOrNum(value2) {
  32722. const reg = /^[0-9a-zA-Z]*$/g;
  32723. return reg.test(value2);
  32724. }
  32725. function contains(value2, param) {
  32726. return value2.indexOf(param) >= 0;
  32727. }
  32728. function range$1(value2, param) {
  32729. return value2 >= param[0] && value2 <= param[1];
  32730. }
  32731. function rangeLength(value2, param) {
  32732. return value2.length >= param[0] && value2.length <= param[1];
  32733. }
  32734. function landline(value2) {
  32735. const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  32736. return reg.test(value2);
  32737. }
  32738. function empty(value2) {
  32739. switch (typeof value2) {
  32740. case "undefined":
  32741. return true;
  32742. case "string":
  32743. if (value2.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0)
  32744. return true;
  32745. break;
  32746. case "boolean":
  32747. if (!value2)
  32748. return true;
  32749. break;
  32750. case "number":
  32751. if (value2 === 0 || isNaN(value2))
  32752. return true;
  32753. break;
  32754. case "object":
  32755. if (value2 === null || value2.length === 0)
  32756. return true;
  32757. for (const i in value2) {
  32758. return false;
  32759. }
  32760. return true;
  32761. }
  32762. return false;
  32763. }
  32764. function jsonString(value2) {
  32765. if (typeof value2 === "string") {
  32766. try {
  32767. const obj = JSON.parse(value2);
  32768. if (typeof obj === "object" && obj) {
  32769. return true;
  32770. }
  32771. return false;
  32772. } catch (e) {
  32773. return false;
  32774. }
  32775. }
  32776. return false;
  32777. }
  32778. function array(value2) {
  32779. if (typeof Array.isArray === "function") {
  32780. return Array.isArray(value2);
  32781. }
  32782. return Object.prototype.toString.call(value2) === "[object Array]";
  32783. }
  32784. function object(value2) {
  32785. return Object.prototype.toString.call(value2) === "[object Object]";
  32786. }
  32787. function code$1(value2, len = 6) {
  32788. return new RegExp(`^\\d{${len}}$`).test(value2);
  32789. }
  32790. function func(value2) {
  32791. return typeof value2 === "function";
  32792. }
  32793. function promise(value2) {
  32794. return object(value2) && func(value2.then) && func(value2.catch);
  32795. }
  32796. function image(value2) {
  32797. const newValue = value2.split("?")[0];
  32798. const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
  32799. return IMAGE_REGEXP.test(newValue);
  32800. }
  32801. function video(value2) {
  32802. const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;
  32803. return VIDEO_REGEXP.test(value2);
  32804. }
  32805. function regExp(o) {
  32806. return o && Object.prototype.toString.call(o) === "[object RegExp]";
  32807. }
  32808. const test = {
  32809. email,
  32810. mobile,
  32811. url,
  32812. date,
  32813. dateISO,
  32814. number,
  32815. digits,
  32816. idCard,
  32817. carNo,
  32818. amount,
  32819. chinese,
  32820. letter,
  32821. enOrNum,
  32822. contains,
  32823. range: range$1,
  32824. rangeLength,
  32825. empty,
  32826. isEmpty: empty,
  32827. jsonString,
  32828. landline,
  32829. object,
  32830. array,
  32831. code: code$1,
  32832. func,
  32833. promise,
  32834. video,
  32835. image,
  32836. regExp,
  32837. string
  32838. };
  32839. let timeout = null;
  32840. function debounce(func2, wait = 500, immediate = false) {
  32841. if (timeout !== null)
  32842. clearTimeout(timeout);
  32843. if (immediate) {
  32844. const callNow = !timeout;
  32845. timeout = setTimeout(() => {
  32846. timeout = null;
  32847. }, wait);
  32848. if (callNow)
  32849. typeof func2 === "function" && func2();
  32850. } else {
  32851. timeout = setTimeout(() => {
  32852. typeof func2 === "function" && func2();
  32853. }, wait);
  32854. }
  32855. }
  32856. let flag;
  32857. function throttle(func2, wait = 500, immediate = true) {
  32858. if (immediate) {
  32859. if (!flag) {
  32860. flag = true;
  32861. typeof func2 === "function" && func2();
  32862. setTimeout(() => {
  32863. flag = false;
  32864. }, wait);
  32865. }
  32866. } else if (!flag) {
  32867. flag = true;
  32868. setTimeout(() => {
  32869. flag = false;
  32870. typeof func2 === "function" && func2();
  32871. }, wait);
  32872. }
  32873. }
  32874. function strip(num, precision = 15) {
  32875. return +parseFloat(Number(num).toPrecision(precision));
  32876. }
  32877. function digitLength(num) {
  32878. const eSplit = num.toString().split(/[eE]/);
  32879. const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0);
  32880. return len > 0 ? len : 0;
  32881. }
  32882. function float2Fixed(num) {
  32883. if (num.toString().indexOf("e") === -1) {
  32884. return Number(num.toString().replace(".", ""));
  32885. }
  32886. const dLen = digitLength(num);
  32887. return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
  32888. }
  32889. function checkBoundary(num) {
  32890. {
  32891. if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
  32892. formatAppLog("warn", "at uni_modules/uview-plus/libs/function/digit.js:45", `${num} 超出了精度限制,结果可能不正确`);
  32893. }
  32894. }
  32895. }
  32896. function iteratorOperation(arr, operation) {
  32897. const [num1, num2, ...others] = arr;
  32898. let res2 = operation(num1, num2);
  32899. others.forEach((num) => {
  32900. res2 = operation(res2, num);
  32901. });
  32902. return res2;
  32903. }
  32904. function times(...nums) {
  32905. if (nums.length > 2) {
  32906. return iteratorOperation(nums, times);
  32907. }
  32908. const [num1, num2] = nums;
  32909. const num1Changed = float2Fixed(num1);
  32910. const num2Changed = float2Fixed(num2);
  32911. const baseNum = digitLength(num1) + digitLength(num2);
  32912. const leftValue = num1Changed * num2Changed;
  32913. checkBoundary(leftValue);
  32914. return leftValue / Math.pow(10, baseNum);
  32915. }
  32916. function divide(...nums) {
  32917. if (nums.length > 2) {
  32918. return iteratorOperation(nums, divide);
  32919. }
  32920. const [num1, num2] = nums;
  32921. const num1Changed = float2Fixed(num1);
  32922. const num2Changed = float2Fixed(num2);
  32923. checkBoundary(num1Changed);
  32924. checkBoundary(num2Changed);
  32925. return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
  32926. }
  32927. function round(num, ratio) {
  32928. const base = Math.pow(10, ratio);
  32929. let result = divide(Math.round(Math.abs(times(num, base))), base);
  32930. if (num < 0 && result !== 0) {
  32931. result = times(result, -1);
  32932. }
  32933. return result;
  32934. }
  32935. function range(min = 0, max = 0, value2 = 0) {
  32936. return Math.max(min, Math.min(max, Number(value2)));
  32937. }
  32938. function getPx(value2, unit = false) {
  32939. if (test.number(value2)) {
  32940. return unit ? `${value2}px` : Number(value2);
  32941. }
  32942. if (/(rpx|upx)$/.test(value2)) {
  32943. return unit ? `${uni.upx2px(parseInt(value2))}px` : Number(uni.upx2px(parseInt(value2)));
  32944. }
  32945. return unit ? `${parseInt(value2)}px` : parseInt(value2);
  32946. }
  32947. function sleep(value2 = 30) {
  32948. return new Promise((resolve) => {
  32949. setTimeout(() => {
  32950. resolve();
  32951. }, value2);
  32952. });
  32953. }
  32954. function os() {
  32955. return uni.getSystemInfoSync().platform.toLowerCase();
  32956. }
  32957. function sys() {
  32958. return uni.getSystemInfoSync();
  32959. }
  32960. function random(min, max) {
  32961. if (min >= 0 && max > 0 && max >= min) {
  32962. const gab = max - min + 1;
  32963. return Math.floor(Math.random() * gab + min);
  32964. }
  32965. return 0;
  32966. }
  32967. function guid(len = 32, firstU = true, radix = null) {
  32968. const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
  32969. const uuid = [];
  32970. radix = radix || chars.length;
  32971. if (len) {
  32972. for (let i = 0; i < len; i++)
  32973. uuid[i] = chars[0 | Math.random() * radix];
  32974. } else {
  32975. let r;
  32976. uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
  32977. uuid[14] = "4";
  32978. for (let i = 0; i < 36; i++) {
  32979. if (!uuid[i]) {
  32980. r = 0 | Math.random() * 16;
  32981. uuid[i] = chars[i == 19 ? r & 3 | 8 : r];
  32982. }
  32983. }
  32984. }
  32985. if (firstU) {
  32986. uuid.shift();
  32987. return `u${uuid.join("")}`;
  32988. }
  32989. return uuid.join("");
  32990. }
  32991. function $parent(name = void 0) {
  32992. let parent = this.$parent;
  32993. while (parent) {
  32994. if (parent.$options && parent.$options.name !== name) {
  32995. parent = parent.$parent;
  32996. } else {
  32997. return parent;
  32998. }
  32999. }
  33000. return false;
  33001. }
  33002. function addStyle(customStyle, target = "object") {
  33003. if (test.empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") {
  33004. return customStyle;
  33005. }
  33006. if (target === "object") {
  33007. customStyle = trim(customStyle);
  33008. const styleArray = customStyle.split(";");
  33009. const style = {};
  33010. for (let i = 0; i < styleArray.length; i++) {
  33011. if (styleArray[i]) {
  33012. const item = styleArray[i].split(":");
  33013. style[trim(item[0])] = trim(item[1]);
  33014. }
  33015. }
  33016. return style;
  33017. }
  33018. let string2 = "";
  33019. for (const i in customStyle) {
  33020. const key = i.replace(/([A-Z])/g, "-$1").toLowerCase();
  33021. string2 += `${key}:${customStyle[i]};`;
  33022. }
  33023. return trim(string2);
  33024. }
  33025. function addUnit(value2 = "auto", unit = "") {
  33026. if (!unit) {
  33027. unit = uni.$u.config.unit || "px";
  33028. }
  33029. value2 = String(value2);
  33030. return test.number(value2) ? `${value2}${unit}` : value2;
  33031. }
  33032. function deepClone(obj) {
  33033. if ([null, void 0, NaN, false].includes(obj))
  33034. return obj;
  33035. if (typeof obj !== "object" && typeof obj !== "function") {
  33036. return obj;
  33037. }
  33038. const o = test.array(obj) ? [] : {};
  33039. for (const i in obj) {
  33040. if (obj.hasOwnProperty(i)) {
  33041. o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
  33042. }
  33043. }
  33044. return o;
  33045. }
  33046. function deepMerge(target = {}, source = {}) {
  33047. target = deepClone(target);
  33048. if (typeof target !== "object" || typeof source !== "object")
  33049. return false;
  33050. for (const prop in source) {
  33051. if (!source.hasOwnProperty(prop))
  33052. continue;
  33053. if (prop in target) {
  33054. if (typeof target[prop] !== "object") {
  33055. target[prop] = source[prop];
  33056. } else if (typeof source[prop] !== "object") {
  33057. target[prop] = source[prop];
  33058. } else if (target[prop].concat && source[prop].concat) {
  33059. target[prop] = target[prop].concat(source[prop]);
  33060. } else {
  33061. target[prop] = deepMerge(target[prop], source[prop]);
  33062. }
  33063. } else {
  33064. target[prop] = source[prop];
  33065. }
  33066. }
  33067. return target;
  33068. }
  33069. function error(err) {
  33070. {
  33071. formatAppLog("error", "at uni_modules/uview-plus/libs/function/index.js:238", `uView提示:${err}`);
  33072. }
  33073. }
  33074. function randomArray(array3 = []) {
  33075. return array3.sort(() => Math.random() - 0.5);
  33076. }
  33077. if (!String.prototype.padStart) {
  33078. String.prototype.padStart = function(maxLength, fillString = " ") {
  33079. if (Object.prototype.toString.call(fillString) !== "[object String]") {
  33080. throw new TypeError(
  33081. "fillString must be String"
  33082. );
  33083. }
  33084. const str = this;
  33085. if (str.length >= maxLength)
  33086. return String(str);
  33087. const fillLength = maxLength - str.length;
  33088. let times2 = Math.ceil(fillLength / fillString.length);
  33089. while (times2 >>= 1) {
  33090. fillString += fillString;
  33091. if (times2 === 1) {
  33092. fillString += fillString;
  33093. }
  33094. }
  33095. return fillString.slice(0, fillLength) + str;
  33096. };
  33097. }
  33098. function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") {
  33099. let date3;
  33100. if (!dateTime) {
  33101. date3 = /* @__PURE__ */ new Date();
  33102. } else if (/^\d{10}$/.test(dateTime.toString().trim())) {
  33103. date3 = new Date(dateTime * 1e3);
  33104. } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
  33105. date3 = new Date(Number(dateTime));
  33106. } else {
  33107. date3 = new Date(
  33108. typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime
  33109. );
  33110. }
  33111. const timeSource = {
  33112. "y": date3.getFullYear().toString(),
  33113. // 年
  33114. "m": (date3.getMonth() + 1).toString().padStart(2, "0"),
  33115. // 月
  33116. "d": date3.getDate().toString().padStart(2, "0"),
  33117. // 日
  33118. "h": date3.getHours().toString().padStart(2, "0"),
  33119. // 时
  33120. "M": date3.getMinutes().toString().padStart(2, "0"),
  33121. // 分
  33122. "s": date3.getSeconds().toString().padStart(2, "0")
  33123. // 秒
  33124. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  33125. };
  33126. for (const key in timeSource) {
  33127. const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
  33128. if (ret) {
  33129. const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
  33130. formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
  33131. }
  33132. }
  33133. return formatStr;
  33134. }
  33135. function timeFrom(timestamp = null, format2 = "yyyy-mm-dd") {
  33136. if (timestamp == null)
  33137. timestamp = Number(/* @__PURE__ */ new Date());
  33138. timestamp = parseInt(timestamp);
  33139. if (timestamp.toString().length == 10)
  33140. timestamp *= 1e3;
  33141. let timer = (/* @__PURE__ */ new Date()).getTime() - timestamp;
  33142. timer = parseInt(timer / 1e3);
  33143. let tips = "";
  33144. switch (true) {
  33145. case timer < 300:
  33146. tips = "刚刚";
  33147. break;
  33148. case (timer >= 300 && timer < 3600):
  33149. tips = `${parseInt(timer / 60)}分钟前`;
  33150. break;
  33151. case (timer >= 3600 && timer < 86400):
  33152. tips = `${parseInt(timer / 3600)}小时前`;
  33153. break;
  33154. case (timer >= 86400 && timer < 2592e3):
  33155. tips = `${parseInt(timer / 86400)}天前`;
  33156. break;
  33157. default:
  33158. if (format2 === false) {
  33159. if (timer >= 2592e3 && timer < 365 * 86400) {
  33160. tips = `${parseInt(timer / (86400 * 30))}个月前`;
  33161. } else {
  33162. tips = `${parseInt(timer / (86400 * 365))}年前`;
  33163. }
  33164. } else {
  33165. tips = timeFormat(timestamp, format2);
  33166. }
  33167. }
  33168. return tips;
  33169. }
  33170. function trim(str, pos = "both") {
  33171. str = String(str);
  33172. if (pos == "both") {
  33173. return str.replace(/^\s+|\s+$/g, "");
  33174. }
  33175. if (pos == "left") {
  33176. return str.replace(/^\s*/, "");
  33177. }
  33178. if (pos == "right") {
  33179. return str.replace(/(\s*$)/g, "");
  33180. }
  33181. if (pos == "all") {
  33182. return str.replace(/\s+/g, "");
  33183. }
  33184. return str;
  33185. }
  33186. function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
  33187. const prefix = isPrefix ? "?" : "";
  33188. const _result = [];
  33189. if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1)
  33190. arrayFormat = "brackets";
  33191. for (const key in data) {
  33192. const value2 = data[key];
  33193. if (["", void 0, null].indexOf(value2) >= 0) {
  33194. continue;
  33195. }
  33196. if (value2.constructor === Array) {
  33197. switch (arrayFormat) {
  33198. case "indices":
  33199. for (let i = 0; i < value2.length; i++) {
  33200. _result.push(`${key}[${i}]=${value2[i]}`);
  33201. }
  33202. break;
  33203. case "brackets":
  33204. value2.forEach((_value) => {
  33205. _result.push(`${key}[]=${_value}`);
  33206. });
  33207. break;
  33208. case "repeat":
  33209. value2.forEach((_value) => {
  33210. _result.push(`${key}=${_value}`);
  33211. });
  33212. break;
  33213. case "comma":
  33214. let commaStr = "";
  33215. value2.forEach((_value) => {
  33216. commaStr += (commaStr ? "," : "") + _value;
  33217. });
  33218. _result.push(`${key}=${commaStr}`);
  33219. break;
  33220. default:
  33221. value2.forEach((_value) => {
  33222. _result.push(`${key}[]=${_value}`);
  33223. });
  33224. }
  33225. } else {
  33226. _result.push(`${key}=${value2}`);
  33227. }
  33228. }
  33229. return _result.length ? prefix + _result.join("&") : "";
  33230. }
  33231. function toast(title, duration = 2e3) {
  33232. uni.showToast({
  33233. title: String(title),
  33234. icon: "none",
  33235. duration
  33236. });
  33237. }
  33238. function type2icon(type2 = "success", fill = false) {
  33239. if (["primary", "info", "error", "warning", "success"].indexOf(type2) == -1)
  33240. type2 = "success";
  33241. let iconName = "";
  33242. switch (type2) {
  33243. case "primary":
  33244. iconName = "info-circle";
  33245. break;
  33246. case "info":
  33247. iconName = "info-circle";
  33248. break;
  33249. case "error":
  33250. iconName = "close-circle";
  33251. break;
  33252. case "warning":
  33253. iconName = "error-circle";
  33254. break;
  33255. case "success":
  33256. iconName = "checkmark-circle";
  33257. break;
  33258. default:
  33259. iconName = "checkmark-circle";
  33260. }
  33261. if (fill)
  33262. iconName += "-fill";
  33263. return iconName;
  33264. }
  33265. function priceFormat(number3, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") {
  33266. number3 = `${number3}`.replace(/[^0-9+-Ee.]/g, "");
  33267. const n = !isFinite(+number3) ? 0 : +number3;
  33268. const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
  33269. const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator;
  33270. const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint;
  33271. let s = "";
  33272. s = (prec ? round(n, prec) + "" : `${Math.round(n)}`).split(".");
  33273. const re = /(-?\d+)(\d{3})/;
  33274. while (re.test(s[0])) {
  33275. s[0] = s[0].replace(re, `$1${sep}$2`);
  33276. }
  33277. if ((s[1] || "").length < prec) {
  33278. s[1] = s[1] || "";
  33279. s[1] += new Array(prec - s[1].length + 1).join("0");
  33280. }
  33281. return s.join(dec);
  33282. }
  33283. function getDuration(value2, unit = true) {
  33284. const valueNum = parseInt(value2);
  33285. if (unit) {
  33286. if (/s$/.test(value2))
  33287. return value2;
  33288. return value2 > 30 ? `${value2}ms` : `${value2}s`;
  33289. }
  33290. if (/ms$/.test(value2))
  33291. return valueNum;
  33292. if (/s$/.test(value2))
  33293. return valueNum > 30 ? valueNum : valueNum * 1e3;
  33294. return valueNum;
  33295. }
  33296. function padZero(value2) {
  33297. return `00${value2}`.slice(-2);
  33298. }
  33299. function formValidate(instance, event) {
  33300. const formItem = uni.$u.$parent.call(instance, "u-form-item");
  33301. const form = uni.$u.$parent.call(instance, "u-form");
  33302. if (formItem && form) {
  33303. form.validateField(formItem.prop, () => {
  33304. }, event);
  33305. }
  33306. }
  33307. function getProperty(obj, key) {
  33308. if (!obj) {
  33309. return;
  33310. }
  33311. if (typeof key !== "string" || key === "") {
  33312. return "";
  33313. }
  33314. if (key.indexOf(".") !== -1) {
  33315. const keys = key.split(".");
  33316. let firstObj = obj[keys[0]] || {};
  33317. for (let i = 1; i < keys.length; i++) {
  33318. if (firstObj) {
  33319. firstObj = firstObj[keys[i]];
  33320. }
  33321. }
  33322. return firstObj;
  33323. }
  33324. return obj[key];
  33325. }
  33326. function setProperty(obj, key, value2) {
  33327. if (!obj) {
  33328. return;
  33329. }
  33330. const inFn = function(_obj, keys, v) {
  33331. if (keys.length === 1) {
  33332. _obj[keys[0]] = v;
  33333. return;
  33334. }
  33335. while (keys.length > 1) {
  33336. const k = keys[0];
  33337. if (!_obj[k] || typeof _obj[k] !== "object") {
  33338. _obj[k] = {};
  33339. }
  33340. keys.shift();
  33341. inFn(_obj[k], keys, v);
  33342. }
  33343. };
  33344. if (typeof key !== "string" || key === "")
  33345. ;
  33346. else if (key.indexOf(".") !== -1) {
  33347. const keys = key.split(".");
  33348. inFn(obj, keys, value2);
  33349. } else {
  33350. obj[key] = value2;
  33351. }
  33352. }
  33353. function page() {
  33354. const pages2 = getCurrentPages();
  33355. return `/${pages2[pages2.length - 1].route || ""}`;
  33356. }
  33357. function pages() {
  33358. const pages2 = getCurrentPages();
  33359. return pages2;
  33360. }
  33361. function setConfig({
  33362. props: props2 = {},
  33363. config: config2 = {},
  33364. color: color2 = {},
  33365. zIndex: zIndex2 = {}
  33366. }) {
  33367. const {
  33368. deepMerge: deepMerge2
  33369. } = uni.$u;
  33370. uni.$u.config = deepMerge2(uni.$u.config, config2);
  33371. uni.$u.props = deepMerge2(uni.$u.props, props2);
  33372. uni.$u.color = deepMerge2(uni.$u.color, color2);
  33373. uni.$u.zIndex = deepMerge2(uni.$u.zIndex, zIndex2);
  33374. }
  33375. const index = {
  33376. range,
  33377. getPx,
  33378. sleep,
  33379. os,
  33380. sys,
  33381. random,
  33382. guid,
  33383. $parent,
  33384. addStyle,
  33385. addUnit,
  33386. deepClone,
  33387. deepMerge,
  33388. error,
  33389. randomArray,
  33390. timeFormat,
  33391. timeFrom,
  33392. trim,
  33393. queryParams,
  33394. toast,
  33395. type2icon,
  33396. priceFormat,
  33397. getDuration,
  33398. padZero,
  33399. formValidate,
  33400. getProperty,
  33401. setProperty,
  33402. page,
  33403. pages,
  33404. setConfig
  33405. };
  33406. const zIndex = {
  33407. toast: 10090,
  33408. noNetwork: 10080,
  33409. // popup包含popup,actionsheet,keyboard,picker的值
  33410. popup: 10075,
  33411. mask: 10070,
  33412. navbar: 980,
  33413. topTips: 975,
  33414. sticky: 970,
  33415. indexListSticky: 965
  33416. };
  33417. let platform = "none";
  33418. platform = "vue3";
  33419. platform = "plus";
  33420. const platform$1 = platform;
  33421. const $u = {
  33422. route,
  33423. date: index.timeFormat,
  33424. // 另名date
  33425. colorGradient: colorGradient$1.colorGradient,
  33426. hexToRgb: colorGradient$1.hexToRgb,
  33427. rgbToHex: colorGradient$1.rgbToHex,
  33428. colorToRgba: colorGradient$1.colorToRgba,
  33429. test,
  33430. type: ["primary", "success", "error", "warning", "info"],
  33431. http: new Request(),
  33432. config,
  33433. // uView配置信息相关,比如版本号
  33434. zIndex,
  33435. debounce,
  33436. throttle,
  33437. mixin,
  33438. mpMixin,
  33439. props: props$E,
  33440. ...index,
  33441. color,
  33442. platform: platform$1
  33443. };
  33444. uni.$u = $u;
  33445. const install = (Vue2) => {
  33446. Vue2.config.globalProperties.$u = $u;
  33447. Vue2.config.globalProperties.$nextTick = (cb) => {
  33448. cb();
  33449. };
  33450. Vue2.mixin(mixin);
  33451. };
  33452. const uviewPlus = {
  33453. install
  33454. };
  33455. const share = {
  33456. data() {
  33457. return {
  33458. // 默认的全局分享内容
  33459. share: {
  33460. title: "标题",
  33461. path: "/pages/home/home",
  33462. // 这里是分享的页面
  33463. imageUrl: ""
  33464. // 这里是分析的图片,如果不写则默认截取当前分享页为分享图片
  33465. }
  33466. };
  33467. },
  33468. // 定义全局分享
  33469. // 1.发送给朋友
  33470. onShareAppMessage(res2) {
  33471. return {
  33472. title: this.share.title,
  33473. path: this.share.path,
  33474. imageUrl: this.share.imageUrl
  33475. };
  33476. },
  33477. //2.分享到朋友圈
  33478. onShareTimeline(res2) {
  33479. return {
  33480. title: this.share.title,
  33481. path: this.share.path,
  33482. imageUrl: this.share.imageUrl
  33483. };
  33484. }
  33485. };
  33486. const permission = {
  33487. // 在绑定元素的父组件挂载时调用
  33488. mounted(el, binding) {
  33489. const { value: value2 } = binding;
  33490. const buttonList = uni.getStorageSync("buttonList") || [];
  33491. const hasPermission = checkPermission(value2, buttonList);
  33492. if (!hasPermission) {
  33493. el.parentNode && el.parentNode.removeChild(el);
  33494. }
  33495. }
  33496. };
  33497. function checkPermission(permission2, buttonList) {
  33498. if (!permission2 || !buttonList || buttonList.length === 0) {
  33499. return false;
  33500. }
  33501. if (buttonList.includes("*:*:*")) {
  33502. return true;
  33503. }
  33504. return buttonList.includes(permission2);
  33505. }
  33506. const permissionDirective = {
  33507. install(app) {
  33508. app.directive("permission", permission);
  33509. }
  33510. };
  33511. initClickSound();
  33512. let ttsModule = new VolumeTTS();
  33513. useInit();
  33514. uni.$u.ttsModule = ttsModule;
  33515. uni.$u.useGlobalEvent = useGlobalEvent;
  33516. uni.$u.updateActivePageOnShow = updateActivePageOnShow;
  33517. uni.$u.playClickSound = playClickSound;
  33518. function createApp() {
  33519. const app = vue.createVueApp(App);
  33520. initRequest();
  33521. const pinia2 = createPinia();
  33522. app.use(pinia2).use(uviewPlus).use(permissionDirective);
  33523. app.mixin(share);
  33524. return {
  33525. app,
  33526. pinia: pinia2
  33527. };
  33528. }
  33529. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  33530. uni.Vuex = __Vuex__;
  33531. uni.Pinia = __Pinia__;
  33532. __app__.provide("__globalStyles", __uniConfig.styles);
  33533. __app__._component.mpType = "app";
  33534. __app__._component.render = () => {
  33535. };
  33536. __app__.mount("#app");
  33537. })(Vue);