app-service.js 1.1 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262
  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 ON_SHOW = "onShow";
  41. const ON_HIDE = "onHide";
  42. const ON_LAUNCH = "onLaunch";
  43. const ON_LOAD = "onLoad";
  44. const ON_UNLOAD = "onUnload";
  45. function requireNativePlugin(name) {
  46. return weex.requireModule(name);
  47. }
  48. function formatAppLog(type2, filename, ...args) {
  49. if (uni.__log__) {
  50. uni.__log__(type2, filename, ...args);
  51. } else {
  52. console[type2].apply(console, [...args, filename]);
  53. }
  54. }
  55. function resolveEasycom(component, easycom) {
  56. return typeof component === "string" ? easycom : component;
  57. }
  58. const createHook = (lifecycle) => (hook, target = vue.getCurrentInstance()) => {
  59. !vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target);
  60. };
  61. const onShow = /* @__PURE__ */ createHook(ON_SHOW);
  62. const onHide = /* @__PURE__ */ createHook(ON_HIDE);
  63. const onLaunch = /* @__PURE__ */ createHook(ON_LAUNCH);
  64. const onLoad = /* @__PURE__ */ createHook(ON_LOAD);
  65. const onUnload = /* @__PURE__ */ createHook(ON_UNLOAD);
  66. const icons$1 = {
  67. "uicon-level": "",
  68. "uicon-column-line": "",
  69. "uicon-checkbox-mark": "",
  70. "uicon-folder": "",
  71. "uicon-movie": "",
  72. "uicon-star-fill": "",
  73. "uicon-star": "",
  74. "uicon-phone-fill": "",
  75. "uicon-phone": "",
  76. "uicon-apple-fill": "",
  77. "uicon-chrome-circle-fill": "",
  78. "uicon-backspace": "",
  79. "uicon-attach": "",
  80. "uicon-cut": "",
  81. "uicon-empty-car": "",
  82. "uicon-empty-coupon": "",
  83. "uicon-empty-address": "",
  84. "uicon-empty-favor": "",
  85. "uicon-empty-permission": "",
  86. "uicon-empty-news": "",
  87. "uicon-empty-search": "",
  88. "uicon-github-circle-fill": "",
  89. "uicon-rmb": "",
  90. "uicon-person-delete-fill": "",
  91. "uicon-reload": "",
  92. "uicon-order": "",
  93. "uicon-server-man": "",
  94. "uicon-search": "",
  95. "uicon-fingerprint": "",
  96. "uicon-more-dot-fill": "",
  97. "uicon-scan": "",
  98. "uicon-share-square": "",
  99. "uicon-map": "",
  100. "uicon-map-fill": "",
  101. "uicon-tags": "",
  102. "uicon-tags-fill": "",
  103. "uicon-bookmark-fill": "",
  104. "uicon-bookmark": "",
  105. "uicon-eye": "",
  106. "uicon-eye-fill": "",
  107. "uicon-mic": "",
  108. "uicon-mic-off": "",
  109. "uicon-calendar": "",
  110. "uicon-calendar-fill": "",
  111. "uicon-trash": "",
  112. "uicon-trash-fill": "",
  113. "uicon-play-left": "",
  114. "uicon-play-right": "",
  115. "uicon-minus": "",
  116. "uicon-plus": "",
  117. "uicon-info": "",
  118. "uicon-info-circle": "",
  119. "uicon-info-circle-fill": "",
  120. "uicon-question": "",
  121. "uicon-error": "",
  122. "uicon-close": "",
  123. "uicon-checkmark": "",
  124. "uicon-android-circle-fill": "",
  125. "uicon-android-fill": "",
  126. "uicon-ie": "",
  127. "uicon-IE-circle-fill": "",
  128. "uicon-google": "",
  129. "uicon-google-circle-fill": "",
  130. "uicon-setting-fill": "",
  131. "uicon-setting": "",
  132. "uicon-minus-square-fill": "",
  133. "uicon-plus-square-fill": "",
  134. "uicon-heart": "",
  135. "uicon-heart-fill": "",
  136. "uicon-camera": "",
  137. "uicon-camera-fill": "",
  138. "uicon-more-circle": "",
  139. "uicon-more-circle-fill": "",
  140. "uicon-chat": "",
  141. "uicon-chat-fill": "",
  142. "uicon-bag-fill": "",
  143. "uicon-bag": "",
  144. "uicon-error-circle-fill": "",
  145. "uicon-error-circle": "",
  146. "uicon-close-circle": "",
  147. "uicon-close-circle-fill": "",
  148. "uicon-checkmark-circle": "",
  149. "uicon-checkmark-circle-fill": "",
  150. "uicon-question-circle-fill": "",
  151. "uicon-question-circle": "",
  152. "uicon-share": "",
  153. "uicon-share-fill": "",
  154. "uicon-shopping-cart": "",
  155. "uicon-shopping-cart-fill": "",
  156. "uicon-bell": "",
  157. "uicon-bell-fill": "",
  158. "uicon-list": "",
  159. "uicon-list-dot": "",
  160. "uicon-zhihu": "",
  161. "uicon-zhihu-circle-fill": "",
  162. "uicon-zhifubao": "",
  163. "uicon-zhifubao-circle-fill": "",
  164. "uicon-weixin-circle-fill": "",
  165. "uicon-weixin-fill": "",
  166. "uicon-twitter-circle-fill": "",
  167. "uicon-twitter": "",
  168. "uicon-taobao-circle-fill": "",
  169. "uicon-taobao": "",
  170. "uicon-weibo-circle-fill": "",
  171. "uicon-weibo": "",
  172. "uicon-qq-fill": "",
  173. "uicon-qq-circle-fill": "",
  174. "uicon-moments-circel-fill": "",
  175. "uicon-moments": "",
  176. "uicon-qzone": "",
  177. "uicon-qzone-circle-fill": "",
  178. "uicon-baidu-circle-fill": "",
  179. "uicon-baidu": "",
  180. "uicon-facebook-circle-fill": "",
  181. "uicon-facebook": "",
  182. "uicon-car": "",
  183. "uicon-car-fill": "",
  184. "uicon-warning-fill": "",
  185. "uicon-warning": "",
  186. "uicon-clock-fill": "",
  187. "uicon-clock": "",
  188. "uicon-edit-pen": "",
  189. "uicon-edit-pen-fill": "",
  190. "uicon-email": "",
  191. "uicon-email-fill": "",
  192. "uicon-minus-circle": "",
  193. "uicon-minus-circle-fill": "",
  194. "uicon-plus-circle": "",
  195. "uicon-plus-circle-fill": "",
  196. "uicon-file-text": "",
  197. "uicon-file-text-fill": "",
  198. "uicon-pushpin": "",
  199. "uicon-pushpin-fill": "",
  200. "uicon-grid": "",
  201. "uicon-grid-fill": "",
  202. "uicon-play-circle": "",
  203. "uicon-play-circle-fill": "",
  204. "uicon-pause-circle-fill": "",
  205. "uicon-pause": "",
  206. "uicon-pause-circle": "",
  207. "uicon-eye-off": "",
  208. "uicon-eye-off-outline": "",
  209. "uicon-gift-fill": "",
  210. "uicon-gift": "",
  211. "uicon-rmb-circle-fill": "",
  212. "uicon-rmb-circle": "",
  213. "uicon-kefu-ermai": "",
  214. "uicon-server-fill": "",
  215. "uicon-coupon-fill": "",
  216. "uicon-coupon": "",
  217. "uicon-integral": "",
  218. "uicon-integral-fill": "",
  219. "uicon-home-fill": "",
  220. "uicon-home": "",
  221. "uicon-hourglass-half-fill": "",
  222. "uicon-hourglass": "",
  223. "uicon-account": "",
  224. "uicon-plus-people-fill": "",
  225. "uicon-minus-people-fill": "",
  226. "uicon-account-fill": "",
  227. "uicon-thumb-down-fill": "",
  228. "uicon-thumb-down": "",
  229. "uicon-thumb-up": "",
  230. "uicon-thumb-up-fill": "",
  231. "uicon-lock-fill": "",
  232. "uicon-lock-open": "",
  233. "uicon-lock-opened-fill": "",
  234. "uicon-lock": "",
  235. "uicon-red-packet-fill": "",
  236. "uicon-photo-fill": "",
  237. "uicon-photo": "",
  238. "uicon-volume-off-fill": "",
  239. "uicon-volume-off": "",
  240. "uicon-volume-fill": "",
  241. "uicon-volume": "",
  242. "uicon-red-packet": "",
  243. "uicon-download": "",
  244. "uicon-arrow-up-fill": "",
  245. "uicon-arrow-down-fill": "",
  246. "uicon-play-left-fill": "",
  247. "uicon-play-right-fill": "",
  248. "uicon-rewind-left-fill": "",
  249. "uicon-rewind-right-fill": "",
  250. "uicon-arrow-downward": "",
  251. "uicon-arrow-leftward": "",
  252. "uicon-arrow-rightward": "",
  253. "uicon-arrow-upward": "",
  254. "uicon-arrow-down": "",
  255. "uicon-arrow-right": "",
  256. "uicon-arrow-left": "",
  257. "uicon-arrow-up": "",
  258. "uicon-skip-back-left": "",
  259. "uicon-skip-forward-right": "",
  260. "uicon-rewind-right": "",
  261. "uicon-rewind-left": "",
  262. "uicon-arrow-right-double": "",
  263. "uicon-arrow-left-double": "",
  264. "uicon-wifi-off": "",
  265. "uicon-wifi": "",
  266. "uicon-empty-data": "",
  267. "uicon-empty-history": "",
  268. "uicon-empty-list": "",
  269. "uicon-empty-page": "",
  270. "uicon-empty-order": "",
  271. "uicon-man": "",
  272. "uicon-woman": "",
  273. "uicon-man-add": "",
  274. "uicon-man-add-fill": "",
  275. "uicon-man-delete": "",
  276. "uicon-man-delete-fill": "",
  277. "uicon-zh": "",
  278. "uicon-en": ""
  279. };
  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$23 = {
  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$22(_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$23, [["render", _sfc_render$22], ["__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$22 = {
  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$21(_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$22, [["render", _sfc_render$21], ["__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$21 = {
  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$20(_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$21, [["render", _sfc_render$20], ["__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$20 = {
  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$1$(_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$a = /* @__PURE__ */ _export_sfc(_sfc_main$20, [["render", _sfc_render$1$], ["__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$1$ = {
  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$1_(_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$1$, [["render", _sfc_render$1_], ["__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$1_ = {
  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$1Z(_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$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1_, [["render", _sfc_render$1Z], ["__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$1Z = {
  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$1Y(_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$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1Z, [["render", _sfc_render$1Y], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-form/u-form.vue"]]);
  4485. const _sfc_main$1Y = {
  4486. name: "u--form",
  4487. mixins: [mpMixin, props$x, mixin],
  4488. components: {
  4489. uvForm: __easycom_2$7
  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$1X(_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$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1Y, [["render", _sfc_render$1X], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u--form/u--form.vue"]]);
  4538. const _imports_0$2 = "/static/img/logo.png";
  4539. const prefixIconStyle = "font-size:50rpx";
  4540. const placeholderStyle$3 = "font-size:32rpx";
  4541. const _sfc_main$1X = {
  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 {
  4550. proxy
  4551. } = vue.getCurrentInstance();
  4552. const formData = vue.reactive({
  4553. username: "",
  4554. password: "",
  4555. code: ""
  4556. });
  4557. const uForm = vue.ref(null);
  4558. const isCountingDown = vue.ref(false);
  4559. const countdown = vue.ref(60);
  4560. const countDownText = vue.ref("获取验证码");
  4561. const startCountDown = () => {
  4562. isCountingDown.value = true;
  4563. countdown.value = 60;
  4564. countDownText.value = `${countdown.value}秒重发`;
  4565. const timer = setInterval(() => {
  4566. countdown.value--;
  4567. countDownText.value = `${countdown.value}秒重发`;
  4568. if (countdown.value <= 0) {
  4569. clearInterval(timer);
  4570. isCountingDown.value = false;
  4571. countDownText.value = "重新发送";
  4572. }
  4573. }, 1e3);
  4574. };
  4575. const getVerifyCode = () => {
  4576. if (isCountingDown.value)
  4577. return;
  4578. if (!formData.username)
  4579. return uni.$u.toast("请输入用户名");
  4580. if (!formData.password)
  4581. return uni.$u.toast("请输入密码");
  4582. let data = {
  4583. username: formData.username,
  4584. password: formData.password
  4585. };
  4586. uni.showLoading({
  4587. mask: true,
  4588. title: "发送中..."
  4589. });
  4590. uni.$u.http.post("/app/appUser/sendMobileCode", data).then((res2) => {
  4591. if (res2.code == 200) {
  4592. uni.showToast({
  4593. title: "验证码发送成功,请注意查收",
  4594. icon: "none"
  4595. });
  4596. startCountDown();
  4597. } else {
  4598. uni.$u.toast(res2.msg);
  4599. }
  4600. }).finally(() => uni.hideLoading());
  4601. };
  4602. const handleLogin = () => {
  4603. if (!formData.username)
  4604. return uni.$u.toast("请输入用户名");
  4605. if (!formData.password)
  4606. return uni.$u.toast("请输入密码");
  4607. uni.showLoading({
  4608. mask: true,
  4609. title: "登录中..."
  4610. });
  4611. uni.$u.http.post("/actuator/debug/loginNotCode", formData).then((res2) => {
  4612. if (res2.code == 200) {
  4613. uni.$u.toast("登录成功");
  4614. uni.switchTab({
  4615. url: "/pages/index/index"
  4616. });
  4617. formatAppLog("log", "at pages/login/login.vue:137", res2, "xxxxx");
  4618. uni.setStorageSync("token", res2.data);
  4619. getUserInfo();
  4620. uni.$u.ttsModule.speak("书嗨,不辜负每一个爱书的人");
  4621. } else {
  4622. uni.$u.toast(res2.msg);
  4623. }
  4624. }).finally(() => uni.hideLoading());
  4625. };
  4626. function getUserInfo() {
  4627. uni.$u.http.get("/app/appUser/getUserInfoById").then((res2) => {
  4628. if (res2.code == 200) {
  4629. uni.setStorageSync("userInfo", res2.data);
  4630. }
  4631. });
  4632. }
  4633. function checkToken() {
  4634. uni.showLoading({
  4635. title: "检测登录状态..."
  4636. });
  4637. uni.$u.http.get("/app/appUser/checkToken").then((res2) => {
  4638. if (res2.code == 200) {
  4639. uni.$u.toast("登录成功");
  4640. uni.switchTab({
  4641. url: "/pages/index/index"
  4642. });
  4643. } else {
  4644. uni.$u.toast("请先登录");
  4645. }
  4646. }).finally(() => uni.hideLoading());
  4647. }
  4648. onLoad(() => {
  4649. let token = uni.getStorageSync("token");
  4650. if (token) {
  4651. checkToken();
  4652. }
  4653. });
  4654. const __returned__ = { prefixIconStyle, placeholderStyle: placeholderStyle$3, customStyle, get proxy() {
  4655. return proxy;
  4656. }, set proxy(v) {
  4657. proxy = v;
  4658. }, formData, uForm, isCountingDown, countdown, countDownText, startCountDown, getVerifyCode, handleLogin, getUserInfo, checkToken, ref: vue.ref, reactive: vue.reactive, getCurrentInstance: vue.getCurrentInstance, get onLoad() {
  4659. return onLoad;
  4660. } };
  4661. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  4662. return __returned__;
  4663. }
  4664. };
  4665. function _sfc_render$1W(_ctx, _cache, $props, $setup, $data, $options) {
  4666. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  4667. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$a);
  4668. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  4669. const _component_u__form = resolveEasycom(vue.resolveDynamicComponent("u--form"), __easycom_2$6);
  4670. return vue.openBlock(), vue.createElementBlock("view", { class: "login-container" }, [
  4671. vue.createCommentVNode(" Logo和标题区域 "),
  4672. vue.createElementVNode("view", { class: "logo-section" }, [
  4673. vue.createElementVNode("image", {
  4674. class: "logo",
  4675. src: _imports_0$2,
  4676. mode: "aspectFit"
  4677. })
  4678. ]),
  4679. vue.createCommentVNode(" 表单区域 "),
  4680. vue.createElementVNode("view", { class: "form-section" }, [
  4681. vue.createVNode(_component_u__form, {
  4682. model: $setup.formData,
  4683. ref: "uForm"
  4684. }, {
  4685. default: vue.withCtx(() => [
  4686. vue.createVNode(_component_u_form_item, null, {
  4687. default: vue.withCtx(() => [
  4688. vue.createVNode(_component_u_input, {
  4689. prefixIconStyle: $setup.prefixIconStyle,
  4690. "placeholder-style": $setup.placeholderStyle,
  4691. "custom-style": $setup.customStyle,
  4692. modelValue: $setup.formData.username,
  4693. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.username = $event),
  4694. placeholder: "请输入用户名",
  4695. prefixIcon: "account"
  4696. }, null, 8, ["custom-style", "modelValue"])
  4697. ]),
  4698. _: 1
  4699. /* STABLE */
  4700. }),
  4701. vue.createVNode(_component_u_form_item, null, {
  4702. default: vue.withCtx(() => [
  4703. vue.createVNode(_component_u_input, {
  4704. prefixIconStyle: $setup.prefixIconStyle,
  4705. "placeholder-style": $setup.placeholderStyle,
  4706. "custom-style": $setup.customStyle,
  4707. modelValue: $setup.formData.password,
  4708. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.password = $event),
  4709. type: "password",
  4710. placeholder: "请输入密码",
  4711. prefixIcon: "lock"
  4712. }, null, 8, ["custom-style", "modelValue"])
  4713. ]),
  4714. _: 1
  4715. /* STABLE */
  4716. }),
  4717. vue.createVNode(_component_u_form_item, null, {
  4718. default: vue.withCtx(() => [
  4719. vue.createVNode(_component_u_input, {
  4720. prefixIconStyle: $setup.prefixIconStyle,
  4721. "placeholder-style": $setup.placeholderStyle,
  4722. "custom-style": $setup.customStyle,
  4723. modelValue: $setup.formData.code,
  4724. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.code = $event),
  4725. placeholder: "请输入验证码",
  4726. prefixIcon: "chat"
  4727. }, {
  4728. suffix: vue.withCtx(() => [
  4729. vue.createVNode(_component_u_button, {
  4730. "custom-style": "width:200rpx",
  4731. color: "#22ac38",
  4732. size: "small",
  4733. onClick: $setup.getVerifyCode,
  4734. disabled: $setup.isCountingDown
  4735. }, {
  4736. default: vue.withCtx(() => [
  4737. vue.createTextVNode(
  4738. vue.toDisplayString($setup.countDownText),
  4739. 1
  4740. /* TEXT */
  4741. )
  4742. ]),
  4743. _: 1
  4744. /* STABLE */
  4745. }, 8, ["disabled"])
  4746. ]),
  4747. _: 1
  4748. /* STABLE */
  4749. }, 8, ["custom-style", "modelValue"])
  4750. ]),
  4751. _: 1
  4752. /* STABLE */
  4753. })
  4754. ]),
  4755. _: 1
  4756. /* STABLE */
  4757. }, 8, ["model"]),
  4758. vue.createVNode(_component_u_button, {
  4759. "custom-style": "margin-top:5%",
  4760. type: "primary",
  4761. block: "",
  4762. onClick: $setup.handleLogin,
  4763. color: "#22ac38",
  4764. shape: "circle"
  4765. }, {
  4766. default: vue.withCtx(() => [
  4767. vue.createTextVNode("登录")
  4768. ]),
  4769. _: 1
  4770. /* STABLE */
  4771. })
  4772. ])
  4773. ]);
  4774. }
  4775. const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$1X, [["render", _sfc_render$1W], ["__scopeId", "data-v-e4e4508d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/login/login.vue"]]);
  4776. const _sfc_main$1W = {
  4777. __name: "index",
  4778. setup(__props, { expose: __expose }) {
  4779. __expose();
  4780. const expressOperations = vue.ref([
  4781. {
  4782. name: "中转\n\r签收",
  4783. path: "/pages/index/express/transfer-sign",
  4784. type: "primary"
  4785. },
  4786. {
  4787. name: "到仓\n\r签收",
  4788. path: "/pages/index/express/warehouse-sign",
  4789. type: "warning"
  4790. },
  4791. {
  4792. name: "重量\n\r修改",
  4793. path: "/pages/index/express/weight-modify",
  4794. type: "primary"
  4795. },
  4796. {
  4797. name: "快递\n\r验收",
  4798. path: "/pages/index/express/quick-check",
  4799. type: "warning"
  4800. },
  4801. {
  4802. name: "路由签收\n\r异常",
  4803. path: "/pages/index/express/route-exception",
  4804. type: "primary"
  4805. },
  4806. {
  4807. name: "快速\n\r拆包",
  4808. path: "/pages/index/express/quick-unpack",
  4809. type: "warning"
  4810. }
  4811. ]);
  4812. const auditOperations = vue.ref([
  4813. {
  4814. name: "确认\n\r收货",
  4815. path: "/pages/index/audit/confirm-receipt",
  4816. type: "primary"
  4817. },
  4818. {
  4819. name: "扫书\n\r查单",
  4820. path: "/pages/index/audit/scan-order",
  4821. type: "warning"
  4822. },
  4823. {
  4824. name: "根据快递单\n\r或订单",
  4825. path: "/pages/index/audit/express-order",
  4826. type: "warning"
  4827. },
  4828. {
  4829. name: "根据\n\r发件人",
  4830. path: "/pages/index/audit/sender",
  4831. type: "primary"
  4832. }
  4833. ]);
  4834. const wmsOperations = vue.ref([
  4835. {
  4836. name: "中等\n\r入库",
  4837. path: "/pages/index/wms/medium-in",
  4838. type: "primary"
  4839. },
  4840. {
  4841. name: "良品\n\r入库",
  4842. path: "/pages/index/wms/good-in",
  4843. type: "warning"
  4844. },
  4845. {
  4846. name: "次品\n\r入库",
  4847. path: "/pages/index/wms/secondary-in",
  4848. type: "primary"
  4849. },
  4850. {
  4851. name: "不良\n\r入库",
  4852. path: "/pages/index/wms/bad-in",
  4853. type: "warning"
  4854. },
  4855. {
  4856. name: "不良\n\r出库",
  4857. path: "/pages/index/wms/bad-out",
  4858. type: "primary"
  4859. },
  4860. {
  4861. name: "不良\n\r下架",
  4862. path: "/pages/index/wms/bad-off",
  4863. type: "warning"
  4864. },
  4865. {
  4866. name: "订单\n\r查询",
  4867. path: "/pages/index/wms/order-query",
  4868. type: "primary"
  4869. },
  4870. {
  4871. name: "库位\n\r订单",
  4872. path: "/pages/index/wms/location-order",
  4873. type: "warning"
  4874. },
  4875. {
  4876. name: "快速盘点",
  4877. path: "/pages/index/wms/speedy-check",
  4878. type: "primary",
  4879. span: 24
  4880. }
  4881. ]);
  4882. const statisticsOperations = vue.ref([
  4883. {
  4884. name: "审核统计",
  4885. path: "/pages/index/statistic/audit",
  4886. type: "warning",
  4887. span: 24
  4888. },
  4889. {
  4890. name: "售后\n\r统计",
  4891. path: "/pages/index/statistic/after-sale",
  4892. type: "primary"
  4893. },
  4894. {
  4895. name: "打包\n\r统计",
  4896. path: "/pages/index/statistic/package",
  4897. type: "warning"
  4898. }
  4899. ]);
  4900. const offlineOperations = vue.ref([
  4901. {
  4902. name: "线下\n\r核单",
  4903. path: "/pages/index/offline/check-order",
  4904. type: "primary"
  4905. },
  4906. {
  4907. name: "核单\n\r记录",
  4908. path: "/pages/index/offline/check-record",
  4909. type: "warning"
  4910. }
  4911. ]);
  4912. const entryOperations = vue.ref([
  4913. {
  4914. name: "扫码\n\r查书",
  4915. path: "/pages/index/entry/scan-book",
  4916. type: "primary"
  4917. },
  4918. {
  4919. name: "录入\n\r书籍重量",
  4920. path: "/pages/index/entry/book-weight",
  4921. type: "warning"
  4922. }
  4923. ]);
  4924. const handleNavigation = (path) => {
  4925. uni.navigateTo({
  4926. url: path,
  4927. fail: () => {
  4928. uni.showToast({
  4929. title: "页面跳转失败",
  4930. icon: "none"
  4931. });
  4932. }
  4933. });
  4934. };
  4935. const __returned__ = { expressOperations, auditOperations, wmsOperations, statisticsOperations, offlineOperations, entryOperations, handleNavigation, ref: vue.ref };
  4936. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  4937. return __returned__;
  4938. }
  4939. };
  4940. function _sfc_render$1V(_ctx, _cache, $props, $setup, $data, $options) {
  4941. return vue.openBlock(), vue.createElementBlock("view", { class: "operation-container" }, [
  4942. vue.createCommentVNode(" 快递操作区域 "),
  4943. vue.createElementVNode("view", { class: "section" }, [
  4944. vue.createElementVNode("view", { class: "section-title" }, "快递"),
  4945. vue.createElementVNode("view", { class: "grid-container" }, [
  4946. (vue.openBlock(true), vue.createElementBlock(
  4947. vue.Fragment,
  4948. null,
  4949. vue.renderList($setup.expressOperations, (item, index2) => {
  4950. return vue.openBlock(), vue.createElementBlock("view", {
  4951. key: index2,
  4952. class: vue.normalizeClass(["grid-item", item.type]),
  4953. onClick: ($event) => $setup.handleNavigation(item.path)
  4954. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  4955. }),
  4956. 128
  4957. /* KEYED_FRAGMENT */
  4958. ))
  4959. ])
  4960. ]),
  4961. vue.createCommentVNode(" 审核操作区域 "),
  4962. vue.createElementVNode("view", { class: "section" }, [
  4963. vue.createElementVNode("view", { class: "section-title" }, "审核"),
  4964. vue.createElementVNode("view", { class: "grid-container" }, [
  4965. (vue.openBlock(true), vue.createElementBlock(
  4966. vue.Fragment,
  4967. null,
  4968. vue.renderList($setup.auditOperations, (item, index2) => {
  4969. return vue.openBlock(), vue.createElementBlock("view", {
  4970. key: index2,
  4971. class: vue.normalizeClass(["grid-item", item.type]),
  4972. onClick: ($event) => $setup.handleNavigation(item.path)
  4973. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  4974. }),
  4975. 128
  4976. /* KEYED_FRAGMENT */
  4977. ))
  4978. ])
  4979. ]),
  4980. vue.createCommentVNode(" 统计操作区域 "),
  4981. vue.createElementVNode("view", { class: "section" }, [
  4982. vue.createElementVNode("view", { class: "section-title" }, "统计"),
  4983. vue.createElementVNode("view", { class: "grid-container" }, [
  4984. (vue.openBlock(true), vue.createElementBlock(
  4985. vue.Fragment,
  4986. null,
  4987. vue.renderList($setup.statisticsOperations, (item, index2) => {
  4988. return vue.openBlock(), vue.createElementBlock("view", {
  4989. key: index2,
  4990. class: vue.normalizeClass(["grid-item", item.type]),
  4991. style: vue.normalizeStyle({ gridColumn: item.span ? "span 2" : "span 1" }),
  4992. onClick: ($event) => $setup.handleNavigation(item.path)
  4993. }, vue.toDisplayString(item.name), 15, ["onClick"]);
  4994. }),
  4995. 128
  4996. /* KEYED_FRAGMENT */
  4997. ))
  4998. ])
  4999. ]),
  5000. vue.createCommentVNode(" WMS操作区域 "),
  5001. vue.createElementVNode("view", { class: "section" }, [
  5002. vue.createElementVNode("view", { class: "section-title" }, "WMS操作"),
  5003. vue.createElementVNode("view", { class: "grid-container" }, [
  5004. (vue.openBlock(true), vue.createElementBlock(
  5005. vue.Fragment,
  5006. null,
  5007. vue.renderList($setup.wmsOperations, (item, index2) => {
  5008. return vue.openBlock(), vue.createElementBlock("view", {
  5009. key: index2,
  5010. class: vue.normalizeClass(["grid-item", item.type]),
  5011. style: vue.normalizeStyle({ gridColumn: item.span ? "span 2" : "span 1" }),
  5012. onClick: ($event) => $setup.handleNavigation(item.path)
  5013. }, vue.toDisplayString(item.name), 15, ["onClick"]);
  5014. }),
  5015. 128
  5016. /* KEYED_FRAGMENT */
  5017. ))
  5018. ])
  5019. ]),
  5020. vue.createCommentVNode(" 线下核单 "),
  5021. vue.createElementVNode("view", { class: "section" }, [
  5022. vue.createElementVNode("view", { class: "section-title" }, "线下核单"),
  5023. vue.createElementVNode("view", { class: "grid-container" }, [
  5024. (vue.openBlock(true), vue.createElementBlock(
  5025. vue.Fragment,
  5026. null,
  5027. vue.renderList($setup.offlineOperations, (item, index2) => {
  5028. return vue.openBlock(), vue.createElementBlock("view", {
  5029. key: index2,
  5030. class: vue.normalizeClass(["grid-item", item.type]),
  5031. onClick: ($event) => $setup.handleNavigation(item.path)
  5032. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  5033. }),
  5034. 128
  5035. /* KEYED_FRAGMENT */
  5036. ))
  5037. ])
  5038. ]),
  5039. vue.createCommentVNode(" 录入信息 "),
  5040. vue.createElementVNode("view", { class: "section" }, [
  5041. vue.createElementVNode("view", { class: "section-title" }, "录入信息"),
  5042. vue.createElementVNode("view", { class: "grid-container" }, [
  5043. (vue.openBlock(true), vue.createElementBlock(
  5044. vue.Fragment,
  5045. null,
  5046. vue.renderList($setup.entryOperations, (item, index2) => {
  5047. return vue.openBlock(), vue.createElementBlock("view", {
  5048. key: index2,
  5049. class: vue.normalizeClass(["grid-item", item.type]),
  5050. onClick: ($event) => $setup.handleNavigation(item.path)
  5051. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  5052. }),
  5053. 128
  5054. /* KEYED_FRAGMENT */
  5055. ))
  5056. ])
  5057. ])
  5058. ]);
  5059. }
  5060. const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1W, [["render", _sfc_render$1V], ["__scopeId", "data-v-1cf27b2a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/index.vue"]]);
  5061. const props$w = {
  5062. props: {
  5063. // 文字颜色
  5064. color: {
  5065. type: String,
  5066. default: props$E.link.color
  5067. },
  5068. // 字体大小,单位px
  5069. fontSize: {
  5070. type: [String, Number],
  5071. default: props$E.link.fontSize
  5072. },
  5073. // 是否显示下划线
  5074. underLine: {
  5075. type: Boolean,
  5076. default: props$E.link.underLine
  5077. },
  5078. // 要跳转的链接
  5079. href: {
  5080. type: String,
  5081. default: props$E.link.href
  5082. },
  5083. // 小程序中复制到粘贴板的提示语
  5084. mpTips: {
  5085. type: String,
  5086. default: props$E.link.mpTips
  5087. },
  5088. // 下划线颜色
  5089. lineColor: {
  5090. type: String,
  5091. default: props$E.link.lineColor
  5092. },
  5093. // 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
  5094. text: {
  5095. type: String,
  5096. default: props$E.link.text
  5097. }
  5098. }
  5099. };
  5100. const _sfc_main$1V = {
  5101. name: "u-link",
  5102. mixins: [mpMixin, mixin, props$w],
  5103. computed: {
  5104. linkStyle() {
  5105. const style = {
  5106. color: this.color,
  5107. fontSize: uni.$u.addUnit(this.fontSize),
  5108. // line-height设置为比字体大小多2px
  5109. lineHeight: uni.$u.addUnit(uni.$u.getPx(this.fontSize) + 2),
  5110. textDecoration: this.underLine ? "underline" : "none"
  5111. };
  5112. return style;
  5113. }
  5114. },
  5115. methods: {
  5116. openLink() {
  5117. plus.runtime.openURL(this.href);
  5118. this.$emit("click");
  5119. }
  5120. }
  5121. };
  5122. function _sfc_render$1U(_ctx, _cache, $props, $setup, $data, $options) {
  5123. return vue.openBlock(), vue.createElementBlock(
  5124. "text",
  5125. {
  5126. class: "u-link",
  5127. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.openLink && $options.openLink(...args), ["stop"])),
  5128. style: vue.normalizeStyle([$options.linkStyle, _ctx.$u.addStyle(_ctx.customStyle)])
  5129. },
  5130. vue.toDisplayString(_ctx.text),
  5131. 5
  5132. /* TEXT, STYLE */
  5133. );
  5134. }
  5135. const __easycom_1$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1V, [["render", _sfc_render$1U], ["__scopeId", "data-v-12f6646d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-link/u-link.vue"]]);
  5136. const value = {
  5137. computed: {
  5138. // 经处理后需要显示的值
  5139. value() {
  5140. const {
  5141. text,
  5142. mode,
  5143. format: format2,
  5144. href
  5145. } = this;
  5146. if (mode === "price") {
  5147. if (!/^\d+(\.\d+)?$/.test(text)) {
  5148. uni.$u.error("金额模式下,text参数需要为金额格式");
  5149. }
  5150. if (uni.$u.test.func(format2)) {
  5151. return format2(text);
  5152. }
  5153. return uni.$u.priceFormat(text, 2);
  5154. }
  5155. if (mode === "date") {
  5156. !uni.$u.test.date(text) && uni.$u.error("日期模式下,text参数需要为日期或时间戳格式");
  5157. if (uni.$u.test.func(format2)) {
  5158. return format2(text);
  5159. }
  5160. if (format2) {
  5161. return uni.$u.timeFormat(text, format2);
  5162. }
  5163. return uni.$u.timeFormat(text, "yyyy-mm-dd");
  5164. }
  5165. if (mode === "phone") {
  5166. if (uni.$u.test.func(format2)) {
  5167. return format2(text);
  5168. }
  5169. if (format2 === "encrypt") {
  5170. return `${text.substr(0, 3)}****${text.substr(7)}`;
  5171. }
  5172. return text;
  5173. }
  5174. if (mode === "name") {
  5175. !(typeof text === "string") && uni.$u.error("姓名模式下,text参数需要为字符串格式");
  5176. if (uni.$u.test.func(format2)) {
  5177. return format2(text);
  5178. }
  5179. if (format2 === "encrypt") {
  5180. return this.formatName(text);
  5181. }
  5182. return text;
  5183. }
  5184. if (mode === "link") {
  5185. !uni.$u.test.url(href) && uni.$u.error("超链接模式下,href参数需要为URL格式");
  5186. return text;
  5187. }
  5188. return text;
  5189. }
  5190. },
  5191. methods: {
  5192. // 默认的姓名脱敏规则
  5193. formatName(name) {
  5194. let value2 = "";
  5195. if (name.length === 2) {
  5196. value2 = name.substr(0, 1) + "*";
  5197. } else if (name.length > 2) {
  5198. let char = "";
  5199. for (let i = 0, len = name.length - 2; i < len; i++) {
  5200. char += "*";
  5201. }
  5202. value2 = name.substr(0, 1) + char + name.substr(-1, 1);
  5203. } else {
  5204. value2 = name;
  5205. }
  5206. return value2;
  5207. }
  5208. }
  5209. };
  5210. const props$v = {
  5211. props: {
  5212. // 主题颜色
  5213. type: {
  5214. type: String,
  5215. default: props$E.text.type
  5216. },
  5217. // 是否显示
  5218. show: {
  5219. type: Boolean,
  5220. default: props$E.text.show
  5221. },
  5222. // 显示的值
  5223. text: {
  5224. type: [String, Number],
  5225. default: props$E.text.text
  5226. },
  5227. // 前置图标
  5228. prefixIcon: {
  5229. type: String,
  5230. default: props$E.text.prefixIcon
  5231. },
  5232. // 后置图标
  5233. suffixIcon: {
  5234. type: String,
  5235. default: props$E.text.suffixIcon
  5236. },
  5237. // 文本处理的匹配模式
  5238. // text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
  5239. mode: {
  5240. type: String,
  5241. default: props$E.text.mode
  5242. },
  5243. // mode=link下,配置的链接
  5244. href: {
  5245. type: String,
  5246. default: props$E.text.href
  5247. },
  5248. // 格式化规则
  5249. format: {
  5250. type: [String, Function],
  5251. default: props$E.text.format
  5252. },
  5253. // mode=phone时,点击文本是否拨打电话
  5254. call: {
  5255. type: Boolean,
  5256. default: props$E.text.call
  5257. },
  5258. // 小程序的打开方式
  5259. openType: {
  5260. type: String,
  5261. default: props$E.text.openType
  5262. },
  5263. // 是否粗体,默认normal
  5264. bold: {
  5265. type: Boolean,
  5266. default: props$E.text.bold
  5267. },
  5268. // 是否块状
  5269. block: {
  5270. type: Boolean,
  5271. default: props$E.text.block
  5272. },
  5273. // 文本显示的行数,如果设置,超出此行数,将会显示省略号
  5274. lines: {
  5275. type: [String, Number],
  5276. default: props$E.text.lines
  5277. },
  5278. // 文本颜色
  5279. color: {
  5280. type: String,
  5281. default: props$E.text.color
  5282. },
  5283. // 字体大小
  5284. size: {
  5285. type: [String, Number],
  5286. default: props$E.text.size
  5287. },
  5288. // 图标的样式
  5289. iconStyle: {
  5290. type: [Object, String],
  5291. default: props$E.text.iconStyle
  5292. },
  5293. // 文字装饰,下划线,中划线等,可选值 none|underline|line-through
  5294. decoration: {
  5295. tepe: String,
  5296. default: props$E.text.decoration
  5297. },
  5298. // 外边距,对象、字符串,数值形式均可
  5299. margin: {
  5300. type: [Object, String, Number],
  5301. default: props$E.text.margin
  5302. },
  5303. // 文本行高
  5304. lineHeight: {
  5305. type: [String, Number],
  5306. default: props$E.text.lineHeight
  5307. },
  5308. // 文本对齐方式,可选值left|center|right
  5309. align: {
  5310. type: String,
  5311. default: props$E.text.align
  5312. },
  5313. // 文字换行,可选值break-word|normal|anywhere
  5314. wordWrap: {
  5315. type: String,
  5316. default: props$E.text.wordWrap
  5317. }
  5318. }
  5319. };
  5320. const _sfc_main$1U = {
  5321. name: "u--text",
  5322. mixins: [mpMixin, mixin, value, props$v],
  5323. emits: ["click"],
  5324. computed: {
  5325. valueStyle() {
  5326. const style = {
  5327. textDecoration: this.decoration,
  5328. fontWeight: this.bold ? "bold" : "normal",
  5329. wordWrap: this.wordWrap,
  5330. fontSize: uni.$u.addUnit(this.size)
  5331. };
  5332. !this.type && (style.color = this.color);
  5333. this.isNvue && this.lines && (style.lines = this.lines);
  5334. this.lineHeight && (style.lineHeight = uni.$u.addUnit(this.lineHeight));
  5335. !this.isNvue && this.block && (style.display = "block");
  5336. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  5337. },
  5338. isNvue() {
  5339. let nvue = false;
  5340. return nvue;
  5341. },
  5342. isMp() {
  5343. let mp = false;
  5344. return mp;
  5345. }
  5346. },
  5347. data() {
  5348. return {};
  5349. },
  5350. methods: {
  5351. clickHandler() {
  5352. if (this.call && this.mode === "phone") {
  5353. uni.makePhoneCall({
  5354. phoneNumber: this.text
  5355. });
  5356. }
  5357. this.$emit("click");
  5358. }
  5359. }
  5360. };
  5361. function _sfc_render$1T(_ctx, _cache, $props, $setup, $data, $options) {
  5362. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  5363. const _component_u_link = resolveEasycom(vue.resolveDynamicComponent("u-link"), __easycom_1$9);
  5364. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  5365. "view",
  5366. {
  5367. key: 0,
  5368. class: vue.normalizeClass(["u-text", []]),
  5369. style: vue.normalizeStyle({
  5370. margin: _ctx.margin,
  5371. justifyContent: _ctx.align === "left" ? "flex-start" : _ctx.align === "center" ? "center" : "flex-end"
  5372. }),
  5373. onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  5374. },
  5375. [
  5376. _ctx.mode === "price" ? (vue.openBlock(), vue.createElementBlock(
  5377. "text",
  5378. {
  5379. key: 0,
  5380. class: vue.normalizeClass(["u-text__price", _ctx.type && `u-text__value--${_ctx.type}`]),
  5381. style: vue.normalizeStyle([$options.valueStyle])
  5382. },
  5383. "¥",
  5384. 6
  5385. /* CLASS, STYLE */
  5386. )) : vue.createCommentVNode("v-if", true),
  5387. _ctx.prefixIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  5388. key: 1,
  5389. class: "u-text__prefix-icon"
  5390. }, [
  5391. vue.createVNode(_component_u_icon, {
  5392. name: _ctx.prefixIcon,
  5393. customStyle: _ctx.$u.addStyle(_ctx.iconStyle)
  5394. }, null, 8, ["name", "customStyle"])
  5395. ])) : vue.createCommentVNode("v-if", true),
  5396. _ctx.mode === "link" ? (vue.openBlock(), vue.createBlock(_component_u_link, {
  5397. key: 2,
  5398. text: _ctx.value,
  5399. href: _ctx.href,
  5400. underLine: ""
  5401. }, null, 8, ["text", "href"])) : _ctx.openType && $options.isMp ? (vue.openBlock(), vue.createElementBlock("button", {
  5402. key: 3,
  5403. class: "u-reset-button u-text__value",
  5404. style: vue.normalizeStyle([$options.valueStyle]),
  5405. "data-index": _ctx.index,
  5406. openType: _ctx.openType,
  5407. onGetuserinfo: _cache[0] || (_cache[0] = (...args) => _ctx.onGetUserInfo && _ctx.onGetUserInfo(...args)),
  5408. onContact: _cache[1] || (_cache[1] = (...args) => _ctx.onContact && _ctx.onContact(...args)),
  5409. onGetphonenumber: _cache[2] || (_cache[2] = (...args) => _ctx.onGetPhoneNumber && _ctx.onGetPhoneNumber(...args)),
  5410. onError: _cache[3] || (_cache[3] = (...args) => _ctx.onError && _ctx.onError(...args)),
  5411. onLaunchapp: _cache[4] || (_cache[4] = (...args) => _ctx.onLaunchApp && _ctx.onLaunchApp(...args)),
  5412. onOpensetting: _cache[5] || (_cache[5] = (...args) => _ctx.onOpenSetting && _ctx.onOpenSetting(...args)),
  5413. lang: _ctx.lang,
  5414. "session-from": _ctx.sessionFrom,
  5415. "send-message-title": _ctx.sendMessageTitle,
  5416. "send-message-path": _ctx.sendMessagePath,
  5417. "send-message-img": _ctx.sendMessageImg,
  5418. "show-message-card": _ctx.showMessageCard,
  5419. "app-parameter": _ctx.appParameter
  5420. }, 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(
  5421. "text",
  5422. {
  5423. key: 4,
  5424. class: vue.normalizeClass(["u-text__value", [
  5425. _ctx.type && `u-text__value--${_ctx.type}`,
  5426. _ctx.lines && `u-line-${_ctx.lines}`
  5427. ]]),
  5428. style: vue.normalizeStyle([$options.valueStyle])
  5429. },
  5430. vue.toDisplayString(_ctx.value),
  5431. 7
  5432. /* TEXT, CLASS, STYLE */
  5433. )),
  5434. _ctx.suffixIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  5435. key: 5,
  5436. class: "u-text__suffix-icon"
  5437. }, [
  5438. vue.createVNode(_component_u_icon, {
  5439. name: _ctx.suffixIcon,
  5440. customStyle: _ctx.$u.addStyle(_ctx.iconStyle)
  5441. }, null, 8, ["name", "customStyle"])
  5442. ])) : vue.createCommentVNode("v-if", true)
  5443. ],
  5444. 4
  5445. /* STYLE */
  5446. )) : vue.createCommentVNode("v-if", true);
  5447. }
  5448. const __easycom_1$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1U, [["render", _sfc_render$1T], ["__scopeId", "data-v-0a574502"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-text/u-text.vue"]]);
  5449. const _sfc_main$1T = {
  5450. name: "u--text",
  5451. mixins: [mpMixin, mixin, props$v],
  5452. components: {
  5453. uvText: __easycom_1$8
  5454. }
  5455. };
  5456. function _sfc_render$1S(_ctx, _cache, $props, $setup, $data, $options) {
  5457. const _component_uvText = vue.resolveComponent("uvText");
  5458. return vue.openBlock(), vue.createBlock(_component_uvText, {
  5459. type: _ctx.type,
  5460. show: _ctx.show,
  5461. text: _ctx.text,
  5462. prefixIcon: _ctx.prefixIcon,
  5463. suffixIcon: _ctx.suffixIcon,
  5464. mode: _ctx.mode,
  5465. href: _ctx.href,
  5466. format: _ctx.format,
  5467. call: _ctx.call,
  5468. openType: _ctx.openType,
  5469. bold: _ctx.bold,
  5470. block: _ctx.block,
  5471. lines: _ctx.lines,
  5472. color: _ctx.color,
  5473. decoration: _ctx.decoration,
  5474. size: _ctx.size,
  5475. iconStyle: _ctx.iconStyle,
  5476. margin: _ctx.margin,
  5477. lineHeight: _ctx.lineHeight,
  5478. align: _ctx.align,
  5479. wordWrap: _ctx.wordWrap,
  5480. customStyle: _ctx.customStyle
  5481. }, null, 8, ["type", "show", "text", "prefixIcon", "suffixIcon", "mode", "href", "format", "call", "openType", "bold", "block", "lines", "color", "decoration", "size", "iconStyle", "margin", "lineHeight", "align", "wordWrap", "customStyle"]);
  5482. }
  5483. const __easycom_1$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1T, [["render", _sfc_render$1S], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u--text/u--text.vue"]]);
  5484. const props$u = {
  5485. props: {
  5486. // 头像图片路径(不能为相对路径)
  5487. src: {
  5488. type: String,
  5489. default: props$E.avatar.src
  5490. },
  5491. // 头像形状,circle-圆形,square-方形
  5492. shape: {
  5493. type: String,
  5494. default: props$E.avatar.shape
  5495. },
  5496. // 头像尺寸
  5497. size: {
  5498. type: [String, Number],
  5499. default: props$E.avatar.size
  5500. },
  5501. // 裁剪模式
  5502. mode: {
  5503. type: String,
  5504. default: props$E.avatar.mode
  5505. },
  5506. // 显示的文字
  5507. text: {
  5508. type: String,
  5509. default: props$E.avatar.text
  5510. },
  5511. // 背景色
  5512. bgColor: {
  5513. type: String,
  5514. default: props$E.avatar.bgColor
  5515. },
  5516. // 文字颜色
  5517. color: {
  5518. type: String,
  5519. default: props$E.avatar.color
  5520. },
  5521. // 文字大小
  5522. fontSize: {
  5523. type: [String, Number],
  5524. default: props$E.avatar.fontSize
  5525. },
  5526. // 显示的图标
  5527. icon: {
  5528. type: String,
  5529. default: props$E.avatar.icon
  5530. },
  5531. // 显示小程序头像,只对百度,微信,QQ小程序有效
  5532. mpAvatar: {
  5533. type: Boolean,
  5534. default: props$E.avatar.mpAvatar
  5535. },
  5536. // 是否使用随机背景色
  5537. randomBgColor: {
  5538. type: Boolean,
  5539. default: props$E.avatar.randomBgColor
  5540. },
  5541. // 加载失败的默认头像(组件有内置默认图片)
  5542. defaultUrl: {
  5543. type: String,
  5544. default: props$E.avatar.defaultUrl
  5545. },
  5546. // 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间
  5547. colorIndex: {
  5548. type: [String, Number],
  5549. // 校验参数规则,索引在0-19之间
  5550. validator(n) {
  5551. return uni.$u.test.range(n, [0, 19]) || n === "";
  5552. },
  5553. default: props$E.avatar.colorIndex
  5554. },
  5555. // 组件标识符
  5556. name: {
  5557. type: String,
  5558. default: props$E.avatar.name
  5559. }
  5560. }
  5561. };
  5562. 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";
  5563. const _sfc_main$1S = {
  5564. name: "u-avatar",
  5565. mixins: [mpMixin, mixin, props$u],
  5566. data() {
  5567. return {
  5568. // 如果配置randomBgColor参数为true,在图标或者文字的模式下,会随机从中取出一个颜色值当做背景色
  5569. colors: [
  5570. "#ffb34b",
  5571. "#f2bba9",
  5572. "#f7a196",
  5573. "#f18080",
  5574. "#88a867",
  5575. "#bfbf39",
  5576. "#89c152",
  5577. "#94d554",
  5578. "#f19ec2",
  5579. "#afaae4",
  5580. "#e1b0df",
  5581. "#c38cc1",
  5582. "#72dcdc",
  5583. "#9acdcb",
  5584. "#77b1cc",
  5585. "#448aca",
  5586. "#86cefa",
  5587. "#98d1ee",
  5588. "#73d1f1",
  5589. "#80a7dc"
  5590. ],
  5591. avatarUrl: this.src,
  5592. allowMp: false
  5593. };
  5594. },
  5595. watch: {
  5596. // 监听头像src的变化,赋值给内部的avatarUrl变量,因为图片加载失败时,需要修改图片的src为默认值
  5597. // 而组件内部不能直接修改props的值,所以需要一个中间变量
  5598. src: {
  5599. immediate: true,
  5600. handler(newVal) {
  5601. this.avatarUrl = newVal;
  5602. if (!newVal) {
  5603. this.errorHandler();
  5604. }
  5605. }
  5606. }
  5607. },
  5608. computed: {
  5609. imageStyle() {
  5610. const style = {};
  5611. return style;
  5612. }
  5613. },
  5614. created() {
  5615. this.init();
  5616. },
  5617. methods: {
  5618. init() {
  5619. },
  5620. // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
  5621. isImg() {
  5622. return this.src.indexOf("/") !== -1;
  5623. },
  5624. // 图片加载时失败时触发
  5625. errorHandler() {
  5626. this.avatarUrl = this.defaultUrl || base64Avatar;
  5627. },
  5628. clickHandler() {
  5629. this.$emit("click", this.name);
  5630. }
  5631. }
  5632. };
  5633. function _sfc_render$1R(_ctx, _cache, $props, $setup, $data, $options) {
  5634. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  5635. const _component_u__text = resolveEasycom(vue.resolveDynamicComponent("u--text"), __easycom_1$7);
  5636. return vue.openBlock(), vue.createElementBlock(
  5637. "view",
  5638. {
  5639. class: vue.normalizeClass(["u-avatar", [`u-avatar--${_ctx.shape}`]]),
  5640. style: vue.normalizeStyle([{
  5641. backgroundColor: _ctx.text || _ctx.icon ? _ctx.randomBgColor ? $data.colors[_ctx.colorIndex !== "" ? _ctx.colorIndex : _ctx.$u.random(0, 19)] : _ctx.bgColor : "transparent",
  5642. width: _ctx.$u.addUnit(_ctx.size),
  5643. height: _ctx.$u.addUnit(_ctx.size)
  5644. }, _ctx.$u.addStyle(_ctx.customStyle)]),
  5645. onClick: _cache[1] || (_cache[1] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  5646. },
  5647. [
  5648. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  5649. _ctx.mpAvatar && $data.allowMp ? (vue.openBlock(), vue.createElementBlock(
  5650. vue.Fragment,
  5651. { key: 0 },
  5652. [],
  5653. 64
  5654. /* STABLE_FRAGMENT */
  5655. )) : _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  5656. key: 1,
  5657. name: _ctx.icon,
  5658. size: _ctx.fontSize,
  5659. color: _ctx.color
  5660. }, null, 8, ["name", "size", "color"])) : _ctx.text ? (vue.openBlock(), vue.createBlock(_component_u__text, {
  5661. key: 2,
  5662. text: _ctx.text,
  5663. size: _ctx.fontSize,
  5664. color: _ctx.color,
  5665. align: "center",
  5666. customStyle: "justify-content: center"
  5667. }, null, 8, ["text", "size", "color"])) : (vue.openBlock(), vue.createElementBlock("image", {
  5668. key: 3,
  5669. class: vue.normalizeClass(["u-avatar__image", [`u-avatar__image--${_ctx.shape}`]]),
  5670. src: $data.avatarUrl || _ctx.defaultUrl,
  5671. mode: _ctx.mode,
  5672. onError: _cache[0] || (_cache[0] = (...args) => $options.errorHandler && $options.errorHandler(...args)),
  5673. style: vue.normalizeStyle([{
  5674. width: _ctx.$u.addUnit(_ctx.size),
  5675. height: _ctx.$u.addUnit(_ctx.size)
  5676. }])
  5677. }, null, 46, ["src", "mode"]))
  5678. ], true)
  5679. ],
  5680. 6
  5681. /* CLASS, STYLE */
  5682. );
  5683. }
  5684. const __easycom_0$c = /* @__PURE__ */ _export_sfc(_sfc_main$1S, [["render", _sfc_render$1R], ["__scopeId", "data-v-34d954f9"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-avatar/u-avatar.vue"]]);
  5685. const props$t = {
  5686. props: {
  5687. // 标题
  5688. title: {
  5689. type: [String, Number],
  5690. default: props$E.cell.title
  5691. },
  5692. // 标题下方的描述信息
  5693. label: {
  5694. type: [String, Number],
  5695. default: props$E.cell.label
  5696. },
  5697. // 右侧的内容
  5698. value: {
  5699. type: [String, Number],
  5700. default: props$E.cell.value
  5701. },
  5702. // 左侧图标名称,或者图片链接(本地文件建议使用绝对地址)
  5703. icon: {
  5704. type: String,
  5705. default: props$E.cell.icon
  5706. },
  5707. // 是否禁用cell
  5708. disabled: {
  5709. type: Boolean,
  5710. default: props$E.cell.disabled
  5711. },
  5712. // 是否显示下边框
  5713. border: {
  5714. type: Boolean,
  5715. default: props$E.cell.border
  5716. },
  5717. // 内容是否垂直居中(主要是针对右侧的value部分)
  5718. center: {
  5719. type: Boolean,
  5720. default: props$E.cell.center
  5721. },
  5722. // 点击后跳转的URL地址
  5723. url: {
  5724. type: String,
  5725. default: props$E.cell.url
  5726. },
  5727. // 链接跳转的方式,内部使用的是uView封装的route方法,可能会进行拦截操作
  5728. linkType: {
  5729. type: String,
  5730. default: props$E.cell.linkType
  5731. },
  5732. // 是否开启点击反馈(表现为点击时加上灰色背景)
  5733. clickable: {
  5734. type: Boolean,
  5735. default: props$E.cell.clickable
  5736. },
  5737. // 是否展示右侧箭头并开启点击反馈
  5738. isLink: {
  5739. type: Boolean,
  5740. default: props$E.cell.isLink
  5741. },
  5742. // 是否显示表单状态下的必填星号(此组件可能会内嵌入input组件)
  5743. required: {
  5744. type: Boolean,
  5745. default: props$E.cell.required
  5746. },
  5747. // 右侧的图标箭头
  5748. rightIcon: {
  5749. type: String,
  5750. default: props$E.cell.rightIcon
  5751. },
  5752. // 右侧箭头的方向,可选值为:left,up,down
  5753. arrowDirection: {
  5754. type: String,
  5755. default: props$E.cell.arrowDirection
  5756. },
  5757. // 左侧图标样式
  5758. iconStyle: {
  5759. type: [Object, String],
  5760. default: () => {
  5761. return uni.$u.props.cell.iconStyle;
  5762. }
  5763. },
  5764. // 右侧箭头图标的样式
  5765. rightIconStyle: {
  5766. type: [Object, String],
  5767. default: () => {
  5768. return uni.$u.props.cell.rightIconStyle;
  5769. }
  5770. },
  5771. // 标题的样式
  5772. titleStyle: {
  5773. type: [Object, String],
  5774. default: () => {
  5775. return uni.$u.props.cell.titleStyle;
  5776. }
  5777. },
  5778. // 单位元的大小,可选值为large
  5779. size: {
  5780. type: String,
  5781. default: props$E.cell.size
  5782. },
  5783. // 点击cell是否阻止事件传播
  5784. stop: {
  5785. type: Boolean,
  5786. default: props$E.cell.stop
  5787. },
  5788. // 标识符,cell被点击时返回
  5789. name: {
  5790. type: [Number, String],
  5791. default: props$E.cell.name
  5792. }
  5793. }
  5794. };
  5795. const _sfc_main$1R = {
  5796. name: "u-cell",
  5797. data() {
  5798. return {};
  5799. },
  5800. mixins: [mpMixin, mixin, props$t],
  5801. computed: {
  5802. titleTextStyle() {
  5803. return uni.$u.addStyle(this.titleStyle);
  5804. }
  5805. },
  5806. emits: ["click"],
  5807. methods: {
  5808. // 点击cell
  5809. clickHandler(e) {
  5810. if (this.disabled)
  5811. return;
  5812. this.$emit("click", {
  5813. name: this.name
  5814. });
  5815. this.openPage();
  5816. this.stop && this.preventEvent(e);
  5817. }
  5818. }
  5819. };
  5820. function _sfc_render$1Q(_ctx, _cache, $props, $setup, $data, $options) {
  5821. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  5822. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$e);
  5823. return vue.openBlock(), vue.createElementBlock("view", {
  5824. class: vue.normalizeClass(["u-cell", [_ctx.customClass]]),
  5825. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
  5826. "hover-class": !_ctx.disabled && (_ctx.clickable || _ctx.isLink) ? "u-cell--clickable" : "",
  5827. "hover-stay-time": 250,
  5828. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  5829. }, [
  5830. vue.createElementVNode(
  5831. "view",
  5832. {
  5833. class: vue.normalizeClass(["u-cell__body", [_ctx.center && "u-cell--center", _ctx.size === "large" && "u-cell__body--large"]])
  5834. },
  5835. [
  5836. vue.createElementVNode("view", { class: "u-cell__body__content" }, [
  5837. vue.createElementVNode("view", { class: "u-cell__left-icon-wrap" }, [
  5838. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  5839. _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  5840. key: 0,
  5841. name: _ctx.icon,
  5842. "custom-style": _ctx.iconStyle,
  5843. size: _ctx.size === "large" ? 22 : 18
  5844. }, null, 8, ["name", "custom-style", "size"])) : vue.createCommentVNode("v-if", true)
  5845. ], true)
  5846. ]),
  5847. vue.createElementVNode("view", { class: "u-cell__title" }, [
  5848. vue.renderSlot(_ctx.$slots, "title", {}, () => [
  5849. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  5850. "text",
  5851. {
  5852. key: 0,
  5853. class: vue.normalizeClass(["u-cell__title-text", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__title-text--large"]]),
  5854. style: vue.normalizeStyle([$options.titleTextStyle])
  5855. },
  5856. vue.toDisplayString(_ctx.title),
  5857. 7
  5858. /* TEXT, CLASS, STYLE */
  5859. )) : vue.createCommentVNode("v-if", true)
  5860. ], true),
  5861. vue.renderSlot(_ctx.$slots, "label", {}, () => [
  5862. _ctx.label ? (vue.openBlock(), vue.createElementBlock(
  5863. "text",
  5864. {
  5865. key: 0,
  5866. class: vue.normalizeClass(["u-cell__label", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__label--large"]])
  5867. },
  5868. vue.toDisplayString(_ctx.label),
  5869. 3
  5870. /* TEXT, CLASS */
  5871. )) : vue.createCommentVNode("v-if", true)
  5872. ], true)
  5873. ])
  5874. ]),
  5875. vue.renderSlot(_ctx.$slots, "value", {}, () => [
  5876. !_ctx.$u.test.empty(_ctx.value) ? (vue.openBlock(), vue.createElementBlock(
  5877. "text",
  5878. {
  5879. key: 0,
  5880. class: vue.normalizeClass(["u-cell__value", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__value--large"]])
  5881. },
  5882. vue.toDisplayString(_ctx.value),
  5883. 3
  5884. /* TEXT, CLASS */
  5885. )) : vue.createCommentVNode("v-if", true)
  5886. ], true),
  5887. vue.createElementVNode(
  5888. "view",
  5889. {
  5890. class: vue.normalizeClass(["u-cell__right-icon-wrap", [`u-cell__right-icon-wrap--${_ctx.arrowDirection}`]])
  5891. },
  5892. [
  5893. vue.renderSlot(_ctx.$slots, "right-icon", {}, () => [
  5894. _ctx.isLink ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  5895. key: 0,
  5896. name: _ctx.rightIcon,
  5897. "custom-style": _ctx.rightIconStyle,
  5898. color: _ctx.disabled ? "#c8c9cc" : "info",
  5899. size: _ctx.size === "large" ? 18 : 16
  5900. }, null, 8, ["name", "custom-style", "color", "size"])) : vue.createCommentVNode("v-if", true)
  5901. ], true)
  5902. ],
  5903. 2
  5904. /* CLASS */
  5905. )
  5906. ],
  5907. 2
  5908. /* CLASS */
  5909. ),
  5910. _ctx.border ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true)
  5911. ], 14, ["hover-class"]);
  5912. }
  5913. const __easycom_1$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1R, [["render", _sfc_render$1Q], ["__scopeId", "data-v-3fd6feca"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-cell/u-cell.vue"]]);
  5914. const props$s = {
  5915. props: {
  5916. // 分组标题
  5917. title: {
  5918. type: String,
  5919. default: props$E.cellGroup.title
  5920. },
  5921. // 是否显示外边框
  5922. border: {
  5923. type: Boolean,
  5924. default: props$E.cellGroup.border
  5925. }
  5926. }
  5927. };
  5928. const _sfc_main$1Q = {
  5929. name: "u-cell-group",
  5930. mixins: [mpMixin, mixin, props$s]
  5931. };
  5932. function _sfc_render$1P(_ctx, _cache, $props, $setup, $data, $options) {
  5933. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$e);
  5934. return vue.openBlock(), vue.createElementBlock(
  5935. "view",
  5936. {
  5937. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
  5938. class: vue.normalizeClass([[_ctx.customClass], "u-cell-group"])
  5939. },
  5940. [
  5941. _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", {
  5942. key: 0,
  5943. class: "u-cell-group__title"
  5944. }, [
  5945. vue.renderSlot(_ctx.$slots, "title", {}, () => [
  5946. vue.createElementVNode(
  5947. "text",
  5948. { class: "u-cell-group__title__text" },
  5949. vue.toDisplayString(_ctx.title),
  5950. 1
  5951. /* TEXT */
  5952. )
  5953. ], true)
  5954. ])) : vue.createCommentVNode("v-if", true),
  5955. vue.createElementVNode("view", { class: "u-cell-group__wrapper" }, [
  5956. _ctx.border ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true),
  5957. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  5958. ])
  5959. ],
  5960. 6
  5961. /* CLASS, STYLE */
  5962. );
  5963. }
  5964. const __easycom_2$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1Q, [["render", _sfc_render$1P], ["__scopeId", "data-v-014d39dc"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-cell-group/u-cell-group.vue"]]);
  5965. const _sfc_main$1P = {
  5966. __name: "my",
  5967. setup(__props, { expose: __expose }) {
  5968. __expose();
  5969. const settingsList = vue.ref([
  5970. {
  5971. title: "用户信息",
  5972. path: "/pages/my/page/user-info"
  5973. },
  5974. {
  5975. title: "默认仓库",
  5976. path: "/pages/my/page/warehouse"
  5977. },
  5978. {
  5979. title: "学校设置",
  5980. path: "/pages/my/page/school"
  5981. },
  5982. {
  5983. title: "审核未完成",
  5984. path: "/pages/my/page/audit-unfinished"
  5985. },
  5986. {
  5987. title: "版本设置",
  5988. path: "/pages/my/page/version",
  5989. icon: "tags"
  5990. },
  5991. {
  5992. title: "音频设置",
  5993. path: "/pages/my/page/volume"
  5994. },
  5995. {
  5996. title: "图书显示设置",
  5997. path: "/pages/my/page/book-display"
  5998. },
  5999. {
  6000. title: "修改密码",
  6001. icon: "lock",
  6002. path: "/pages/my/page/password"
  6003. },
  6004. {
  6005. title: "退出账号",
  6006. path: "/pages/my/page/logout",
  6007. type: "logout"
  6008. }
  6009. ]);
  6010. const greeting = vue.ref("");
  6011. const updateGreeting = () => {
  6012. const hour = (/* @__PURE__ */ new Date()).getHours();
  6013. if (hour >= 5 && hour < 12) {
  6014. greeting.value = "早上好";
  6015. } else if (hour >= 12 && hour < 14) {
  6016. greeting.value = "中午好";
  6017. } else if (hour >= 14 && hour < 18) {
  6018. greeting.value = "下午好";
  6019. } else if (hour >= 18 && hour < 22) {
  6020. greeting.value = "晚上好";
  6021. } else {
  6022. greeting.value = "夜深了";
  6023. }
  6024. };
  6025. vue.onMounted(() => {
  6026. updateGreeting();
  6027. setInterval(updateGreeting, 60 * 60 * 1e3);
  6028. });
  6029. const handleClick = (item) => {
  6030. if (item.type === "logout") {
  6031. uni.showModal({
  6032. title: "提示",
  6033. content: "确定要退出登录吗?",
  6034. success: (res2) => {
  6035. if (res2.confirm) {
  6036. uni.clearStorageSync();
  6037. uni.reLaunch({
  6038. url: "/pages/login/login"
  6039. });
  6040. }
  6041. }
  6042. });
  6043. return;
  6044. }
  6045. uni.navigateTo({
  6046. url: item.path
  6047. });
  6048. };
  6049. const __returned__ = { settingsList, greeting, updateGreeting, handleClick, ref: vue.ref, onMounted: vue.onMounted };
  6050. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  6051. return __returned__;
  6052. }
  6053. };
  6054. function _sfc_render$1O(_ctx, _cache, $props, $setup, $data, $options) {
  6055. const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$c);
  6056. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  6057. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$6);
  6058. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$5);
  6059. return vue.openBlock(), vue.createElementBlock("view", { class: "settings-page" }, [
  6060. vue.createCommentVNode(" 顶部用户信息 "),
  6061. vue.createElementVNode("view", { class: "user-header" }, [
  6062. vue.createElementVNode("view", { class: "user-info" }, [
  6063. vue.createVNode(_component_u_avatar, {
  6064. size: 60,
  6065. src: "https://img20.360buyimg.com/da/jfs/t1/141592/25/8861/261559/5f68d8c1E33ed78ab/698ad655bfcfbaed.png"
  6066. }),
  6067. vue.createElementVNode("view", { class: "greeting" }, [
  6068. vue.createElementVNode(
  6069. "text",
  6070. { class: "time" },
  6071. vue.toDisplayString($setup.greeting) + "!",
  6072. 1
  6073. /* TEXT */
  6074. ),
  6075. vue.createElementVNode("text", { class: "name" }, "涨涨涨")
  6076. ])
  6077. ])
  6078. ]),
  6079. vue.createCommentVNode(" 设置列表 "),
  6080. vue.createElementVNode("view", { class: "settings-list" }, [
  6081. vue.createVNode(_component_u_cell_group, { border: false }, {
  6082. default: vue.withCtx(() => [
  6083. (vue.openBlock(true), vue.createElementBlock(
  6084. vue.Fragment,
  6085. null,
  6086. vue.renderList($setup.settingsList, (item, index2) => {
  6087. return vue.openBlock(), vue.createBlock(_component_u_cell, {
  6088. key: index2,
  6089. title: item.title,
  6090. isLink: true,
  6091. onClick: ($event) => $setup.handleClick(item),
  6092. border: index2 == $setup.settingsList.length - 1 ? false : true
  6093. }, {
  6094. icon: vue.withCtx(() => [
  6095. vue.createElementVNode("view", { class: "cell-icon" }, [
  6096. vue.createVNode(_component_u_icon, {
  6097. name: item.icon || "setting",
  6098. size: "22",
  6099. color: "#333"
  6100. }, null, 8, ["name"])
  6101. ])
  6102. ]),
  6103. _: 2
  6104. /* DYNAMIC */
  6105. }, 1032, ["title", "onClick", "border"]);
  6106. }),
  6107. 128
  6108. /* KEYED_FRAGMENT */
  6109. ))
  6110. ]),
  6111. _: 1
  6112. /* STABLE */
  6113. })
  6114. ])
  6115. ]);
  6116. }
  6117. const PagesMyMy = /* @__PURE__ */ _export_sfc(_sfc_main$1P, [["render", _sfc_render$1O], ["__scopeId", "data-v-2f1ef635"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/my.vue"]]);
  6118. const GlobalOption = {
  6119. down: {
  6120. // 其他down的配置参数也可以写,这里只展示了常用的配置:
  6121. offset: 80,
  6122. // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
  6123. native: false
  6124. // 是否使用系统自带的下拉刷新; 默认false; 仅在mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  6125. },
  6126. up: {
  6127. // 其他up的配置参数也可以写,这里只展示了常用的配置:
  6128. offset: 150,
  6129. // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
  6130. toTop: {
  6131. // 回到顶部按钮,需配置src才显示
  6132. src: "https://www.mescroll.com/img/mescroll-totop.png",
  6133. // 图片路径 (建议放入static目录, 如 /static/img/mescroll-totop.png )
  6134. offset: 1e3,
  6135. // 列表滚动多少距离才显示回到顶部按钮,默认1000px
  6136. right: 20,
  6137. // 到右边的距离, 默认20 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  6138. bottom: 120,
  6139. // 到底部的距离, 默认120 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  6140. width: 72
  6141. // 回到顶部图标的宽度, 默认72 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  6142. },
  6143. empty: {
  6144. use: true,
  6145. // 是否显示空布局
  6146. icon: "https://www.mescroll.com/img/mescroll-empty.png"
  6147. // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
  6148. }
  6149. },
  6150. // 国际化配置
  6151. i18n: {
  6152. // 中文
  6153. zh: {
  6154. down: {
  6155. textInOffset: "下拉刷新",
  6156. // 下拉的距离在offset范围内的提示文本
  6157. textOutOffset: "释放更新",
  6158. // 下拉的距离大于offset范围的提示文本
  6159. textLoading: "加载中 ...",
  6160. // 加载中的提示文本
  6161. textSuccess: "加载成功",
  6162. // 加载成功的文本
  6163. textErr: "加载失败"
  6164. // 加载失败的文本
  6165. },
  6166. up: {
  6167. textLoading: "加载中 ...",
  6168. // 加载中的提示文本
  6169. textNoMore: "-- END --",
  6170. // 没有更多数据的提示文本
  6171. empty: {
  6172. tip: "暂无数据"
  6173. // 空提示
  6174. }
  6175. }
  6176. },
  6177. // 英文
  6178. en: {
  6179. down: {
  6180. textInOffset: "drop down refresh",
  6181. textOutOffset: "release updates",
  6182. textLoading: "loading ...",
  6183. textSuccess: "loaded successfully",
  6184. textErr: "loading failed"
  6185. },
  6186. up: {
  6187. textLoading: "loading ...",
  6188. textNoMore: "-- END --",
  6189. empty: {
  6190. tip: "~ absolutely empty ~"
  6191. }
  6192. }
  6193. }
  6194. }
  6195. };
  6196. const mescrollI18n = {
  6197. // 默认语言
  6198. def: "zh",
  6199. // 获取当前语言类型
  6200. getType() {
  6201. return uni.getStorageSync("mescroll-i18n") || this.def;
  6202. },
  6203. // 设置当前语言类型
  6204. setType(type2) {
  6205. uni.setStorageSync("mescroll-i18n", type2);
  6206. }
  6207. };
  6208. const _imports_0$1 = "/assets/no-result.6af066e5.png";
  6209. const _sfc_main$1O = {
  6210. props: {
  6211. // empty的配置项: 默认为GlobalOption.up.empty
  6212. option: {
  6213. type: Object,
  6214. default() {
  6215. return {};
  6216. }
  6217. }
  6218. },
  6219. // 使用computed获取配置,用于支持option的动态配置
  6220. computed: {
  6221. // 图标
  6222. icon() {
  6223. if (this.option.icon != null) {
  6224. return this.option.icon;
  6225. } else {
  6226. let i18nType = mescrollI18n.getType();
  6227. if (this.option.i18n) {
  6228. return this.option.i18n[i18nType].icon;
  6229. } else {
  6230. return GlobalOption.i18n[i18nType].up.empty.icon || GlobalOption.up.empty.icon;
  6231. }
  6232. }
  6233. },
  6234. // 文本提示
  6235. tip() {
  6236. if (this.option.tip != null) {
  6237. return this.option.tip;
  6238. } else {
  6239. let i18nType = mescrollI18n.getType();
  6240. if (this.option.i18n) {
  6241. return this.option.i18n[i18nType].tip;
  6242. } else {
  6243. return GlobalOption.i18n[i18nType].up.empty.tip || GlobalOption.up.empty.tip;
  6244. }
  6245. }
  6246. },
  6247. // 按钮文本
  6248. btnText() {
  6249. if (this.option.i18n) {
  6250. let i18nType = mescrollI18n.getType();
  6251. return this.option.i18n[i18nType].btnText;
  6252. } else {
  6253. return this.option.btnText;
  6254. }
  6255. }
  6256. },
  6257. methods: {
  6258. // 点击按钮
  6259. emptyClick() {
  6260. this.$emit("emptyclick");
  6261. }
  6262. }
  6263. };
  6264. function _sfc_render$1N(_ctx, _cache, $props, $setup, $data, $options) {
  6265. return vue.openBlock(), vue.createElementBlock(
  6266. "view",
  6267. {
  6268. class: vue.normalizeClass(["mescroll-empty", { "empty-fixed": $props.option.fixed }]),
  6269. style: vue.normalizeStyle({ "z-index": $props.option.zIndex, top: $props.option.top })
  6270. },
  6271. [
  6272. vue.createCommentVNode(' <view> <image v-if="icon" class="empty-icon" :src="icon" mode="widthFix" /> </view> '),
  6273. vue.createElementVNode("view", null, [
  6274. $options.icon ? (vue.openBlock(), vue.createElementBlock("image", {
  6275. key: 0,
  6276. class: "empty-icon",
  6277. src: _imports_0$1,
  6278. mode: "widthFix"
  6279. })) : vue.createCommentVNode("v-if", true)
  6280. ]),
  6281. $options.tip ? (vue.openBlock(), vue.createElementBlock(
  6282. "view",
  6283. {
  6284. key: 0,
  6285. class: "empty-tip"
  6286. },
  6287. vue.toDisplayString($options.tip),
  6288. 1
  6289. /* TEXT */
  6290. )) : vue.createCommentVNode("v-if", true),
  6291. $options.btnText ? (vue.openBlock(), vue.createElementBlock(
  6292. "view",
  6293. {
  6294. key: 1,
  6295. class: "empty-btn",
  6296. onClick: _cache[0] || (_cache[0] = (...args) => $options.emptyClick && $options.emptyClick(...args))
  6297. },
  6298. vue.toDisplayString($options.btnText),
  6299. 1
  6300. /* TEXT */
  6301. )) : vue.createCommentVNode("v-if", true)
  6302. ],
  6303. 6
  6304. /* CLASS, STYLE */
  6305. );
  6306. }
  6307. const __easycom_0$b = /* @__PURE__ */ _export_sfc(_sfc_main$1O, [["render", _sfc_render$1N], ["__scopeId", "data-v-7cefd855"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/mescroll-uni/components/mescroll-empty/mescroll-empty.vue"]]);
  6308. function MeScroll(options, isScrollBody) {
  6309. let me = this;
  6310. me.version = "1.3.7";
  6311. me.options = options || {};
  6312. me.isScrollBody = isScrollBody || false;
  6313. me.isDownScrolling = false;
  6314. me.isUpScrolling = false;
  6315. let hasDownCallback = me.options.down && me.options.down.callback;
  6316. me.initDownScroll();
  6317. me.initUpScroll();
  6318. setTimeout(function() {
  6319. if ((me.optDown.use || me.optDown.native) && me.optDown.auto && hasDownCallback) {
  6320. if (me.optDown.autoShowLoading) {
  6321. me.triggerDownScroll();
  6322. } else {
  6323. me.optDown.callback && me.optDown.callback(me);
  6324. }
  6325. }
  6326. if (!me.isUpAutoLoad) {
  6327. setTimeout(function() {
  6328. me.optUp.use && me.optUp.auto && !me.isUpAutoLoad && me.triggerUpScroll();
  6329. }, 100);
  6330. }
  6331. }, 30);
  6332. }
  6333. MeScroll.prototype.extendDownScroll = function(optDown) {
  6334. MeScroll.extend(optDown, {
  6335. use: true,
  6336. // 是否启用下拉刷新; 默认true
  6337. auto: true,
  6338. // 是否在初始化完毕之后自动执行下拉刷新的回调; 默认true
  6339. native: false,
  6340. // 是否使用系统自带的下拉刷新; 默认false; 仅mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  6341. autoShowLoading: false,
  6342. // 如果设置auto=true(在初始化完毕之后自动执行下拉刷新的回调),那么是否显示下拉刷新的进度; 默认false
  6343. isLock: false,
  6344. // 是否锁定下拉刷新,默认false;
  6345. offset: 80,
  6346. // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
  6347. startTop: 100,
  6348. // scroll-view快速滚动到顶部时,此时的scroll-top可能大于0, 此值用于控制最大的误差
  6349. inOffsetRate: 1,
  6350. // 在列表顶部,下拉的距离小于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
  6351. outOffsetRate: 0.2,
  6352. // 在列表顶部,下拉的距离大于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
  6353. bottomOffset: 20,
  6354. // 当手指touchmove位置在距离body底部20px范围内的时候结束上拉刷新,避免Webview嵌套导致touchend事件不执行
  6355. minAngle: 45,
  6356. // 向下滑动最少偏移的角度,取值区间 [0,90];默认45度,即向下滑动的角度大于45度则触发下拉;而小于45度,将不触发下拉,避免与左右滑动的轮播等组件冲突;
  6357. textInOffset: "下拉刷新",
  6358. // 下拉的距离在offset范围内的提示文本
  6359. textOutOffset: "释放更新",
  6360. // 下拉的距离大于offset范围的提示文本
  6361. textLoading: "加载中 ...",
  6362. // 加载中的提示文本
  6363. textSuccess: "加载成功",
  6364. // 加载成功的文本
  6365. textErr: "加载失败",
  6366. // 加载失败的文本
  6367. beforeEndDelay: 0,
  6368. // 延时结束的时长 (显示加载成功/失败的时长, android小程序设置此项结束下拉会卡顿, 配置后请注意测试)
  6369. bgColor: "transparent",
  6370. // 背景颜色 (建议在pages.json中再设置一下backgroundColorTop)
  6371. textColor: "gray",
  6372. // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
  6373. inited: null,
  6374. // 下拉刷新初始化完毕的回调
  6375. inOffset: null,
  6376. // 下拉的距离进入offset范围内那一刻的回调
  6377. outOffset: null,
  6378. // 下拉的距离大于offset那一刻的回调
  6379. onMoving: null,
  6380. // 下拉过程中的回调,滑动过程一直在执行; rate下拉区域当前高度与指定距离的比值(inOffset: rate<1; outOffset: rate>=1); downHight当前下拉区域的高度
  6381. beforeLoading: null,
  6382. // 准备触发下拉刷新的回调: 如果return true,将不触发showLoading和callback回调; 常用来完全自定义下拉刷新, 参考案例【淘宝 v6.8.0】
  6383. showLoading: null,
  6384. // 显示下拉刷新进度的回调
  6385. afterLoading: null,
  6386. // 显示下拉刷新进度的回调之后,马上要执行的代码 (如: 在wxs中使用)
  6387. beforeEndDownScroll: null,
  6388. // 准备结束下拉的回调. 返回结束下拉的延时执行时间,默认0ms; 常用于结束下拉之前再显示另外一小段动画,才去隐藏下拉刷新的场景, 参考案例【dotJump】
  6389. endDownScroll: null,
  6390. // 结束下拉刷新的回调
  6391. afterEndDownScroll: null,
  6392. // 结束下拉刷新的回调,马上要执行的代码 (如: 在wxs中使用)
  6393. callback: function(mescroll) {
  6394. mescroll.resetUpScroll();
  6395. }
  6396. });
  6397. };
  6398. MeScroll.prototype.extendUpScroll = function(optUp) {
  6399. MeScroll.extend(optUp, {
  6400. use: true,
  6401. // 是否启用上拉加载; 默认true
  6402. auto: true,
  6403. // 是否在初始化完毕之后自动执行上拉加载的回调; 默认true
  6404. isLock: false,
  6405. // 是否锁定上拉加载,默认false;
  6406. isBoth: true,
  6407. // 上拉加载时,如果滑动到列表顶部是否可以同时触发下拉刷新;默认true,两者可同时触发;
  6408. callback: null,
  6409. // 上拉加载的回调;function(page,mescroll){ }
  6410. page: {
  6411. num: 0,
  6412. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  6413. size: 10,
  6414. // 每页数据的数量
  6415. time: null
  6416. // 加载第一页数据服务器返回的时间; 防止用户翻页时,后台新增了数据从而导致下一页数据重复;
  6417. },
  6418. noMoreSize: 5,
  6419. // 如果列表已无数据,可设置列表的总数量要大于等于5条才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看
  6420. offset: 150,
  6421. // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
  6422. textLoading: "加载中 ...",
  6423. // 加载中的提示文本
  6424. textNoMore: "-- END --",
  6425. // 没有更多数据的提示文本
  6426. bgColor: "transparent",
  6427. // 背景颜色 (建议在pages.json中再设置一下backgroundColorBottom)
  6428. textColor: "gray",
  6429. // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
  6430. inited: null,
  6431. // 初始化完毕的回调
  6432. showLoading: null,
  6433. // 显示加载中的回调
  6434. showNoMore: null,
  6435. // 显示无更多数据的回调
  6436. hideUpScroll: null,
  6437. // 隐藏上拉加载的回调
  6438. errDistance: 60,
  6439. // endErr的时候需往上滑动一段距离,使其往下滑动时再次触发onReachBottom,仅mescroll-body生效
  6440. toTop: {
  6441. // 回到顶部按钮,需配置src才显示
  6442. src: null,
  6443. // 图片路径,默认null (绝对路径或网络图)
  6444. offset: 1e3,
  6445. // 列表滚动多少距离才显示回到顶部按钮,默认1000
  6446. duration: 300,
  6447. // 回到顶部的动画时长,默认300ms (当值为0或300则使用系统自带回到顶部,更流畅; 其他值则通过step模拟,部分机型可能不够流畅,所以非特殊情况不建议修改此项)
  6448. btnClick: null,
  6449. // 点击按钮的回调
  6450. onShow: null,
  6451. // 是否显示的回调
  6452. zIndex: 9990,
  6453. // fixed定位z-index值
  6454. left: null,
  6455. // 到左边的距离, 默认null. 此项有值时,right不生效. (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  6456. right: 20,
  6457. // 到右边的距离, 默认20 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  6458. bottom: 120,
  6459. // 到底部的距离, 默认120 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  6460. safearea: false,
  6461. // bottom的偏移量是否加上底部安全区的距离, 默认false, 需要适配iPhoneX时使用 (具体的界面如果不配置此项,则取本vue的safearea值)
  6462. width: 72,
  6463. // 回到顶部图标的宽度, 默认72 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  6464. radius: "50%"
  6465. // 圆角, 默认"50%" (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  6466. },
  6467. empty: {
  6468. use: true,
  6469. // 是否显示空布局
  6470. icon: null,
  6471. // 图标路径
  6472. tip: "~ 暂无相关数据 ~",
  6473. // 提示
  6474. btnText: "",
  6475. // 按钮
  6476. btnClick: null,
  6477. // 点击按钮的回调
  6478. onShow: null,
  6479. // 是否显示的回调
  6480. fixed: false,
  6481. // 是否使用fixed定位,默认false; 配置fixed为true,以下的top和zIndex才生效 (transform会使fixed失效,最终会降级为absolute)
  6482. top: "100rpx",
  6483. // fixed定位的top值 (完整的单位值,如 "10%"; "100rpx")
  6484. zIndex: 99
  6485. // fixed定位z-index值
  6486. },
  6487. onScroll: false
  6488. // 是否监听滚动事件
  6489. });
  6490. };
  6491. MeScroll.extend = function(userOption, defaultOption) {
  6492. if (!userOption)
  6493. return defaultOption;
  6494. for (let key in defaultOption) {
  6495. if (userOption[key] == null) {
  6496. let def = defaultOption[key];
  6497. if (def != null && typeof def === "object") {
  6498. userOption[key] = MeScroll.extend({}, def);
  6499. } else {
  6500. userOption[key] = def;
  6501. }
  6502. } else if (typeof userOption[key] === "object") {
  6503. MeScroll.extend(userOption[key], defaultOption[key]);
  6504. }
  6505. }
  6506. return userOption;
  6507. };
  6508. MeScroll.prototype.hasColor = function(color2) {
  6509. if (!color2)
  6510. return false;
  6511. let c = color2.toLowerCase();
  6512. return c != "#fff" && c != "#ffffff" && c != "transparent" && c != "white";
  6513. };
  6514. MeScroll.prototype.initDownScroll = function() {
  6515. let me = this;
  6516. me.optDown = me.options.down || {};
  6517. if (!me.optDown.textColor && me.hasColor(me.optDown.bgColor))
  6518. me.optDown.textColor = "#fff";
  6519. me.extendDownScroll(me.optDown);
  6520. if (me.isScrollBody && me.optDown.native) {
  6521. me.optDown.use = false;
  6522. } else {
  6523. me.optDown.native = false;
  6524. }
  6525. me.downHight = 0;
  6526. if (me.optDown.use && me.optDown.inited) {
  6527. setTimeout(function() {
  6528. me.optDown.inited(me);
  6529. }, 0);
  6530. }
  6531. };
  6532. MeScroll.prototype.touchstartEvent = function(e) {
  6533. if (!this.optDown.use)
  6534. return;
  6535. this.startPoint = this.getPoint(e);
  6536. this.startTop = this.getScrollTop();
  6537. this.startAngle = 0;
  6538. this.lastPoint = this.startPoint;
  6539. this.maxTouchmoveY = this.getBodyHeight() - this.optDown.bottomOffset;
  6540. this.inTouchend = false;
  6541. };
  6542. MeScroll.prototype.touchmoveEvent = function(e) {
  6543. if (!this.optDown.use)
  6544. return;
  6545. let me = this;
  6546. let scrollTop = me.getScrollTop();
  6547. let curPoint = me.getPoint(e);
  6548. let moveY = curPoint.y - me.startPoint.y;
  6549. if (moveY > 0 && (me.isScrollBody && scrollTop <= 0 || !me.isScrollBody && (scrollTop <= 0 || scrollTop <= me.optDown.startTop && scrollTop === me.startTop))) {
  6550. if (!me.inTouchend && !me.isDownScrolling && !me.optDown.isLock && (!me.isUpScrolling || me.isUpScrolling && me.optUp.isBoth)) {
  6551. if (!me.startAngle)
  6552. me.startAngle = me.getAngle(me.lastPoint, curPoint);
  6553. if (me.startAngle < me.optDown.minAngle)
  6554. return;
  6555. if (me.maxTouchmoveY > 0 && curPoint.y >= me.maxTouchmoveY) {
  6556. me.inTouchend = true;
  6557. me.touchendEvent();
  6558. return;
  6559. }
  6560. me.preventDefault(e);
  6561. let diff = curPoint.y - me.lastPoint.y;
  6562. if (me.downHight < me.optDown.offset) {
  6563. if (me.movetype !== 1) {
  6564. me.movetype = 1;
  6565. me.isDownEndSuccess = null;
  6566. me.optDown.inOffset && me.optDown.inOffset(me);
  6567. me.isMoveDown = true;
  6568. }
  6569. me.downHight += diff * me.optDown.inOffsetRate;
  6570. } else {
  6571. if (me.movetype !== 2) {
  6572. me.movetype = 2;
  6573. me.optDown.outOffset && me.optDown.outOffset(me);
  6574. me.isMoveDown = true;
  6575. }
  6576. if (diff > 0) {
  6577. me.downHight += diff * me.optDown.outOffsetRate;
  6578. } else {
  6579. me.downHight += diff;
  6580. }
  6581. }
  6582. me.downHight = Math.round(me.downHight);
  6583. let rate = me.downHight / me.optDown.offset;
  6584. me.optDown.onMoving && me.optDown.onMoving(me, rate, me.downHight);
  6585. }
  6586. }
  6587. me.lastPoint = curPoint;
  6588. };
  6589. MeScroll.prototype.touchendEvent = function(e) {
  6590. if (!this.optDown.use)
  6591. return;
  6592. if (this.isMoveDown) {
  6593. if (this.downHight >= this.optDown.offset) {
  6594. this.triggerDownScroll();
  6595. } else {
  6596. this.downHight = 0;
  6597. this.endDownScrollCall(this);
  6598. }
  6599. this.movetype = 0;
  6600. this.isMoveDown = false;
  6601. } else if (!this.isScrollBody && this.getScrollTop() === this.startTop) {
  6602. let isScrollUp = this.getPoint(e).y - this.startPoint.y < 0;
  6603. if (isScrollUp) {
  6604. let angle = this.getAngle(this.getPoint(e), this.startPoint);
  6605. if (angle > 80) {
  6606. this.triggerUpScroll(true);
  6607. }
  6608. }
  6609. }
  6610. };
  6611. MeScroll.prototype.getPoint = function(e) {
  6612. if (!e) {
  6613. return {
  6614. x: 0,
  6615. y: 0
  6616. };
  6617. }
  6618. if (e.touches && e.touches[0]) {
  6619. return {
  6620. x: e.touches[0].pageX,
  6621. y: e.touches[0].pageY
  6622. };
  6623. } else if (e.changedTouches && e.changedTouches[0]) {
  6624. return {
  6625. x: e.changedTouches[0].pageX,
  6626. y: e.changedTouches[0].pageY
  6627. };
  6628. } else {
  6629. return {
  6630. x: e.clientX,
  6631. y: e.clientY
  6632. };
  6633. }
  6634. };
  6635. MeScroll.prototype.getAngle = function(p1, p2) {
  6636. let x = Math.abs(p1.x - p2.x);
  6637. let y = Math.abs(p1.y - p2.y);
  6638. let z = Math.sqrt(x * x + y * y);
  6639. let angle = 0;
  6640. if (z !== 0) {
  6641. angle = Math.asin(y / z) / Math.PI * 180;
  6642. }
  6643. return angle;
  6644. };
  6645. MeScroll.prototype.triggerDownScroll = function() {
  6646. if (this.optDown.beforeLoading && this.optDown.beforeLoading(this))
  6647. ;
  6648. else {
  6649. this.showDownScroll();
  6650. !this.optDown.native && this.optDown.callback && this.optDown.callback(this);
  6651. }
  6652. };
  6653. MeScroll.prototype.showDownScroll = function() {
  6654. this.isDownScrolling = true;
  6655. if (this.optDown.native) {
  6656. uni.startPullDownRefresh();
  6657. this.showDownLoadingCall(0);
  6658. } else {
  6659. this.downHight = this.optDown.offset;
  6660. this.showDownLoadingCall(this.downHight);
  6661. }
  6662. };
  6663. MeScroll.prototype.showDownLoadingCall = function(downHight) {
  6664. this.optDown.showLoading && this.optDown.showLoading(this, downHight);
  6665. this.optDown.afterLoading && this.optDown.afterLoading(this, downHight);
  6666. };
  6667. MeScroll.prototype.onPullDownRefresh = function() {
  6668. this.isDownScrolling = true;
  6669. this.showDownLoadingCall(0);
  6670. this.optDown.callback && this.optDown.callback(this);
  6671. };
  6672. MeScroll.prototype.endDownScroll = function() {
  6673. if (this.optDown.native) {
  6674. this.isDownScrolling = false;
  6675. this.endDownScrollCall(this);
  6676. uni.stopPullDownRefresh();
  6677. return;
  6678. }
  6679. let me = this;
  6680. let endScroll = function() {
  6681. me.downHight = 0;
  6682. me.isDownScrolling = false;
  6683. me.endDownScrollCall(me);
  6684. if (!me.isScrollBody) {
  6685. me.setScrollHeight(0);
  6686. me.scrollTo(0, 0);
  6687. }
  6688. };
  6689. let delay = 0;
  6690. if (me.optDown.beforeEndDownScroll) {
  6691. delay = me.optDown.beforeEndDownScroll(me);
  6692. if (me.isDownEndSuccess == null)
  6693. delay = 0;
  6694. }
  6695. if (typeof delay === "number" && delay > 0) {
  6696. setTimeout(endScroll, delay);
  6697. } else {
  6698. endScroll();
  6699. }
  6700. };
  6701. MeScroll.prototype.endDownScrollCall = function() {
  6702. this.optDown.endDownScroll && this.optDown.endDownScroll(this);
  6703. this.optDown.afterEndDownScroll && this.optDown.afterEndDownScroll(this);
  6704. };
  6705. MeScroll.prototype.lockDownScroll = function(isLock) {
  6706. if (isLock == null)
  6707. isLock = true;
  6708. this.optDown.isLock = isLock;
  6709. };
  6710. MeScroll.prototype.lockUpScroll = function(isLock) {
  6711. if (isLock == null)
  6712. isLock = true;
  6713. this.optUp.isLock = isLock;
  6714. };
  6715. MeScroll.prototype.initUpScroll = function() {
  6716. let me = this;
  6717. me.optUp = me.options.up || { use: false };
  6718. if (!me.optUp.textColor && me.hasColor(me.optUp.bgColor))
  6719. me.optUp.textColor = "#fff";
  6720. me.extendUpScroll(me.optUp);
  6721. if (me.optUp.use === false)
  6722. return;
  6723. me.optUp.hasNext = true;
  6724. me.startNum = me.optUp.page.num + 1;
  6725. if (me.optUp.inited) {
  6726. setTimeout(function() {
  6727. me.optUp.inited(me);
  6728. }, 0);
  6729. }
  6730. };
  6731. MeScroll.prototype.onReachBottom = function() {
  6732. if (this.isScrollBody && !this.isUpScrolling) {
  6733. if (!this.optUp.isLock && this.optUp.hasNext) {
  6734. this.triggerUpScroll();
  6735. }
  6736. }
  6737. };
  6738. MeScroll.prototype.onPageScroll = function(e) {
  6739. if (!this.isScrollBody)
  6740. return;
  6741. this.setScrollTop(e.scrollTop);
  6742. if (e.scrollTop >= this.optUp.toTop.offset) {
  6743. this.showTopBtn();
  6744. } else {
  6745. this.hideTopBtn();
  6746. }
  6747. };
  6748. MeScroll.prototype.scroll = function(e, onScroll) {
  6749. this.setScrollTop(e.scrollTop);
  6750. this.setScrollHeight(e.scrollHeight);
  6751. if (this.preScrollY == null)
  6752. this.preScrollY = 0;
  6753. this.isScrollUp = e.scrollTop - this.preScrollY > 0;
  6754. this.preScrollY = e.scrollTop;
  6755. this.isScrollUp && this.triggerUpScroll(true);
  6756. if (e.scrollTop >= this.optUp.toTop.offset) {
  6757. this.showTopBtn();
  6758. } else {
  6759. this.hideTopBtn();
  6760. }
  6761. this.optUp.onScroll && onScroll && onScroll();
  6762. };
  6763. MeScroll.prototype.triggerUpScroll = function(isCheck) {
  6764. if (!this.isUpScrolling && this.optUp.use && this.optUp.callback) {
  6765. if (isCheck === true) {
  6766. let canUp = false;
  6767. if (this.optUp.hasNext && !this.optUp.isLock && !this.isDownScrolling) {
  6768. if (this.getScrollBottom() <= this.optUp.offset) {
  6769. canUp = true;
  6770. }
  6771. }
  6772. if (canUp === false)
  6773. return;
  6774. }
  6775. this.showUpScroll();
  6776. this.optUp.page.num++;
  6777. this.isUpAutoLoad = true;
  6778. this.num = this.optUp.page.num;
  6779. this.size = this.optUp.page.size;
  6780. this.time = this.optUp.page.time;
  6781. this.optUp.callback(this);
  6782. }
  6783. };
  6784. MeScroll.prototype.showUpScroll = function() {
  6785. this.isUpScrolling = true;
  6786. this.optUp.showLoading && this.optUp.showLoading(this);
  6787. };
  6788. MeScroll.prototype.showNoMore = function() {
  6789. this.optUp.hasNext = false;
  6790. this.optUp.showNoMore && this.optUp.showNoMore(this);
  6791. };
  6792. MeScroll.prototype.hideUpScroll = function() {
  6793. this.optUp.hideUpScroll && this.optUp.hideUpScroll(this);
  6794. };
  6795. MeScroll.prototype.endUpScroll = function(isShowNoMore) {
  6796. if (isShowNoMore != null) {
  6797. if (isShowNoMore) {
  6798. this.showNoMore();
  6799. } else {
  6800. this.hideUpScroll();
  6801. }
  6802. }
  6803. this.isUpScrolling = false;
  6804. };
  6805. MeScroll.prototype.resetUpScroll = function(isShowLoading) {
  6806. if (this.optUp && this.optUp.use) {
  6807. let page2 = this.optUp.page;
  6808. this.prePageNum = page2.num;
  6809. this.prePageTime = page2.time;
  6810. page2.num = this.startNum;
  6811. page2.time = null;
  6812. if (!this.isDownScrolling && isShowLoading !== false) {
  6813. if (isShowLoading == null) {
  6814. this.removeEmpty();
  6815. this.showUpScroll();
  6816. } else {
  6817. this.showDownScroll();
  6818. }
  6819. }
  6820. this.isUpAutoLoad = true;
  6821. this.num = page2.num;
  6822. this.size = page2.size;
  6823. this.time = page2.time;
  6824. this.optUp.callback && this.optUp.callback(this);
  6825. }
  6826. };
  6827. MeScroll.prototype.setPageNum = function(num) {
  6828. this.optUp.page.num = num - 1;
  6829. };
  6830. MeScroll.prototype.setPageSize = function(size) {
  6831. this.optUp.page.size = size;
  6832. };
  6833. MeScroll.prototype.endByPage = function(dataSize, totalPage, systime) {
  6834. let hasNext;
  6835. if (this.optUp.use && totalPage != null)
  6836. hasNext = this.optUp.page.num < totalPage;
  6837. this.endSuccess(dataSize, hasNext, systime);
  6838. };
  6839. MeScroll.prototype.endBySize = function(dataSize, totalSize, systime) {
  6840. let hasNext;
  6841. if (this.optUp.use && totalSize != null) {
  6842. let loadSize = (this.optUp.page.num - 1) * this.optUp.page.size + dataSize;
  6843. hasNext = loadSize < totalSize;
  6844. }
  6845. this.endSuccess(dataSize, hasNext, systime);
  6846. };
  6847. MeScroll.prototype.endSuccess = function(dataSize, hasNext, systime) {
  6848. let me = this;
  6849. if (me.isDownScrolling) {
  6850. me.isDownEndSuccess = true;
  6851. me.endDownScroll();
  6852. }
  6853. if (me.optUp.use) {
  6854. let isShowNoMore;
  6855. if (dataSize != null) {
  6856. let pageNum = me.optUp.page.num;
  6857. let pageSize = me.optUp.page.size;
  6858. if (pageNum === 1) {
  6859. if (systime)
  6860. me.optUp.page.time = systime;
  6861. }
  6862. if (dataSize < pageSize || hasNext === false) {
  6863. me.optUp.hasNext = false;
  6864. if (dataSize === 0 && pageNum === 1) {
  6865. isShowNoMore = false;
  6866. me.showEmpty();
  6867. } else {
  6868. let allDataSize = (pageNum - 1) * pageSize + dataSize;
  6869. if (allDataSize < me.optUp.noMoreSize) {
  6870. isShowNoMore = false;
  6871. } else {
  6872. isShowNoMore = true;
  6873. }
  6874. me.removeEmpty();
  6875. }
  6876. } else {
  6877. isShowNoMore = false;
  6878. me.optUp.hasNext = true;
  6879. me.removeEmpty();
  6880. }
  6881. }
  6882. me.endUpScroll(isShowNoMore);
  6883. }
  6884. };
  6885. MeScroll.prototype.endErr = function(errDistance) {
  6886. if (this.isDownScrolling) {
  6887. this.isDownEndSuccess = false;
  6888. let page2 = this.optUp.page;
  6889. if (page2 && this.prePageNum) {
  6890. page2.num = this.prePageNum;
  6891. page2.time = this.prePageTime;
  6892. }
  6893. this.endDownScroll();
  6894. }
  6895. if (this.isUpScrolling) {
  6896. this.optUp.page.num--;
  6897. this.endUpScroll(false);
  6898. if (this.isScrollBody && errDistance !== 0) {
  6899. if (!errDistance)
  6900. errDistance = this.optUp.errDistance;
  6901. this.scrollTo(this.getScrollTop() - errDistance, 0);
  6902. }
  6903. }
  6904. };
  6905. MeScroll.prototype.showEmpty = function() {
  6906. this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(true);
  6907. };
  6908. MeScroll.prototype.removeEmpty = function() {
  6909. this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(false);
  6910. };
  6911. MeScroll.prototype.showTopBtn = function() {
  6912. if (!this.topBtnShow) {
  6913. this.topBtnShow = true;
  6914. this.optUp.toTop.onShow && this.optUp.toTop.onShow(true);
  6915. }
  6916. };
  6917. MeScroll.prototype.hideTopBtn = function() {
  6918. if (this.topBtnShow) {
  6919. this.topBtnShow = false;
  6920. this.optUp.toTop.onShow && this.optUp.toTop.onShow(false);
  6921. }
  6922. };
  6923. MeScroll.prototype.getScrollTop = function() {
  6924. return this.scrollTop || 0;
  6925. };
  6926. MeScroll.prototype.setScrollTop = function(y) {
  6927. this.scrollTop = y;
  6928. };
  6929. MeScroll.prototype.scrollTo = function(y, t2) {
  6930. this.myScrollTo && this.myScrollTo(y, t2);
  6931. };
  6932. MeScroll.prototype.resetScrollTo = function(myScrollTo) {
  6933. this.myScrollTo = myScrollTo;
  6934. };
  6935. MeScroll.prototype.getScrollBottom = function() {
  6936. return this.getScrollHeight() - this.getClientHeight() - this.getScrollTop();
  6937. };
  6938. MeScroll.prototype.getStep = function(star, end, callback, t2, rate) {
  6939. let diff = end - star;
  6940. if (t2 === 0 || diff === 0) {
  6941. callback && callback(end);
  6942. return;
  6943. }
  6944. t2 = t2 || 300;
  6945. rate = rate || 30;
  6946. let count = t2 / rate;
  6947. let step = diff / count;
  6948. let i = 0;
  6949. let timer = setInterval(function() {
  6950. if (i < count - 1) {
  6951. star += step;
  6952. callback && callback(star, timer);
  6953. i++;
  6954. } else {
  6955. callback && callback(end, timer);
  6956. clearInterval(timer);
  6957. }
  6958. }, rate);
  6959. };
  6960. MeScroll.prototype.getClientHeight = function(isReal) {
  6961. let h = this.clientHeight || 0;
  6962. if (h === 0 && isReal !== true) {
  6963. h = this.getBodyHeight();
  6964. }
  6965. return h;
  6966. };
  6967. MeScroll.prototype.setClientHeight = function(h) {
  6968. this.clientHeight = h;
  6969. };
  6970. MeScroll.prototype.getScrollHeight = function() {
  6971. return this.scrollHeight || 0;
  6972. };
  6973. MeScroll.prototype.setScrollHeight = function(h) {
  6974. this.scrollHeight = h;
  6975. };
  6976. MeScroll.prototype.getBodyHeight = function() {
  6977. return this.bodyHeight || 0;
  6978. };
  6979. MeScroll.prototype.setBodyHeight = function(h) {
  6980. this.bodyHeight = h;
  6981. };
  6982. MeScroll.prototype.preventDefault = function(e) {
  6983. if (e && e.cancelable && !e.defaultPrevented)
  6984. e.preventDefault();
  6985. };
  6986. const _sfc_main$1N = {
  6987. props: {
  6988. // up.toTop的配置项
  6989. option: {
  6990. type: Object,
  6991. default() {
  6992. return {};
  6993. }
  6994. },
  6995. // 是否显示
  6996. value: false,
  6997. // vue2
  6998. modelValue: false
  6999. // vue3
  7000. },
  7001. computed: {
  7002. // 优先显示左边
  7003. left() {
  7004. return this.option.left ? this.addUnit(this.option.left) : "auto";
  7005. },
  7006. // 右边距离 (优先显示左边)
  7007. right() {
  7008. return this.option.left ? "auto" : this.addUnit(this.option.right);
  7009. },
  7010. // 是否显示
  7011. isShow() {
  7012. return this.modelValue;
  7013. }
  7014. },
  7015. methods: {
  7016. addUnit(num) {
  7017. if (!num)
  7018. return 0;
  7019. if (typeof num === "number")
  7020. return num + "rpx";
  7021. return num;
  7022. },
  7023. toTopClick() {
  7024. this.$emit("update:modelValue", false);
  7025. this.$emit("click");
  7026. }
  7027. }
  7028. };
  7029. function _sfc_render$1M(_ctx, _cache, $props, $setup, $data, $options) {
  7030. return $props.option.src ? (vue.openBlock(), vue.createElementBlock("image", {
  7031. key: 0,
  7032. class: vue.normalizeClass(["mescroll-totop", [$options.isShow ? "mescroll-totop-in" : "mescroll-totop-out", { "mescroll-totop-safearea": $props.option.safearea }]]),
  7033. 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) }),
  7034. src: $props.option.src,
  7035. mode: "widthFix",
  7036. onClick: _cache[0] || (_cache[0] = (...args) => $options.toTopClick && $options.toTopClick(...args))
  7037. }, null, 14, ["src"])) : vue.createCommentVNode("v-if", true);
  7038. }
  7039. const MescrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$1N, [["render", _sfc_render$1M], ["__scopeId", "data-v-49fff3a8"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/mescroll-uni/components/mescroll-uni/components/mescroll-top.vue"]]);
  7040. const WxsMixin = {
  7041. data() {
  7042. return {
  7043. // 传入wxs视图层的数据 (响应式)
  7044. wxsProp: {
  7045. optDown: {},
  7046. // 下拉刷新的配置
  7047. scrollTop: 0,
  7048. // 滚动条的距离
  7049. bodyHeight: 0,
  7050. // body的高度
  7051. isDownScrolling: false,
  7052. // 是否正在下拉刷新中
  7053. isUpScrolling: false,
  7054. // 是否正在上拉加载中
  7055. isScrollBody: true,
  7056. // 是否为mescroll-body滚动
  7057. isUpBoth: true,
  7058. // 上拉加载时,是否同时可以下拉刷新
  7059. t: 0
  7060. // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
  7061. },
  7062. // 标记调用wxs视图层的方法
  7063. callProp: {
  7064. callType: "",
  7065. // 方法名
  7066. t: 0
  7067. // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
  7068. }
  7069. // 不用wxs的平台使用此处的wxsBiz对象,抹平wxs的写法 (微信小程序和APP使用的wxsBiz对象是./wxs/wxs.wxs)
  7070. // 不用renderjs的平台使用此处的renderBiz对象,抹平renderjs的写法 (app 和 h5 使用的renderBiz对象是./wxs/renderjs.js)
  7071. };
  7072. },
  7073. methods: {
  7074. // wxs视图层调用逻辑层的回调
  7075. wxsCall(msg) {
  7076. if (msg.type === "setWxsProp") {
  7077. this.wxsProp = {
  7078. optDown: this.mescroll.optDown,
  7079. scrollTop: this.mescroll.getScrollTop(),
  7080. bodyHeight: this.mescroll.getBodyHeight(),
  7081. isDownScrolling: this.mescroll.isDownScrolling,
  7082. isUpScrolling: this.mescroll.isUpScrolling,
  7083. isUpBoth: this.mescroll.optUp.isBoth,
  7084. isScrollBody: this.mescroll.isScrollBody,
  7085. t: Date.now()
  7086. };
  7087. } else if (msg.type === "setLoadType") {
  7088. this.downLoadType = msg.downLoadType;
  7089. this.$set(this.mescroll, "downLoadType", this.downLoadType);
  7090. this.$set(this.mescroll, "isDownEndSuccess", null);
  7091. } else if (msg.type === "triggerDownScroll") {
  7092. this.mescroll.triggerDownScroll();
  7093. } else if (msg.type === "endDownScroll") {
  7094. this.mescroll.endDownScroll();
  7095. } else if (msg.type === "triggerUpScroll") {
  7096. this.mescroll.triggerUpScroll(true);
  7097. }
  7098. }
  7099. },
  7100. mounted() {
  7101. this.mescroll.optDown.afterLoading = () => {
  7102. this.callProp = { callType: "showLoading", t: Date.now() };
  7103. };
  7104. this.mescroll.optDown.afterEndDownScroll = () => {
  7105. this.callProp = { callType: "endDownScroll", t: Date.now() };
  7106. let delay = 300 + (this.mescroll.optDown.beforeEndDelay || 0);
  7107. setTimeout(() => {
  7108. if (this.downLoadType === 4 || this.downLoadType === 0) {
  7109. this.callProp = { callType: "clearTransform", t: Date.now() };
  7110. }
  7111. this.$set(this.mescroll, "downLoadType", this.downLoadType);
  7112. }, delay);
  7113. };
  7114. this.wxsCall({ type: "setWxsProp" });
  7115. }
  7116. };
  7117. const block0$1 = (Comp) => {
  7118. (Comp.$wxs || (Comp.$wxs = [])).push("wxsBiz");
  7119. (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxsBiz"] = "30f4e25a";
  7120. };
  7121. const block1 = (Comp) => {
  7122. (Comp.$renderjs || (Comp.$renderjs = [])).push("renderBiz");
  7123. (Comp.$renderjsModules || (Comp.$renderjsModules = {}))["renderBiz"] = "5a9dc23f";
  7124. };
  7125. const _sfc_main$1M = {
  7126. name: "mescroll-uni",
  7127. mixins: [WxsMixin],
  7128. components: {
  7129. MescrollTop
  7130. },
  7131. props: {
  7132. down: Object,
  7133. up: Object,
  7134. i18n: Object,
  7135. top: [String, Number],
  7136. topbar: [Boolean, String],
  7137. bottom: [String, Number],
  7138. safearea: Boolean,
  7139. fixed: {
  7140. type: Boolean,
  7141. default: true
  7142. },
  7143. height: [String, Number],
  7144. bottombar: {
  7145. type: Boolean,
  7146. default: true
  7147. },
  7148. disableScroll: Boolean
  7149. },
  7150. data() {
  7151. return {
  7152. mescroll: { optDown: {}, optUp: {} },
  7153. // mescroll实例
  7154. viewId: "id_" + Math.random().toString(36).substr(2, 16),
  7155. // 随机生成mescroll的id(不能数字开头,否则找不到元素)
  7156. downHight: 0,
  7157. //下拉刷新: 容器高度
  7158. downRate: 0,
  7159. // 下拉比率(inOffset: rate<1; outOffset: rate>=1)
  7160. downLoadType: 0,
  7161. // 下拉刷新状态: 0(loading前), 1(inOffset), 2(outOffset), 3(showLoading), 4(endDownScroll)
  7162. upLoadType: 0,
  7163. // 上拉加载状态: 0(loading前), 1loading中, 2没有更多了,显示END文本提示, 3(没有更多了,不显示END文本提示)
  7164. isShowEmpty: false,
  7165. // 是否显示空布局
  7166. isShowToTop: false,
  7167. // 是否显示回到顶部按钮
  7168. scrollTop: 0,
  7169. // 滚动条的位置
  7170. scrollAnim: false,
  7171. // 是否开启滚动动画
  7172. windowTop: 0,
  7173. // 可使用窗口的顶部位置
  7174. windowBottom: 0,
  7175. // 可使用窗口的底部位置
  7176. windowHeight: 0,
  7177. // 可使用窗口的高度
  7178. statusBarHeight: 0
  7179. // 状态栏高度
  7180. };
  7181. },
  7182. watch: {
  7183. height() {
  7184. this.setClientHeight();
  7185. }
  7186. },
  7187. computed: {
  7188. // 是否使用fixed定位 (当height有值,则不使用)
  7189. isFixed() {
  7190. return !this.height && this.fixed;
  7191. },
  7192. // mescroll的高度
  7193. scrollHeight() {
  7194. if (this.isFixed) {
  7195. return "auto";
  7196. } else if (this.height) {
  7197. return this.toPx(this.height) + "px";
  7198. } else {
  7199. return "100%";
  7200. }
  7201. },
  7202. // 下拉布局往下偏移的距离 (px)
  7203. numTop() {
  7204. return this.toPx(this.top);
  7205. },
  7206. fixedTop() {
  7207. return this.isFixed ? this.numTop + this.windowTop + "px" : 0;
  7208. },
  7209. padTop() {
  7210. return !this.isFixed ? this.numTop + "px" : 0;
  7211. },
  7212. // 上拉布局往上偏移 (px)
  7213. numBottom() {
  7214. return this.toPx(this.bottom);
  7215. },
  7216. fixedBottom() {
  7217. return this.isFixed ? this.numBottom + this.windowBottom + "px" : 0;
  7218. },
  7219. padBottom() {
  7220. return !this.isFixed ? this.numBottom + "px" : 0;
  7221. },
  7222. // 是否为重置下拉的状态
  7223. isDownReset() {
  7224. return this.downLoadType === 3 || this.downLoadType === 4;
  7225. },
  7226. // 过渡
  7227. transition() {
  7228. return this.isDownReset ? "transform 300ms" : "";
  7229. },
  7230. translateY() {
  7231. return this.downHight > 0 ? "translateY(" + this.downHight + "px)" : "";
  7232. },
  7233. // 列表是否可滑动
  7234. scrollable() {
  7235. if (this.disableScroll)
  7236. return false;
  7237. return this.downLoadType === 0 || this.isDownReset;
  7238. },
  7239. // 是否在加载中
  7240. isDownLoading() {
  7241. return this.downLoadType === 3;
  7242. },
  7243. // 旋转的角度
  7244. downRotate() {
  7245. return "rotate(" + 360 * this.downRate + "deg)";
  7246. },
  7247. // 文本提示
  7248. downText() {
  7249. if (!this.mescroll)
  7250. return "";
  7251. switch (this.downLoadType) {
  7252. case 1:
  7253. return this.mescroll.optDown.textInOffset;
  7254. case 2:
  7255. return this.mescroll.optDown.textOutOffset;
  7256. case 3:
  7257. return this.mescroll.optDown.textLoading;
  7258. case 4:
  7259. return this.mescroll.isDownEndSuccess ? this.mescroll.optDown.textSuccess : this.mescroll.isDownEndSuccess == false ? this.mescroll.optDown.textErr : this.mescroll.optDown.textInOffset;
  7260. default:
  7261. return this.mescroll.optDown.textInOffset;
  7262. }
  7263. }
  7264. },
  7265. methods: {
  7266. //number,rpx,upx,px,% --> px的数值
  7267. toPx(num) {
  7268. if (typeof num === "string") {
  7269. if (num.indexOf("px") !== -1) {
  7270. if (num.indexOf("rpx") !== -1) {
  7271. num = num.replace("rpx", "");
  7272. } else if (num.indexOf("upx") !== -1) {
  7273. num = num.replace("upx", "");
  7274. } else {
  7275. return Number(num.replace("px", ""));
  7276. }
  7277. } else if (num.indexOf("%") !== -1) {
  7278. let rate = Number(num.replace("%", "")) / 100;
  7279. return this.windowHeight * rate;
  7280. }
  7281. }
  7282. return num ? uni.upx2px(Number(num)) : 0;
  7283. },
  7284. //注册列表滚动事件,用于下拉刷新和上拉加载
  7285. scroll(e) {
  7286. this.mescroll.scroll(e.detail, () => {
  7287. this.$emit("scroll", this.mescroll);
  7288. });
  7289. },
  7290. // 点击空布局的按钮回调
  7291. emptyClick() {
  7292. this.$emit("emptyclick", this.mescroll);
  7293. },
  7294. // 点击回到顶部的按钮回调
  7295. toTopClick() {
  7296. this.mescroll.scrollTo(0, this.mescroll.optUp.toTop.duration);
  7297. this.$emit("topclick", this.mescroll);
  7298. },
  7299. // 更新滚动区域的高度 (使内容不满屏和到底,都可继续翻页)
  7300. setClientHeight() {
  7301. if (!this.isExec) {
  7302. this.isExec = true;
  7303. this.$nextTick(() => {
  7304. this.getClientInfo((data) => {
  7305. this.isExec = false;
  7306. if (data) {
  7307. this.mescroll.setClientHeight(data.height);
  7308. } else if (this.clientNum != 3) {
  7309. this.clientNum = this.clientNum == null ? 1 : this.clientNum + 1;
  7310. setTimeout(() => {
  7311. this.setClientHeight();
  7312. }, this.clientNum * 100);
  7313. }
  7314. });
  7315. });
  7316. }
  7317. },
  7318. // 获取滚动区域的信息
  7319. getClientInfo(success) {
  7320. let query = uni.createSelectorQuery().in(this);
  7321. let view = query.select("#" + this.viewId);
  7322. view.boundingClientRect((data) => {
  7323. success(data);
  7324. }).exec();
  7325. }
  7326. },
  7327. // 使用created初始化mescroll对象; 如果用mounted部分css样式编译到H5会失效
  7328. created() {
  7329. let vm = this;
  7330. let diyOption = {
  7331. // 下拉刷新的配置
  7332. down: {
  7333. inOffset() {
  7334. vm.downLoadType = 1;
  7335. },
  7336. outOffset() {
  7337. vm.downLoadType = 2;
  7338. },
  7339. onMoving(mescroll, rate, downHight) {
  7340. vm.downHight = downHight;
  7341. vm.downRate = rate;
  7342. },
  7343. showLoading(mescroll, downHight) {
  7344. vm.downLoadType = 3;
  7345. vm.downHight = downHight;
  7346. },
  7347. beforeEndDownScroll(mescroll) {
  7348. vm.downLoadType = 4;
  7349. return mescroll.optDown.beforeEndDelay;
  7350. },
  7351. endDownScroll() {
  7352. vm.downLoadType = 4;
  7353. vm.downHight = 0;
  7354. vm.downResetTimer && clearTimeout(vm.downResetTimer);
  7355. vm.downResetTimer = setTimeout(() => {
  7356. if (vm.downLoadType === 4)
  7357. vm.downLoadType = 0;
  7358. }, 300);
  7359. },
  7360. // 派发下拉刷新的回调
  7361. callback: function(mescroll) {
  7362. vm.$emit("down", mescroll);
  7363. }
  7364. },
  7365. // 上拉加载的配置
  7366. up: {
  7367. // 显示加载中的回调
  7368. showLoading() {
  7369. vm.upLoadType = 1;
  7370. },
  7371. // 显示无更多数据的回调
  7372. showNoMore() {
  7373. vm.upLoadType = 2;
  7374. },
  7375. // 隐藏上拉加载的回调
  7376. hideUpScroll(mescroll) {
  7377. vm.upLoadType = mescroll.optUp.hasNext ? 0 : 3;
  7378. },
  7379. // 空布局
  7380. empty: {
  7381. onShow(isShow) {
  7382. vm.isShowEmpty = isShow;
  7383. }
  7384. },
  7385. // 回到顶部
  7386. toTop: {
  7387. onShow(isShow) {
  7388. vm.isShowToTop = isShow;
  7389. }
  7390. },
  7391. // 派发上拉加载的回调
  7392. callback: function(mescroll) {
  7393. vm.$emit("up", mescroll);
  7394. vm.setClientHeight();
  7395. }
  7396. }
  7397. };
  7398. let i18nType = mescrollI18n.getType();
  7399. let i18nOption = { type: i18nType };
  7400. MeScroll.extend(i18nOption, vm.i18n);
  7401. MeScroll.extend(i18nOption, GlobalOption.i18n);
  7402. MeScroll.extend(diyOption, i18nOption[i18nType]);
  7403. MeScroll.extend(diyOption, { down: GlobalOption.down, up: GlobalOption.up });
  7404. let myOption = JSON.parse(JSON.stringify({ "down": vm.down, "up": vm.up }));
  7405. MeScroll.extend(myOption, diyOption);
  7406. vm.mescroll = new MeScroll(myOption);
  7407. vm.mescroll.viewId = vm.viewId;
  7408. vm.mescroll.i18n = i18nOption;
  7409. vm.$emit("init", vm.mescroll);
  7410. const sys2 = uni.getSystemInfoSync();
  7411. if (sys2.windowTop)
  7412. vm.windowTop = sys2.windowTop;
  7413. if (sys2.windowBottom)
  7414. vm.windowBottom = sys2.windowBottom;
  7415. if (sys2.windowHeight)
  7416. vm.windowHeight = sys2.windowHeight;
  7417. if (sys2.statusBarHeight)
  7418. vm.statusBarHeight = sys2.statusBarHeight;
  7419. vm.mescroll.setBodyHeight(sys2.windowHeight);
  7420. vm.mescroll.resetScrollTo((y, t2) => {
  7421. vm.scrollAnim = t2 !== 0;
  7422. if (typeof y === "string") {
  7423. vm.getClientInfo(function(rect) {
  7424. let mescrollTop = rect.top;
  7425. let selector;
  7426. if (y.indexOf("#") == -1 && y.indexOf(".") == -1) {
  7427. selector = "#" + y;
  7428. } else {
  7429. selector = y;
  7430. if (y.indexOf(">>>") != -1) {
  7431. selector = y.split(">>>")[1].trim();
  7432. }
  7433. }
  7434. uni.createSelectorQuery().select(selector).boundingClientRect(function(rect2) {
  7435. if (rect2) {
  7436. let curY2 = vm.mescroll.getScrollTop();
  7437. let top = rect2.top - mescrollTop;
  7438. top += curY2;
  7439. if (!vm.isFixed)
  7440. top -= vm.numTop;
  7441. vm.scrollTop = curY2;
  7442. vm.$nextTick(function() {
  7443. vm.scrollTop = top;
  7444. });
  7445. } else {
  7446. formatAppLog("error", "at uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.vue:422", selector + " does not exist");
  7447. }
  7448. }).exec();
  7449. });
  7450. return;
  7451. }
  7452. let curY = vm.mescroll.getScrollTop();
  7453. if (t2 === 0 || t2 === 300) {
  7454. vm.scrollTop = curY;
  7455. vm.$nextTick(function() {
  7456. vm.scrollTop = y;
  7457. });
  7458. } else {
  7459. vm.mescroll.getStep(curY, y, (step) => {
  7460. vm.scrollTop = step;
  7461. }, t2);
  7462. }
  7463. });
  7464. if (vm.up && vm.up.toTop && vm.up.toTop.safearea != null)
  7465. ;
  7466. else {
  7467. vm.mescroll.optUp.toTop.safearea = vm.safearea;
  7468. }
  7469. uni.$on("setMescrollGlobalOption", (options) => {
  7470. if (!options)
  7471. return;
  7472. let i18nType2 = options.i18n ? options.i18n.type : null;
  7473. if (i18nType2 && vm.mescroll.i18n.type != i18nType2) {
  7474. vm.mescroll.i18n.type = i18nType2;
  7475. mescrollI18n.setType(i18nType2);
  7476. MeScroll.extend(options, vm.mescroll.i18n[i18nType2]);
  7477. }
  7478. if (options.down) {
  7479. let down = MeScroll.extend({}, options.down);
  7480. vm.mescroll.optDown = MeScroll.extend(down, vm.mescroll.optDown);
  7481. }
  7482. if (options.up) {
  7483. let up = MeScroll.extend({}, options.up);
  7484. vm.mescroll.optUp = MeScroll.extend(up, vm.mescroll.optUp);
  7485. }
  7486. });
  7487. },
  7488. mounted() {
  7489. this.setClientHeight();
  7490. },
  7491. destroyed() {
  7492. uni.$off("setMescrollGlobalOption");
  7493. }
  7494. };
  7495. function _sfc_render$1L(_ctx, _cache, $props, $setup, $data, $options) {
  7496. const _component_mescroll_empty = resolveEasycom(vue.resolveDynamicComponent("mescroll-empty"), __easycom_0$b);
  7497. const _component_mescroll_top = vue.resolveComponent("mescroll-top");
  7498. return vue.openBlock(), vue.createElementBlock("view", { class: "mescroll-uni-warp" }, [
  7499. vue.createElementVNode("scroll-view", {
  7500. id: $data.viewId,
  7501. class: vue.normalizeClass(["mescroll-uni", { "mescroll-uni-fixed": $options.isFixed }]),
  7502. style: vue.normalizeStyle({ "height": $options.scrollHeight, "padding-top": $options.padTop, "padding-bottom": $options.padBottom, "top": $options.fixedTop, "bottom": $options.fixedBottom }),
  7503. "scroll-top": $data.scrollTop,
  7504. "scroll-with-animation": $data.scrollAnim,
  7505. onScroll: _cache[4] || (_cache[4] = (...args) => $options.scroll && $options.scroll(...args)),
  7506. "scroll-y": $options.scrollable,
  7507. "enable-back-to-top": true,
  7508. throttle: false
  7509. }, [
  7510. vue.createElementVNode("view", {
  7511. class: "mescroll-uni-content mescroll-render-touch",
  7512. onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.wxsBiz.touchstartEvent && _ctx.wxsBiz.touchstartEvent(...args)),
  7513. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.wxsBiz.touchmoveEvent && _ctx.wxsBiz.touchmoveEvent(...args)),
  7514. onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.wxsBiz.touchendEvent && _ctx.wxsBiz.touchendEvent(...args)),
  7515. onTouchcancel: _cache[3] || (_cache[3] = (...args) => _ctx.wxsBiz.touchendEvent && _ctx.wxsBiz.touchendEvent(...args)),
  7516. "change:prop": _ctx.wxsBiz.propObserver,
  7517. prop: vue.wp(_ctx.wxsProp)
  7518. }, [
  7519. vue.createCommentVNode(" 状态栏 "),
  7520. $props.topbar && $data.statusBarHeight ? (vue.openBlock(), vue.createElementBlock(
  7521. "view",
  7522. {
  7523. key: 0,
  7524. class: "mescroll-topbar",
  7525. style: vue.normalizeStyle({ height: $data.statusBarHeight + "px", background: $props.topbar })
  7526. },
  7527. null,
  7528. 4
  7529. /* STYLE */
  7530. )) : vue.createCommentVNode("v-if", true),
  7531. vue.createElementVNode("view", {
  7532. class: "mescroll-wxs-content",
  7533. style: vue.normalizeStyle({ "transform": $options.translateY, "transition": $options.transition }),
  7534. "change:prop": _ctx.wxsBiz.callObserver,
  7535. prop: vue.wp(_ctx.callProp)
  7536. }, [
  7537. vue.createCommentVNode(" 下拉加载区域 (支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-down组件实现)"),
  7538. vue.createCommentVNode(' <mescroll-down :option="mescroll.optDown" :type="downLoadType" :rate="downRate"></mescroll-down> '),
  7539. $data.mescroll.optDown.use ? (vue.openBlock(), vue.createElementBlock(
  7540. "view",
  7541. {
  7542. key: 0,
  7543. class: "mescroll-downwarp",
  7544. style: vue.normalizeStyle({ "background": $data.mescroll.optDown.bgColor, "color": $data.mescroll.optDown.textColor })
  7545. },
  7546. [
  7547. vue.createElementVNode("view", { class: "downwarp-content" }, [
  7548. vue.createElementVNode(
  7549. "view",
  7550. {
  7551. class: vue.normalizeClass(["downwarp-progress mescroll-wxs-progress", { "mescroll-rotate": $options.isDownLoading }]),
  7552. style: vue.normalizeStyle({ "border-color": $data.mescroll.optDown.textColor, "transform": $options.downRotate })
  7553. },
  7554. null,
  7555. 6
  7556. /* CLASS, STYLE */
  7557. ),
  7558. vue.createElementVNode(
  7559. "view",
  7560. { class: "downwarp-tip" },
  7561. vue.toDisplayString($options.downText),
  7562. 1
  7563. /* TEXT */
  7564. )
  7565. ])
  7566. ],
  7567. 4
  7568. /* STYLE */
  7569. )) : vue.createCommentVNode("v-if", true),
  7570. vue.createCommentVNode(" 列表内容 "),
  7571. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  7572. vue.createCommentVNode(" 空布局 "),
  7573. $data.isShowEmpty ? (vue.openBlock(), vue.createBlock(_component_mescroll_empty, {
  7574. key: 1,
  7575. option: $data.mescroll.optUp.empty,
  7576. onEmptyclick: $options.emptyClick
  7577. }, null, 8, ["option", "onEmptyclick"])) : vue.createCommentVNode("v-if", true),
  7578. vue.createCommentVNode(" 上拉加载区域 (下拉刷新时不显示, 支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-up组件实现)"),
  7579. vue.createCommentVNode(' <mescroll-up v-if="mescroll.optUp.use && !isDownLoading && upLoadType!==3" :option="mescroll.optUp" :type="upLoadType"></mescroll-up> '),
  7580. $data.mescroll.optUp.use && !$options.isDownLoading && $data.upLoadType !== 3 ? (vue.openBlock(), vue.createElementBlock(
  7581. "view",
  7582. {
  7583. key: 2,
  7584. class: "mescroll-upwarp",
  7585. style: vue.normalizeStyle({ "background": $data.mescroll.optUp.bgColor, "color": $data.mescroll.optUp.textColor })
  7586. },
  7587. [
  7588. vue.createCommentVNode(" 加载中 (此处不能用v-if,否则android小程序快速上拉可能会不断触发上拉回调) "),
  7589. vue.withDirectives(vue.createElementVNode(
  7590. "view",
  7591. null,
  7592. [
  7593. vue.createElementVNode(
  7594. "view",
  7595. {
  7596. class: "upwarp-progress mescroll-rotate",
  7597. style: vue.normalizeStyle({ "border-color": $data.mescroll.optUp.textColor })
  7598. },
  7599. null,
  7600. 4
  7601. /* STYLE */
  7602. ),
  7603. vue.createElementVNode(
  7604. "view",
  7605. { class: "upwarp-tip" },
  7606. vue.toDisplayString($data.mescroll.optUp.textLoading),
  7607. 1
  7608. /* TEXT */
  7609. )
  7610. ],
  7611. 512
  7612. /* NEED_PATCH */
  7613. ), [
  7614. [vue.vShow, $data.upLoadType === 1]
  7615. ]),
  7616. vue.createCommentVNode(" 无数据 "),
  7617. $data.upLoadType === 2 ? (vue.openBlock(), vue.createElementBlock(
  7618. "view",
  7619. {
  7620. key: 0,
  7621. class: "upwarp-nodata"
  7622. },
  7623. vue.toDisplayString($data.mescroll.optUp.textNoMore),
  7624. 1
  7625. /* TEXT */
  7626. )) : vue.createCommentVNode("v-if", true)
  7627. ],
  7628. 4
  7629. /* STYLE */
  7630. )) : vue.createCommentVNode("v-if", true)
  7631. ], 12, ["change:prop", "prop"]),
  7632. vue.createCommentVNode(" 底部是否偏移TabBar的高度(默认仅在H5端的tab页生效) "),
  7633. vue.createCommentVNode(" 适配iPhoneX "),
  7634. $props.safearea ? (vue.openBlock(), vue.createElementBlock("view", {
  7635. key: 1,
  7636. class: "mescroll-safearea"
  7637. })) : vue.createCommentVNode("v-if", true)
  7638. ], 40, ["change:prop", "prop"])
  7639. ], 46, ["id", "scroll-top", "scroll-with-animation", "scroll-y"]),
  7640. vue.createCommentVNode(" 回到顶部按钮 (fixed元素,需写在scroll-view外面,防止滚动的时候抖动)"),
  7641. vue.createVNode(_component_mescroll_top, {
  7642. modelValue: $data.isShowToTop,
  7643. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.isShowToTop = $event),
  7644. option: $data.mescroll.optUp.toTop,
  7645. onClick: $options.toTopClick
  7646. }, null, 8, ["modelValue", "option", "onClick"]),
  7647. vue.createCommentVNode(" renderjs的数据载体,不可写在mescroll-downwarp内部,避免use为false时,载体丢失,无法更新数据 "),
  7648. vue.createElementVNode("view", {
  7649. "change:prop": _ctx.renderBiz.propObserver,
  7650. prop: vue.wp(_ctx.wxsProp)
  7651. }, null, 8, ["change:prop", "prop"])
  7652. ]);
  7653. }
  7654. if (typeof block0$1 === "function")
  7655. block0$1(_sfc_main$1M);
  7656. if (typeof block1 === "function")
  7657. block1(_sfc_main$1M);
  7658. const __easycom_0$a = /* @__PURE__ */ _export_sfc(_sfc_main$1M, [["render", _sfc_render$1L], ["__scopeId", "data-v-97b1664c"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.vue"]]);
  7659. function useMescroll(onPageScroll, onReachBottom, onPullDownRefresh) {
  7660. let mescroll = null;
  7661. const mescrollInit = (e) => {
  7662. mescroll = e;
  7663. };
  7664. const getMescroll = () => {
  7665. return mescroll;
  7666. };
  7667. const downCallback = () => {
  7668. if (mescroll.optUp.use) {
  7669. mescroll.resetUpScroll();
  7670. } else {
  7671. setTimeout(() => {
  7672. mescroll.endSuccess();
  7673. }, 500);
  7674. }
  7675. };
  7676. const upCallback = () => {
  7677. setTimeout(() => {
  7678. mescroll.endErr();
  7679. }, 500);
  7680. };
  7681. onPullDownRefresh && onPullDownRefresh(() => {
  7682. mescroll && mescroll.onPullDownRefresh();
  7683. });
  7684. onPageScroll && onPageScroll((e) => {
  7685. mescroll && mescroll.onPageScroll(e);
  7686. });
  7687. onReachBottom && onReachBottom(() => {
  7688. mescroll && mescroll.onReachBottom();
  7689. });
  7690. return {
  7691. getMescroll,
  7692. mescrollInit,
  7693. downCallback,
  7694. upCallback
  7695. };
  7696. }
  7697. var isVue2 = false;
  7698. function set(target, key, val) {
  7699. if (Array.isArray(target)) {
  7700. target.length = Math.max(target.length, key);
  7701. target.splice(key, 1, val);
  7702. return val;
  7703. }
  7704. target[key] = val;
  7705. return val;
  7706. }
  7707. function del(target, key) {
  7708. if (Array.isArray(target)) {
  7709. target.splice(key, 1);
  7710. return;
  7711. }
  7712. delete target[key];
  7713. }
  7714. function getDevtoolsGlobalHook() {
  7715. return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;
  7716. }
  7717. function getTarget() {
  7718. return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
  7719. }
  7720. const isProxyAvailable = typeof Proxy === "function";
  7721. const HOOK_SETUP = "devtools-plugin:setup";
  7722. const HOOK_PLUGIN_SETTINGS_SET = "plugin:settings:set";
  7723. let supported;
  7724. let perf;
  7725. function isPerformanceSupported() {
  7726. var _a;
  7727. if (supported !== void 0) {
  7728. return supported;
  7729. }
  7730. if (typeof window !== "undefined" && window.performance) {
  7731. supported = true;
  7732. perf = window.performance;
  7733. } else if (typeof global !== "undefined" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {
  7734. supported = true;
  7735. perf = global.perf_hooks.performance;
  7736. } else {
  7737. supported = false;
  7738. }
  7739. return supported;
  7740. }
  7741. function now() {
  7742. return isPerformanceSupported() ? perf.now() : Date.now();
  7743. }
  7744. class ApiProxy {
  7745. constructor(plugin, hook) {
  7746. this.target = null;
  7747. this.targetQueue = [];
  7748. this.onQueue = [];
  7749. this.plugin = plugin;
  7750. this.hook = hook;
  7751. const defaultSettings = {};
  7752. if (plugin.settings) {
  7753. for (const id in plugin.settings) {
  7754. const item = plugin.settings[id];
  7755. defaultSettings[id] = item.defaultValue;
  7756. }
  7757. }
  7758. const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;
  7759. let currentSettings = Object.assign({}, defaultSettings);
  7760. try {
  7761. const raw = localStorage.getItem(localSettingsSaveId);
  7762. const data = JSON.parse(raw);
  7763. Object.assign(currentSettings, data);
  7764. } catch (e) {
  7765. }
  7766. this.fallbacks = {
  7767. getSettings() {
  7768. return currentSettings;
  7769. },
  7770. setSettings(value2) {
  7771. try {
  7772. localStorage.setItem(localSettingsSaveId, JSON.stringify(value2));
  7773. } catch (e) {
  7774. }
  7775. currentSettings = value2;
  7776. },
  7777. now() {
  7778. return now();
  7779. }
  7780. };
  7781. if (hook) {
  7782. hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value2) => {
  7783. if (pluginId === this.plugin.id) {
  7784. this.fallbacks.setSettings(value2);
  7785. }
  7786. });
  7787. }
  7788. this.proxiedOn = new Proxy({}, {
  7789. get: (_target, prop) => {
  7790. if (this.target) {
  7791. return this.target.on[prop];
  7792. } else {
  7793. return (...args) => {
  7794. this.onQueue.push({
  7795. method: prop,
  7796. args
  7797. });
  7798. };
  7799. }
  7800. }
  7801. });
  7802. this.proxiedTarget = new Proxy({}, {
  7803. get: (_target, prop) => {
  7804. if (this.target) {
  7805. return this.target[prop];
  7806. } else if (prop === "on") {
  7807. return this.proxiedOn;
  7808. } else if (Object.keys(this.fallbacks).includes(prop)) {
  7809. return (...args) => {
  7810. this.targetQueue.push({
  7811. method: prop,
  7812. args,
  7813. resolve: () => {
  7814. }
  7815. });
  7816. return this.fallbacks[prop](...args);
  7817. };
  7818. } else {
  7819. return (...args) => {
  7820. return new Promise((resolve) => {
  7821. this.targetQueue.push({
  7822. method: prop,
  7823. args,
  7824. resolve
  7825. });
  7826. });
  7827. };
  7828. }
  7829. }
  7830. });
  7831. }
  7832. async setRealTarget(target) {
  7833. this.target = target;
  7834. for (const item of this.onQueue) {
  7835. this.target.on[item.method](...item.args);
  7836. }
  7837. for (const item of this.targetQueue) {
  7838. item.resolve(await this.target[item.method](...item.args));
  7839. }
  7840. }
  7841. }
  7842. function setupDevtoolsPlugin(pluginDescriptor, setupFn) {
  7843. const descriptor = pluginDescriptor;
  7844. const target = getTarget();
  7845. const hook = getDevtoolsGlobalHook();
  7846. const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;
  7847. if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {
  7848. hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);
  7849. } else {
  7850. const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null;
  7851. const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];
  7852. list.push({
  7853. pluginDescriptor: descriptor,
  7854. setupFn,
  7855. proxy
  7856. });
  7857. if (proxy)
  7858. setupFn(proxy.proxiedTarget);
  7859. }
  7860. }
  7861. /*!
  7862. * pinia v2.1.7
  7863. * (c) 2023 Eduardo San Martin Morote
  7864. * @license MIT
  7865. */
  7866. let activePinia;
  7867. const setActivePinia = (pinia2) => activePinia = pinia2;
  7868. const piniaSymbol = Symbol("pinia");
  7869. function isPlainObject$1(o) {
  7870. return o && typeof o === "object" && Object.prototype.toString.call(o) === "[object Object]" && typeof o.toJSON !== "function";
  7871. }
  7872. var MutationType;
  7873. (function(MutationType2) {
  7874. MutationType2["direct"] = "direct";
  7875. MutationType2["patchObject"] = "patch object";
  7876. MutationType2["patchFunction"] = "patch function";
  7877. })(MutationType || (MutationType = {}));
  7878. const IS_CLIENT = typeof window !== "undefined";
  7879. const USE_DEVTOOLS = IS_CLIENT;
  7880. 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 })();
  7881. function bom(blob, { autoBom = false } = {}) {
  7882. if (autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
  7883. return new Blob([String.fromCharCode(65279), blob], { type: blob.type });
  7884. }
  7885. return blob;
  7886. }
  7887. function download(url2, name, opts) {
  7888. const xhr = new XMLHttpRequest();
  7889. xhr.open("GET", url2);
  7890. xhr.responseType = "blob";
  7891. xhr.onload = function() {
  7892. saveAs(xhr.response, name, opts);
  7893. };
  7894. xhr.onerror = function() {
  7895. console.error("could not download file");
  7896. };
  7897. xhr.send();
  7898. }
  7899. function corsEnabled(url2) {
  7900. const xhr = new XMLHttpRequest();
  7901. xhr.open("HEAD", url2, false);
  7902. try {
  7903. xhr.send();
  7904. } catch (e) {
  7905. }
  7906. return xhr.status >= 200 && xhr.status <= 299;
  7907. }
  7908. function click(node) {
  7909. try {
  7910. node.dispatchEvent(new MouseEvent("click"));
  7911. } catch (e) {
  7912. const evt = document.createEvent("MouseEvents");
  7913. evt.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);
  7914. node.dispatchEvent(evt);
  7915. }
  7916. }
  7917. const _navigator = typeof navigator === "object" ? navigator : { userAgent: "" };
  7918. const isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))();
  7919. const saveAs = !IS_CLIENT ? () => {
  7920. } : (
  7921. // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
  7922. typeof HTMLAnchorElement !== "undefined" && "download" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : (
  7923. // Use msSaveOrOpenBlob as a second approach
  7924. "msSaveOrOpenBlob" in _navigator ? msSaveAs : (
  7925. // Fallback to using FileReader and a popup
  7926. fileSaverSaveAs
  7927. )
  7928. )
  7929. );
  7930. function downloadSaveAs(blob, name = "download", opts) {
  7931. const a = document.createElement("a");
  7932. a.download = name;
  7933. a.rel = "noopener";
  7934. if (typeof blob === "string") {
  7935. a.href = blob;
  7936. if (a.origin !== location.origin) {
  7937. if (corsEnabled(a.href)) {
  7938. download(blob, name, opts);
  7939. } else {
  7940. a.target = "_blank";
  7941. click(a);
  7942. }
  7943. } else {
  7944. click(a);
  7945. }
  7946. } else {
  7947. a.href = URL.createObjectURL(blob);
  7948. setTimeout(function() {
  7949. URL.revokeObjectURL(a.href);
  7950. }, 4e4);
  7951. setTimeout(function() {
  7952. click(a);
  7953. }, 0);
  7954. }
  7955. }
  7956. function msSaveAs(blob, name = "download", opts) {
  7957. if (typeof blob === "string") {
  7958. if (corsEnabled(blob)) {
  7959. download(blob, name, opts);
  7960. } else {
  7961. const a = document.createElement("a");
  7962. a.href = blob;
  7963. a.target = "_blank";
  7964. setTimeout(function() {
  7965. click(a);
  7966. });
  7967. }
  7968. } else {
  7969. navigator.msSaveOrOpenBlob(bom(blob, opts), name);
  7970. }
  7971. }
  7972. function fileSaverSaveAs(blob, name, opts, popup) {
  7973. popup = popup || open("", "_blank");
  7974. if (popup) {
  7975. popup.document.title = popup.document.body.innerText = "downloading...";
  7976. }
  7977. if (typeof blob === "string")
  7978. return download(blob, name, opts);
  7979. const force = blob.type === "application/octet-stream";
  7980. const isSafari = /constructor/i.test(String(_global.HTMLElement)) || "safari" in _global;
  7981. const isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent);
  7982. if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== "undefined") {
  7983. const reader = new FileReader();
  7984. reader.onloadend = function() {
  7985. let url2 = reader.result;
  7986. if (typeof url2 !== "string") {
  7987. popup = null;
  7988. throw new Error("Wrong reader.result type");
  7989. }
  7990. url2 = isChromeIOS ? url2 : url2.replace(/^data:[^;]*;/, "data:attachment/file;");
  7991. if (popup) {
  7992. popup.location.href = url2;
  7993. } else {
  7994. location.assign(url2);
  7995. }
  7996. popup = null;
  7997. };
  7998. reader.readAsDataURL(blob);
  7999. } else {
  8000. const url2 = URL.createObjectURL(blob);
  8001. if (popup)
  8002. popup.location.assign(url2);
  8003. else
  8004. location.href = url2;
  8005. popup = null;
  8006. setTimeout(function() {
  8007. URL.revokeObjectURL(url2);
  8008. }, 4e4);
  8009. }
  8010. }
  8011. function toastMessage(message, type2) {
  8012. const piniaMessage = "🍍 " + message;
  8013. if (typeof __VUE_DEVTOOLS_TOAST__ === "function") {
  8014. __VUE_DEVTOOLS_TOAST__(piniaMessage, type2);
  8015. } else if (type2 === "error") {
  8016. console.error(piniaMessage);
  8017. } else if (type2 === "warn") {
  8018. console.warn(piniaMessage);
  8019. } else {
  8020. console.log(piniaMessage);
  8021. }
  8022. }
  8023. function isPinia(o) {
  8024. return "_a" in o && "install" in o;
  8025. }
  8026. function checkClipboardAccess() {
  8027. if (!("clipboard" in navigator)) {
  8028. toastMessage(`Your browser doesn't support the Clipboard API`, "error");
  8029. return true;
  8030. }
  8031. }
  8032. function checkNotFocusedError(error2) {
  8033. if (error2 instanceof Error && error2.message.toLowerCase().includes("document is not focused")) {
  8034. toastMessage('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn");
  8035. return true;
  8036. }
  8037. return false;
  8038. }
  8039. async function actionGlobalCopyState(pinia2) {
  8040. if (checkClipboardAccess())
  8041. return;
  8042. try {
  8043. await navigator.clipboard.writeText(JSON.stringify(pinia2.state.value));
  8044. toastMessage("Global state copied to clipboard.");
  8045. } catch (error2) {
  8046. if (checkNotFocusedError(error2))
  8047. return;
  8048. toastMessage(`Failed to serialize the state. Check the console for more details.`, "error");
  8049. console.error(error2);
  8050. }
  8051. }
  8052. async function actionGlobalPasteState(pinia2) {
  8053. if (checkClipboardAccess())
  8054. return;
  8055. try {
  8056. loadStoresState(pinia2, JSON.parse(await navigator.clipboard.readText()));
  8057. toastMessage("Global state pasted from clipboard.");
  8058. } catch (error2) {
  8059. if (checkNotFocusedError(error2))
  8060. return;
  8061. toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, "error");
  8062. console.error(error2);
  8063. }
  8064. }
  8065. async function actionGlobalSaveState(pinia2) {
  8066. try {
  8067. saveAs(new Blob([JSON.stringify(pinia2.state.value)], {
  8068. type: "text/plain;charset=utf-8"
  8069. }), "pinia-state.json");
  8070. } catch (error2) {
  8071. toastMessage(`Failed to export the state as JSON. Check the console for more details.`, "error");
  8072. console.error(error2);
  8073. }
  8074. }
  8075. let fileInput;
  8076. function getFileOpener() {
  8077. if (!fileInput) {
  8078. fileInput = document.createElement("input");
  8079. fileInput.type = "file";
  8080. fileInput.accept = ".json";
  8081. }
  8082. function openFile() {
  8083. return new Promise((resolve, reject) => {
  8084. fileInput.onchange = async () => {
  8085. const files = fileInput.files;
  8086. if (!files)
  8087. return resolve(null);
  8088. const file = files.item(0);
  8089. if (!file)
  8090. return resolve(null);
  8091. return resolve({ text: await file.text(), file });
  8092. };
  8093. fileInput.oncancel = () => resolve(null);
  8094. fileInput.onerror = reject;
  8095. fileInput.click();
  8096. });
  8097. }
  8098. return openFile;
  8099. }
  8100. async function actionGlobalOpenStateFile(pinia2) {
  8101. try {
  8102. const open2 = getFileOpener();
  8103. const result = await open2();
  8104. if (!result)
  8105. return;
  8106. const { text, file } = result;
  8107. loadStoresState(pinia2, JSON.parse(text));
  8108. toastMessage(`Global state imported from "${file.name}".`);
  8109. } catch (error2) {
  8110. toastMessage(`Failed to import the state from JSON. Check the console for more details.`, "error");
  8111. console.error(error2);
  8112. }
  8113. }
  8114. function loadStoresState(pinia2, state) {
  8115. for (const key in state) {
  8116. const storeState = pinia2.state.value[key];
  8117. if (storeState) {
  8118. Object.assign(storeState, state[key]);
  8119. } else {
  8120. pinia2.state.value[key] = state[key];
  8121. }
  8122. }
  8123. }
  8124. function formatDisplay(display) {
  8125. return {
  8126. _custom: {
  8127. display
  8128. }
  8129. };
  8130. }
  8131. const PINIA_ROOT_LABEL = "🍍 Pinia (root)";
  8132. const PINIA_ROOT_ID = "_root";
  8133. function formatStoreForInspectorTree(store2) {
  8134. return isPinia(store2) ? {
  8135. id: PINIA_ROOT_ID,
  8136. label: PINIA_ROOT_LABEL
  8137. } : {
  8138. id: store2.$id,
  8139. label: store2.$id
  8140. };
  8141. }
  8142. function formatStoreForInspectorState(store2) {
  8143. if (isPinia(store2)) {
  8144. const storeNames = Array.from(store2._s.keys());
  8145. const storeMap = store2._s;
  8146. const state2 = {
  8147. state: storeNames.map((storeId) => ({
  8148. editable: true,
  8149. key: storeId,
  8150. value: store2.state.value[storeId]
  8151. })),
  8152. getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => {
  8153. const store22 = storeMap.get(id);
  8154. return {
  8155. editable: false,
  8156. key: id,
  8157. value: store22._getters.reduce((getters, key) => {
  8158. getters[key] = store22[key];
  8159. return getters;
  8160. }, {})
  8161. };
  8162. })
  8163. };
  8164. return state2;
  8165. }
  8166. const state = {
  8167. state: Object.keys(store2.$state).map((key) => ({
  8168. editable: true,
  8169. key,
  8170. value: store2.$state[key]
  8171. }))
  8172. };
  8173. if (store2._getters && store2._getters.length) {
  8174. state.getters = store2._getters.map((getterName) => ({
  8175. editable: false,
  8176. key: getterName,
  8177. value: store2[getterName]
  8178. }));
  8179. }
  8180. if (store2._customProperties.size) {
  8181. state.customProperties = Array.from(store2._customProperties).map((key) => ({
  8182. editable: true,
  8183. key,
  8184. value: store2[key]
  8185. }));
  8186. }
  8187. return state;
  8188. }
  8189. function formatEventData(events) {
  8190. if (!events)
  8191. return {};
  8192. if (Array.isArray(events)) {
  8193. return events.reduce((data, event) => {
  8194. data.keys.push(event.key);
  8195. data.operations.push(event.type);
  8196. data.oldValue[event.key] = event.oldValue;
  8197. data.newValue[event.key] = event.newValue;
  8198. return data;
  8199. }, {
  8200. oldValue: {},
  8201. keys: [],
  8202. operations: [],
  8203. newValue: {}
  8204. });
  8205. } else {
  8206. return {
  8207. operation: formatDisplay(events.type),
  8208. key: formatDisplay(events.key),
  8209. oldValue: events.oldValue,
  8210. newValue: events.newValue
  8211. };
  8212. }
  8213. }
  8214. function formatMutationType(type2) {
  8215. switch (type2) {
  8216. case MutationType.direct:
  8217. return "mutation";
  8218. case MutationType.patchFunction:
  8219. return "$patch";
  8220. case MutationType.patchObject:
  8221. return "$patch";
  8222. default:
  8223. return "unknown";
  8224. }
  8225. }
  8226. let isTimelineActive = true;
  8227. const componentStateTypes = [];
  8228. const MUTATIONS_LAYER_ID = "pinia:mutations";
  8229. const INSPECTOR_ID = "pinia";
  8230. const { assign: assign$1 } = Object;
  8231. const getStoreType = (id) => "🍍 " + id;
  8232. function registerPiniaDevtools(app, pinia2) {
  8233. setupDevtoolsPlugin({
  8234. id: "dev.esm.pinia",
  8235. label: "Pinia 🍍",
  8236. logo: "https://pinia.vuejs.org/logo.svg",
  8237. packageName: "pinia",
  8238. homepage: "https://pinia.vuejs.org",
  8239. componentStateTypes,
  8240. app
  8241. }, (api) => {
  8242. if (typeof api.now !== "function") {
  8243. 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.");
  8244. }
  8245. api.addTimelineLayer({
  8246. id: MUTATIONS_LAYER_ID,
  8247. label: `Pinia 🍍`,
  8248. color: 15064968
  8249. });
  8250. api.addInspector({
  8251. id: INSPECTOR_ID,
  8252. label: "Pinia 🍍",
  8253. icon: "storage",
  8254. treeFilterPlaceholder: "Search stores",
  8255. actions: [
  8256. {
  8257. icon: "content_copy",
  8258. action: () => {
  8259. actionGlobalCopyState(pinia2);
  8260. },
  8261. tooltip: "Serialize and copy the state"
  8262. },
  8263. {
  8264. icon: "content_paste",
  8265. action: async () => {
  8266. await actionGlobalPasteState(pinia2);
  8267. api.sendInspectorTree(INSPECTOR_ID);
  8268. api.sendInspectorState(INSPECTOR_ID);
  8269. },
  8270. tooltip: "Replace the state with the content of your clipboard"
  8271. },
  8272. {
  8273. icon: "save",
  8274. action: () => {
  8275. actionGlobalSaveState(pinia2);
  8276. },
  8277. tooltip: "Save the state as a JSON file"
  8278. },
  8279. {
  8280. icon: "folder_open",
  8281. action: async () => {
  8282. await actionGlobalOpenStateFile(pinia2);
  8283. api.sendInspectorTree(INSPECTOR_ID);
  8284. api.sendInspectorState(INSPECTOR_ID);
  8285. },
  8286. tooltip: "Import the state from a JSON file"
  8287. }
  8288. ],
  8289. nodeActions: [
  8290. {
  8291. icon: "restore",
  8292. tooltip: 'Reset the state (with "$reset")',
  8293. action: (nodeId) => {
  8294. const store2 = pinia2._s.get(nodeId);
  8295. if (!store2) {
  8296. toastMessage(`Cannot reset "${nodeId}" store because it wasn't found.`, "warn");
  8297. } else if (typeof store2.$reset !== "function") {
  8298. toastMessage(`Cannot reset "${nodeId}" store because it doesn't have a "$reset" method implemented.`, "warn");
  8299. } else {
  8300. store2.$reset();
  8301. toastMessage(`Store "${nodeId}" reset.`);
  8302. }
  8303. }
  8304. }
  8305. ]
  8306. });
  8307. api.on.inspectComponent((payload, ctx) => {
  8308. const proxy = payload.componentInstance && payload.componentInstance.proxy;
  8309. if (proxy && proxy._pStores) {
  8310. const piniaStores = payload.componentInstance.proxy._pStores;
  8311. Object.values(piniaStores).forEach((store2) => {
  8312. payload.instanceData.state.push({
  8313. type: getStoreType(store2.$id),
  8314. key: "state",
  8315. editable: true,
  8316. value: store2._isOptionsAPI ? {
  8317. _custom: {
  8318. value: vue.toRaw(store2.$state),
  8319. actions: [
  8320. {
  8321. icon: "restore",
  8322. tooltip: "Reset the state of this store",
  8323. action: () => store2.$reset()
  8324. }
  8325. ]
  8326. }
  8327. } : (
  8328. // NOTE: workaround to unwrap transferred refs
  8329. Object.keys(store2.$state).reduce((state, key) => {
  8330. state[key] = store2.$state[key];
  8331. return state;
  8332. }, {})
  8333. )
  8334. });
  8335. if (store2._getters && store2._getters.length) {
  8336. payload.instanceData.state.push({
  8337. type: getStoreType(store2.$id),
  8338. key: "getters",
  8339. editable: false,
  8340. value: store2._getters.reduce((getters, key) => {
  8341. try {
  8342. getters[key] = store2[key];
  8343. } catch (error2) {
  8344. getters[key] = error2;
  8345. }
  8346. return getters;
  8347. }, {})
  8348. });
  8349. }
  8350. });
  8351. }
  8352. });
  8353. api.on.getInspectorTree((payload) => {
  8354. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  8355. let stores = [pinia2];
  8356. stores = stores.concat(Array.from(pinia2._s.values()));
  8357. 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);
  8358. }
  8359. });
  8360. api.on.getInspectorState((payload) => {
  8361. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  8362. const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);
  8363. if (!inspectedStore) {
  8364. return;
  8365. }
  8366. if (inspectedStore) {
  8367. payload.state = formatStoreForInspectorState(inspectedStore);
  8368. }
  8369. }
  8370. });
  8371. api.on.editInspectorState((payload, ctx) => {
  8372. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  8373. const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);
  8374. if (!inspectedStore) {
  8375. return toastMessage(`store "${payload.nodeId}" not found`, "error");
  8376. }
  8377. const { path } = payload;
  8378. if (!isPinia(inspectedStore)) {
  8379. if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) {
  8380. path.unshift("$state");
  8381. }
  8382. } else {
  8383. path.unshift("state");
  8384. }
  8385. isTimelineActive = false;
  8386. payload.set(inspectedStore, path, payload.state.value);
  8387. isTimelineActive = true;
  8388. }
  8389. });
  8390. api.on.editComponentState((payload) => {
  8391. if (payload.type.startsWith("🍍")) {
  8392. const storeId = payload.type.replace(/^🍍\s*/, "");
  8393. const store2 = pinia2._s.get(storeId);
  8394. if (!store2) {
  8395. return toastMessage(`store "${storeId}" not found`, "error");
  8396. }
  8397. const { path } = payload;
  8398. if (path[0] !== "state") {
  8399. return toastMessage(`Invalid path for store "${storeId}":
  8400. ${path}
  8401. Only state can be modified.`);
  8402. }
  8403. path[0] = "$state";
  8404. isTimelineActive = false;
  8405. payload.set(store2, path, payload.state.value);
  8406. isTimelineActive = true;
  8407. }
  8408. });
  8409. });
  8410. }
  8411. function addStoreToDevtools(app, store2) {
  8412. if (!componentStateTypes.includes(getStoreType(store2.$id))) {
  8413. componentStateTypes.push(getStoreType(store2.$id));
  8414. }
  8415. setupDevtoolsPlugin({
  8416. id: "dev.esm.pinia",
  8417. label: "Pinia 🍍",
  8418. logo: "https://pinia.vuejs.org/logo.svg",
  8419. packageName: "pinia",
  8420. homepage: "https://pinia.vuejs.org",
  8421. componentStateTypes,
  8422. app,
  8423. settings: {
  8424. logStoreChanges: {
  8425. label: "Notify about new/deleted stores",
  8426. type: "boolean",
  8427. defaultValue: true
  8428. }
  8429. // useEmojis: {
  8430. // label: 'Use emojis in messages ⚡️',
  8431. // type: 'boolean',
  8432. // defaultValue: true,
  8433. // },
  8434. }
  8435. }, (api) => {
  8436. const now2 = typeof api.now === "function" ? api.now.bind(api) : Date.now;
  8437. store2.$onAction(({ after, onError, name, args }) => {
  8438. const groupId = runningActionId++;
  8439. api.addTimelineEvent({
  8440. layerId: MUTATIONS_LAYER_ID,
  8441. event: {
  8442. time: now2(),
  8443. title: "🛫 " + name,
  8444. subtitle: "start",
  8445. data: {
  8446. store: formatDisplay(store2.$id),
  8447. action: formatDisplay(name),
  8448. args
  8449. },
  8450. groupId
  8451. }
  8452. });
  8453. after((result) => {
  8454. activeAction = void 0;
  8455. api.addTimelineEvent({
  8456. layerId: MUTATIONS_LAYER_ID,
  8457. event: {
  8458. time: now2(),
  8459. title: "🛬 " + name,
  8460. subtitle: "end",
  8461. data: {
  8462. store: formatDisplay(store2.$id),
  8463. action: formatDisplay(name),
  8464. args,
  8465. result
  8466. },
  8467. groupId
  8468. }
  8469. });
  8470. });
  8471. onError((error2) => {
  8472. activeAction = void 0;
  8473. api.addTimelineEvent({
  8474. layerId: MUTATIONS_LAYER_ID,
  8475. event: {
  8476. time: now2(),
  8477. logType: "error",
  8478. title: "💥 " + name,
  8479. subtitle: "end",
  8480. data: {
  8481. store: formatDisplay(store2.$id),
  8482. action: formatDisplay(name),
  8483. args,
  8484. error: error2
  8485. },
  8486. groupId
  8487. }
  8488. });
  8489. });
  8490. }, true);
  8491. store2._customProperties.forEach((name) => {
  8492. vue.watch(() => vue.unref(store2[name]), (newValue, oldValue) => {
  8493. api.notifyComponentUpdate();
  8494. api.sendInspectorState(INSPECTOR_ID);
  8495. if (isTimelineActive) {
  8496. api.addTimelineEvent({
  8497. layerId: MUTATIONS_LAYER_ID,
  8498. event: {
  8499. time: now2(),
  8500. title: "Change",
  8501. subtitle: name,
  8502. data: {
  8503. newValue,
  8504. oldValue
  8505. },
  8506. groupId: activeAction
  8507. }
  8508. });
  8509. }
  8510. }, { deep: true });
  8511. });
  8512. store2.$subscribe(({ events, type: type2 }, state) => {
  8513. api.notifyComponentUpdate();
  8514. api.sendInspectorState(INSPECTOR_ID);
  8515. if (!isTimelineActive)
  8516. return;
  8517. const eventData = {
  8518. time: now2(),
  8519. title: formatMutationType(type2),
  8520. data: assign$1({ store: formatDisplay(store2.$id) }, formatEventData(events)),
  8521. groupId: activeAction
  8522. };
  8523. if (type2 === MutationType.patchFunction) {
  8524. eventData.subtitle = "⤵️";
  8525. } else if (type2 === MutationType.patchObject) {
  8526. eventData.subtitle = "🧩";
  8527. } else if (events && !Array.isArray(events)) {
  8528. eventData.subtitle = events.type;
  8529. }
  8530. if (events) {
  8531. eventData.data["rawEvent(s)"] = {
  8532. _custom: {
  8533. display: "DebuggerEvent",
  8534. type: "object",
  8535. tooltip: "raw DebuggerEvent[]",
  8536. value: events
  8537. }
  8538. };
  8539. }
  8540. api.addTimelineEvent({
  8541. layerId: MUTATIONS_LAYER_ID,
  8542. event: eventData
  8543. });
  8544. }, { detached: true, flush: "sync" });
  8545. const hotUpdate = store2._hotUpdate;
  8546. store2._hotUpdate = vue.markRaw((newStore) => {
  8547. hotUpdate(newStore);
  8548. api.addTimelineEvent({
  8549. layerId: MUTATIONS_LAYER_ID,
  8550. event: {
  8551. time: now2(),
  8552. title: "🔥 " + store2.$id,
  8553. subtitle: "HMR update",
  8554. data: {
  8555. store: formatDisplay(store2.$id),
  8556. info: formatDisplay(`HMR update`)
  8557. }
  8558. }
  8559. });
  8560. api.notifyComponentUpdate();
  8561. api.sendInspectorTree(INSPECTOR_ID);
  8562. api.sendInspectorState(INSPECTOR_ID);
  8563. });
  8564. const { $dispose } = store2;
  8565. store2.$dispose = () => {
  8566. $dispose();
  8567. api.notifyComponentUpdate();
  8568. api.sendInspectorTree(INSPECTOR_ID);
  8569. api.sendInspectorState(INSPECTOR_ID);
  8570. api.getSettings().logStoreChanges && toastMessage(`Disposed "${store2.$id}" store 🗑`);
  8571. };
  8572. api.notifyComponentUpdate();
  8573. api.sendInspectorTree(INSPECTOR_ID);
  8574. api.sendInspectorState(INSPECTOR_ID);
  8575. api.getSettings().logStoreChanges && toastMessage(`"${store2.$id}" store installed 🆕`);
  8576. });
  8577. }
  8578. let runningActionId = 0;
  8579. let activeAction;
  8580. function patchActionForGrouping(store2, actionNames, wrapWithProxy) {
  8581. const actions = actionNames.reduce((storeActions, actionName) => {
  8582. storeActions[actionName] = vue.toRaw(store2)[actionName];
  8583. return storeActions;
  8584. }, {});
  8585. for (const actionName in actions) {
  8586. store2[actionName] = function() {
  8587. const _actionId = runningActionId;
  8588. const trackedStore = wrapWithProxy ? new Proxy(store2, {
  8589. get(...args) {
  8590. activeAction = _actionId;
  8591. return Reflect.get(...args);
  8592. },
  8593. set(...args) {
  8594. activeAction = _actionId;
  8595. return Reflect.set(...args);
  8596. }
  8597. }) : store2;
  8598. activeAction = _actionId;
  8599. const retValue = actions[actionName].apply(trackedStore, arguments);
  8600. activeAction = void 0;
  8601. return retValue;
  8602. };
  8603. }
  8604. }
  8605. function devtoolsPlugin({ app, store: store2, options }) {
  8606. if (store2.$id.startsWith("__hot:")) {
  8607. return;
  8608. }
  8609. store2._isOptionsAPI = !!options.state;
  8610. patchActionForGrouping(store2, Object.keys(options.actions), store2._isOptionsAPI);
  8611. const originalHotUpdate = store2._hotUpdate;
  8612. vue.toRaw(store2)._hotUpdate = function(newStore) {
  8613. originalHotUpdate.apply(this, arguments);
  8614. patchActionForGrouping(store2, Object.keys(newStore._hmrPayload.actions), !!store2._isOptionsAPI);
  8615. };
  8616. addStoreToDevtools(
  8617. app,
  8618. // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
  8619. store2
  8620. );
  8621. }
  8622. function createPinia() {
  8623. const scope = vue.effectScope(true);
  8624. const state = scope.run(() => vue.ref({}));
  8625. let _p = [];
  8626. let toBeInstalled = [];
  8627. const pinia2 = vue.markRaw({
  8628. install(app) {
  8629. setActivePinia(pinia2);
  8630. {
  8631. pinia2._a = app;
  8632. app.provide(piniaSymbol, pinia2);
  8633. app.config.globalProperties.$pinia = pinia2;
  8634. if (USE_DEVTOOLS) {
  8635. registerPiniaDevtools(app, pinia2);
  8636. }
  8637. toBeInstalled.forEach((plugin) => _p.push(plugin));
  8638. toBeInstalled = [];
  8639. }
  8640. },
  8641. use(plugin) {
  8642. if (!this._a && !isVue2) {
  8643. toBeInstalled.push(plugin);
  8644. } else {
  8645. _p.push(plugin);
  8646. }
  8647. return this;
  8648. },
  8649. _p,
  8650. // it's actually undefined here
  8651. // @ts-expect-error
  8652. _a: null,
  8653. _e: scope,
  8654. _s: /* @__PURE__ */ new Map(),
  8655. state
  8656. });
  8657. if (USE_DEVTOOLS && typeof Proxy !== "undefined") {
  8658. pinia2.use(devtoolsPlugin);
  8659. }
  8660. return pinia2;
  8661. }
  8662. function patchObject(newState, oldState) {
  8663. for (const key in oldState) {
  8664. const subPatch = oldState[key];
  8665. if (!(key in newState)) {
  8666. continue;
  8667. }
  8668. const targetValue = newState[key];
  8669. if (isPlainObject$1(targetValue) && isPlainObject$1(subPatch) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) {
  8670. newState[key] = patchObject(targetValue, subPatch);
  8671. } else {
  8672. {
  8673. newState[key] = subPatch;
  8674. }
  8675. }
  8676. }
  8677. return newState;
  8678. }
  8679. const noop = () => {
  8680. };
  8681. function addSubscription(subscriptions, callback, detached, onCleanup = noop) {
  8682. subscriptions.push(callback);
  8683. const removeSubscription = () => {
  8684. const idx = subscriptions.indexOf(callback);
  8685. if (idx > -1) {
  8686. subscriptions.splice(idx, 1);
  8687. onCleanup();
  8688. }
  8689. };
  8690. if (!detached && vue.getCurrentScope()) {
  8691. vue.onScopeDispose(removeSubscription);
  8692. }
  8693. return removeSubscription;
  8694. }
  8695. function triggerSubscriptions(subscriptions, ...args) {
  8696. subscriptions.slice().forEach((callback) => {
  8697. callback(...args);
  8698. });
  8699. }
  8700. const fallbackRunWithContext = (fn) => fn();
  8701. function mergeReactiveObjects(target, patchToApply) {
  8702. if (target instanceof Map && patchToApply instanceof Map) {
  8703. patchToApply.forEach((value2, key) => target.set(key, value2));
  8704. }
  8705. if (target instanceof Set && patchToApply instanceof Set) {
  8706. patchToApply.forEach(target.add, target);
  8707. }
  8708. for (const key in patchToApply) {
  8709. if (!patchToApply.hasOwnProperty(key))
  8710. continue;
  8711. const subPatch = patchToApply[key];
  8712. const targetValue = target[key];
  8713. if (isPlainObject$1(targetValue) && isPlainObject$1(subPatch) && target.hasOwnProperty(key) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) {
  8714. target[key] = mergeReactiveObjects(targetValue, subPatch);
  8715. } else {
  8716. target[key] = subPatch;
  8717. }
  8718. }
  8719. return target;
  8720. }
  8721. const skipHydrateSymbol = Symbol("pinia:skipHydration");
  8722. function shouldHydrate(obj) {
  8723. return !isPlainObject$1(obj) || !obj.hasOwnProperty(skipHydrateSymbol);
  8724. }
  8725. const { assign } = Object;
  8726. function isComputed(o) {
  8727. return !!(vue.isRef(o) && o.effect);
  8728. }
  8729. function createOptionsStore(id, options, pinia2, hot) {
  8730. const { state, actions, getters } = options;
  8731. const initialState = pinia2.state.value[id];
  8732. let store2;
  8733. function setup() {
  8734. if (!initialState && !hot) {
  8735. {
  8736. pinia2.state.value[id] = state ? state() : {};
  8737. }
  8738. }
  8739. const localState = hot ? (
  8740. // use ref() to unwrap refs inside state TODO: check if this is still necessary
  8741. vue.toRefs(vue.ref(state ? state() : {}).value)
  8742. ) : vue.toRefs(pinia2.state.value[id]);
  8743. return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {
  8744. if (name in localState) {
  8745. console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${name}" in store "${id}".`);
  8746. }
  8747. computedGetters[name] = vue.markRaw(vue.computed(() => {
  8748. setActivePinia(pinia2);
  8749. const store22 = pinia2._s.get(id);
  8750. return getters[name].call(store22, store22);
  8751. }));
  8752. return computedGetters;
  8753. }, {}));
  8754. }
  8755. store2 = createSetupStore(id, setup, options, pinia2, hot, true);
  8756. return store2;
  8757. }
  8758. function createSetupStore($id, setup, options = {}, pinia2, hot, isOptionsStore) {
  8759. let scope;
  8760. const optionsForPlugin = assign({ actions: {} }, options);
  8761. if (!pinia2._e.active) {
  8762. throw new Error("Pinia destroyed");
  8763. }
  8764. const $subscribeOptions = {
  8765. deep: true
  8766. // flush: 'post',
  8767. };
  8768. {
  8769. $subscribeOptions.onTrigger = (event) => {
  8770. if (isListening) {
  8771. debuggerEvents = event;
  8772. } else if (isListening == false && !store2._hotUpdating) {
  8773. if (Array.isArray(debuggerEvents)) {
  8774. debuggerEvents.push(event);
  8775. } else {
  8776. console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.");
  8777. }
  8778. }
  8779. };
  8780. }
  8781. let isListening;
  8782. let isSyncListening;
  8783. let subscriptions = [];
  8784. let actionSubscriptions = [];
  8785. let debuggerEvents;
  8786. const initialState = pinia2.state.value[$id];
  8787. if (!isOptionsStore && !initialState && !hot) {
  8788. {
  8789. pinia2.state.value[$id] = {};
  8790. }
  8791. }
  8792. const hotState = vue.ref({});
  8793. let activeListener;
  8794. function $patch(partialStateOrMutator) {
  8795. let subscriptionMutation;
  8796. isListening = isSyncListening = false;
  8797. {
  8798. debuggerEvents = [];
  8799. }
  8800. if (typeof partialStateOrMutator === "function") {
  8801. partialStateOrMutator(pinia2.state.value[$id]);
  8802. subscriptionMutation = {
  8803. type: MutationType.patchFunction,
  8804. storeId: $id,
  8805. events: debuggerEvents
  8806. };
  8807. } else {
  8808. mergeReactiveObjects(pinia2.state.value[$id], partialStateOrMutator);
  8809. subscriptionMutation = {
  8810. type: MutationType.patchObject,
  8811. payload: partialStateOrMutator,
  8812. storeId: $id,
  8813. events: debuggerEvents
  8814. };
  8815. }
  8816. const myListenerId = activeListener = Symbol();
  8817. vue.nextTick().then(() => {
  8818. if (activeListener === myListenerId) {
  8819. isListening = true;
  8820. }
  8821. });
  8822. isSyncListening = true;
  8823. triggerSubscriptions(subscriptions, subscriptionMutation, pinia2.state.value[$id]);
  8824. }
  8825. const $reset = isOptionsStore ? function $reset2() {
  8826. const { state } = options;
  8827. const newState = state ? state() : {};
  8828. this.$patch(($state) => {
  8829. assign($state, newState);
  8830. });
  8831. } : (
  8832. /* istanbul ignore next */
  8833. () => {
  8834. throw new Error(`🍍: Store "${$id}" is built using the setup syntax and does not implement $reset().`);
  8835. }
  8836. );
  8837. function $dispose() {
  8838. scope.stop();
  8839. subscriptions = [];
  8840. actionSubscriptions = [];
  8841. pinia2._s.delete($id);
  8842. }
  8843. function wrapAction(name, action) {
  8844. return function() {
  8845. setActivePinia(pinia2);
  8846. const args = Array.from(arguments);
  8847. const afterCallbackList = [];
  8848. const onErrorCallbackList = [];
  8849. function after(callback) {
  8850. afterCallbackList.push(callback);
  8851. }
  8852. function onError(callback) {
  8853. onErrorCallbackList.push(callback);
  8854. }
  8855. triggerSubscriptions(actionSubscriptions, {
  8856. args,
  8857. name,
  8858. store: store2,
  8859. after,
  8860. onError
  8861. });
  8862. let ret;
  8863. try {
  8864. ret = action.apply(this && this.$id === $id ? this : store2, args);
  8865. } catch (error2) {
  8866. triggerSubscriptions(onErrorCallbackList, error2);
  8867. throw error2;
  8868. }
  8869. if (ret instanceof Promise) {
  8870. return ret.then((value2) => {
  8871. triggerSubscriptions(afterCallbackList, value2);
  8872. return value2;
  8873. }).catch((error2) => {
  8874. triggerSubscriptions(onErrorCallbackList, error2);
  8875. return Promise.reject(error2);
  8876. });
  8877. }
  8878. triggerSubscriptions(afterCallbackList, ret);
  8879. return ret;
  8880. };
  8881. }
  8882. const _hmrPayload = /* @__PURE__ */ vue.markRaw({
  8883. actions: {},
  8884. getters: {},
  8885. state: [],
  8886. hotState
  8887. });
  8888. const partialStore = {
  8889. _p: pinia2,
  8890. // _s: scope,
  8891. $id,
  8892. $onAction: addSubscription.bind(null, actionSubscriptions),
  8893. $patch,
  8894. $reset,
  8895. $subscribe(callback, options2 = {}) {
  8896. const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());
  8897. const stopWatcher = scope.run(() => vue.watch(() => pinia2.state.value[$id], (state) => {
  8898. if (options2.flush === "sync" ? isSyncListening : isListening) {
  8899. callback({
  8900. storeId: $id,
  8901. type: MutationType.direct,
  8902. events: debuggerEvents
  8903. }, state);
  8904. }
  8905. }, assign({}, $subscribeOptions, options2)));
  8906. return removeSubscription;
  8907. },
  8908. $dispose
  8909. };
  8910. const store2 = vue.reactive(assign(
  8911. {
  8912. _hmrPayload,
  8913. _customProperties: vue.markRaw(/* @__PURE__ */ new Set())
  8914. // devtools custom properties
  8915. },
  8916. partialStore
  8917. // must be added later
  8918. // setupStore
  8919. ));
  8920. pinia2._s.set($id, store2);
  8921. const runWithContext = pinia2._a && pinia2._a.runWithContext || fallbackRunWithContext;
  8922. const setupStore = runWithContext(() => pinia2._e.run(() => (scope = vue.effectScope()).run(setup)));
  8923. for (const key in setupStore) {
  8924. const prop = setupStore[key];
  8925. if (vue.isRef(prop) && !isComputed(prop) || vue.isReactive(prop)) {
  8926. if (hot) {
  8927. set(hotState.value, key, vue.toRef(setupStore, key));
  8928. } else if (!isOptionsStore) {
  8929. if (initialState && shouldHydrate(prop)) {
  8930. if (vue.isRef(prop)) {
  8931. prop.value = initialState[key];
  8932. } else {
  8933. mergeReactiveObjects(prop, initialState[key]);
  8934. }
  8935. }
  8936. {
  8937. pinia2.state.value[$id][key] = prop;
  8938. }
  8939. }
  8940. {
  8941. _hmrPayload.state.push(key);
  8942. }
  8943. } else if (typeof prop === "function") {
  8944. const actionValue = hot ? prop : wrapAction(key, prop);
  8945. {
  8946. setupStore[key] = actionValue;
  8947. }
  8948. {
  8949. _hmrPayload.actions[key] = prop;
  8950. }
  8951. optionsForPlugin.actions[key] = prop;
  8952. } else {
  8953. if (isComputed(prop)) {
  8954. _hmrPayload.getters[key] = isOptionsStore ? (
  8955. // @ts-expect-error
  8956. options.getters[key]
  8957. ) : prop;
  8958. if (IS_CLIENT) {
  8959. const getters = setupStore._getters || // @ts-expect-error: same
  8960. (setupStore._getters = vue.markRaw([]));
  8961. getters.push(key);
  8962. }
  8963. }
  8964. }
  8965. }
  8966. {
  8967. assign(store2, setupStore);
  8968. assign(vue.toRaw(store2), setupStore);
  8969. }
  8970. Object.defineProperty(store2, "$state", {
  8971. get: () => hot ? hotState.value : pinia2.state.value[$id],
  8972. set: (state) => {
  8973. if (hot) {
  8974. throw new Error("cannot set hotState");
  8975. }
  8976. $patch(($state) => {
  8977. assign($state, state);
  8978. });
  8979. }
  8980. });
  8981. {
  8982. store2._hotUpdate = vue.markRaw((newStore) => {
  8983. store2._hotUpdating = true;
  8984. newStore._hmrPayload.state.forEach((stateKey) => {
  8985. if (stateKey in store2.$state) {
  8986. const newStateTarget = newStore.$state[stateKey];
  8987. const oldStateSource = store2.$state[stateKey];
  8988. if (typeof newStateTarget === "object" && isPlainObject$1(newStateTarget) && isPlainObject$1(oldStateSource)) {
  8989. patchObject(newStateTarget, oldStateSource);
  8990. } else {
  8991. newStore.$state[stateKey] = oldStateSource;
  8992. }
  8993. }
  8994. set(store2, stateKey, vue.toRef(newStore.$state, stateKey));
  8995. });
  8996. Object.keys(store2.$state).forEach((stateKey) => {
  8997. if (!(stateKey in newStore.$state)) {
  8998. del(store2, stateKey);
  8999. }
  9000. });
  9001. isListening = false;
  9002. isSyncListening = false;
  9003. pinia2.state.value[$id] = vue.toRef(newStore._hmrPayload, "hotState");
  9004. isSyncListening = true;
  9005. vue.nextTick().then(() => {
  9006. isListening = true;
  9007. });
  9008. for (const actionName in newStore._hmrPayload.actions) {
  9009. const action = newStore[actionName];
  9010. set(store2, actionName, wrapAction(actionName, action));
  9011. }
  9012. for (const getterName in newStore._hmrPayload.getters) {
  9013. const getter = newStore._hmrPayload.getters[getterName];
  9014. const getterValue = isOptionsStore ? (
  9015. // special handling of options api
  9016. vue.computed(() => {
  9017. setActivePinia(pinia2);
  9018. return getter.call(store2, store2);
  9019. })
  9020. ) : getter;
  9021. set(store2, getterName, getterValue);
  9022. }
  9023. Object.keys(store2._hmrPayload.getters).forEach((key) => {
  9024. if (!(key in newStore._hmrPayload.getters)) {
  9025. del(store2, key);
  9026. }
  9027. });
  9028. Object.keys(store2._hmrPayload.actions).forEach((key) => {
  9029. if (!(key in newStore._hmrPayload.actions)) {
  9030. del(store2, key);
  9031. }
  9032. });
  9033. store2._hmrPayload = newStore._hmrPayload;
  9034. store2._getters = newStore._getters;
  9035. store2._hotUpdating = false;
  9036. });
  9037. }
  9038. if (USE_DEVTOOLS) {
  9039. const nonEnumerable = {
  9040. writable: true,
  9041. configurable: true,
  9042. // avoid warning on devtools trying to display this property
  9043. enumerable: false
  9044. };
  9045. ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((p) => {
  9046. Object.defineProperty(store2, p, assign({ value: store2[p] }, nonEnumerable));
  9047. });
  9048. }
  9049. pinia2._p.forEach((extender) => {
  9050. if (USE_DEVTOOLS) {
  9051. const extensions = scope.run(() => extender({
  9052. store: store2,
  9053. app: pinia2._a,
  9054. pinia: pinia2,
  9055. options: optionsForPlugin
  9056. }));
  9057. Object.keys(extensions || {}).forEach((key) => store2._customProperties.add(key));
  9058. assign(store2, extensions);
  9059. } else {
  9060. assign(store2, scope.run(() => extender({
  9061. store: store2,
  9062. app: pinia2._a,
  9063. pinia: pinia2,
  9064. options: optionsForPlugin
  9065. })));
  9066. }
  9067. });
  9068. if (store2.$state && typeof store2.$state === "object" && typeof store2.$state.constructor === "function" && !store2.$state.constructor.toString().includes("[native code]")) {
  9069. console.warn(`[🍍]: The "state" must be a plain object. It cannot be
  9070. state: () => new MyClass()
  9071. Found in store "${store2.$id}".`);
  9072. }
  9073. if (initialState && isOptionsStore && options.hydrate) {
  9074. options.hydrate(store2.$state, initialState);
  9075. }
  9076. isListening = true;
  9077. isSyncListening = true;
  9078. return store2;
  9079. }
  9080. function defineStore(idOrOptions, setup, setupOptions) {
  9081. let id;
  9082. let options;
  9083. const isSetupStore = typeof setup === "function";
  9084. if (typeof idOrOptions === "string") {
  9085. id = idOrOptions;
  9086. options = isSetupStore ? setupOptions : setup;
  9087. } else {
  9088. options = idOrOptions;
  9089. id = idOrOptions.id;
  9090. if (typeof id !== "string") {
  9091. throw new Error(`[🍍]: "defineStore()" must be passed a store id as its first argument.`);
  9092. }
  9093. }
  9094. function useStore2(pinia2, hot) {
  9095. const hasContext = vue.hasInjectionContext();
  9096. pinia2 = // in test mode, ignore the argument provided as we can always retrieve a
  9097. // pinia instance with getActivePinia()
  9098. pinia2 || (hasContext ? vue.inject(piniaSymbol, null) : null);
  9099. if (pinia2)
  9100. setActivePinia(pinia2);
  9101. if (!activePinia) {
  9102. throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
  9103. See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
  9104. This will fail in production.`);
  9105. }
  9106. pinia2 = activePinia;
  9107. if (!pinia2._s.has(id)) {
  9108. if (isSetupStore) {
  9109. createSetupStore(id, setup, options, pinia2);
  9110. } else {
  9111. createOptionsStore(id, options, pinia2);
  9112. }
  9113. {
  9114. useStore2._pinia = pinia2;
  9115. }
  9116. }
  9117. const store2 = pinia2._s.get(id);
  9118. if (hot) {
  9119. const hotId = "__hot:" + id;
  9120. const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia2, true) : createOptionsStore(hotId, assign({}, options), pinia2, true);
  9121. hot._hotUpdate(newStore);
  9122. delete pinia2.state.value[hotId];
  9123. pinia2._s.delete(hotId);
  9124. }
  9125. if (IS_CLIENT) {
  9126. const currentInstance = vue.getCurrentInstance();
  9127. if (currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement
  9128. !hot) {
  9129. const vm = currentInstance.proxy;
  9130. const cache = "_pStores" in vm ? vm._pStores : vm._pStores = {};
  9131. cache[id] = store2;
  9132. }
  9133. }
  9134. return store2;
  9135. }
  9136. useStore2.$id = id;
  9137. return useStore2;
  9138. }
  9139. const useStore = defineStore("user", {
  9140. state: () => ({
  9141. userInfo: {},
  9142. // 用户信息
  9143. token: "",
  9144. // uploadUrl: 'http://192.168.1.3:8080/ai-file/upload/oss', // 上传资源的服务器网址
  9145. uploadUrl: "https://gc.sdzcq.com/prod-api/ai-file/upload/oss"
  9146. // 上传资源的服务器网址
  9147. }),
  9148. getters: {},
  9149. actions: {
  9150. setUserInfo(data) {
  9151. if (data.userId) {
  9152. formatAppLog("log", "at store/uses.js:16", "更新全局的用户信息-也更新本地存储", data);
  9153. this.userInfo = data;
  9154. uni.setStorageSync("userInfo", data);
  9155. } else {
  9156. uni.removeStorageSync("userInfo");
  9157. }
  9158. },
  9159. setToken(token) {
  9160. if (token) {
  9161. formatAppLog("log", "at store/uses.js:25", "更新全局的 token -也更新本地存储", token);
  9162. this.token = token;
  9163. uni.setStorageSync("token", token);
  9164. } else {
  9165. uni.removeStorageSync("token");
  9166. }
  9167. }
  9168. }
  9169. });
  9170. const pinia = createPinia();
  9171. const store = useStore(pinia);
  9172. const _sfc_main$1L = {
  9173. __name: "index",
  9174. props: {
  9175. request: {
  9176. type: Function
  9177. },
  9178. requestStr: {
  9179. type: String
  9180. },
  9181. isRefresh: {
  9182. type: [Number, Boolean],
  9183. default: 0
  9184. },
  9185. height: {
  9186. type: [String, Number]
  9187. },
  9188. total: {
  9189. type: [Number],
  9190. default: 0
  9191. },
  9192. otherParams: {
  9193. type: Object,
  9194. default: () => ({})
  9195. },
  9196. diffHeight: {
  9197. type: Number,
  9198. default: 0
  9199. },
  9200. immediate: {
  9201. type: Boolean,
  9202. default: false
  9203. },
  9204. method: {
  9205. type: String,
  9206. default: "get"
  9207. },
  9208. isUpAutoLoad: {
  9209. type: Boolean,
  9210. default: true
  9211. }
  9212. },
  9213. emits: ["updateList", "update:total"],
  9214. setup(__props, { expose: __expose, emit: __emit }) {
  9215. const {
  9216. mescrollInit,
  9217. downCallback,
  9218. getMescroll
  9219. } = useMescroll();
  9220. const windowHeight = vue.computed(() => {
  9221. return store.clientHeight - props2.diffHeight;
  9222. });
  9223. const emit2 = __emit;
  9224. const props2 = __props;
  9225. const list = vue.ref([]);
  9226. const getList = (mescroll) => {
  9227. return new Promise((resolve, reject) => {
  9228. let params = {
  9229. pageNum: mescroll.num,
  9230. pageSize: mescroll.size,
  9231. ...props2.otherParams
  9232. };
  9233. let methods = props2.method == "post" ? uni.$u.http.post(props2.requestStr, params) : uni.$u.http.get(props2.requestStr, {
  9234. params
  9235. });
  9236. methods.then((res2) => {
  9237. emit2("update:total", res2.total);
  9238. resolve(res2);
  9239. });
  9240. });
  9241. };
  9242. const upCallback = (mescroll) => {
  9243. formatAppLog("log", "at components/pageScroll/index.vue:99", mescroll, "mescroll");
  9244. if (!props2.requestStr)
  9245. return;
  9246. getList(mescroll).then((res2) => {
  9247. const curPageData = res2.rows || res2.data || [];
  9248. if (mescroll.num == 1)
  9249. list.value = [];
  9250. list.value = list.value.concat(curPageData);
  9251. emit2("updateList", list.value, mescroll.num);
  9252. mescroll.endBySize(curPageData.length, res2.total);
  9253. }).catch(() => {
  9254. mescroll.endErr();
  9255. });
  9256. };
  9257. const resetUpScroll = () => {
  9258. setTimeout(() => {
  9259. getMescroll().resetUpScroll();
  9260. }, 100);
  9261. };
  9262. const scroll = (e) => {
  9263. emit2("scroll", e);
  9264. };
  9265. __expose({
  9266. resetUpScroll
  9267. });
  9268. 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() {
  9269. return onShow;
  9270. }, get useMescroll() {
  9271. return useMescroll;
  9272. }, get store() {
  9273. return store;
  9274. } };
  9275. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  9276. return __returned__;
  9277. }
  9278. };
  9279. function _sfc_render$1K(_ctx, _cache, $props, $setup, $data, $options) {
  9280. const _component_mescroll_uni = resolveEasycom(vue.resolveDynamicComponent("mescroll-uni"), __easycom_0$a);
  9281. return vue.openBlock(), vue.createBlock(_component_mescroll_uni, {
  9282. onInit: $setup.mescrollInit,
  9283. onDown: $setup.downCallback,
  9284. onUp: $setup.upCallback,
  9285. height: $props.height || $setup.windowHeight + "px",
  9286. up: { textNoMore: "-- 没有更多了 --", auto: $props.isUpAutoLoad },
  9287. down: { auto: $props.isUpAutoLoad }
  9288. }, {
  9289. default: vue.withCtx(() => [
  9290. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  9291. ]),
  9292. _: 3
  9293. /* FORWARDED */
  9294. }, 8, ["onInit", "onDown", "height", "up", "down"]);
  9295. }
  9296. const PageScroll = /* @__PURE__ */ _export_sfc(_sfc_main$1L, [["render", _sfc_render$1K], ["__scopeId", "data-v-30bc23e1"], ["__file", "E:/书嗨项目/shuhi-app-fornt/components/pageScroll/index.vue"]]);
  9297. const _sfc_main$1K = {
  9298. __name: "index",
  9299. setup(__props, { expose: __expose }) {
  9300. __expose();
  9301. const statusList = vue.ref([
  9302. {
  9303. label: "待初审",
  9304. value: "1361",
  9305. path: "/pages/order/stat/pending-review"
  9306. },
  9307. {
  9308. label: "待拣件",
  9309. value: "1361",
  9310. path: "/pages/order/stat/pending-pick"
  9311. },
  9312. {
  9313. label: "已拣件待签收",
  9314. value: "1361",
  9315. path: "/pages/order/stat/pending-sign"
  9316. },
  9317. {
  9318. label: "待确认收货",
  9319. value: "1361",
  9320. path: "/pages/order/stat/pending-confirm"
  9321. },
  9322. {
  9323. label: "已到货待审核",
  9324. value: "1361",
  9325. path: "/pages/order/stat/pending-audit"
  9326. },
  9327. {
  9328. label: "待付款",
  9329. value: "1361",
  9330. path: "/pages/order/stat/pending-payment"
  9331. }
  9332. ]);
  9333. const navigateToDetail = (path) => {
  9334. uni.navigateTo({
  9335. url: path
  9336. });
  9337. };
  9338. const __returned__ = { statusList, navigateToDetail, PageScroll, ref: vue.ref };
  9339. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  9340. return __returned__;
  9341. }
  9342. };
  9343. function _sfc_render$1J(_ctx, _cache, $props, $setup, $data, $options) {
  9344. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  9345. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$6);
  9346. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$5);
  9347. return vue.openBlock(), vue.createElementBlock("view", { class: "order-statistics" }, [
  9348. vue.createCommentVNode(" 顶部统计卡片 "),
  9349. vue.createElementVNode("view", { class: "overview-card" }, [
  9350. vue.createElementVNode("view", { class: "overview-grid" }, [
  9351. vue.createElementVNode("view", { class: "grid-item" }, [
  9352. vue.createElementVNode("text", { class: "item-label" }, "今日订单"),
  9353. vue.createElementVNode("text", { class: "item-value" }, "1361")
  9354. ]),
  9355. vue.createElementVNode("view", { class: "grid-item" }, [
  9356. vue.createElementVNode("text", { class: "item-label" }, "昨日订单"),
  9357. vue.createElementVNode("text", { class: "item-value" }, "1361")
  9358. ]),
  9359. vue.createElementVNode("view", { class: "grid-item" }, [
  9360. vue.createElementVNode("text", { class: "item-label" }, "本月订单"),
  9361. vue.createElementVNode("text", { class: "item-value" }, [
  9362. vue.createTextVNode("2.77"),
  9363. vue.createElementVNode("text", { class: "unit" }, "万")
  9364. ])
  9365. ])
  9366. ])
  9367. ]),
  9368. vue.createCommentVNode(" 订单状态网格 "),
  9369. vue.createElementVNode("view", { class: "status-grid" }, [
  9370. (vue.openBlock(true), vue.createElementBlock(
  9371. vue.Fragment,
  9372. null,
  9373. vue.renderList($setup.statusList, (item, index2) => {
  9374. return vue.openBlock(), vue.createElementBlock("view", {
  9375. key: index2,
  9376. class: "status-item",
  9377. onClick: ($event) => $setup.navigateToDetail(item.path)
  9378. }, [
  9379. vue.createElementVNode("view", { class: "status-content" }, [
  9380. vue.createElementVNode(
  9381. "text",
  9382. { class: "status-label" },
  9383. vue.toDisplayString(item.label),
  9384. 1
  9385. /* TEXT */
  9386. ),
  9387. vue.createElementVNode("view", { class: "status-value-wrap" }, [
  9388. vue.createElementVNode(
  9389. "text",
  9390. { class: "status-value" },
  9391. vue.toDisplayString(item.value),
  9392. 1
  9393. /* TEXT */
  9394. ),
  9395. vue.createVNode(_component_u_icon, {
  9396. name: "arrow-right",
  9397. color: "#999",
  9398. size: "14"
  9399. })
  9400. ])
  9401. ])
  9402. ], 8, ["onClick"]);
  9403. }),
  9404. 128
  9405. /* KEYED_FRAGMENT */
  9406. ))
  9407. ]),
  9408. vue.createCommentVNode(" 底部操作项 "),
  9409. vue.createElementVNode("view", { class: "bottom-actions" }, [
  9410. vue.createVNode(_component_u_cell_group, { border: false }, {
  9411. default: vue.withCtx(() => [
  9412. vue.createVNode(_component_u_cell, {
  9413. title: "收货统计",
  9414. isLink: "",
  9415. onClick: _cache[0] || (_cache[0] = ($event) => $setup.navigateToDetail("/pages/statistics/receive"))
  9416. }),
  9417. vue.createVNode(_component_u_cell, {
  9418. title: "全部订单",
  9419. isLink: "",
  9420. onClick: _cache[1] || (_cache[1] = ($event) => $setup.navigateToDetail("/pages/order/stat/all")),
  9421. border: false
  9422. })
  9423. ]),
  9424. _: 1
  9425. /* STABLE */
  9426. })
  9427. ])
  9428. ]);
  9429. }
  9430. const PagesOrderIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1K, [["render", _sfc_render$1J], ["__scopeId", "data-v-17a44f9d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/index.vue"]]);
  9431. const props$r = {
  9432. props: {
  9433. // 搜索框形状,round-圆形,square-方形
  9434. shape: {
  9435. type: String,
  9436. default: props$E.search.shape
  9437. },
  9438. // 搜索框背景色,默认值#f2f2f2
  9439. bgColor: {
  9440. type: String,
  9441. default: props$E.search.bgColor
  9442. },
  9443. // 占位提示文字
  9444. placeholder: {
  9445. type: String,
  9446. default: props$E.search.placeholder
  9447. },
  9448. // 是否启用清除控件
  9449. clearabled: {
  9450. type: Boolean,
  9451. default: props$E.search.clearabled
  9452. },
  9453. // 是否自动聚焦
  9454. focus: {
  9455. type: Boolean,
  9456. default: props$E.search.focus
  9457. },
  9458. // 是否在搜索框右侧显示取消按钮
  9459. showAction: {
  9460. type: Boolean,
  9461. default: props$E.search.showAction
  9462. },
  9463. // 右边控件的样式
  9464. actionStyle: {
  9465. type: Object,
  9466. default: props$E.search.actionStyle
  9467. },
  9468. // 取消按钮文字
  9469. actionText: {
  9470. type: String,
  9471. default: props$E.search.actionText
  9472. },
  9473. // 输入框内容对齐方式,可选值为 left|center|right
  9474. inputAlign: {
  9475. type: String,
  9476. default: props$E.search.inputAlign
  9477. },
  9478. // input输入框的样式,可以定义文字颜色,大小等,对象形式
  9479. inputStyle: {
  9480. type: Object,
  9481. default: props$E.search.inputStyle
  9482. },
  9483. // 是否启用输入框
  9484. disabled: {
  9485. type: Boolean,
  9486. default: props$E.search.disabled
  9487. },
  9488. // 边框颜色
  9489. borderColor: {
  9490. type: String,
  9491. default: props$E.search.borderColor
  9492. },
  9493. // 搜索图标的颜色,默认同输入框字体颜色
  9494. searchIconColor: {
  9495. type: String,
  9496. default: props$E.search.searchIconColor
  9497. },
  9498. // 输入框字体颜色
  9499. color: {
  9500. type: String,
  9501. default: props$E.search.color
  9502. },
  9503. // placeholder的颜色
  9504. placeholderColor: {
  9505. type: String,
  9506. default: props$E.search.placeholderColor
  9507. },
  9508. // 左边输入框的图标,可以为uView图标名称或图片路径
  9509. searchIcon: {
  9510. type: String,
  9511. default: props$E.search.searchIcon
  9512. },
  9513. searchIconSize: {
  9514. type: [Number, String],
  9515. default: props$E.search.searchIconSize
  9516. },
  9517. // 组件与其他上下左右元素之间的距离,带单位的字符串形式,如"30px"、"30px 20px"等写法
  9518. margin: {
  9519. type: String,
  9520. default: props$E.search.margin
  9521. },
  9522. // 开启showAction时,是否在input获取焦点时才显示
  9523. animation: {
  9524. type: Boolean,
  9525. default: props$E.search.animation
  9526. },
  9527. // 输入框的初始化内容
  9528. modelValue: {
  9529. type: String,
  9530. default: props$E.search.value
  9531. },
  9532. value: {
  9533. type: String,
  9534. default: props$E.search.value
  9535. },
  9536. // 输入框最大能输入的长度,-1为不限制长度(来自uniapp文档)
  9537. maxlength: {
  9538. type: [String, Number],
  9539. default: props$E.search.maxlength
  9540. },
  9541. // 搜索框高度,单位px
  9542. height: {
  9543. type: [String, Number],
  9544. default: props$E.search.height
  9545. },
  9546. // 搜索框左侧文本
  9547. label: {
  9548. type: [String, Number, null],
  9549. default: props$E.search.label
  9550. }
  9551. }
  9552. };
  9553. const _sfc_main$1J = {
  9554. name: "u-search",
  9555. mixins: [mpMixin, mixin, props$r],
  9556. data() {
  9557. return {
  9558. keyword: "",
  9559. showClear: false,
  9560. // 是否显示右边的清除图标
  9561. show: false,
  9562. // 标记input当前状态是否处于聚焦中,如果是,才会显示右侧的清除控件
  9563. focused: this.focus
  9564. // 绑定输入框的值
  9565. // inputValue: this.value
  9566. };
  9567. },
  9568. watch: {
  9569. keyword(nVal) {
  9570. this.$emit("update:modelValue", nVal);
  9571. this.$emit("change", nVal);
  9572. },
  9573. modelValue: {
  9574. immediate: true,
  9575. handler(nVal) {
  9576. this.keyword = nVal;
  9577. }
  9578. }
  9579. },
  9580. computed: {
  9581. showActionBtn() {
  9582. return !this.animation && this.showAction;
  9583. }
  9584. },
  9585. emits: ["clear", "search", "custom", "focus", "blur", "click", "clickIcon", "update:modelValue", "change"],
  9586. methods: {
  9587. // 目前HX2.6.9 v-model双向绑定无效,故监听input事件获取输入框内容的变化
  9588. inputChange(e) {
  9589. this.keyword = e.detail.value;
  9590. },
  9591. // 清空输入
  9592. // 也可以作为用户通过this.$refs形式调用清空输入框内容
  9593. clear() {
  9594. this.keyword = "";
  9595. this.$nextTick(() => {
  9596. this.$emit("clear");
  9597. });
  9598. },
  9599. // 确定搜索
  9600. search(e) {
  9601. this.$emit("search", e.detail.value);
  9602. try {
  9603. uni.hideKeyboard();
  9604. } catch (e2) {
  9605. }
  9606. },
  9607. // 点击右边自定义按钮的事件
  9608. custom() {
  9609. this.$emit("custom", this.keyword);
  9610. try {
  9611. uni.hideKeyboard();
  9612. } catch (e) {
  9613. }
  9614. },
  9615. // 获取焦点
  9616. getFocus() {
  9617. this.focused = true;
  9618. if (this.animation && this.showAction)
  9619. this.show = true;
  9620. this.$emit("focus", this.keyword);
  9621. },
  9622. // 失去焦点
  9623. blur() {
  9624. setTimeout(() => {
  9625. this.focused = false;
  9626. }, 100);
  9627. this.show = false;
  9628. this.$emit("blur", this.keyword);
  9629. },
  9630. // 点击搜索框,只有disabled=true时才发出事件,因为禁止了输入,意味着是想跳转真正的搜索页
  9631. clickHandler() {
  9632. if (this.disabled)
  9633. this.$emit("click");
  9634. },
  9635. // 点击左边图标
  9636. clickIcon() {
  9637. this.$emit("clickIcon");
  9638. }
  9639. }
  9640. };
  9641. function _sfc_render$1I(_ctx, _cache, $props, $setup, $data, $options) {
  9642. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  9643. return vue.openBlock(), vue.createElementBlock(
  9644. "view",
  9645. {
  9646. class: "u-search",
  9647. onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args)),
  9648. style: vue.normalizeStyle([{
  9649. margin: _ctx.margin
  9650. }, _ctx.$u.addStyle(_ctx.customStyle)])
  9651. },
  9652. [
  9653. vue.createElementVNode(
  9654. "view",
  9655. {
  9656. class: "u-search__content",
  9657. style: vue.normalizeStyle({
  9658. backgroundColor: _ctx.bgColor,
  9659. borderRadius: _ctx.shape == "round" ? "100px" : "4px",
  9660. borderColor: _ctx.borderColor
  9661. })
  9662. },
  9663. [
  9664. _ctx.$slots.label || _ctx.label !== null ? vue.renderSlot(_ctx.$slots, "label", { key: 0 }, () => [
  9665. vue.createElementVNode(
  9666. "text",
  9667. { class: "u-search__content__label" },
  9668. vue.toDisplayString(_ctx.label),
  9669. 1
  9670. /* TEXT */
  9671. )
  9672. ], true) : vue.createCommentVNode("v-if", true),
  9673. vue.createElementVNode("view", { class: "u-search__content__icon" }, [
  9674. vue.createVNode(_component_u_icon, {
  9675. onClick: $options.clickIcon,
  9676. size: _ctx.searchIconSize,
  9677. name: _ctx.searchIcon,
  9678. color: _ctx.searchIconColor ? _ctx.searchIconColor : _ctx.color
  9679. }, null, 8, ["onClick", "size", "name", "color"])
  9680. ]),
  9681. vue.createElementVNode("input", {
  9682. "confirm-type": "search",
  9683. onBlur: _cache[0] || (_cache[0] = (...args) => $options.blur && $options.blur(...args)),
  9684. value: $data.keyword,
  9685. onConfirm: _cache[1] || (_cache[1] = (...args) => $options.search && $options.search(...args)),
  9686. onInput: _cache[2] || (_cache[2] = (...args) => $options.inputChange && $options.inputChange(...args)),
  9687. disabled: _ctx.disabled,
  9688. onFocus: _cache[3] || (_cache[3] = (...args) => $options.getFocus && $options.getFocus(...args)),
  9689. focus: _ctx.focus,
  9690. maxlength: _ctx.maxlength,
  9691. "placeholder-class": "u-search__content__input--placeholder",
  9692. placeholder: _ctx.placeholder,
  9693. "placeholder-style": `color: ${_ctx.placeholderColor}`,
  9694. class: "u-search__content__input",
  9695. type: "text",
  9696. style: vue.normalizeStyle([{
  9697. textAlign: _ctx.inputAlign,
  9698. color: _ctx.color,
  9699. backgroundColor: _ctx.bgColor,
  9700. height: _ctx.$u.addUnit(_ctx.height)
  9701. }, _ctx.inputStyle])
  9702. }, null, 44, ["value", "disabled", "focus", "maxlength", "placeholder", "placeholder-style"]),
  9703. $data.keyword && _ctx.clearabled && $data.focused ? (vue.openBlock(), vue.createElementBlock("view", {
  9704. key: 1,
  9705. class: "u-search__content__icon u-search__content__close",
  9706. onClick: _cache[4] || (_cache[4] = (...args) => $options.clear && $options.clear(...args))
  9707. }, [
  9708. vue.createVNode(_component_u_icon, {
  9709. name: "close",
  9710. size: "11",
  9711. color: "#ffffff",
  9712. customStyle: "line-height: 12px"
  9713. })
  9714. ])) : vue.createCommentVNode("v-if", true)
  9715. ],
  9716. 4
  9717. /* STYLE */
  9718. ),
  9719. vue.createElementVNode(
  9720. "text",
  9721. {
  9722. style: vue.normalizeStyle([_ctx.actionStyle]),
  9723. class: vue.normalizeClass(["u-search__action", [($options.showActionBtn || $data.show) && "u-search__action--active"]]),
  9724. onClick: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.custom && $options.custom(...args), ["stop", "prevent"]))
  9725. },
  9726. vue.toDisplayString(_ctx.actionText),
  9727. 7
  9728. /* TEXT, CLASS, STYLE */
  9729. )
  9730. ],
  9731. 4
  9732. /* STYLE */
  9733. );
  9734. }
  9735. const __easycom_4$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1J, [["render", _sfc_render$1I], ["__scopeId", "data-v-e082a34a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-search/u-search.vue"]]);
  9736. function pickExclude(obj, keys) {
  9737. if (!["[object Object]", "[object File]"].includes(Object.prototype.toString.call(obj))) {
  9738. return {};
  9739. }
  9740. return Object.keys(obj).reduce((prev, key) => {
  9741. if (!keys.includes(key)) {
  9742. prev[key] = obj[key];
  9743. }
  9744. return prev;
  9745. }, {});
  9746. }
  9747. function formatImage(res2) {
  9748. return res2.tempFiles.map((item) => ({
  9749. ...pickExclude(item, ["path"]),
  9750. type: "image",
  9751. url: item.path,
  9752. thumb: item.path,
  9753. size: item.size
  9754. }));
  9755. }
  9756. function formatVideo(res2) {
  9757. return [
  9758. {
  9759. ...pickExclude(res2, ["tempFilePath", "thumbTempFilePath", "errMsg"]),
  9760. type: "video",
  9761. url: res2.tempFilePath,
  9762. thumb: res2.thumbTempFilePath,
  9763. size: res2.size
  9764. }
  9765. ];
  9766. }
  9767. function chooseFile({
  9768. accept,
  9769. multiple,
  9770. capture,
  9771. compressed,
  9772. maxDuration,
  9773. sizeType,
  9774. camera,
  9775. maxCount
  9776. }) {
  9777. return new Promise((resolve, reject) => {
  9778. switch (accept) {
  9779. case "image":
  9780. uni.chooseImage({
  9781. count: multiple ? Math.min(maxCount, 9) : 1,
  9782. sourceType: capture,
  9783. sizeType,
  9784. success: (res2) => resolve(formatImage(res2)),
  9785. fail: reject
  9786. });
  9787. break;
  9788. case "video":
  9789. uni.chooseVideo({
  9790. sourceType: capture,
  9791. compressed,
  9792. maxDuration,
  9793. camera,
  9794. success: (res2) => resolve(formatVideo(res2)),
  9795. fail: reject
  9796. });
  9797. break;
  9798. }
  9799. });
  9800. }
  9801. const mixinUp = {
  9802. watch: {
  9803. // 监听accept的变化,判断是否符合个平台要求
  9804. // 只有微信小程序才支持选择媒体,文件类型,所以这里做一个判断提示
  9805. accept: {
  9806. immediate: true,
  9807. handler(val) {
  9808. if (val === "all" || val === "media") {
  9809. uni.$u.error("只有微信小程序才支持把accept配置为all、media之一");
  9810. }
  9811. if (val === "file") {
  9812. uni.$u.error("只有微信小程序和H5(HX2.9.9)才支持把accept配置为file");
  9813. }
  9814. }
  9815. }
  9816. }
  9817. };
  9818. const props$q = {
  9819. props: {
  9820. // 接受的文件类型, 可选值为all media image file video
  9821. accept: {
  9822. type: String,
  9823. default: props$E.upload.accept
  9824. },
  9825. // 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头
  9826. capture: {
  9827. type: [String, Array],
  9828. default: props$E.upload.capture
  9829. },
  9830. // 当accept为video时生效,是否压缩视频,默认为true
  9831. compressed: {
  9832. type: Boolean,
  9833. default: props$E.upload.compressed
  9834. },
  9835. // 当accept为video时生效,可选值为back或front
  9836. camera: {
  9837. type: String,
  9838. default: props$E.upload.camera
  9839. },
  9840. // 当accept为video时生效,拍摄视频最长拍摄时间,单位秒
  9841. maxDuration: {
  9842. type: Number,
  9843. default: props$E.upload.maxDuration
  9844. },
  9845. // 上传区域的图标,只能内置图标
  9846. uploadIcon: {
  9847. type: String,
  9848. default: props$E.upload.uploadIcon
  9849. },
  9850. // 上传区域的图标的颜色,默认
  9851. uploadIconColor: {
  9852. type: String,
  9853. default: props$E.upload.uploadIconColor
  9854. },
  9855. // 是否开启文件读取前事件
  9856. useBeforeRead: {
  9857. type: Boolean,
  9858. default: props$E.upload.useBeforeRead
  9859. },
  9860. // 读取后的处理函数
  9861. afterRead: {
  9862. type: Function,
  9863. default: null
  9864. },
  9865. // 读取前的处理函数
  9866. beforeRead: {
  9867. type: Function,
  9868. default: null
  9869. },
  9870. // 是否显示组件自带的图片预览功能
  9871. previewFullImage: {
  9872. type: Boolean,
  9873. default: props$E.upload.previewFullImage
  9874. },
  9875. // 最大上传数量
  9876. maxCount: {
  9877. type: [String, Number],
  9878. default: props$E.upload.maxCount
  9879. },
  9880. // 是否启用
  9881. disabled: {
  9882. type: Boolean,
  9883. default: props$E.upload.disabled
  9884. },
  9885. // 预览上传的图片时的裁剪模式,和image组件mode属性一致
  9886. imageMode: {
  9887. type: String,
  9888. default: props$E.upload.imageMode
  9889. },
  9890. // 标识符,可以在回调函数的第二项参数中获取
  9891. name: {
  9892. type: String,
  9893. default: props$E.upload.name
  9894. },
  9895. // 所选的图片的尺寸, 可选值为original compressed
  9896. sizeType: {
  9897. type: Array,
  9898. default: props$E.upload.sizeType
  9899. },
  9900. // 是否开启图片多选,部分安卓机型不支持
  9901. multiple: {
  9902. type: Boolean,
  9903. default: props$E.upload.multiple
  9904. },
  9905. // 是否展示删除按钮
  9906. deletable: {
  9907. type: Boolean,
  9908. default: props$E.upload.deletable
  9909. },
  9910. // 文件大小限制,单位为byte
  9911. maxSize: {
  9912. type: [String, Number],
  9913. default: props$E.upload.maxSize
  9914. },
  9915. // 显示已上传的文件列表
  9916. fileList: {
  9917. type: Array,
  9918. default: props$E.upload.fileList
  9919. },
  9920. // 上传区域的提示文字
  9921. uploadText: {
  9922. type: String,
  9923. default: props$E.upload.uploadText
  9924. },
  9925. // 内部预览图片区域和选择图片按钮的区域宽度
  9926. width: {
  9927. type: [String, Number],
  9928. default: props$E.upload.width
  9929. },
  9930. // 内部预览图片区域和选择图片按钮的区域高度
  9931. height: {
  9932. type: [String, Number],
  9933. default: props$E.upload.height
  9934. },
  9935. // 是否在上传完成后展示预览图
  9936. previewImage: {
  9937. type: Boolean,
  9938. default: props$E.upload.previewImage
  9939. }
  9940. }
  9941. };
  9942. const _sfc_main$1I = {
  9943. name: "u-upload",
  9944. mixins: [mpMixin, mixin, mixinUp, props$q],
  9945. data() {
  9946. return {
  9947. lists: [],
  9948. isInCount: true
  9949. };
  9950. },
  9951. watch: {
  9952. // 监听文件列表的变化,重新整理内部数据
  9953. fileList: {
  9954. immediate: true,
  9955. handler() {
  9956. this.formatFileList();
  9957. },
  9958. immediate: true,
  9959. deep: true
  9960. }
  9961. },
  9962. emits: ["error", "beforeRead", "oversize", "afterRead", "delete", "clickPreview"],
  9963. methods: {
  9964. formatFileList() {
  9965. const {
  9966. fileList = [],
  9967. maxCount
  9968. } = this;
  9969. const lists = fileList.map(
  9970. (item) => Object.assign(Object.assign({}, item), {
  9971. // 如果item.url为本地选择的blob文件的话,无法判断其为video还是image,此处优先通过accept做判断处理
  9972. isImage: this.accept === "image" || uni.$u.test.image(item.url || item.thumb),
  9973. isVideo: this.accept === "video" || uni.$u.test.video(item.url || item.thumb),
  9974. deletable: typeof item.deletable === "boolean" ? item.deletable : this.deletable
  9975. })
  9976. );
  9977. this.lists = lists;
  9978. this.isInCount = lists.length < maxCount;
  9979. },
  9980. chooseFile() {
  9981. const {
  9982. maxCount,
  9983. multiple,
  9984. lists,
  9985. disabled
  9986. } = this;
  9987. if (disabled)
  9988. return;
  9989. let capture;
  9990. try {
  9991. capture = uni.$u.test.array(this.capture) ? this.capture : this.capture.split(",");
  9992. } catch (e) {
  9993. capture = [];
  9994. }
  9995. chooseFile(
  9996. Object.assign({
  9997. accept: this.accept,
  9998. multiple: this.multiple,
  9999. capture,
  10000. compressed: this.compressed,
  10001. maxDuration: this.maxDuration,
  10002. sizeType: this.sizeType,
  10003. camera: this.camera
  10004. }, {
  10005. maxCount: maxCount - lists.length
  10006. })
  10007. ).then((res2) => {
  10008. this.onBeforeRead(multiple ? res2 : res2[0]);
  10009. }).catch((error2) => {
  10010. this.$emit("error", error2);
  10011. });
  10012. },
  10013. // 文件读取之前
  10014. onBeforeRead(file) {
  10015. const {
  10016. beforeRead,
  10017. useBeforeRead
  10018. } = this;
  10019. let res2 = true;
  10020. if (uni.$u.test.func(beforeRead)) {
  10021. res2 = beforeRead(file, this.getDetail());
  10022. }
  10023. if (useBeforeRead) {
  10024. res2 = new Promise((resolve, reject) => {
  10025. this.$emit(
  10026. "beforeRead",
  10027. Object.assign(Object.assign({
  10028. file
  10029. }, this.getDetail()), {
  10030. callback: (ok) => {
  10031. ok ? resolve() : reject();
  10032. }
  10033. })
  10034. );
  10035. });
  10036. }
  10037. if (!res2) {
  10038. return;
  10039. }
  10040. if (uni.$u.test.promise(res2)) {
  10041. res2.then((data) => this.onAfterRead(data || file));
  10042. } else {
  10043. this.onAfterRead(file);
  10044. }
  10045. },
  10046. getDetail(index2) {
  10047. return {
  10048. name: this.name,
  10049. index: index2 == null ? this.fileList.length : index2
  10050. };
  10051. },
  10052. onAfterRead(file) {
  10053. const {
  10054. maxSize,
  10055. afterRead
  10056. } = this;
  10057. const oversize = Array.isArray(file) ? file.some((item) => item.size > maxSize) : file.size > maxSize;
  10058. if (oversize) {
  10059. this.$emit("oversize", Object.assign({
  10060. file
  10061. }, this.getDetail()));
  10062. return;
  10063. }
  10064. if (typeof afterRead === "function") {
  10065. afterRead(file, this.getDetail());
  10066. }
  10067. this.$emit("afterRead", Object.assign({
  10068. file
  10069. }, this.getDetail()));
  10070. },
  10071. deleteItem(index2) {
  10072. this.$emit(
  10073. "delete",
  10074. Object.assign(Object.assign({}, this.getDetail(index2)), {
  10075. file: this.fileList[index2]
  10076. })
  10077. );
  10078. },
  10079. // 预览图片
  10080. onPreviewImage(item) {
  10081. if (!item.isImage || !this.previewFullImage)
  10082. return;
  10083. uni.previewImage({
  10084. // 先filter找出为图片的item,再返回filter结果中的图片url
  10085. urls: this.lists.filter((item2) => this.accept === "image" || uni.$u.test.image(item2.url || item2.thumb)).map((item2) => item2.url || item2.thumb),
  10086. current: item.url || item.thumb,
  10087. fail() {
  10088. uni.$u.toast("预览图片失败");
  10089. }
  10090. });
  10091. },
  10092. onPreviewVideo(event) {
  10093. if (!this.data.previewFullImage)
  10094. return;
  10095. const {
  10096. index: index2
  10097. } = event.currentTarget.dataset;
  10098. const {
  10099. lists
  10100. } = this.data;
  10101. wx.previewMedia({
  10102. sources: lists.filter((item) => isVideoFile(item)).map(
  10103. (item) => Object.assign(Object.assign({}, item), {
  10104. type: "video"
  10105. })
  10106. ),
  10107. current: index2,
  10108. fail() {
  10109. uni.$u.toast("预览视频失败");
  10110. }
  10111. });
  10112. },
  10113. onClickPreview(event) {
  10114. const {
  10115. index: index2
  10116. } = event.currentTarget.dataset;
  10117. const item = this.data.lists[index2];
  10118. this.$emit(
  10119. "clickPreview",
  10120. Object.assign(Object.assign({}, item), this.getDetail(index2))
  10121. );
  10122. }
  10123. }
  10124. };
  10125. function _sfc_render$1H(_ctx, _cache, $props, $setup, $data, $options) {
  10126. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  10127. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  10128. return vue.openBlock(), vue.createElementBlock(
  10129. "view",
  10130. {
  10131. class: "u-upload",
  10132. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  10133. },
  10134. [
  10135. vue.createElementVNode("view", { class: "u-upload__wrap" }, [
  10136. _ctx.previewImage ? (vue.openBlock(true), vue.createElementBlock(
  10137. vue.Fragment,
  10138. { key: 0 },
  10139. vue.renderList($data.lists, (item, index2) => {
  10140. return vue.openBlock(), vue.createElementBlock("view", {
  10141. class: "u-upload__wrap__preview",
  10142. key: index2
  10143. }, [
  10144. item.isImage || item.type && item.type === "image" ? (vue.openBlock(), vue.createElementBlock("image", {
  10145. key: 0,
  10146. src: item.thumb || item.url,
  10147. mode: _ctx.imageMode,
  10148. class: "u-upload__wrap__preview__image",
  10149. onClick: ($event) => $options.onPreviewImage(item),
  10150. style: vue.normalizeStyle([{
  10151. width: _ctx.$u.addUnit(_ctx.width),
  10152. height: _ctx.$u.addUnit(_ctx.height)
  10153. }])
  10154. }, null, 12, ["src", "mode", "onClick"])) : (vue.openBlock(), vue.createElementBlock("view", {
  10155. key: 1,
  10156. class: "u-upload__wrap__preview__other"
  10157. }, [
  10158. vue.createVNode(_component_u_icon, {
  10159. color: "#80CBF9",
  10160. size: "26",
  10161. name: item.isVideo || item.type && item.type === "video" ? "movie" : "folder"
  10162. }, null, 8, ["name"]),
  10163. vue.createElementVNode(
  10164. "text",
  10165. { class: "u-upload__wrap__preview__other__text" },
  10166. vue.toDisplayString(item.isVideo || item.type && item.type === "video" ? "视频" : "文件"),
  10167. 1
  10168. /* TEXT */
  10169. )
  10170. ])),
  10171. item.status === "uploading" || item.status === "failed" ? (vue.openBlock(), vue.createElementBlock("view", {
  10172. key: 2,
  10173. class: "u-upload__status"
  10174. }, [
  10175. vue.createElementVNode("view", { class: "u-upload__status__icon" }, [
  10176. item.status === "failed" ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  10177. key: 0,
  10178. name: "close-circle",
  10179. color: "#ffffff",
  10180. size: "25"
  10181. })) : (vue.openBlock(), vue.createBlock(_component_u_loading_icon, {
  10182. key: 1,
  10183. size: "22",
  10184. mode: "circle",
  10185. color: "#ffffff"
  10186. }))
  10187. ]),
  10188. item.message ? (vue.openBlock(), vue.createElementBlock(
  10189. "text",
  10190. {
  10191. key: 0,
  10192. class: "u-upload__status__message"
  10193. },
  10194. vue.toDisplayString(item.message),
  10195. 1
  10196. /* TEXT */
  10197. )) : vue.createCommentVNode("v-if", true)
  10198. ])) : vue.createCommentVNode("v-if", true),
  10199. item.status !== "uploading" && (_ctx.deletable || item.deletable) ? (vue.openBlock(), vue.createElementBlock("view", {
  10200. key: 3,
  10201. class: "u-upload__deletable",
  10202. onClick: vue.withModifiers(($event) => $options.deleteItem(index2), ["stop"])
  10203. }, [
  10204. vue.createElementVNode("view", { class: "u-upload__deletable__icon" }, [
  10205. vue.createVNode(_component_u_icon, {
  10206. name: "close",
  10207. color: "#ffffff",
  10208. size: "10"
  10209. })
  10210. ])
  10211. ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  10212. item.status === "success" ? (vue.openBlock(), vue.createElementBlock("view", {
  10213. key: 4,
  10214. class: "u-upload__success"
  10215. }, [
  10216. vue.createElementVNode("view", { class: "u-upload__success__icon" }, [
  10217. vue.createVNode(_component_u_icon, {
  10218. name: "checkmark",
  10219. color: "#ffffff",
  10220. size: "12"
  10221. })
  10222. ])
  10223. ])) : vue.createCommentVNode("v-if", true)
  10224. ]);
  10225. }),
  10226. 128
  10227. /* KEYED_FRAGMENT */
  10228. )) : vue.createCommentVNode("v-if", true),
  10229. $data.isInCount ? (vue.openBlock(), vue.createElementBlock(
  10230. vue.Fragment,
  10231. { key: 1 },
  10232. [
  10233. _ctx.$slots.default || _ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock("view", {
  10234. key: 0,
  10235. onClick: _cache[0] || (_cache[0] = (...args) => $options.chooseFile && $options.chooseFile(...args))
  10236. }, [
  10237. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  10238. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  10239. key: 1,
  10240. class: vue.normalizeClass(["u-upload__button", [_ctx.disabled && "u-upload__button--disabled"]]),
  10241. "hover-class": !_ctx.disabled ? "u-upload__button--hover" : "",
  10242. "hover-stay-time": "150",
  10243. onClick: _cache[1] || (_cache[1] = (...args) => $options.chooseFile && $options.chooseFile(...args)),
  10244. style: vue.normalizeStyle([{
  10245. width: _ctx.$u.addUnit(_ctx.width),
  10246. height: _ctx.$u.addUnit(_ctx.height)
  10247. }])
  10248. }, [
  10249. vue.createVNode(_component_u_icon, {
  10250. name: _ctx.uploadIcon,
  10251. size: "26",
  10252. color: _ctx.uploadIconColor
  10253. }, null, 8, ["name", "color"]),
  10254. _ctx.uploadText ? (vue.openBlock(), vue.createElementBlock(
  10255. "text",
  10256. {
  10257. key: 0,
  10258. class: "u-upload__button__text"
  10259. },
  10260. vue.toDisplayString(_ctx.uploadText),
  10261. 1
  10262. /* TEXT */
  10263. )) : vue.createCommentVNode("v-if", true)
  10264. ], 14, ["hover-class"]))
  10265. ],
  10266. 64
  10267. /* STABLE_FRAGMENT */
  10268. )) : vue.createCommentVNode("v-if", true)
  10269. ])
  10270. ],
  10271. 4
  10272. /* STYLE */
  10273. );
  10274. }
  10275. const __easycom_0$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1I, [["render", _sfc_render$1H], ["__scopeId", "data-v-c8491d64"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-upload/u-upload.vue"]]);
  10276. const props$p = {
  10277. props: {
  10278. // 是否展示组件
  10279. show: {
  10280. type: Boolean,
  10281. default: props$E.transition.show
  10282. },
  10283. // 使用的动画模式
  10284. mode: {
  10285. type: String,
  10286. default: props$E.transition.mode
  10287. },
  10288. // 动画的执行时间,单位ms
  10289. duration: {
  10290. type: [String, Number],
  10291. default: props$E.transition.duration
  10292. },
  10293. // 使用的动画过渡函数
  10294. timingFunction: {
  10295. type: String,
  10296. default: props$E.transition.timingFunction
  10297. }
  10298. }
  10299. };
  10300. const getClassNames = (name) => ({
  10301. enter: `u-${name}-enter u-${name}-enter-active`,
  10302. "enter-to": `u-${name}-enter-to u-${name}-enter-active`,
  10303. leave: `u-${name}-leave u-${name}-leave-active`,
  10304. "leave-to": `u-${name}-leave-to u-${name}-leave-active`
  10305. });
  10306. const transition = {
  10307. methods: {
  10308. // 组件被点击发出事件
  10309. clickHandler() {
  10310. this.$emit("click");
  10311. },
  10312. // vue版本的组件进场处理
  10313. vueEnter() {
  10314. const classNames = getClassNames(this.mode);
  10315. this.status = "enter";
  10316. this.$emit("beforeEnter");
  10317. this.inited = true;
  10318. this.display = true;
  10319. this.classes = classNames.enter;
  10320. this.$nextTick(async () => {
  10321. this.$emit("enter");
  10322. this.transitionEnded = false;
  10323. this.$emit("afterEnter");
  10324. this.classes = classNames["enter-to"];
  10325. });
  10326. },
  10327. // 动画离场处理
  10328. vueLeave() {
  10329. if (!this.display)
  10330. return;
  10331. const classNames = getClassNames(this.mode);
  10332. this.status = "leave";
  10333. this.$emit("beforeLeave");
  10334. this.classes = classNames.leave;
  10335. this.$nextTick(() => {
  10336. this.transitionEnded = false;
  10337. this.$emit("leave");
  10338. setTimeout(this.onTransitionEnd, this.duration);
  10339. this.classes = classNames["leave-to"];
  10340. });
  10341. },
  10342. // 完成过渡后触发
  10343. onTransitionEnd() {
  10344. if (this.transitionEnded)
  10345. return;
  10346. this.transitionEnded = true;
  10347. this.$emit(this.status === "leave" ? "afterLeave" : "afterEnter");
  10348. if (!this.show && this.display) {
  10349. this.display = false;
  10350. this.inited = false;
  10351. }
  10352. }
  10353. }
  10354. };
  10355. const _sfc_main$1H = {
  10356. name: "u-transition",
  10357. data() {
  10358. return {
  10359. inited: false,
  10360. // 是否显示/隐藏组件
  10361. viewStyle: {},
  10362. // 组件内部的样式
  10363. status: "",
  10364. // 记录组件动画的状态
  10365. transitionEnded: false,
  10366. // 组件是否结束的标记
  10367. display: false,
  10368. // 组件是否展示
  10369. classes: ""
  10370. // 应用的类名
  10371. };
  10372. },
  10373. computed: {
  10374. mergeStyle() {
  10375. const { viewStyle, customStyle } = this;
  10376. return {
  10377. transitionDuration: `${this.duration}ms`,
  10378. // display: `${this.display ? '' : 'none'}`,
  10379. transitionTimingFunction: this.timingFunction,
  10380. // 避免自定义样式影响到动画属性,所以写在viewStyle前面
  10381. ...uni.$u.addStyle(customStyle),
  10382. ...viewStyle
  10383. };
  10384. }
  10385. },
  10386. // 将mixin挂在到组件中,uni.$u.mixin实际上为一个vue格式对象
  10387. mixins: [mpMixin, mixin, transition, props$p],
  10388. watch: {
  10389. show: {
  10390. handler(newVal) {
  10391. newVal ? this.vueEnter() : this.vueLeave();
  10392. },
  10393. // 表示同时监听初始化时的props的show的意思
  10394. immediate: true
  10395. }
  10396. }
  10397. };
  10398. function _sfc_render$1G(_ctx, _cache, $props, $setup, $data, $options) {
  10399. return $data.inited ? (vue.openBlock(), vue.createElementBlock(
  10400. "view",
  10401. {
  10402. key: 0,
  10403. class: vue.normalizeClass(["u-transition", $data.classes]),
  10404. ref: "u-transition",
  10405. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clickHandler && _ctx.clickHandler(...args)),
  10406. style: vue.normalizeStyle([$options.mergeStyle]),
  10407. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.noop && _ctx.noop(...args))
  10408. },
  10409. [
  10410. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  10411. ],
  10412. 38
  10413. /* CLASS, STYLE, NEED_HYDRATION */
  10414. )) : vue.createCommentVNode("v-if", true);
  10415. }
  10416. const __easycom_1$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1H, [["render", _sfc_render$1G], ["__scopeId", "data-v-5cec8177"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-transition/u-transition.vue"]]);
  10417. const props$o = {
  10418. props: {
  10419. // 是否显示遮罩
  10420. show: {
  10421. type: Boolean,
  10422. default: props$E.overlay.show
  10423. },
  10424. // 层级z-index
  10425. zIndex: {
  10426. type: [String, Number],
  10427. default: props$E.overlay.zIndex
  10428. },
  10429. // 遮罩的过渡时间,单位为ms
  10430. duration: {
  10431. type: [String, Number],
  10432. default: props$E.overlay.duration
  10433. },
  10434. // 不透明度值,当做rgba的第四个参数
  10435. opacity: {
  10436. type: [String, Number],
  10437. default: props$E.overlay.opacity
  10438. }
  10439. }
  10440. };
  10441. const _sfc_main$1G = {
  10442. name: "u-overlay",
  10443. mixins: [mpMixin, mixin, props$o],
  10444. computed: {
  10445. overlayStyle() {
  10446. const style = {
  10447. position: "fixed",
  10448. top: 0,
  10449. left: 0,
  10450. right: 0,
  10451. zIndex: this.zIndex,
  10452. bottom: 0,
  10453. "background-color": `rgba(0, 0, 0, ${this.opacity})`
  10454. };
  10455. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  10456. }
  10457. },
  10458. methods: {
  10459. clickHandler() {
  10460. this.$emit("click");
  10461. }
  10462. }
  10463. };
  10464. function _sfc_render$1F(_ctx, _cache, $props, $setup, $data, $options) {
  10465. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
  10466. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  10467. show: _ctx.show,
  10468. "custom-class": "u-overlay",
  10469. duration: _ctx.duration,
  10470. "custom-style": $options.overlayStyle,
  10471. onClick: $options.clickHandler
  10472. }, {
  10473. default: vue.withCtx(() => [
  10474. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  10475. ]),
  10476. _: 3
  10477. /* FORWARDED */
  10478. }, 8, ["show", "duration", "custom-style", "onClick"]);
  10479. }
  10480. const __easycom_0$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["render", _sfc_render$1F], ["__scopeId", "data-v-9112bed9"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-overlay/u-overlay.vue"]]);
  10481. const props$n = {
  10482. props: {
  10483. bgColor: {
  10484. type: String,
  10485. default: props$E.statusBar.bgColor
  10486. }
  10487. }
  10488. };
  10489. const _sfc_main$1F = {
  10490. name: "u-status-bar",
  10491. mixins: [mpMixin, mixin, props$n],
  10492. data() {
  10493. return {};
  10494. },
  10495. computed: {
  10496. style() {
  10497. const style = {};
  10498. style.height = uni.$u.addUnit(uni.$u.sys().statusBarHeight, "px");
  10499. style.backgroundColor = this.bgColor;
  10500. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  10501. }
  10502. }
  10503. };
  10504. function _sfc_render$1E(_ctx, _cache, $props, $setup, $data, $options) {
  10505. return vue.openBlock(), vue.createElementBlock(
  10506. "view",
  10507. {
  10508. style: vue.normalizeStyle([$options.style]),
  10509. class: "u-status-bar"
  10510. },
  10511. [
  10512. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  10513. ],
  10514. 4
  10515. /* STYLE */
  10516. );
  10517. }
  10518. const __easycom_0$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["render", _sfc_render$1E], ["__scopeId", "data-v-eb8e0cdd"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-status-bar/u-status-bar.vue"]]);
  10519. const props$m = {
  10520. props: {}
  10521. };
  10522. const _sfc_main$1E = {
  10523. name: "u-safe-bottom",
  10524. mixins: [mpMixin, mixin, props$m],
  10525. data() {
  10526. return {
  10527. safeAreaBottomHeight: 0,
  10528. isNvue: false
  10529. };
  10530. },
  10531. computed: {
  10532. style() {
  10533. const style = {};
  10534. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  10535. }
  10536. },
  10537. mounted() {
  10538. }
  10539. };
  10540. function _sfc_render$1D(_ctx, _cache, $props, $setup, $data, $options) {
  10541. return vue.openBlock(), vue.createElementBlock(
  10542. "view",
  10543. {
  10544. class: vue.normalizeClass(["u-safe-bottom", [!$data.isNvue && "u-safe-area-inset-bottom"]]),
  10545. style: vue.normalizeStyle([$options.style])
  10546. },
  10547. null,
  10548. 6
  10549. /* CLASS, STYLE */
  10550. );
  10551. }
  10552. const __easycom_3$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1E, [["render", _sfc_render$1D], ["__scopeId", "data-v-f3d22cfe"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.vue"]]);
  10553. const props$l = {
  10554. props: {
  10555. // 是否展示弹窗
  10556. show: {
  10557. type: Boolean,
  10558. default: props$E.popup.show
  10559. },
  10560. // 是否显示遮罩
  10561. overlay: {
  10562. type: Boolean,
  10563. default: props$E.popup.overlay
  10564. },
  10565. // 弹出的方向,可选值为 top bottom right left center
  10566. mode: {
  10567. type: String,
  10568. default: props$E.popup.mode
  10569. },
  10570. // 动画时长,单位ms
  10571. duration: {
  10572. type: [String, Number],
  10573. default: props$E.popup.duration
  10574. },
  10575. // 是否显示关闭图标
  10576. closeable: {
  10577. type: Boolean,
  10578. default: props$E.popup.closeable
  10579. },
  10580. // 自定义遮罩的样式
  10581. overlayStyle: {
  10582. type: [Object, String],
  10583. default: props$E.popup.overlayStyle
  10584. },
  10585. // 点击遮罩是否关闭弹窗
  10586. closeOnClickOverlay: {
  10587. type: Boolean,
  10588. default: props$E.popup.closeOnClickOverlay
  10589. },
  10590. // 层级
  10591. zIndex: {
  10592. type: [String, Number],
  10593. default: props$E.popup.zIndex
  10594. },
  10595. // 是否为iPhoneX留出底部安全距离
  10596. safeAreaInsetBottom: {
  10597. type: Boolean,
  10598. default: props$E.popup.safeAreaInsetBottom
  10599. },
  10600. // 是否留出顶部安全距离(状态栏高度)
  10601. safeAreaInsetTop: {
  10602. type: Boolean,
  10603. default: props$E.popup.safeAreaInsetTop
  10604. },
  10605. // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角
  10606. closeIconPos: {
  10607. type: String,
  10608. default: props$E.popup.closeIconPos
  10609. },
  10610. // 是否显示圆角
  10611. round: {
  10612. type: [Boolean, String, Number],
  10613. default: props$E.popup.round
  10614. },
  10615. // mode=center,也即中部弹出时,是否使用缩放模式
  10616. zoom: {
  10617. type: Boolean,
  10618. default: props$E.popup.zoom
  10619. },
  10620. // 弹窗背景色,设置为transparent可去除白色背景
  10621. bgColor: {
  10622. type: String,
  10623. default: props$E.popup.bgColor
  10624. },
  10625. // 遮罩的透明度,0-1之间
  10626. overlayOpacity: {
  10627. type: [Number, String],
  10628. default: props$E.popup.overlayOpacity
  10629. }
  10630. }
  10631. };
  10632. const _sfc_main$1D = {
  10633. name: "u-popup",
  10634. mixins: [mpMixin, mixin, props$l],
  10635. data() {
  10636. return {
  10637. overlayDuration: this.duration + 50
  10638. };
  10639. },
  10640. watch: {
  10641. show(newValue, oldValue) {
  10642. }
  10643. },
  10644. computed: {
  10645. transitionStyle() {
  10646. const style = {
  10647. zIndex: this.zIndex,
  10648. position: "fixed",
  10649. display: "flex"
  10650. };
  10651. style[this.mode] = 0;
  10652. if (this.mode === "left") {
  10653. return uni.$u.deepMerge(style, {
  10654. bottom: 0,
  10655. top: 0
  10656. });
  10657. } else if (this.mode === "right") {
  10658. return uni.$u.deepMerge(style, {
  10659. bottom: 0,
  10660. top: 0
  10661. });
  10662. } else if (this.mode === "top") {
  10663. return uni.$u.deepMerge(style, {
  10664. left: 0,
  10665. right: 0
  10666. });
  10667. } else if (this.mode === "bottom") {
  10668. return uni.$u.deepMerge(style, {
  10669. left: 0,
  10670. right: 0
  10671. });
  10672. } else if (this.mode === "center") {
  10673. return uni.$u.deepMerge(style, {
  10674. alignItems: "center",
  10675. "justify-content": "center",
  10676. top: 0,
  10677. left: 0,
  10678. right: 0,
  10679. bottom: 0
  10680. });
  10681. }
  10682. },
  10683. contentStyle() {
  10684. const style = {};
  10685. uni.$u.sys();
  10686. if (this.mode !== "center") {
  10687. style.flex = 1;
  10688. }
  10689. if (this.bgColor) {
  10690. style.backgroundColor = this.bgColor;
  10691. }
  10692. if (this.round) {
  10693. const value2 = uni.$u.addUnit(this.round);
  10694. if (this.mode === "top") {
  10695. style.borderBottomLeftRadius = value2;
  10696. style.borderBottomRightRadius = value2;
  10697. } else if (this.mode === "bottom") {
  10698. style.borderTopLeftRadius = value2;
  10699. style.borderTopRightRadius = value2;
  10700. } else if (this.mode === "center") {
  10701. style.borderRadius = value2;
  10702. }
  10703. }
  10704. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  10705. },
  10706. position() {
  10707. if (this.mode === "center") {
  10708. return this.zoom ? "fade-zoom" : "fade";
  10709. }
  10710. if (this.mode === "left") {
  10711. return "slide-left";
  10712. }
  10713. if (this.mode === "right") {
  10714. return "slide-right";
  10715. }
  10716. if (this.mode === "bottom") {
  10717. return "slide-up";
  10718. }
  10719. if (this.mode === "top") {
  10720. return "slide-down";
  10721. }
  10722. }
  10723. },
  10724. methods: {
  10725. // 点击遮罩
  10726. overlayClick() {
  10727. if (this.closeOnClickOverlay) {
  10728. this.$emit("close");
  10729. }
  10730. },
  10731. close(e) {
  10732. this.$emit("close");
  10733. },
  10734. afterEnter() {
  10735. this.$emit("open");
  10736. },
  10737. clickHandler() {
  10738. if (this.mode === "center") {
  10739. this.overlayClick();
  10740. }
  10741. this.$emit("click");
  10742. }
  10743. }
  10744. };
  10745. function _sfc_render$1C(_ctx, _cache, $props, $setup, $data, $options) {
  10746. const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$8);
  10747. const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$7);
  10748. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  10749. const _component_u_safe_bottom = resolveEasycom(vue.resolveDynamicComponent("u-safe-bottom"), __easycom_3$5);
  10750. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
  10751. return vue.openBlock(), vue.createElementBlock("view", { class: "u-popup" }, [
  10752. _ctx.overlay ? (vue.openBlock(), vue.createBlock(_component_u_overlay, {
  10753. key: 0,
  10754. show: _ctx.show,
  10755. onClick: $options.overlayClick,
  10756. duration: $data.overlayDuration,
  10757. customStyle: _ctx.overlayStyle,
  10758. opacity: _ctx.overlayOpacity
  10759. }, null, 8, ["show", "onClick", "duration", "customStyle", "opacity"])) : vue.createCommentVNode("v-if", true),
  10760. vue.createVNode(_component_u_transition, {
  10761. show: _ctx.show,
  10762. customStyle: $options.transitionStyle,
  10763. mode: $options.position,
  10764. duration: _ctx.duration,
  10765. onAfterEnter: $options.afterEnter,
  10766. onClick: $options.clickHandler
  10767. }, {
  10768. default: vue.withCtx(() => [
  10769. vue.createElementVNode(
  10770. "view",
  10771. {
  10772. class: "u-popup__content",
  10773. style: vue.normalizeStyle([$options.contentStyle]),
  10774. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop"]))
  10775. },
  10776. [
  10777. _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true),
  10778. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  10779. _ctx.closeable ? (vue.openBlock(), vue.createElementBlock(
  10780. "view",
  10781. {
  10782. key: 1,
  10783. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.close && $options.close(...args), ["stop"])),
  10784. class: vue.normalizeClass(["u-popup__content__close", ["u-popup__content__close--" + _ctx.closeIconPos]]),
  10785. "hover-class": "u-popup__content__close--hover",
  10786. "hover-stay-time": "150"
  10787. },
  10788. [
  10789. vue.createVNode(_component_u_icon, {
  10790. name: "close",
  10791. color: "#909399",
  10792. size: "18",
  10793. bold: ""
  10794. })
  10795. ],
  10796. 2
  10797. /* CLASS */
  10798. )) : vue.createCommentVNode("v-if", true),
  10799. _ctx.safeAreaInsetBottom ? (vue.openBlock(), vue.createBlock(_component_u_safe_bottom, { key: 2 })) : vue.createCommentVNode("v-if", true)
  10800. ],
  10801. 4
  10802. /* STYLE */
  10803. )
  10804. ]),
  10805. _: 3
  10806. /* FORWARDED */
  10807. }, 8, ["show", "customStyle", "mode", "duration", "onAfterEnter", "onClick"])
  10808. ]);
  10809. }
  10810. const __easycom_3$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1D, [["render", _sfc_render$1C], ["__scopeId", "data-v-05c24e9b"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-popup/u-popup.vue"]]);
  10811. const _sfc_main$1C = {
  10812. __name: "feedbackPopup",
  10813. emits: ["submit"],
  10814. setup(__props, { expose: __expose, emit: __emit }) {
  10815. const show = vue.ref(false);
  10816. const emit2 = __emit;
  10817. const formRef = vue.ref(null);
  10818. const submitting = vue.ref(false);
  10819. const formData = vue.reactive({
  10820. feedbackContent: "",
  10821. imgUrl: "",
  10822. isbn: ""
  10823. });
  10824. const rules2 = {
  10825. feedbackContent: [{
  10826. required: true,
  10827. message: "请输入反馈信息",
  10828. trigger: ["blur", "change"]
  10829. }]
  10830. };
  10831. function open2(data) {
  10832. show.value = true;
  10833. formData.isbn = data.isbn;
  10834. }
  10835. function handleCancel() {
  10836. resetForm();
  10837. show.value = false;
  10838. }
  10839. async function handleConfirm() {
  10840. var _a;
  10841. (_a = formRef.value) == null ? void 0 : _a.validate().then((res2) => {
  10842. submitting.value = true;
  10843. uni.$u.http.post("/app/feedback/add", formData).then((res3) => {
  10844. if (res3.code == 200) {
  10845. uni.showToast({
  10846. title: "反馈已提交",
  10847. icon: "success"
  10848. });
  10849. emit2("submit", formData);
  10850. show.value = false;
  10851. } else {
  10852. uni.$u.toast(res3.msg);
  10853. }
  10854. }).finally(() => {
  10855. submitting.value = false;
  10856. });
  10857. });
  10858. }
  10859. function resetForm() {
  10860. var _a;
  10861. formData.feedbackContent = "";
  10862. formData.imgUrl = "";
  10863. (_a = formRef.value) == null ? void 0 : _a.resetFields();
  10864. }
  10865. __expose({
  10866. open: open2
  10867. });
  10868. const __returned__ = { show, emit: emit2, formRef, submitting, formData, rules: rules2, open: open2, handleCancel, handleConfirm, resetForm, ref: vue.ref, reactive: vue.reactive };
  10869. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  10870. return __returned__;
  10871. }
  10872. };
  10873. function _sfc_render$1B(_ctx, _cache, $props, $setup, $data, $options) {
  10874. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  10875. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$a);
  10876. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  10877. const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_0$9);
  10878. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$7);
  10879. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  10880. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_3$4);
  10881. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  10882. mode: "center",
  10883. show: $setup.show,
  10884. onClose: $setup.handleCancel,
  10885. closeOnClickOverlay: false
  10886. }, {
  10887. default: vue.withCtx(() => [
  10888. vue.createElementVNode("view", { class: "popup-container" }, [
  10889. vue.createVNode(_component_u_form, {
  10890. ref: "formRef",
  10891. model: $setup.formData,
  10892. rules: $setup.rules,
  10893. labelPosition: "top",
  10894. labelWidth: "100%",
  10895. "error-type": "toast"
  10896. }, {
  10897. default: vue.withCtx(() => [
  10898. vue.createCommentVNode(" 反馈信息 "),
  10899. vue.createVNode(_component_u_form_item, {
  10900. label: "反馈图书信息",
  10901. prop: "feedbackContent",
  10902. borderBottom: true
  10903. }, {
  10904. default: vue.withCtx(() => [
  10905. vue.createVNode(_component_u_input, {
  10906. modelValue: $setup.formData.feedbackContent,
  10907. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.feedbackContent = $event),
  10908. type: "textarea",
  10909. placeholder: "请输入反馈信息",
  10910. border: true,
  10911. height: "100"
  10912. }, null, 8, ["modelValue"])
  10913. ]),
  10914. _: 1
  10915. /* STABLE */
  10916. }),
  10917. vue.createCommentVNode(" 图片上传 "),
  10918. vue.createVNode(_component_u_form_item, {
  10919. label: "上传照片",
  10920. prop: "imgUrl",
  10921. borderBottom: false
  10922. }, {
  10923. default: vue.withCtx(() => [
  10924. vue.createVNode(_component_u_upload, {
  10925. fileList: $setup.formData.imgUrl,
  10926. onAfterRead: _ctx.afterRead,
  10927. onDelete: _ctx.deletePic,
  10928. name: "1",
  10929. multiple: "",
  10930. maxCount: 1,
  10931. imageMode: true
  10932. }, {
  10933. default: vue.withCtx(() => [
  10934. vue.createElementVNode("view", { class: "upload-slot" }, [
  10935. vue.createVNode(_component_u_icon, {
  10936. name: "plus",
  10937. size: "30"
  10938. }),
  10939. vue.createElementVNode("text", { class: "upload-text" }, "上传照片")
  10940. ])
  10941. ]),
  10942. _: 1
  10943. /* STABLE */
  10944. }, 8, ["fileList", "onAfterRead", "onDelete"])
  10945. ]),
  10946. _: 1
  10947. /* STABLE */
  10948. })
  10949. ]),
  10950. _: 1
  10951. /* STABLE */
  10952. }, 8, ["model"]),
  10953. vue.createCommentVNode(" 按钮组 "),
  10954. vue.createElementVNode("view", { class: "button-group" }, [
  10955. vue.createVNode(_component_u_button, {
  10956. type: "info",
  10957. text: "取消",
  10958. plain: true,
  10959. onClick: $setup.handleCancel,
  10960. disabled: $setup.submitting
  10961. }, null, 8, ["disabled"]),
  10962. vue.createVNode(_component_u_button, {
  10963. type: "primary",
  10964. text: "确认",
  10965. onClick: $setup.handleConfirm,
  10966. loading: $setup.submitting
  10967. }, null, 8, ["loading"])
  10968. ])
  10969. ])
  10970. ]),
  10971. _: 1
  10972. /* STABLE */
  10973. }, 8, ["show"]);
  10974. }
  10975. const FeedbackPopup = /* @__PURE__ */ _export_sfc(_sfc_main$1C, [["render", _sfc_render$1B], ["__scopeId", "data-v-0265fb8a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/book/components/feedbackPopup.vue"]]);
  10976. const _sfc_main$1B = {
  10977. __name: "index",
  10978. setup(__props, { expose: __expose }) {
  10979. __expose();
  10980. const showFeedback = vue.ref(null);
  10981. function handleFeedbackSubmit(data) {
  10982. formatAppLog("log", "at pages/book/index.vue:47", "反馈数据:", data);
  10983. }
  10984. const searchText = vue.ref("");
  10985. const bookList = vue.ref([{
  10986. bookName: "怪兽阿斗来了",
  10987. suit: 0,
  10988. price: 99,
  10989. isbn: "9787559603159"
  10990. }]);
  10991. async function handleSearch() {
  10992. if (!searchText.value) {
  10993. uni.showToast({
  10994. title: "请输入ISBN",
  10995. icon: "none"
  10996. });
  10997. return;
  10998. }
  10999. await getSimpleBookInfoByIsbn(searchText.value);
  11000. }
  11001. async function getSimpleBookInfoByIsbn(isbn) {
  11002. uni.$u.http.get(`/app/book/getSimpleBookInfoByIsbn/${isbn}`).then((res2) => {
  11003. if (res2.code == 200) {
  11004. let bool = bookList.value.some((v) => v.isbn == isbn);
  11005. if (!bool) {
  11006. bookList.value.push(res2.data);
  11007. }
  11008. } else {
  11009. uni.$u.toast(res2.msg);
  11010. }
  11011. });
  11012. }
  11013. function scanCode() {
  11014. uni.scanCode({
  11015. scanType: ["barCode"],
  11016. success: (res2) => {
  11017. searchText.value = res2.result;
  11018. getSimpleBookInfoByIsbn(res2.result);
  11019. },
  11020. fail: () => {
  11021. uni.showToast({
  11022. title: "扫码失败",
  11023. icon: "none"
  11024. });
  11025. }
  11026. });
  11027. }
  11028. function editBook(book) {
  11029. var _a;
  11030. (_a = showFeedback.value) == null ? void 0 : _a.open(book);
  11031. }
  11032. onLoad(() => {
  11033. uni.$u.useGlobalEvent((e) => {
  11034. if (!e.barcode)
  11035. return;
  11036. getSimpleBookInfoByIsbn(e.barcode);
  11037. });
  11038. });
  11039. const __returned__ = { showFeedback, handleFeedbackSubmit, searchText, bookList, handleSearch, getSimpleBookInfoByIsbn, scanCode, editBook, ref: vue.ref, computed: vue.computed, get onLoad() {
  11040. return onLoad;
  11041. }, FeedbackPopup };
  11042. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11043. return __returned__;
  11044. }
  11045. };
  11046. function _sfc_render$1A(_ctx, _cache, $props, $setup, $data, $options) {
  11047. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  11048. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  11049. return vue.openBlock(), vue.createElementBlock("view", {
  11050. class: "book-list",
  11051. style: { "padding": "0" }
  11052. }, [
  11053. vue.createCommentVNode(" 搜索框 "),
  11054. vue.createElementVNode("view", { class: "search-header" }, [
  11055. vue.createElementVNode("view", { class: "search-box" }, [
  11056. vue.createVNode(_component_u_icon, {
  11057. style: { "margin-right": "16rpx" },
  11058. name: "scan",
  11059. size: "30",
  11060. color: "#ffffff",
  11061. onClick: $setup.scanCode
  11062. }),
  11063. vue.createVNode(_component_u_search, {
  11064. height: "80rpx",
  11065. modelValue: $setup.searchText,
  11066. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  11067. placeholder: "请输入ISBN",
  11068. showAction: false,
  11069. clearabled: true,
  11070. onSearch: $setup.handleSearch,
  11071. bgColor: "#ffffff"
  11072. }, null, 8, ["modelValue"])
  11073. ])
  11074. ]),
  11075. vue.createCommentVNode(" 搜索结果列表 "),
  11076. $setup.bookList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11077. key: 0,
  11078. class: "book-list"
  11079. }, [
  11080. (vue.openBlock(true), vue.createElementBlock(
  11081. vue.Fragment,
  11082. null,
  11083. vue.renderList($setup.bookList, (book, index2) => {
  11084. return vue.openBlock(), vue.createElementBlock("view", {
  11085. class: "book-item",
  11086. key: index2
  11087. }, [
  11088. vue.createElementVNode("view", { class: "book-info" }, [
  11089. vue.createElementVNode("image", {
  11090. class: "book-image",
  11091. src: book.cover,
  11092. mode: "aspectFill"
  11093. }, null, 8, ["src"]),
  11094. vue.createElementVNode("view", { class: "book-details" }, [
  11095. vue.createElementVNode(
  11096. "text",
  11097. { class: "book-title" },
  11098. vue.toDisplayString(book.bookName),
  11099. 1
  11100. /* TEXT */
  11101. ),
  11102. vue.createElementVNode(
  11103. "text",
  11104. { class: "book-isbn" },
  11105. "ISBN: " + vue.toDisplayString(book.isbn),
  11106. 1
  11107. /* TEXT */
  11108. ),
  11109. vue.createElementVNode(
  11110. "text",
  11111. { class: "book-price" },
  11112. "定价: " + vue.toDisplayString(book.price),
  11113. 1
  11114. /* TEXT */
  11115. ),
  11116. vue.createElementVNode(
  11117. "text",
  11118. { class: "book-set" },
  11119. "套装: " + vue.toDisplayString(book.suit == 1 ? "是" : "否"),
  11120. 1
  11121. /* TEXT */
  11122. )
  11123. ])
  11124. ]),
  11125. vue.createElementVNode("view", { class: "book-action" }, [
  11126. vue.createVNode(_component_u_icon, {
  11127. name: "edit-pen",
  11128. size: "30",
  11129. color: "#4cd964",
  11130. onClick: ($event) => $setup.editBook(book)
  11131. }, null, 8, ["onClick"])
  11132. ])
  11133. ]);
  11134. }),
  11135. 128
  11136. /* KEYED_FRAGMENT */
  11137. ))
  11138. ])) : vue.createCommentVNode("v-if", true),
  11139. vue.createVNode(
  11140. $setup["FeedbackPopup"],
  11141. {
  11142. ref: "showFeedback",
  11143. onSubmit: $setup.handleFeedbackSubmit
  11144. },
  11145. null,
  11146. 512
  11147. /* NEED_PATCH */
  11148. )
  11149. ]);
  11150. }
  11151. const PagesBookIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1B, [["render", _sfc_render$1A], ["__scopeId", "data-v-0452ab4c"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/book/index.vue"]]);
  11152. const props$k = {
  11153. props: {
  11154. // 标签类型info、primary、success、warning、error
  11155. type: {
  11156. type: String,
  11157. default: props$E.tag.type
  11158. },
  11159. // 不可用
  11160. disabled: {
  11161. type: [Boolean, String],
  11162. default: props$E.tag.disabled
  11163. },
  11164. // 标签的大小,large,medium,mini
  11165. size: {
  11166. type: String,
  11167. default: props$E.tag.size
  11168. },
  11169. // tag的形状,circle(两边半圆形), square(方形,带圆角)
  11170. shape: {
  11171. type: String,
  11172. default: props$E.tag.shape
  11173. },
  11174. // 标签文字
  11175. text: {
  11176. type: [String, Number],
  11177. default: props$E.tag.text
  11178. },
  11179. // 背景颜色,默认为空字符串,即不处理
  11180. bgColor: {
  11181. type: String,
  11182. default: props$E.tag.bgColor
  11183. },
  11184. // 标签字体颜色,默认为空字符串,即不处理
  11185. color: {
  11186. type: String,
  11187. default: props$E.tag.color
  11188. },
  11189. // 标签的边框颜色
  11190. borderColor: {
  11191. type: String,
  11192. default: props$E.tag.borderColor
  11193. },
  11194. // 关闭按钮图标的颜色
  11195. closeColor: {
  11196. type: String,
  11197. default: props$E.tag.closeColor
  11198. },
  11199. // 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了
  11200. name: {
  11201. type: [String, Number],
  11202. default: props$E.tag.name
  11203. },
  11204. // // 模式选择,dark|light|plain
  11205. // mode: {
  11206. // type: String,
  11207. // default: 'light'
  11208. // },
  11209. // 镂空时是否填充背景色
  11210. plainFill: {
  11211. type: Boolean,
  11212. default: props$E.tag.plainFill
  11213. },
  11214. // 是否镂空
  11215. plain: {
  11216. type: Boolean,
  11217. default: props$E.tag.plain
  11218. },
  11219. // 是否可关闭
  11220. closable: {
  11221. type: Boolean,
  11222. default: props$E.tag.closable
  11223. },
  11224. // 是否显示
  11225. show: {
  11226. type: Boolean,
  11227. default: props$E.tag.show
  11228. },
  11229. // 内置图标,或绝对路径的图片
  11230. icon: {
  11231. type: String,
  11232. default: props$E.tag.icon
  11233. }
  11234. }
  11235. };
  11236. const _sfc_main$1A = {
  11237. name: "u-tag",
  11238. mixins: [mpMixin, mixin, props$k],
  11239. data() {
  11240. return {};
  11241. },
  11242. computed: {
  11243. style() {
  11244. const style = {};
  11245. if (this.bgColor) {
  11246. style.backgroundColor = this.bgColor;
  11247. }
  11248. if (this.color) {
  11249. style.color = this.color;
  11250. }
  11251. if (this.borderColor) {
  11252. style.borderColor = this.borderColor;
  11253. }
  11254. return style;
  11255. },
  11256. // nvue下,文本颜色无法继承父元素
  11257. textColor() {
  11258. const style = {};
  11259. if (this.color) {
  11260. style.color = this.color;
  11261. }
  11262. return style;
  11263. },
  11264. imgStyle() {
  11265. const width = this.size === "large" ? "17px" : this.size === "medium" ? "15px" : "13px";
  11266. return {
  11267. width,
  11268. height: width
  11269. };
  11270. },
  11271. // 文本的样式
  11272. closeSize() {
  11273. const size = this.size === "large" ? 15 : this.size === "medium" ? 13 : 12;
  11274. return size;
  11275. },
  11276. // 图标大小
  11277. iconSize() {
  11278. const size = this.size === "large" ? 21 : this.size === "medium" ? 19 : 16;
  11279. return size;
  11280. },
  11281. // 图标颜色
  11282. elIconColor() {
  11283. return this.iconColor ? this.iconColor : this.plain ? this.type : "#ffffff";
  11284. }
  11285. },
  11286. methods: {
  11287. // 点击关闭按钮
  11288. closeHandler() {
  11289. this.$emit("close", this.name);
  11290. },
  11291. // 点击标签
  11292. clickHandler() {
  11293. this.$emit("click", this.name);
  11294. }
  11295. }
  11296. };
  11297. function _sfc_render$1z(_ctx, _cache, $props, $setup, $data, $options) {
  11298. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  11299. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
  11300. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  11301. mode: "fade",
  11302. show: _ctx.show,
  11303. style: { "display": "inline-flex" }
  11304. }, {
  11305. default: vue.withCtx(() => [
  11306. vue.createElementVNode("view", { class: "u-tag-wrapper" }, [
  11307. vue.createElementVNode(
  11308. "view",
  11309. {
  11310. 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`]]),
  11311. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
  11312. style: vue.normalizeStyle([{
  11313. marginRight: _ctx.closable ? "10px" : 0,
  11314. marginTop: _ctx.closable ? "10px" : 0
  11315. }, $options.style])
  11316. },
  11317. [
  11318. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  11319. _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", {
  11320. key: 0,
  11321. class: "u-tag__icon"
  11322. }, [
  11323. _ctx.$u.test.image(_ctx.icon) ? (vue.openBlock(), vue.createElementBlock("image", {
  11324. key: 0,
  11325. src: _ctx.icon,
  11326. style: vue.normalizeStyle([$options.imgStyle])
  11327. }, null, 12, ["src"])) : (vue.openBlock(), vue.createBlock(_component_u_icon, {
  11328. key: 1,
  11329. color: $options.elIconColor,
  11330. name: _ctx.icon,
  11331. size: $options.iconSize
  11332. }, null, 8, ["color", "name", "size"]))
  11333. ])) : vue.createCommentVNode("v-if", true)
  11334. ], true),
  11335. vue.createElementVNode(
  11336. "text",
  11337. {
  11338. class: vue.normalizeClass(["u-tag__text", [`u-tag__text--${_ctx.type}`, _ctx.plain && `u-tag__text--${_ctx.type}--plain`, `u-tag__text--${_ctx.size}`]]),
  11339. style: vue.normalizeStyle([$options.textColor])
  11340. },
  11341. vue.toDisplayString(_ctx.text),
  11342. 7
  11343. /* TEXT, CLASS, STYLE */
  11344. )
  11345. ],
  11346. 6
  11347. /* CLASS, STYLE */
  11348. ),
  11349. _ctx.closable ? (vue.openBlock(), vue.createElementBlock(
  11350. "view",
  11351. {
  11352. key: 0,
  11353. class: vue.normalizeClass(["u-tag__close", [`u-tag__close--${_ctx.size}`]]),
  11354. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"])),
  11355. style: vue.normalizeStyle({ backgroundColor: _ctx.closeColor })
  11356. },
  11357. [
  11358. vue.createVNode(_component_u_icon, {
  11359. name: "close",
  11360. size: $options.closeSize,
  11361. color: "#ffffff"
  11362. }, null, 8, ["size"])
  11363. ],
  11364. 6
  11365. /* CLASS, STYLE */
  11366. )) : vue.createCommentVNode("v-if", true)
  11367. ])
  11368. ]),
  11369. _: 3
  11370. /* FORWARDED */
  11371. }, 8, ["show"]);
  11372. }
  11373. const __easycom_2$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1A, [["render", _sfc_render$1z], ["__scopeId", "data-v-2fd891bb"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-tag/u-tag.vue"]]);
  11374. const _sfc_main$1z = {
  11375. __name: "WarehouseSelector",
  11376. props: {
  11377. show: {
  11378. type: Boolean,
  11379. default: false
  11380. }
  11381. },
  11382. emits: ["update:show", "warehouse-selected"],
  11383. setup(__props, { expose: __expose, emit: __emit }) {
  11384. __expose();
  11385. const props2 = __props;
  11386. const emit2 = __emit;
  11387. const searchKeyword = vue.ref("");
  11388. const searchResults = vue.ref([]);
  11389. const historyWarehouses = vue.ref([""]);
  11390. const selectedWarehouse = vue.ref("");
  11391. const warehouseSearch = (name) => {
  11392. formatAppLog("log", "at pages/index/express/components/WarehouseSelector.vue:68", name);
  11393. uni.$u.http.post("/app/appUser/searchGodown?name=" + name).then((res2) => {
  11394. if (res2.code == 200) {
  11395. searchResults.value = res2.data;
  11396. }
  11397. });
  11398. };
  11399. const getUserBindHistory = () => {
  11400. uni.$u.http.get("/app/appUser/getUserBindGodownReocrd").then((res2) => {
  11401. if (res2.code == 200) {
  11402. historyWarehouses.value = res2.data;
  11403. }
  11404. });
  11405. };
  11406. getUserBindHistory();
  11407. const handleSearch = () => {
  11408. warehouseSearch(searchKeyword.value);
  11409. };
  11410. const selectItem = vue.ref({});
  11411. const selectWarehouse = (item) => {
  11412. selectedWarehouse.value = item.godownName;
  11413. selectItem.value = item;
  11414. };
  11415. const handleClose = () => {
  11416. emit2("update:show", false);
  11417. searchKeyword.value = "";
  11418. };
  11419. const handleConfirm = () => {
  11420. if (selectedWarehouse.value) {
  11421. emit2("warehouse-selected", selectItem.value);
  11422. handleClose();
  11423. }
  11424. };
  11425. const __returned__ = { props: props2, emit: emit2, searchKeyword, searchResults, historyWarehouses, selectedWarehouse, warehouseSearch, getUserBindHistory, handleSearch, selectItem, selectWarehouse, handleClose, handleConfirm, ref: vue.ref };
  11426. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11427. return __returned__;
  11428. }
  11429. };
  11430. function _sfc_render$1y(_ctx, _cache, $props, $setup, $data, $options) {
  11431. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  11432. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$4);
  11433. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  11434. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_3$4);
  11435. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  11436. show: $props.show,
  11437. onClose: $setup.handleClose,
  11438. mode: "bottom",
  11439. round: "10"
  11440. }, {
  11441. default: vue.withCtx(() => [
  11442. vue.createElementVNode("view", { class: "warehouse-selector" }, [
  11443. vue.createElementVNode("view", { style: { "flex": "1" } }, [
  11444. vue.createCommentVNode(" 标题 "),
  11445. vue.createElementVNode("view", { class: "header" }, [
  11446. vue.createElementVNode("text", { class: "title" }, "绑定仓库")
  11447. ]),
  11448. vue.createCommentVNode(" 搜索框 "),
  11449. vue.createElementVNode("view", { class: "search-box" }, [
  11450. vue.createVNode(_component_u_search, {
  11451. inputStyle: { "height": "80rpx", "font-size": "16px" },
  11452. actionStyle: { "font-size": "16px", color: "#22ac38" },
  11453. modelValue: $setup.searchKeyword,
  11454. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchKeyword = $event),
  11455. placeholder: "搜索仓库",
  11456. "show-action": true,
  11457. "action-text": "搜索",
  11458. onSearch: $setup.handleSearch,
  11459. onCustom: $setup.handleSearch
  11460. }, null, 8, ["modelValue"])
  11461. ]),
  11462. vue.createCommentVNode(" 搜索结果 "),
  11463. $setup.searchResults.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11464. key: 0,
  11465. class: "search-result"
  11466. }, [
  11467. vue.createElementVNode("text", { class: "section-title" }, "搜索结果"),
  11468. vue.createElementVNode("view", { class: "tag-group" }, [
  11469. (vue.openBlock(true), vue.createElementBlock(
  11470. vue.Fragment,
  11471. null,
  11472. vue.renderList($setup.searchResults, (item) => {
  11473. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  11474. key: item,
  11475. text: item.godownName,
  11476. plain: $setup.selectedWarehouse !== item.godownName,
  11477. shape: "circle",
  11478. onClick: ($event) => $setup.selectWarehouse(item),
  11479. size: "large"
  11480. }, null, 8, ["text", "plain", "onClick"]);
  11481. }),
  11482. 128
  11483. /* KEYED_FRAGMENT */
  11484. ))
  11485. ])
  11486. ])) : vue.createCommentVNode("v-if", true),
  11487. vue.createCommentVNode(" 历史绑定 "),
  11488. $setup.historyWarehouses.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11489. key: 1,
  11490. class: "history-section"
  11491. }, [
  11492. vue.createElementVNode("text", { class: "section-title" }, "历史绑定"),
  11493. vue.createElementVNode("view", { class: "tag-group" }, [
  11494. (vue.openBlock(true), vue.createElementBlock(
  11495. vue.Fragment,
  11496. null,
  11497. vue.renderList($setup.historyWarehouses, (item) => {
  11498. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  11499. key: item,
  11500. text: item,
  11501. plain: $setup.selectedWarehouse !== item.godownName,
  11502. shape: "circle",
  11503. onClick: ($event) => $setup.selectWarehouse(item),
  11504. size: "large"
  11505. }, null, 8, ["text", "plain", "onClick"]);
  11506. }),
  11507. 128
  11508. /* KEYED_FRAGMENT */
  11509. ))
  11510. ])
  11511. ])) : vue.createCommentVNode("v-if", true)
  11512. ]),
  11513. vue.createCommentVNode(" 底部按钮 "),
  11514. vue.createElementVNode("view", { class: "footer" }, [
  11515. vue.createVNode(_component_u_button, {
  11516. onClick: $setup.handleClose,
  11517. text: "取消",
  11518. plain: "",
  11519. shape: "circle"
  11520. }),
  11521. vue.createVNode(_component_u_button, {
  11522. type: "primary",
  11523. onClick: $setup.handleConfirm,
  11524. text: "确定",
  11525. shape: "circle"
  11526. })
  11527. ])
  11528. ])
  11529. ]),
  11530. _: 1
  11531. /* STABLE */
  11532. }, 8, ["show"]);
  11533. }
  11534. const WarehouseSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["render", _sfc_render$1y], ["__scopeId", "data-v-b9bd3f04"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/WarehouseSelector.vue"]]);
  11535. const placeholderStyle$2 = "font-size:32rpx";
  11536. const _sfc_main$1y = {
  11537. __name: "transfer-sign",
  11538. setup(__props, { expose: __expose }) {
  11539. __expose();
  11540. const customStyle = vue.reactive({
  11541. height: "90rpx"
  11542. });
  11543. const selectedWarehouse = vue.ref("");
  11544. const form = vue.ref({
  11545. "packageCode": "",
  11546. "godownId": ""
  11547. });
  11548. const showSelector = vue.ref(false);
  11549. function openWarehouseSelector() {
  11550. showSelector.value = true;
  11551. }
  11552. function handleWarehouseSelected(item) {
  11553. selectedWarehouse.value = item.godownName;
  11554. form.value.godownId = item.id;
  11555. }
  11556. function scanCode() {
  11557. uni.scanCode({
  11558. success: (res2) => {
  11559. form.value.packageCode = res2.result;
  11560. handleBarcode(res2.result);
  11561. },
  11562. fail: (err) => {
  11563. uni.$u.toast("扫码失败");
  11564. }
  11565. });
  11566. }
  11567. function handleBarcode(code2) {
  11568. if (!code2)
  11569. return uni.$u.toast("请输入物流单号");
  11570. uni.$u.http.post("/app/ordersign/transferSign", form.value).then((res2) => {
  11571. if (res2.code == 200) {
  11572. let text = code2 + "签收成功";
  11573. uni.$u.ttsModule.speak(text);
  11574. } else {
  11575. let text = code2 + "订单不存在";
  11576. uni.$u.ttsModule.speak(text);
  11577. }
  11578. });
  11579. }
  11580. function getUserBindWarehouse() {
  11581. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
  11582. var _a, _b;
  11583. if (res2.code == 200) {
  11584. selectedWarehouse.value = (_a = res2.data) == null ? void 0 : _a.godownName;
  11585. form.value.godownId = (_b = res2.data) == null ? void 0 : _b.id;
  11586. }
  11587. });
  11588. }
  11589. onLoad(() => {
  11590. getUserBindWarehouse();
  11591. uni.$u.useGlobalEvent((e) => {
  11592. form.value.packageCode = e.barcode;
  11593. handleBarcode(e.barcode);
  11594. });
  11595. });
  11596. const __returned__ = { placeholderStyle: placeholderStyle$2, customStyle, selectedWarehouse, form, showSelector, openWarehouseSelector, handleWarehouseSelected, scanCode, handleBarcode, getUserBindWarehouse, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  11597. return onLoad;
  11598. }, WarehouseSelector };
  11599. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11600. return __returned__;
  11601. }
  11602. };
  11603. function _sfc_render$1x(_ctx, _cache, $props, $setup, $data, $options) {
  11604. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  11605. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  11606. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11607. vue.createElementVNode("view", { class: "main-content" }, [
  11608. vue.createElementVNode("view", { class: "input-group" }, [
  11609. vue.createVNode(_component_u_input, {
  11610. customStyle: $setup.customStyle,
  11611. "placeholder-style": $setup.placeholderStyle,
  11612. modelValue: $setup.selectedWarehouse,
  11613. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedWarehouse = $event),
  11614. placeholder: "请选择仓库",
  11615. readonly: "",
  11616. border: "surround"
  11617. }, null, 8, ["customStyle", "modelValue"]),
  11618. vue.createVNode(_component_u_button, {
  11619. customStyle: $setup.customStyle,
  11620. type: "info",
  11621. color: "#a4adb3",
  11622. onClick: $setup.openWarehouseSelector,
  11623. text: "选择"
  11624. }, null, 8, ["customStyle"])
  11625. ]),
  11626. vue.createElementVNode("view", { class: "input-group" }, [
  11627. vue.createVNode(_component_u_input, {
  11628. customStyle: $setup.customStyle,
  11629. "placeholder-style": $setup.placeholderStyle,
  11630. modelValue: $setup.form.packageCode,
  11631. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.packageCode = $event),
  11632. placeholder: "扫描/输入物流单号",
  11633. border: "surround"
  11634. }, null, 8, ["customStyle", "modelValue"]),
  11635. vue.createVNode(_component_u_button, {
  11636. customStyle: $setup.customStyle,
  11637. type: "info",
  11638. color: "#a4adb3",
  11639. onClick: _cache[2] || (_cache[2] = ($event) => $setup.handleBarcode($setup.form.packageCode)),
  11640. text: "确定"
  11641. }, null, 8, ["customStyle"])
  11642. ])
  11643. ]),
  11644. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  11645. vue.createVNode(_component_u_button, {
  11646. size: "large",
  11647. type: "success",
  11648. onClick: $setup.scanCode,
  11649. text: "扫码",
  11650. class: "scan-button"
  11651. })
  11652. ]),
  11653. vue.createVNode($setup["WarehouseSelector"], {
  11654. show: $setup.showSelector,
  11655. "onUpdate:show": _cache[3] || (_cache[3] = ($event) => $setup.showSelector = $event),
  11656. onWarehouseSelected: $setup.handleWarehouseSelected
  11657. }, null, 8, ["show"])
  11658. ]);
  11659. }
  11660. const PagesIndexExpressTransferSign = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["render", _sfc_render$1x], ["__scopeId", "data-v-333d344a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/transfer-sign.vue"]]);
  11661. const _sfc_main$1x = {
  11662. __name: "scan",
  11663. setup(__props, { expose: __expose }) {
  11664. __expose();
  11665. const isInitializing = vue.ref(false);
  11666. const isBluetoothOpened = vue.ref(false);
  11667. const isDiscovering = vue.ref(false);
  11668. const isConnecting = vue.ref(false);
  11669. const isConnected = vue.ref(false);
  11670. const devices = vue.ref([]);
  11671. const selectedDevice = vue.ref(null);
  11672. const scanData = vue.ref(null);
  11673. const deviceId = vue.ref("");
  11674. const serviceId = vue.ref("");
  11675. const characteristicId = vue.ref("");
  11676. const initBluetooth = () => {
  11677. isInitializing.value = true;
  11678. uni.openBluetoothAdapter({
  11679. success: (res2) => {
  11680. formatAppLog("log", "at pages/index/express/scan.vue:35", "蓝牙适配器初始化成功");
  11681. isBluetoothOpened.value = true;
  11682. isInitializing.value = false;
  11683. },
  11684. fail: (err) => {
  11685. formatAppLog("log", "at pages/index/express/scan.vue:40", "蓝牙适配器初始化失败:", err);
  11686. isInitializing.value = false;
  11687. }
  11688. });
  11689. };
  11690. const startDiscovery = () => {
  11691. isDiscovering.value = true;
  11692. uni.startBluetoothDevicesDiscovery({
  11693. success: (res2) => {
  11694. formatAppLog("log", "at pages/index/express/scan.vue:50", "开始搜索蓝牙设备成功");
  11695. uni.onBluetoothDeviceFound((devicesRes) => {
  11696. const newDevices = devicesRes.devices;
  11697. devices.value = devices.value.concat(newDevices);
  11698. formatAppLog("log", "at pages/index/express/scan.vue:54", devices.value, "devices.value");
  11699. const scanGunDevice = newDevices.find((device) => device.name.includes("Z0"));
  11700. if (scanGunDevice) {
  11701. selectedDevice.value = scanGunDevice;
  11702. deviceId.value = scanGunDevice.deviceId;
  11703. }
  11704. });
  11705. uni.onBluetoothAdapterStateChange((stateRes) => {
  11706. if (!stateRes.available) {
  11707. isDiscovering.value = false;
  11708. formatAppLog("log", "at pages/index/express/scan.vue:64", "蓝牙适配器不可用,停止搜索");
  11709. }
  11710. });
  11711. },
  11712. fail: (err) => {
  11713. formatAppLog("log", "at pages/index/express/scan.vue:69", "开始搜索蓝牙设备失败:", err);
  11714. isDiscovering.value = false;
  11715. }
  11716. });
  11717. };
  11718. const connectDevice = () => {
  11719. isConnecting.value = true;
  11720. uni.createBLEConnection({
  11721. deviceId: deviceId.value,
  11722. success: (res2) => {
  11723. formatAppLog("log", "at pages/index/express/scan.vue:80", "连接蓝牙设备成功");
  11724. isConnected.value = true;
  11725. isConnecting.value = false;
  11726. getBLEDeviceServices(deviceId.value);
  11727. },
  11728. fail: (err) => {
  11729. formatAppLog("log", "at pages/index/express/scan.vue:86", "连接蓝牙设备失败:", err);
  11730. isConnecting.value = false;
  11731. }
  11732. });
  11733. };
  11734. const getBLEDeviceServices = (deviceId2) => {
  11735. uni.getBLEDeviceServices({
  11736. deviceId: deviceId2,
  11737. success: (res2) => {
  11738. formatAppLog("log", "at pages/index/express/scan.vue:96", "获取服务列表成功:", res2.services);
  11739. const targetService = res2.services.find((service) => service.uuid === "目标服务UUID");
  11740. if (targetService) {
  11741. serviceId.value = targetService.uuid;
  11742. getBLEDeviceCharacteristics(deviceId2, serviceId.value);
  11743. }
  11744. },
  11745. fail: (err) => {
  11746. formatAppLog("log", "at pages/index/express/scan.vue:104", "获取服务列表失败:", err);
  11747. }
  11748. });
  11749. };
  11750. const getBLEDeviceCharacteristics = (deviceId2, serviceId2) => {
  11751. uni.getBLEDeviceCharacteristics({
  11752. deviceId: deviceId2,
  11753. serviceId: serviceId2,
  11754. success: (res2) => {
  11755. formatAppLog("log", "at pages/index/express/scan.vue:114", "获取特征列表成功:", res2.characteristics);
  11756. const targetCharacteristic = res2.characteristics.find((characteristic) => characteristic.properties.read && characteristic.properties.notify);
  11757. if (targetCharacteristic) {
  11758. characteristicId.value = targetCharacteristic.uuid;
  11759. }
  11760. },
  11761. fail: (err) => {
  11762. formatAppLog("log", "at pages/index/express/scan.vue:121", "获取特征列表失败:", err);
  11763. }
  11764. });
  11765. };
  11766. const startDataMonitor = () => {
  11767. uni.onBLECharacteristicValueChange((characteristicRes) => {
  11768. const value2 = characteristicRes.value;
  11769. const data = ab2str(value2);
  11770. formatAppLog("log", "at pages/index/express/scan.vue:130", "获取到扫码枪扫描的数据:", data);
  11771. scanData.value = data;
  11772. });
  11773. uni.notifyBLECharacteristicValueChange({
  11774. state: true,
  11775. deviceId: deviceId.value,
  11776. characteristicId: characteristicId.value,
  11777. success: (res2) => {
  11778. formatAppLog("log", "at pages/index/express/scan.vue:138", "开启特征值通知成功");
  11779. },
  11780. fail: (err) => {
  11781. formatAppLog("log", "at pages/index/express/scan.vue:141", "开启特征值通知失败:", err);
  11782. }
  11783. });
  11784. };
  11785. const ab2str = (buffer) => {
  11786. return String.fromCharCode.apply(null, new Uint8Array(buffer));
  11787. };
  11788. 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() {
  11789. return onLoad;
  11790. } };
  11791. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11792. return __returned__;
  11793. }
  11794. };
  11795. function _sfc_render$1w(_ctx, _cache, $props, $setup, $data, $options) {
  11796. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11797. vue.createElementVNode("button", {
  11798. onClick: $setup.initBluetooth,
  11799. disabled: $setup.isInitializing
  11800. }, "初始化蓝牙", 8, ["disabled"]),
  11801. vue.createElementVNode("button", {
  11802. onClick: $setup.startDiscovery,
  11803. disabled: $setup.isDiscovering || !$setup.isBluetoothOpened
  11804. }, "开始搜索设备", 8, ["disabled"]),
  11805. vue.createElementVNode("button", {
  11806. onClick: $setup.connectDevice,
  11807. disabled: !$setup.selectedDevice || $setup.isConnecting
  11808. }, "连接设备", 8, ["disabled"]),
  11809. vue.createElementVNode("button", {
  11810. onClick: $setup.startDataMonitor,
  11811. disabled: !$setup.isConnected
  11812. }, "开始监听数据", 8, ["disabled"]),
  11813. $setup.scanData ? (vue.openBlock(), vue.createElementBlock(
  11814. "view",
  11815. { key: 0 },
  11816. "扫描结果: " + vue.toDisplayString($setup.scanData),
  11817. 1
  11818. /* TEXT */
  11819. )) : vue.createCommentVNode("v-if", true),
  11820. (vue.openBlock(true), vue.createElementBlock(
  11821. vue.Fragment,
  11822. null,
  11823. vue.renderList($setup.devices, (item) => {
  11824. return vue.openBlock(), vue.createElementBlock(
  11825. "view",
  11826. null,
  11827. vue.toDisplayString(item.name),
  11828. 1
  11829. /* TEXT */
  11830. );
  11831. }),
  11832. 256
  11833. /* UNKEYED_FRAGMENT */
  11834. ))
  11835. ]);
  11836. }
  11837. const PagesIndexExpressScan = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["render", _sfc_render$1w], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/scan.vue"]]);
  11838. const props$j = {
  11839. props: {
  11840. // radio的名称
  11841. name: {
  11842. type: [String, Number, Boolean],
  11843. default: props$E.radio.name
  11844. },
  11845. // 形状,square为方形,circle为圆型
  11846. shape: {
  11847. type: String,
  11848. default: props$E.radio.shape
  11849. },
  11850. // 是否禁用
  11851. disabled: {
  11852. type: [String, Boolean],
  11853. default: props$E.radio.disabled
  11854. },
  11855. // 是否禁止点击提示语选中单选框
  11856. labelDisabled: {
  11857. type: [String, Boolean],
  11858. default: props$E.radio.labelDisabled
  11859. },
  11860. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  11861. activeColor: {
  11862. type: String,
  11863. default: props$E.radio.activeColor
  11864. },
  11865. // 未选中的颜色
  11866. inactiveColor: {
  11867. type: String,
  11868. default: props$E.radio.inactiveColor
  11869. },
  11870. // 图标的大小,单位px
  11871. iconSize: {
  11872. type: [String, Number],
  11873. default: props$E.radio.iconSize
  11874. },
  11875. // label的字体大小,px单位
  11876. labelSize: {
  11877. type: [String, Number],
  11878. default: props$E.radio.labelSize
  11879. },
  11880. // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
  11881. label: {
  11882. type: [String, Number],
  11883. default: props$E.radio.label
  11884. },
  11885. // 整体的大小
  11886. size: {
  11887. type: [String, Number],
  11888. default: props$E.radio.size
  11889. },
  11890. // 图标颜色
  11891. color: {
  11892. type: String,
  11893. default: props$E.radio.color
  11894. },
  11895. // label的颜色
  11896. labelColor: {
  11897. type: String,
  11898. default: props$E.radio.labelColor
  11899. },
  11900. // 图标颜色
  11901. iconColor: {
  11902. type: String,
  11903. default: props$E.radio.iconColor
  11904. }
  11905. }
  11906. };
  11907. const _sfc_main$1w = {
  11908. name: "u-radio",
  11909. mixins: [mpMixin, mixin, props$j],
  11910. data() {
  11911. return {
  11912. checked: false,
  11913. // 当你看到这段代码的时候,
  11914. // 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式
  11915. // 故只能使用如此方法
  11916. parentData: {
  11917. iconSize: 12,
  11918. labelDisabled: null,
  11919. disabled: null,
  11920. shape: null,
  11921. activeColor: null,
  11922. inactiveColor: null,
  11923. size: 18,
  11924. value: null,
  11925. modelValue: null,
  11926. iconColor: null,
  11927. placement: "row",
  11928. borderBottom: false,
  11929. iconPlacement: "left"
  11930. }
  11931. };
  11932. },
  11933. computed: {
  11934. // 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置
  11935. elDisabled() {
  11936. return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false;
  11937. },
  11938. // 是否禁用label点击
  11939. elLabelDisabled() {
  11940. return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false;
  11941. },
  11942. // 组件尺寸,对应size的值,默认值为21px
  11943. elSize() {
  11944. return this.size ? this.size : this.parentData.size ? this.parentData.size : 21;
  11945. },
  11946. // 组件的勾选图标的尺寸,默认12px
  11947. elIconSize() {
  11948. return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12;
  11949. },
  11950. // 组件选中激活时的颜色
  11951. elActiveColor() {
  11952. return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : "#2979ff";
  11953. },
  11954. // 组件选未中激活时的颜色
  11955. elInactiveColor() {
  11956. return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : "#c8c9cc";
  11957. },
  11958. // label的颜色
  11959. elLabelColor() {
  11960. return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : "#606266";
  11961. },
  11962. // 组件的形状
  11963. elShape() {
  11964. return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle";
  11965. },
  11966. // label大小
  11967. elLabelSize() {
  11968. return uni.$u.addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : "15");
  11969. },
  11970. elIconColor() {
  11971. const iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : "#ffffff";
  11972. if (this.elDisabled) {
  11973. return this.checked ? this.elInactiveColor : "transparent";
  11974. } else {
  11975. return this.checked ? iconColor : "transparent";
  11976. }
  11977. },
  11978. iconClasses() {
  11979. let classes = [];
  11980. classes.push("u-radio__icon-wrap--" + this.elShape);
  11981. if (this.elDisabled) {
  11982. classes.push("u-radio__icon-wrap--disabled");
  11983. }
  11984. if (this.checked && this.elDisabled) {
  11985. classes.push("u-radio__icon-wrap--disabled--checked");
  11986. }
  11987. return classes;
  11988. },
  11989. iconWrapStyle() {
  11990. const style = {};
  11991. style.backgroundColor = this.checked && !this.elDisabled ? this.elActiveColor : "#ffffff";
  11992. style.borderColor = this.checked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor;
  11993. style.width = uni.$u.addUnit(this.elSize);
  11994. style.height = uni.$u.addUnit(this.elSize);
  11995. if (this.parentData.iconPlacement === "right") {
  11996. style.marginRight = 0;
  11997. }
  11998. return style;
  11999. },
  12000. radioStyle() {
  12001. const style = {};
  12002. if (this.parentData.borderBottom && this.parentData.placement === "row") {
  12003. uni.$u.error("检测到您将borderBottom设置为true,需要同时将u-radio-group的placement设置为column才有效");
  12004. }
  12005. if (this.parentData.borderBottom && this.parentData.placement === "column") {
  12006. style.paddingBottom = uni.$u.os() === "ios" ? "12px" : "8px";
  12007. }
  12008. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  12009. }
  12010. },
  12011. mounted() {
  12012. this.init();
  12013. },
  12014. methods: {
  12015. init() {
  12016. this.updateParentData();
  12017. if (!this.parent) {
  12018. uni.$u.error("u-radio必须搭配u-radio-group组件使用");
  12019. }
  12020. this.checked = this.name === this.parentData.modelValue;
  12021. },
  12022. updateParentData() {
  12023. this.getParentData("u-radio-group");
  12024. },
  12025. // 点击图标
  12026. iconClickHandler(e) {
  12027. this.preventEvent(e);
  12028. if (!this.elDisabled) {
  12029. this.setRadioCheckedStatus();
  12030. }
  12031. },
  12032. // 横向两端排列时,点击组件即可触发选中事件
  12033. wrapperClickHandler(e) {
  12034. this.parentData.iconPlacement === "right" && this.iconClickHandler(e);
  12035. },
  12036. // 点击label
  12037. labelClickHandler(e) {
  12038. this.preventEvent(e);
  12039. if (!this.elLabelDisabled && !this.elDisabled) {
  12040. this.setRadioCheckedStatus();
  12041. }
  12042. },
  12043. emitEvent() {
  12044. if (!this.checked) {
  12045. this.$emit("change", this.name);
  12046. this.$nextTick(() => {
  12047. uni.$u.formValidate(this, "change");
  12048. });
  12049. }
  12050. },
  12051. // 改变组件选中状态
  12052. // 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-radio实例
  12053. // 将本组件外的其他u-radio的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态
  12054. setRadioCheckedStatus() {
  12055. this.emitEvent();
  12056. this.checked = true;
  12057. typeof this.parent.unCheckedOther === "function" && this.parent.unCheckedOther(this);
  12058. }
  12059. }
  12060. };
  12061. function _sfc_render$1v(_ctx, _cache, $props, $setup, $data, $options) {
  12062. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  12063. return vue.openBlock(), vue.createElementBlock(
  12064. "view",
  12065. {
  12066. class: vue.normalizeClass(["u-radio", [`u-radio-label--${$data.parentData.iconPlacement}`, $data.parentData.borderBottom && $data.parentData.placement === "column" && "u-border-bottom"]]),
  12067. onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.wrapperClickHandler && $options.wrapperClickHandler(...args), ["stop"])),
  12068. style: vue.normalizeStyle([$options.radioStyle])
  12069. },
  12070. [
  12071. vue.createElementVNode(
  12072. "view",
  12073. {
  12074. class: vue.normalizeClass(["u-radio__icon-wrap", $options.iconClasses]),
  12075. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.iconClickHandler && $options.iconClickHandler(...args), ["stop"])),
  12076. style: vue.normalizeStyle([$options.iconWrapStyle])
  12077. },
  12078. [
  12079. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  12080. vue.createVNode(_component_u_icon, {
  12081. class: "u-radio__icon-wrap__icon",
  12082. name: "checkbox-mark",
  12083. size: $options.elIconSize,
  12084. color: $options.elIconColor
  12085. }, null, 8, ["size", "color"])
  12086. ], true)
  12087. ],
  12088. 6
  12089. /* CLASS, STYLE */
  12090. ),
  12091. vue.createElementVNode(
  12092. "text",
  12093. {
  12094. class: "u-radio__text",
  12095. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.labelClickHandler && $options.labelClickHandler(...args), ["stop"])),
  12096. style: vue.normalizeStyle({
  12097. color: $options.elDisabled ? $options.elInactiveColor : $options.elLabelColor,
  12098. fontSize: $options.elLabelSize,
  12099. lineHeight: $options.elLabelSize
  12100. })
  12101. },
  12102. vue.toDisplayString(_ctx.label),
  12103. 5
  12104. /* TEXT, STYLE */
  12105. )
  12106. ],
  12107. 6
  12108. /* CLASS, STYLE */
  12109. );
  12110. }
  12111. const __easycom_0$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["render", _sfc_render$1v], ["__scopeId", "data-v-83036558"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-radio/u-radio.vue"]]);
  12112. const props$i = {
  12113. props: {
  12114. // 绑定的值
  12115. modelValue: {
  12116. type: [String, Number, Boolean],
  12117. default: props$E.radioGroup.value
  12118. },
  12119. // 是否禁用全部radio
  12120. disabled: {
  12121. type: Boolean,
  12122. default: props$E.radioGroup.disabled
  12123. },
  12124. // 形状,circle-圆形,square-方形
  12125. shape: {
  12126. type: String,
  12127. default: props$E.radioGroup.shape
  12128. },
  12129. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  12130. activeColor: {
  12131. type: String,
  12132. default: props$E.radioGroup.activeColor
  12133. },
  12134. // 未选中的颜色
  12135. inactiveColor: {
  12136. type: String,
  12137. default: props$E.radioGroup.inactiveColor
  12138. },
  12139. // 标识符
  12140. name: {
  12141. type: String,
  12142. default: props$E.radioGroup.name
  12143. },
  12144. // 整个组件的尺寸,默认px
  12145. size: {
  12146. type: [String, Number],
  12147. default: props$E.radioGroup.size
  12148. },
  12149. // 布局方式,row-横向,column-纵向
  12150. placement: {
  12151. type: String,
  12152. default: props$E.radioGroup.placement
  12153. },
  12154. // label的文本
  12155. label: {
  12156. type: [String],
  12157. default: props$E.radioGroup.label
  12158. },
  12159. // label的颜色 (默认 '#303133' )
  12160. labelColor: {
  12161. type: [String],
  12162. default: props$E.radioGroup.labelColor
  12163. },
  12164. // label的字体大小,px单位
  12165. labelSize: {
  12166. type: [String, Number],
  12167. default: props$E.radioGroup.labelSize
  12168. },
  12169. // 是否禁止点击文本操作checkbox(默认 false )
  12170. labelDisabled: {
  12171. type: Boolean,
  12172. default: props$E.radioGroup.labelDisabled
  12173. },
  12174. // 图标颜色
  12175. iconColor: {
  12176. type: String,
  12177. default: props$E.radioGroup.iconColor
  12178. },
  12179. // 图标的大小,单位px
  12180. iconSize: {
  12181. type: [String, Number],
  12182. default: props$E.radioGroup.iconSize
  12183. },
  12184. // 竖向配列时,是否显示下划线
  12185. borderBottom: {
  12186. type: Boolean,
  12187. default: props$E.radioGroup.borderBottom
  12188. },
  12189. // 图标与文字的对齐方式
  12190. iconPlacement: {
  12191. type: String,
  12192. default: props$E.radio.iconPlacement
  12193. }
  12194. }
  12195. };
  12196. const _sfc_main$1v = {
  12197. name: "u-radio-group",
  12198. mixins: [mpMixin, mixin, props$i],
  12199. computed: {
  12200. // 这里computed的变量,都是子组件u-radio需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
  12201. // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-radio-group)
  12202. // 拉取父组件新的变化后的参数
  12203. parentData() {
  12204. return [
  12205. this.modelValue,
  12206. this.disabled,
  12207. this.inactiveColor,
  12208. this.activeColor,
  12209. this.size,
  12210. this.labelDisabled,
  12211. this.shape,
  12212. this.iconSize,
  12213. this.borderBottom,
  12214. this.placement
  12215. ];
  12216. },
  12217. bemClass() {
  12218. return this.bem("radio-group", ["placement"]);
  12219. }
  12220. },
  12221. watch: {
  12222. // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
  12223. parentData() {
  12224. if (this.children.length) {
  12225. this.children.map((child) => {
  12226. typeof child.init === "function" && child.init();
  12227. });
  12228. }
  12229. }
  12230. },
  12231. data() {
  12232. return {};
  12233. },
  12234. created() {
  12235. this.children = [];
  12236. },
  12237. emits: ["update:modelValue", "change"],
  12238. methods: {
  12239. // 将其他的radio设置为未选中的状态
  12240. unCheckedOther(childInstance) {
  12241. this.children.map((child) => {
  12242. if (childInstance !== child) {
  12243. child.checked = false;
  12244. }
  12245. });
  12246. const {
  12247. name
  12248. } = childInstance;
  12249. this.$emit("update:modelValue", name);
  12250. this.$emit("change", name);
  12251. }
  12252. }
  12253. };
  12254. function _sfc_render$1u(_ctx, _cache, $props, $setup, $data, $options) {
  12255. return vue.openBlock(), vue.createElementBlock(
  12256. "view",
  12257. {
  12258. class: vue.normalizeClass(["u-radio-group", $options.bemClass])
  12259. },
  12260. [
  12261. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  12262. ],
  12263. 2
  12264. /* CLASS */
  12265. );
  12266. }
  12267. const __easycom_1$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["render", _sfc_render$1u], ["__scopeId", "data-v-cbc8bf70"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-radio-group/u-radio-group.vue"]]);
  12268. const props$h = {
  12269. props: {
  12270. // 是否虚线
  12271. dashed: {
  12272. type: Boolean,
  12273. default: props$E.divider.dashed
  12274. },
  12275. // 是否细线
  12276. hairline: {
  12277. type: Boolean,
  12278. default: props$E.divider.hairline
  12279. },
  12280. // 是否以点替代文字,优先于text字段起作用
  12281. dot: {
  12282. type: Boolean,
  12283. default: props$E.divider.dot
  12284. },
  12285. // 内容文本的位置,left-左边,center-中间,right-右边
  12286. textPosition: {
  12287. type: String,
  12288. default: props$E.divider.textPosition
  12289. },
  12290. // 文本内容
  12291. text: {
  12292. type: [String, Number],
  12293. default: props$E.divider.text
  12294. },
  12295. // 文本大小
  12296. textSize: {
  12297. type: [String, Number],
  12298. default: props$E.divider.textSize
  12299. },
  12300. // 文本颜色
  12301. textColor: {
  12302. type: String,
  12303. default: props$E.divider.textColor
  12304. },
  12305. // 线条颜色
  12306. lineColor: {
  12307. type: String,
  12308. default: props$E.divider.lineColor
  12309. }
  12310. }
  12311. };
  12312. const _sfc_main$1u = {
  12313. name: "u-divider",
  12314. mixins: [mpMixin, mixin, props$h],
  12315. computed: {
  12316. textStyle() {
  12317. const style = {};
  12318. style.fontSize = uni.$u.addUnit(this.textSize);
  12319. style.color = this.textColor;
  12320. return style;
  12321. },
  12322. // 左边线条的的样式
  12323. leftLineStyle() {
  12324. const style = {};
  12325. if (this.textPosition === "left") {
  12326. style.width = "80rpx";
  12327. } else {
  12328. style.flex = 1;
  12329. }
  12330. return style;
  12331. },
  12332. // 右边线条的的样式
  12333. rightLineStyle() {
  12334. const style = {};
  12335. if (this.textPosition === "right") {
  12336. style.width = "80rpx";
  12337. } else {
  12338. style.flex = 1;
  12339. }
  12340. return style;
  12341. }
  12342. },
  12343. methods: {
  12344. // divider组件被点击时触发
  12345. click() {
  12346. this.$emit("click");
  12347. }
  12348. }
  12349. };
  12350. function _sfc_render$1t(_ctx, _cache, $props, $setup, $data, $options) {
  12351. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$e);
  12352. return vue.openBlock(), vue.createElementBlock(
  12353. "view",
  12354. {
  12355. class: "u-divider",
  12356. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
  12357. onClick: _cache[0] || (_cache[0] = (...args) => $options.click && $options.click(...args))
  12358. },
  12359. [
  12360. vue.createVNode(_component_u_line, {
  12361. color: _ctx.lineColor,
  12362. customStyle: $options.leftLineStyle,
  12363. hairline: _ctx.hairline,
  12364. dashed: _ctx.dashed
  12365. }, null, 8, ["color", "customStyle", "hairline", "dashed"]),
  12366. _ctx.dot ? (vue.openBlock(), vue.createElementBlock("text", {
  12367. key: 0,
  12368. class: "u-divider__dot"
  12369. }, "●")) : _ctx.text ? (vue.openBlock(), vue.createElementBlock(
  12370. "text",
  12371. {
  12372. key: 1,
  12373. class: "u-divider__text",
  12374. style: vue.normalizeStyle([$options.textStyle])
  12375. },
  12376. vue.toDisplayString(_ctx.text),
  12377. 5
  12378. /* TEXT, STYLE */
  12379. )) : vue.createCommentVNode("v-if", true),
  12380. vue.createVNode(_component_u_line, {
  12381. color: _ctx.lineColor,
  12382. customStyle: $options.rightLineStyle,
  12383. hairline: _ctx.hairline,
  12384. dashed: _ctx.dashed
  12385. }, null, 8, ["color", "customStyle", "hairline", "dashed"])
  12386. ],
  12387. 4
  12388. /* STYLE */
  12389. );
  12390. }
  12391. const __easycom_2$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["render", _sfc_render$1t], ["__scopeId", "data-v-ea022cee"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-divider/u-divider.vue"]]);
  12392. const _sfc_main$1t = {
  12393. __name: "quick-check",
  12394. setup(__props, { expose: __expose }) {
  12395. __expose();
  12396. const selectedBatchId = vue.ref("");
  12397. const showBatchSelector = vue.ref(false);
  12398. const count = vue.ref(0);
  12399. const formData = vue.ref({
  12400. batchNum: "",
  12401. packageCode: "",
  12402. searchType: "2",
  12403. packageStatus: ""
  12404. });
  12405. const batchList = vue.ref([]);
  12406. function getBatchList() {
  12407. uni.$u.http.get("/app/batchnum/pagelist").then((res2) => {
  12408. batchList.value = res2.rows;
  12409. });
  12410. }
  12411. getBatchList();
  12412. const openBatchSelector = () => {
  12413. showBatchSelector.value = true;
  12414. };
  12415. const selectBatch = (batch) => {
  12416. selectedBatchId.value = batch.id;
  12417. count.value = Number(batch.num);
  12418. formData.value.batchNum = batch.batchNum;
  12419. showBatchSelector.value = false;
  12420. };
  12421. const handleSearch = () => {
  12422. formatAppLog("log", "at pages/index/express/quick-check.vue:116", "查询:", formData.value.packageCode);
  12423. };
  12424. const handleSubmitBatch = () => {
  12425. formatAppLog("log", "at pages/index/express/quick-check.vue:121", "提交批次:", formData.value.batchNum);
  12426. if (!formData.value.batchNum) {
  12427. uni.$u.toast("请选择批次");
  12428. return;
  12429. }
  12430. if (!formData.value.packageCode) {
  12431. uni.$u.toast("请扫描/输入物流单号");
  12432. return;
  12433. }
  12434. uni.$u.http.post("/app/ordersign/deliverySign", formData.value).then((res2) => {
  12435. formatAppLog("log", "at pages/index/express/quick-check.vue:131", res2);
  12436. if (res2.code == 200) {
  12437. let text = code + "快递验收成功";
  12438. uni.$u.ttsModule.speak(text);
  12439. } else {
  12440. let text = code + "订单不存在";
  12441. uni.$u.ttsModule.speak(text);
  12442. }
  12443. });
  12444. };
  12445. const handleScan = () => {
  12446. uni.scanCode({
  12447. success: (res2) => {
  12448. formData.value.packageCode = res2.result;
  12449. handleSubmitBatch();
  12450. }
  12451. });
  12452. };
  12453. const createNewBatch = () => {
  12454. selectedBatchId.value = "new";
  12455. formData.value.batchNum = "新建批次";
  12456. count.value = 0;
  12457. };
  12458. onLoad(() => {
  12459. uni.$u.useGlobalEvent((e) => {
  12460. formData.value.packageCode = e.barcode;
  12461. handleSubmitBatch();
  12462. });
  12463. });
  12464. const __returned__ = { selectedBatchId, showBatchSelector, count, formData, batchList, getBatchList, openBatchSelector, selectBatch, handleSearch, handleSubmitBatch, handleScan, createNewBatch, ref: vue.ref, get onLoad() {
  12465. return onLoad;
  12466. } };
  12467. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  12468. return __returned__;
  12469. }
  12470. };
  12471. function _sfc_render$1s(_ctx, _cache, $props, $setup, $data, $options) {
  12472. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  12473. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  12474. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
  12475. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$4);
  12476. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  12477. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$3);
  12478. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_3$4);
  12479. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12480. vue.createCommentVNode(" 批次选择区域 "),
  12481. vue.createElementVNode("view", { class: "select-section" }, [
  12482. vue.createElementVNode("view", { class: "batch-select" }, [
  12483. vue.createElementVNode("text", { class: "required" }, "*"),
  12484. vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "批次:"),
  12485. vue.createElementVNode("view", { class: "batch-input" }, [
  12486. vue.createElementVNode("view", {
  12487. class: "batch-input-text",
  12488. onClick: $setup.openBatchSelector
  12489. }),
  12490. vue.createVNode(_component_u_input, {
  12491. modelValue: $setup.formData.batchNum,
  12492. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.batchNum = $event),
  12493. placeholder: "请选择/新建批次",
  12494. readonly: "",
  12495. border: "surround",
  12496. "placeholder-style": "font-size: 32rpx",
  12497. "custom-style": "font-size: 32rpx;height: 88rpx;"
  12498. }, {
  12499. suffix: vue.withCtx(() => [
  12500. vue.createVNode(_component_u_icon, {
  12501. name: "arrow-down",
  12502. size: "18"
  12503. })
  12504. ]),
  12505. _: 1
  12506. /* STABLE */
  12507. }, 8, ["modelValue"])
  12508. ])
  12509. ])
  12510. ]),
  12511. vue.createCommentVNode(" 数量显示 "),
  12512. vue.createElementVNode("view", { class: "count-badge" }, [
  12513. vue.createTextVNode(" 数量 "),
  12514. vue.createElementVNode(
  12515. "text",
  12516. { style: { "font-size": "32rpx" } },
  12517. vue.toDisplayString($setup.count),
  12518. 1
  12519. /* TEXT */
  12520. )
  12521. ]),
  12522. vue.createCommentVNode(" 底部按钮 "),
  12523. vue.createElementVNode("view", { class: "footer" }, [
  12524. vue.createCommentVNode(" 查询区域 "),
  12525. vue.createElementVNode("view", { class: "query-section" }, [
  12526. vue.createVNode(_component_u_radio_group, {
  12527. modelValue: $setup.formData.searchType,
  12528. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.searchType = $event),
  12529. class: "query-radio"
  12530. }, {
  12531. default: vue.withCtx(() => [
  12532. vue.createVNode(_component_u_radio, {
  12533. label: "查订单",
  12534. name: "1",
  12535. labelSize: "16px",
  12536. iconSize: "16px"
  12537. }),
  12538. vue.createVNode(_component_u_radio, {
  12539. label: "查物流",
  12540. "custom-style": "margin-left:20px",
  12541. name: "2",
  12542. labelSize: "16px",
  12543. iconSize: "16px"
  12544. })
  12545. ]),
  12546. _: 1
  12547. /* STABLE */
  12548. }, 8, ["modelValue"]),
  12549. vue.createElementVNode("view", { class: "search-box" }, [
  12550. vue.createVNode(_component_u_input, {
  12551. "custom-style": "font-size: 32rpx;",
  12552. "placeholder-style": "font-size: 32rpx;",
  12553. modelValue: $setup.formData.packageCode,
  12554. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.packageCode = $event),
  12555. adjustPosition: true,
  12556. placeholder: "扫描/输入物流单号",
  12557. border: "surround",
  12558. clearable: ""
  12559. }, null, 8, ["modelValue"]),
  12560. vue.createVNode(_component_u_button, {
  12561. color: "#c8c8c8",
  12562. text: "查询",
  12563. onClick: $setup.handleSearch
  12564. })
  12565. ])
  12566. ]),
  12567. vue.createVNode(_component_u_divider),
  12568. vue.createElementVNode("view", { style: { "display": "flex" } }, [
  12569. vue.createVNode(_component_u_button, {
  12570. size: "large",
  12571. type: "warning",
  12572. text: "验收扫码",
  12573. onClick: $setup.handleScan
  12574. }),
  12575. vue.createVNode(_component_u_button, {
  12576. size: "large",
  12577. type: "primary",
  12578. text: "提交批次",
  12579. onClick: $setup.handleSubmitBatch
  12580. })
  12581. ])
  12582. ]),
  12583. vue.createCommentVNode(" 批次选择弹窗 "),
  12584. vue.createVNode(_component_u_popup, {
  12585. show: $setup.showBatchSelector,
  12586. mode: "bottom",
  12587. onClose: _cache[3] || (_cache[3] = ($event) => $setup.showBatchSelector = false)
  12588. }, {
  12589. default: vue.withCtx(() => [
  12590. vue.createElementVNode("view", {
  12591. class: "batch-popup",
  12592. style: { "min-height": "300px" }
  12593. }, [
  12594. vue.createElementVNode("view", { class: "popup-header" }, [
  12595. vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "批次")
  12596. ]),
  12597. vue.createElementVNode("scroll-view", {
  12598. "scroll-y": "",
  12599. class: "batch-list"
  12600. }, [
  12601. vue.createElementVNode(
  12602. "view",
  12603. {
  12604. class: vue.normalizeClass(["batch-item", { active: $setup.selectedBatchId === "new" }]),
  12605. onClick: $setup.createNewBatch
  12606. },
  12607. [
  12608. vue.createElementVNode("text", null, "新建批次")
  12609. ],
  12610. 2
  12611. /* CLASS */
  12612. ),
  12613. (vue.openBlock(true), vue.createElementBlock(
  12614. vue.Fragment,
  12615. null,
  12616. vue.renderList($setup.batchList, (batch) => {
  12617. return vue.openBlock(), vue.createElementBlock("view", {
  12618. key: batch.id,
  12619. class: vue.normalizeClass(["batch-item", { active: $setup.selectedBatchId === batch.id }]),
  12620. onClick: ($event) => $setup.selectBatch(batch)
  12621. }, [
  12622. vue.createElementVNode(
  12623. "text",
  12624. null,
  12625. vue.toDisplayString(batch.batchNum),
  12626. 1
  12627. /* TEXT */
  12628. ),
  12629. vue.createElementVNode(
  12630. "text",
  12631. null,
  12632. vue.toDisplayString(batch.num),
  12633. 1
  12634. /* TEXT */
  12635. )
  12636. ], 10, ["onClick"]);
  12637. }),
  12638. 128
  12639. /* KEYED_FRAGMENT */
  12640. ))
  12641. ])
  12642. ])
  12643. ]),
  12644. _: 1
  12645. /* STABLE */
  12646. }, 8, ["show"])
  12647. ]);
  12648. }
  12649. const PagesIndexExpressQuickCheck = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["render", _sfc_render$1s], ["__scopeId", "data-v-61cc11f4"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/quick-check.vue"]]);
  12650. const keymap = {
  12651. "7": "0",
  12652. "8": "1",
  12653. "9": "2",
  12654. "10": "3",
  12655. "11": "4",
  12656. "12": "5",
  12657. "13": "6",
  12658. "14": "7",
  12659. "15": "8",
  12660. "16": "9",
  12661. "29": "A",
  12662. "30": "B",
  12663. "31": "C",
  12664. "32": "D",
  12665. "33": "E",
  12666. "34": "F",
  12667. "35": "G",
  12668. "36": "H",
  12669. "37": "I",
  12670. "38": "J",
  12671. "39": "K",
  12672. "40": "L",
  12673. "41": "M",
  12674. "42": "N",
  12675. "43": "O",
  12676. "44": "P",
  12677. "45": "Q",
  12678. "46": "R",
  12679. "47": "S",
  12680. "48": "T",
  12681. "49": "U",
  12682. "50": "V",
  12683. "51": "W",
  12684. "52": "X",
  12685. "53": "Y",
  12686. "54": "Z",
  12687. "55": ",",
  12688. "56": ".",
  12689. "59": "",
  12690. "69": "-",
  12691. "70": "=",
  12692. "81": "+"
  12693. };
  12694. const _sfc_main$1s = {
  12695. __name: "quick-unpack",
  12696. setup(__props, { expose: __expose }) {
  12697. __expose();
  12698. function goScan() {
  12699. uni.navigateTo({
  12700. url: "/pages/index/express/scan"
  12701. });
  12702. }
  12703. const unpackCode = vue.ref("");
  12704. function confirmTrackingNumber(code2) {
  12705. uni.$u.http.post("/app/ordersign/unpackingSign", {
  12706. packageCode: code2
  12707. }).then((res2) => {
  12708. if (res2.code == 200) {
  12709. let text = code2 + "拆包成功";
  12710. uni.$u.ttsModule.speak(text);
  12711. } else {
  12712. let text = code2 + "订单不存在";
  12713. uni.$u.ttsModule.speak(text);
  12714. }
  12715. });
  12716. }
  12717. function scanCode() {
  12718. uni.scanCode({
  12719. success: (res2) => {
  12720. unpackCode.value = res2.result;
  12721. confirmTrackingNumber(res2.result);
  12722. formatAppLog("log", "at pages/index/express/quick-unpack.vue:66", "扫码结果:", res2.result);
  12723. },
  12724. fail: (err) => {
  12725. formatAppLog("error", "at pages/index/express/quick-unpack.vue:69", "扫码失败:", err);
  12726. }
  12727. });
  12728. }
  12729. const inputCache = vue.ref("");
  12730. const keypress = (e) => {
  12731. if (e.keyCode === 66 || e.key == "Enter") {
  12732. unpackCode.value = inputCache.value;
  12733. confirmTrackingNumber(unpackCode.value);
  12734. inputCache.value = "";
  12735. } else {
  12736. inputCache.value += keymap[e.keyCode] || "";
  12737. }
  12738. };
  12739. onLoad(() => {
  12740. uni.$u.useGlobalEvent((e) => {
  12741. unpackCode.value = e.barcode;
  12742. confirmTrackingNumber(e.barcode);
  12743. });
  12744. plus.key.addEventListener("keyup", keypress);
  12745. });
  12746. onUnload(() => {
  12747. plus.key.removeEventListener("keyup", keypress);
  12748. });
  12749. const __returned__ = { goScan, unpackCode, confirmTrackingNumber, scanCode, inputCache, keypress, ref: vue.ref, get onLoad() {
  12750. return onLoad;
  12751. }, get onUnload() {
  12752. return onUnload;
  12753. }, get keymap() {
  12754. return keymap;
  12755. } };
  12756. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  12757. return __returned__;
  12758. }
  12759. };
  12760. function _sfc_render$1r(_ctx, _cache, $props, $setup, $data, $options) {
  12761. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  12762. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  12763. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12764. 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> '),
  12765. vue.createVNode(_component_u_button, {
  12766. type: "primary",
  12767. onClick: $setup.goScan,
  12768. text: "扫码"
  12769. }),
  12770. vue.createElementVNode("view", { class: "main-content" }, [
  12771. vue.createElementVNode("view", { class: "input-group" }, [
  12772. vue.createVNode(_component_u_input, {
  12773. "placeholder-style": "font-size:32rpx",
  12774. modelValue: $setup.unpackCode,
  12775. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.unpackCode = $event),
  12776. placeholder: "扫描/输入物流单号",
  12777. border: "surround"
  12778. }, null, 8, ["modelValue"]),
  12779. vue.createVNode(_component_u_button, {
  12780. type: "primary",
  12781. onClick: _cache[1] || (_cache[1] = ($event) => $setup.confirmTrackingNumber($setup.unpackCode)),
  12782. text: "确定"
  12783. })
  12784. ])
  12785. ]),
  12786. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  12787. vue.createVNode(_component_u_button, {
  12788. size: "large",
  12789. type: "success",
  12790. onClick: $setup.scanCode,
  12791. text: "扫码",
  12792. class: "scan-button"
  12793. })
  12794. ])
  12795. ]);
  12796. }
  12797. const PagesIndexExpressQuickUnpack = /* @__PURE__ */ _export_sfc(_sfc_main$1s, [["render", _sfc_render$1r], ["__scopeId", "data-v-cd1b3ab5"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/quick-unpack.vue"]]);
  12798. const props$g = {
  12799. props: {
  12800. // tab的数据
  12801. list: {
  12802. type: Array,
  12803. default: props$E.subsection.list
  12804. },
  12805. // 当前活动的tab的index
  12806. current: {
  12807. type: [String, Number],
  12808. default: props$E.subsection.current
  12809. },
  12810. // 激活的颜色
  12811. activeColor: {
  12812. type: String,
  12813. default: props$E.subsection.activeColor
  12814. },
  12815. // 未激活的颜色
  12816. inactiveColor: {
  12817. type: String,
  12818. default: props$E.subsection.inactiveColor
  12819. },
  12820. // 模式选择,mode=button为按钮形式,mode=subsection时为分段模式
  12821. mode: {
  12822. type: String,
  12823. default: props$E.subsection.mode
  12824. },
  12825. // 字体大小
  12826. fontSize: {
  12827. type: [String, Number],
  12828. default: props$E.subsection.fontSize
  12829. },
  12830. // 激活tab的字体是否加粗
  12831. bold: {
  12832. type: Boolean,
  12833. default: props$E.subsection.bold
  12834. },
  12835. // mode = button时,组件背景颜色
  12836. bgColor: {
  12837. type: String,
  12838. default: props$E.subsection.bgColor
  12839. },
  12840. // 从list元素对象中读取的键名
  12841. keyName: {
  12842. type: String,
  12843. default: props$E.subsection.keyName
  12844. }
  12845. }
  12846. };
  12847. const _sfc_main$1r = {
  12848. name: "u-subsection",
  12849. mixins: [mpMixin, mixin, props$g],
  12850. data() {
  12851. return {
  12852. // 组件尺寸
  12853. itemRect: {
  12854. width: 0,
  12855. height: 0
  12856. }
  12857. };
  12858. },
  12859. watch: {
  12860. list(newValue, oldValue) {
  12861. this.init();
  12862. },
  12863. current: {
  12864. immediate: true,
  12865. handler(n) {
  12866. }
  12867. }
  12868. },
  12869. computed: {
  12870. wrapperStyle() {
  12871. const style = {};
  12872. if (this.mode === "button") {
  12873. style.backgroundColor = this.bgColor;
  12874. }
  12875. return style;
  12876. },
  12877. // 滑块的样式
  12878. barStyle() {
  12879. const style = {};
  12880. style.width = `${this.itemRect.width}px`;
  12881. style.height = `${this.itemRect.height}px`;
  12882. style.transform = `translateX(${this.current * this.itemRect.width}px)`;
  12883. if (this.mode === "subsection") {
  12884. style.backgroundColor = this.activeColor;
  12885. }
  12886. return style;
  12887. },
  12888. // 分段器item的样式
  12889. itemStyle(index2) {
  12890. return (index3) => {
  12891. const style = {};
  12892. if (this.mode === "subsection") {
  12893. style.borderColor = this.activeColor;
  12894. style.borderWidth = "1px";
  12895. style.borderStyle = "solid";
  12896. }
  12897. return style;
  12898. };
  12899. },
  12900. // 分段器文字颜色
  12901. textStyle(index2) {
  12902. return (index3) => {
  12903. const style = {};
  12904. style.fontWeight = this.bold && this.current === index3 ? "bold" : "normal";
  12905. style.fontSize = uni.$u.addUnit(this.fontSize);
  12906. if (this.mode === "subsection") {
  12907. style.color = this.current === index3 ? "#fff" : this.inactiveColor;
  12908. } else {
  12909. style.color = this.current === index3 ? this.activeColor : this.inactiveColor;
  12910. }
  12911. return style;
  12912. };
  12913. }
  12914. },
  12915. mounted() {
  12916. this.init();
  12917. },
  12918. methods: {
  12919. init() {
  12920. uni.$u.sleep().then(() => this.getRect());
  12921. },
  12922. // 判断展示文本
  12923. getText(item) {
  12924. return typeof item === "object" ? item[this.keyName] : item;
  12925. },
  12926. // 获取组件的尺寸
  12927. getRect() {
  12928. this.$uGetRect(".u-subsection__item--0").then((size) => {
  12929. this.itemRect = size;
  12930. });
  12931. },
  12932. clickHandler(index2) {
  12933. this.$emit("change", index2);
  12934. }
  12935. }
  12936. };
  12937. function _sfc_render$1q(_ctx, _cache, $props, $setup, $data, $options) {
  12938. return vue.openBlock(), vue.createElementBlock(
  12939. "view",
  12940. {
  12941. class: vue.normalizeClass(["u-subsection", [`u-subsection--${_ctx.mode}`]]),
  12942. ref: "u-subsection",
  12943. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), $options.wrapperStyle])
  12944. },
  12945. [
  12946. vue.createElementVNode(
  12947. "view",
  12948. {
  12949. class: vue.normalizeClass(["u-subsection__bar", [
  12950. _ctx.mode === "button" && "u-subsection--button__bar",
  12951. _ctx.current === 0 && _ctx.mode === "subsection" && "u-subsection__bar--first",
  12952. _ctx.current > 0 && _ctx.current < _ctx.list.length - 1 && _ctx.mode === "subsection" && "u-subsection__bar--center",
  12953. _ctx.current === _ctx.list.length - 1 && _ctx.mode === "subsection" && "u-subsection__bar--last"
  12954. ]]),
  12955. ref: "u-subsection__bar",
  12956. style: vue.normalizeStyle([$options.barStyle])
  12957. },
  12958. null,
  12959. 6
  12960. /* CLASS, STYLE */
  12961. ),
  12962. (vue.openBlock(true), vue.createElementBlock(
  12963. vue.Fragment,
  12964. null,
  12965. vue.renderList(_ctx.list, (item, index2) => {
  12966. return vue.openBlock(), vue.createElementBlock("view", {
  12967. class: vue.normalizeClass(["u-subsection__item", [
  12968. `u-subsection__item--${index2}`,
  12969. index2 < _ctx.list.length - 1 && "u-subsection__item--no-border-right",
  12970. index2 === 0 && "u-subsection__item--first",
  12971. index2 === _ctx.list.length - 1 && "u-subsection__item--last"
  12972. ]]),
  12973. ref_for: true,
  12974. ref: `u-subsection__item--${index2}`,
  12975. style: vue.normalizeStyle([$options.itemStyle(index2)]),
  12976. onClick: ($event) => $options.clickHandler(index2),
  12977. key: index2
  12978. }, [
  12979. vue.createElementVNode(
  12980. "text",
  12981. {
  12982. class: "u-subsection__item__text",
  12983. style: vue.normalizeStyle([$options.textStyle(index2)])
  12984. },
  12985. vue.toDisplayString($options.getText(item)),
  12986. 5
  12987. /* TEXT, STYLE */
  12988. )
  12989. ], 14, ["onClick"]);
  12990. }),
  12991. 128
  12992. /* KEYED_FRAGMENT */
  12993. ))
  12994. ],
  12995. 6
  12996. /* CLASS, STYLE */
  12997. );
  12998. }
  12999. const __easycom_0$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1r, [["render", _sfc_render$1q], ["__scopeId", "data-v-b5ccb67e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-subsection/u-subsection.vue"]]);
  13000. const props$f = {
  13001. props: {
  13002. // 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px
  13003. offsetTop: {
  13004. type: [String, Number],
  13005. default: props$E.sticky.offsetTop
  13006. },
  13007. // 自定义导航栏的高度
  13008. customNavHeight: {
  13009. type: [String, Number],
  13010. default: props$E.sticky.customNavHeight
  13011. },
  13012. // 是否开启吸顶功能
  13013. disabled: {
  13014. type: Boolean,
  13015. default: props$E.sticky.disabled
  13016. },
  13017. // 吸顶区域的背景颜色
  13018. bgColor: {
  13019. type: String,
  13020. default: props$E.sticky.bgColor
  13021. },
  13022. // z-index值
  13023. zIndex: {
  13024. type: [String, Number],
  13025. default: props$E.sticky.zIndex
  13026. },
  13027. // 列表中的索引值
  13028. index: {
  13029. type: [String, Number],
  13030. default: props$E.sticky.index
  13031. }
  13032. }
  13033. };
  13034. const _sfc_main$1q = {
  13035. name: "u-sticky",
  13036. mixins: [mpMixin, mixin, props$f],
  13037. data() {
  13038. return {
  13039. cssSticky: false,
  13040. // 是否使用css的sticky实现
  13041. stickyTop: 0,
  13042. // 吸顶的top值,因为可能受自定义导航栏影响,最终的吸顶值非offsetTop值
  13043. elId: uni.$u.guid(),
  13044. left: 0,
  13045. // js模式时,吸顶的内容因为处于postition: fixed模式,为了和原来保持一致的样式,需要记录并重新设置它的left,height,width属性
  13046. width: "auto",
  13047. height: "auto",
  13048. fixed: false
  13049. // js模式时,是否处于吸顶模式
  13050. };
  13051. },
  13052. computed: {
  13053. style() {
  13054. const style = {};
  13055. if (!this.disabled) {
  13056. if (this.cssSticky) {
  13057. style.position = "sticky";
  13058. style.zIndex = this.uZindex;
  13059. style.top = uni.$u.addUnit(this.stickyTop);
  13060. } else {
  13061. style.height = this.fixed ? this.height + "px" : "auto";
  13062. }
  13063. } else {
  13064. style.position = "static";
  13065. }
  13066. style.backgroundColor = this.bgColor;
  13067. return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style);
  13068. },
  13069. // 吸顶内容的样式
  13070. stickyContent() {
  13071. const style = {};
  13072. if (!this.cssSticky) {
  13073. style.position = this.fixed ? "fixed" : "static";
  13074. style.top = this.stickyTop + "px";
  13075. style.left = this.left + "px";
  13076. style.width = this.width == "auto" ? "auto" : this.width + "px";
  13077. style.zIndex = this.uZindex;
  13078. }
  13079. return style;
  13080. },
  13081. uZindex() {
  13082. return this.zIndex ? this.zIndex : uni.$u.zIndex.sticky;
  13083. }
  13084. },
  13085. mounted() {
  13086. this.init();
  13087. },
  13088. methods: {
  13089. init() {
  13090. this.getStickyTop();
  13091. this.checkSupportCssSticky();
  13092. if (!this.cssSticky) {
  13093. !this.disabled && this.initObserveContent();
  13094. }
  13095. },
  13096. initObserveContent() {
  13097. this.$uGetRect("#" + this.elId).then((res2) => {
  13098. this.height = res2.height;
  13099. this.left = res2.left;
  13100. this.width = res2.width;
  13101. this.$nextTick(() => {
  13102. this.observeContent();
  13103. });
  13104. });
  13105. },
  13106. observeContent() {
  13107. this.disconnectObserver("contentObserver");
  13108. const contentObserver = uni.createIntersectionObserver({
  13109. // 检测的区间范围
  13110. thresholds: [0.95, 0.98, 1]
  13111. });
  13112. contentObserver.relativeToViewport({
  13113. top: -this.stickyTop
  13114. });
  13115. contentObserver.observe(`#${this.elId}`, (res2) => {
  13116. this.setFixed(res2.boundingClientRect.top);
  13117. });
  13118. this.contentObserver = contentObserver;
  13119. },
  13120. setFixed(top) {
  13121. const fixed = top <= this.stickyTop;
  13122. this.fixed = fixed;
  13123. },
  13124. disconnectObserver(observerName) {
  13125. const observer = this[observerName];
  13126. observer && observer.disconnect();
  13127. },
  13128. getStickyTop() {
  13129. this.stickyTop = uni.$u.getPx(this.offsetTop) + uni.$u.getPx(this.customNavHeight);
  13130. },
  13131. async checkSupportCssSticky() {
  13132. if (uni.$u.os() === "android" && Number(uni.$u.sys().system) > 8) {
  13133. this.cssSticky = true;
  13134. }
  13135. this.cssSticky = await this.checkComputedStyle();
  13136. if (uni.$u.os() === "ios") {
  13137. this.cssSticky = true;
  13138. }
  13139. },
  13140. // 在APP和微信小程序上,通过uni.createSelectorQuery可以判断是否支持css sticky
  13141. checkComputedStyle() {
  13142. return new Promise((resolve) => {
  13143. uni.createSelectorQuery().in(this).select(".u-sticky").fields({
  13144. computedStyle: ["position"]
  13145. }).exec((e) => {
  13146. resolve("sticky" === e[0].position);
  13147. });
  13148. });
  13149. },
  13150. // H5通过创建元素的形式嗅探是否支持css sticky
  13151. // 判断浏览器是否支持sticky属性
  13152. checkCssStickyForH5() {
  13153. }
  13154. },
  13155. beforeDestroy() {
  13156. this.disconnectObserver("contentObserver");
  13157. }
  13158. };
  13159. function _sfc_render$1p(_ctx, _cache, $props, $setup, $data, $options) {
  13160. return vue.openBlock(), vue.createElementBlock("view", {
  13161. class: "u-sticky",
  13162. id: $data.elId,
  13163. style: vue.normalizeStyle([$options.style])
  13164. }, [
  13165. vue.createElementVNode(
  13166. "view",
  13167. {
  13168. style: vue.normalizeStyle([$options.stickyContent]),
  13169. class: "u-sticky__content"
  13170. },
  13171. [
  13172. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  13173. ],
  13174. 4
  13175. /* STYLE */
  13176. )
  13177. ], 12, ["id"]);
  13178. }
  13179. const __easycom_1$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", _sfc_render$1p], ["__scopeId", "data-v-8b303089"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-sticky/u-sticky.vue"]]);
  13180. const props$e = {
  13181. props: {
  13182. // 是否展示modal
  13183. show: {
  13184. type: Boolean,
  13185. default: props$E.modal.show
  13186. },
  13187. // 标题
  13188. title: {
  13189. type: [String],
  13190. default: props$E.modal.title
  13191. },
  13192. // 弹窗内容
  13193. content: {
  13194. type: String,
  13195. default: props$E.modal.content
  13196. },
  13197. // 确认文案
  13198. confirmText: {
  13199. type: String,
  13200. default: props$E.modal.confirmText
  13201. },
  13202. // 取消文案
  13203. cancelText: {
  13204. type: String,
  13205. default: props$E.modal.cancelText
  13206. },
  13207. // 是否显示确认按钮
  13208. showConfirmButton: {
  13209. type: Boolean,
  13210. default: props$E.modal.showConfirmButton
  13211. },
  13212. // 是否显示取消按钮
  13213. showCancelButton: {
  13214. type: Boolean,
  13215. default: props$E.modal.showCancelButton
  13216. },
  13217. // 确认按钮颜色
  13218. confirmColor: {
  13219. type: String,
  13220. default: props$E.modal.confirmColor
  13221. },
  13222. // 取消文字颜色
  13223. cancelColor: {
  13224. type: String,
  13225. default: props$E.modal.cancelColor
  13226. },
  13227. // 对调确认和取消的位置
  13228. buttonReverse: {
  13229. type: Boolean,
  13230. default: props$E.modal.buttonReverse
  13231. },
  13232. // 是否开启缩放效果
  13233. zoom: {
  13234. type: Boolean,
  13235. default: props$E.modal.zoom
  13236. },
  13237. // 是否异步关闭,只对确定按钮有效
  13238. asyncClose: {
  13239. type: Boolean,
  13240. default: props$E.modal.asyncClose
  13241. },
  13242. // 是否允许点击遮罩关闭modal
  13243. closeOnClickOverlay: {
  13244. type: Boolean,
  13245. default: props$E.modal.closeOnClickOverlay
  13246. },
  13247. // 给一个负的margin-top,往上偏移,避免和键盘重合的情况
  13248. negativeTop: {
  13249. type: [String, Number],
  13250. default: props$E.modal.negativeTop
  13251. },
  13252. // modal宽度,不支持百分比,可以数值,px,rpx单位
  13253. width: {
  13254. type: [String, Number],
  13255. default: props$E.modal.width
  13256. },
  13257. // 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮
  13258. confirmButtonShape: {
  13259. type: String,
  13260. default: props$E.modal.confirmButtonShape
  13261. }
  13262. }
  13263. };
  13264. const _sfc_main$1p = {
  13265. name: "u-modal",
  13266. mixins: [mpMixin, mixin, props$e],
  13267. data() {
  13268. return {
  13269. loading: false
  13270. };
  13271. },
  13272. watch: {
  13273. show(n) {
  13274. if (n && this.loading)
  13275. this.loading = false;
  13276. }
  13277. },
  13278. methods: {
  13279. // 点击确定按钮
  13280. confirmHandler() {
  13281. if (this.asyncClose) {
  13282. this.loading = true;
  13283. }
  13284. this.$emit("confirm");
  13285. },
  13286. // 点击取消按钮
  13287. cancelHandler() {
  13288. this.$emit("cancel");
  13289. },
  13290. // 点击遮罩
  13291. // 从原理上来说,modal的遮罩点击,并不是真的点击到了遮罩
  13292. // 因为modal依赖于popup的中部弹窗类型,中部弹窗比较特殊,虽有然遮罩,但是为了让弹窗内容能flex居中
  13293. // 多了一个透明的遮罩,此透明的遮罩会覆盖在灰色的遮罩上,所以实际上是点击不到灰色遮罩的,popup内部在
  13294. // 透明遮罩的子元素做了.stop处理,所以点击内容区,也不会导致误触发
  13295. clickHandler() {
  13296. if (this.closeOnClickOverlay) {
  13297. this.$emit("close");
  13298. }
  13299. }
  13300. }
  13301. };
  13302. function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) {
  13303. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$e);
  13304. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  13305. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_3$4);
  13306. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  13307. mode: "center",
  13308. zoom: _ctx.zoom,
  13309. show: _ctx.show,
  13310. customStyle: {
  13311. borderRadius: "6px",
  13312. overflow: "hidden",
  13313. marginTop: `-${_ctx.$u.addUnit(_ctx.negativeTop)}`
  13314. },
  13315. closeOnClickOverlay: _ctx.closeOnClickOverlay,
  13316. safeAreaInsetBottom: false,
  13317. duration: 400,
  13318. onClick: $options.clickHandler
  13319. }, {
  13320. default: vue.withCtx(() => [
  13321. vue.createElementVNode(
  13322. "view",
  13323. {
  13324. class: "u-modal",
  13325. style: vue.normalizeStyle({
  13326. width: _ctx.$u.addUnit(_ctx.width)
  13327. })
  13328. },
  13329. [
  13330. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  13331. "text",
  13332. {
  13333. key: 0,
  13334. class: "u-modal__title"
  13335. },
  13336. vue.toDisplayString(_ctx.title),
  13337. 1
  13338. /* TEXT */
  13339. )) : vue.createCommentVNode("v-if", true),
  13340. vue.createElementVNode(
  13341. "view",
  13342. {
  13343. class: "u-modal__content",
  13344. style: vue.normalizeStyle({
  13345. paddingTop: `${_ctx.title ? 12 : 25}px`
  13346. })
  13347. },
  13348. [
  13349. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  13350. vue.createElementVNode(
  13351. "text",
  13352. { class: "u-modal__content__text" },
  13353. vue.toDisplayString(_ctx.content),
  13354. 1
  13355. /* TEXT */
  13356. )
  13357. ], true)
  13358. ],
  13359. 4
  13360. /* STYLE */
  13361. ),
  13362. _ctx.$slots.confirmButton ? (vue.openBlock(), vue.createElementBlock("view", {
  13363. key: 1,
  13364. class: "u-modal__button-group--confirm-button"
  13365. }, [
  13366. vue.renderSlot(_ctx.$slots, "confirmButton", {}, void 0, true)
  13367. ])) : (vue.openBlock(), vue.createElementBlock(
  13368. vue.Fragment,
  13369. { key: 2 },
  13370. [
  13371. vue.createVNode(_component_u_line),
  13372. vue.createElementVNode(
  13373. "view",
  13374. {
  13375. class: "u-modal__button-group",
  13376. style: vue.normalizeStyle({
  13377. flexDirection: _ctx.buttonReverse ? "row-reverse" : "row"
  13378. })
  13379. },
  13380. [
  13381. _ctx.showCancelButton ? (vue.openBlock(), vue.createElementBlock(
  13382. "view",
  13383. {
  13384. key: 0,
  13385. 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"]]),
  13386. "hover-stay-time": 150,
  13387. "hover-class": "u-modal__button-group__wrapper--hover",
  13388. onClick: _cache[0] || (_cache[0] = (...args) => $options.cancelHandler && $options.cancelHandler(...args))
  13389. },
  13390. [
  13391. vue.createElementVNode(
  13392. "text",
  13393. {
  13394. class: "u-modal__button-group__wrapper__text",
  13395. style: vue.normalizeStyle({
  13396. color: _ctx.cancelColor
  13397. })
  13398. },
  13399. vue.toDisplayString(_ctx.cancelText),
  13400. 5
  13401. /* TEXT, STYLE */
  13402. )
  13403. ],
  13404. 2
  13405. /* CLASS */
  13406. )) : vue.createCommentVNode("v-if", true),
  13407. _ctx.showConfirmButton && _ctx.showCancelButton ? (vue.openBlock(), vue.createBlock(_component_u_line, {
  13408. key: 1,
  13409. direction: "column"
  13410. })) : vue.createCommentVNode("v-if", true),
  13411. _ctx.showConfirmButton ? (vue.openBlock(), vue.createElementBlock(
  13412. "view",
  13413. {
  13414. key: 2,
  13415. 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"]]),
  13416. "hover-stay-time": 150,
  13417. "hover-class": "u-modal__button-group__wrapper--hover",
  13418. onClick: _cache[1] || (_cache[1] = (...args) => $options.confirmHandler && $options.confirmHandler(...args))
  13419. },
  13420. [
  13421. $data.loading ? (vue.openBlock(), vue.createBlock(_component_u_loading_icon, { key: 0 })) : (vue.openBlock(), vue.createElementBlock(
  13422. "text",
  13423. {
  13424. key: 1,
  13425. class: "u-modal__button-group__wrapper__text",
  13426. style: vue.normalizeStyle({
  13427. color: _ctx.confirmColor
  13428. })
  13429. },
  13430. vue.toDisplayString(_ctx.confirmText),
  13431. 5
  13432. /* TEXT, STYLE */
  13433. ))
  13434. ],
  13435. 2
  13436. /* CLASS */
  13437. )) : vue.createCommentVNode("v-if", true)
  13438. ],
  13439. 4
  13440. /* STYLE */
  13441. )
  13442. ],
  13443. 64
  13444. /* STABLE_FRAGMENT */
  13445. ))
  13446. ],
  13447. 4
  13448. /* STYLE */
  13449. )
  13450. ]),
  13451. _: 3
  13452. /* FORWARDED */
  13453. }, 8, ["zoom", "show", "customStyle", "closeOnClickOverlay", "onClick"]);
  13454. }
  13455. const __easycom_1$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1p, [["render", _sfc_render$1o], ["__scopeId", "data-v-f667648f"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-modal/u-modal.vue"]]);
  13456. const _sfc_main$1o = {
  13457. __name: "ApproveButton",
  13458. emits: ["approve"],
  13459. setup(__props, { expose: __expose, emit: __emit }) {
  13460. __expose();
  13461. const emit2 = __emit;
  13462. const showConfirmModal = vue.ref(false);
  13463. const handleApprove = () => {
  13464. showConfirmModal.value = true;
  13465. };
  13466. const confirmApprove = () => {
  13467. emit2("approve");
  13468. showConfirmModal.value = false;
  13469. };
  13470. const __returned__ = { emit: emit2, showConfirmModal, handleApprove, confirmApprove, ref: vue.ref };
  13471. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  13472. return __returned__;
  13473. }
  13474. };
  13475. function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) {
  13476. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  13477. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$2);
  13478. return vue.openBlock(), vue.createElementBlock("view", { style: { "width": "50%" } }, [
  13479. vue.createVNode(
  13480. _component_u_button,
  13481. vue.mergeProps({
  13482. type: "success",
  13483. text: "同意",
  13484. size: "small",
  13485. onClick: $setup.handleApprove
  13486. }, _ctx.$attrs),
  13487. null,
  13488. 16
  13489. /* FULL_PROPS */
  13490. ),
  13491. vue.createCommentVNode(" 确认弹窗 "),
  13492. vue.createVNode(_component_u_modal, {
  13493. show: $setup.showConfirmModal,
  13494. title: "确认",
  13495. content: "确认收到货了吗?",
  13496. onConfirm: $setup.confirmApprove,
  13497. showCancelButton: "",
  13498. "content-style": { textAlign: "center" },
  13499. onCancel: _cache[0] || (_cache[0] = ($event) => $setup.showConfirmModal = false)
  13500. }, null, 8, ["show"])
  13501. ]);
  13502. }
  13503. const ApproveButton = /* @__PURE__ */ _export_sfc(_sfc_main$1o, [["render", _sfc_render$1n], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/ApproveButton.vue"]]);
  13504. const props$d = {
  13505. props: {
  13506. // 是否展示工具条
  13507. show: {
  13508. type: Boolean,
  13509. default: props$E.toolbar.show
  13510. },
  13511. // 取消按钮的文字
  13512. cancelText: {
  13513. type: String,
  13514. default: props$E.toolbar.cancelText
  13515. },
  13516. // 确认按钮的文字
  13517. confirmText: {
  13518. type: String,
  13519. default: props$E.toolbar.confirmText
  13520. },
  13521. // 取消按钮的颜色
  13522. cancelColor: {
  13523. type: String,
  13524. default: props$E.toolbar.cancelColor
  13525. },
  13526. // 确认按钮的颜色
  13527. confirmColor: {
  13528. type: String,
  13529. default: props$E.toolbar.confirmColor
  13530. },
  13531. // 标题文字
  13532. title: {
  13533. type: String,
  13534. default: props$E.toolbar.title
  13535. }
  13536. }
  13537. };
  13538. const _sfc_main$1n = {
  13539. name: "u-toolbar",
  13540. mixins: [mpMixin, mixin, props$d],
  13541. methods: {
  13542. // 点击取消按钮
  13543. cancel() {
  13544. this.$emit("cancel");
  13545. },
  13546. // 点击确定按钮
  13547. confirm() {
  13548. this.$emit("confirm");
  13549. }
  13550. }
  13551. };
  13552. function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) {
  13553. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  13554. "view",
  13555. {
  13556. key: 0,
  13557. class: "u-toolbar",
  13558. onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"]))
  13559. },
  13560. [
  13561. vue.createElementVNode("view", {
  13562. class: "u-toolbar__cancel__wrapper",
  13563. "hover-class": "u-hover-class"
  13564. }, [
  13565. vue.createElementVNode(
  13566. "text",
  13567. {
  13568. class: "u-toolbar__wrapper__cancel",
  13569. onClick: _cache[0] || (_cache[0] = (...args) => $options.cancel && $options.cancel(...args)),
  13570. style: vue.normalizeStyle({
  13571. color: _ctx.cancelColor
  13572. })
  13573. },
  13574. vue.toDisplayString(_ctx.cancelText),
  13575. 5
  13576. /* TEXT, STYLE */
  13577. )
  13578. ]),
  13579. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  13580. "text",
  13581. {
  13582. key: 0,
  13583. class: "u-toolbar__title u-line-1"
  13584. },
  13585. vue.toDisplayString(_ctx.title),
  13586. 1
  13587. /* TEXT */
  13588. )) : vue.createCommentVNode("v-if", true),
  13589. vue.createElementVNode("view", {
  13590. class: "u-toolbar__confirm__wrapper",
  13591. "hover-class": "u-hover-class"
  13592. }, [
  13593. vue.createElementVNode(
  13594. "text",
  13595. {
  13596. class: "u-toolbar__wrapper__confirm",
  13597. onClick: _cache[1] || (_cache[1] = (...args) => $options.confirm && $options.confirm(...args)),
  13598. style: vue.normalizeStyle({
  13599. color: _ctx.confirmColor
  13600. })
  13601. },
  13602. vue.toDisplayString(_ctx.confirmText),
  13603. 5
  13604. /* TEXT, STYLE */
  13605. )
  13606. ])
  13607. ],
  13608. 32
  13609. /* NEED_HYDRATION */
  13610. )) : vue.createCommentVNode("v-if", true);
  13611. }
  13612. const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["render", _sfc_render$1m], ["__scopeId", "data-v-eadae74e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-toolbar/u-toolbar.vue"]]);
  13613. const props$c = {
  13614. props: {
  13615. // 是否展示picker弹窗
  13616. show: {
  13617. type: Boolean,
  13618. default: props$E.picker.show
  13619. },
  13620. // 是否展示顶部的操作栏
  13621. showToolbar: {
  13622. type: Boolean,
  13623. default: props$E.picker.showToolbar
  13624. },
  13625. // 顶部标题
  13626. title: {
  13627. type: String,
  13628. default: props$E.picker.title
  13629. },
  13630. // 对象数组,设置每一列的数据
  13631. columns: {
  13632. type: Array,
  13633. default: props$E.picker.columns
  13634. },
  13635. // 是否显示加载中状态
  13636. loading: {
  13637. type: Boolean,
  13638. default: props$E.picker.loading
  13639. },
  13640. // 各列中,单个选项的高度
  13641. itemHeight: {
  13642. type: [String, Number],
  13643. default: props$E.picker.itemHeight
  13644. },
  13645. // 取消按钮的文字
  13646. cancelText: {
  13647. type: String,
  13648. default: props$E.picker.cancelText
  13649. },
  13650. // 确认按钮的文字
  13651. confirmText: {
  13652. type: String,
  13653. default: props$E.picker.confirmText
  13654. },
  13655. // 取消按钮的颜色
  13656. cancelColor: {
  13657. type: String,
  13658. default: props$E.picker.cancelColor
  13659. },
  13660. // 确认按钮的颜色
  13661. confirmColor: {
  13662. type: String,
  13663. default: props$E.picker.confirmColor
  13664. },
  13665. // 每列中可见选项的数量
  13666. visibleItemCount: {
  13667. type: [String, Number],
  13668. default: props$E.picker.visibleItemCount
  13669. },
  13670. // 选项对象中,需要展示的属性键名
  13671. keyName: {
  13672. type: String,
  13673. default: props$E.picker.keyName
  13674. },
  13675. // 是否允许点击遮罩关闭选择器
  13676. closeOnClickOverlay: {
  13677. type: Boolean,
  13678. default: props$E.picker.closeOnClickOverlay
  13679. },
  13680. // 各列的默认索引
  13681. defaultIndex: {
  13682. type: Array,
  13683. default: props$E.picker.defaultIndex
  13684. },
  13685. // 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效
  13686. immediateChange: {
  13687. type: Boolean,
  13688. default: props$E.picker.immediateChange
  13689. }
  13690. }
  13691. };
  13692. const _sfc_main$1m = {
  13693. name: "u-picker",
  13694. mixins: [mpMixin, mixin, props$c],
  13695. data() {
  13696. return {
  13697. // 上一次选择的列索引
  13698. lastIndex: [],
  13699. // 索引值 ,对应picker-view的value
  13700. innerIndex: [],
  13701. // 各列的值
  13702. innerColumns: [],
  13703. // 上一次的变化列索引
  13704. columnIndex: 0
  13705. };
  13706. },
  13707. watch: {
  13708. // 监听默认索引的变化,重新设置对应的值
  13709. defaultIndex: {
  13710. immediate: true,
  13711. handler(n) {
  13712. this.setIndexs(n, true);
  13713. }
  13714. },
  13715. // 监听columns参数的变化
  13716. columns: {
  13717. immediate: true,
  13718. deep: true,
  13719. handler(n) {
  13720. this.setColumns(n);
  13721. }
  13722. }
  13723. },
  13724. emits: ["close", "cancel", "confirm", "change"],
  13725. methods: {
  13726. // 获取item需要显示的文字,判别为对象还是文本
  13727. getItemText(item) {
  13728. if (uni.$u.test.object(item)) {
  13729. return item[this.keyName];
  13730. } else {
  13731. return item;
  13732. }
  13733. },
  13734. // 关闭选择器
  13735. closeHandler() {
  13736. if (this.closeOnClickOverlay) {
  13737. this.$emit("close");
  13738. }
  13739. },
  13740. // 点击工具栏的取消按钮
  13741. cancel() {
  13742. this.$emit("cancel");
  13743. },
  13744. // 点击工具栏的确定按钮
  13745. confirm() {
  13746. this.$emit("confirm", {
  13747. indexs: this.innerIndex,
  13748. value: this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]),
  13749. values: this.innerColumns
  13750. });
  13751. },
  13752. // 选择器某一列的数据发生变化时触发
  13753. changeHandler(e) {
  13754. const {
  13755. value: value2
  13756. } = e.detail;
  13757. let index2 = 0, columnIndex = 0;
  13758. for (let i = 0; i < value2.length; i++) {
  13759. let item = value2[i];
  13760. if (item !== (this.lastIndex[i] || 0)) {
  13761. columnIndex = i;
  13762. index2 = item;
  13763. break;
  13764. }
  13765. }
  13766. this.columnIndex = columnIndex;
  13767. const values = this.innerColumns;
  13768. this.setLastIndex(value2);
  13769. this.setIndexs(value2);
  13770. this.$emit("change", {
  13771. // 微信小程序不能传递this,会因为循环引用而报错
  13772. picker: this,
  13773. value: this.innerColumns.map((item, index3) => item[value2[index3]]),
  13774. index: index2,
  13775. indexs: value2,
  13776. // values为当前变化列的数组内容
  13777. values,
  13778. columnIndex
  13779. });
  13780. },
  13781. // 设置index索引,此方法可被外部调用设置
  13782. setIndexs(index2, setLastIndex) {
  13783. this.innerIndex = uni.$u.deepClone(index2);
  13784. if (setLastIndex) {
  13785. this.setLastIndex(index2);
  13786. }
  13787. },
  13788. // 记录上一次的各列索引位置
  13789. setLastIndex(index2) {
  13790. this.lastIndex = uni.$u.deepClone(index2);
  13791. },
  13792. // 设置对应列选项的所有值
  13793. setColumnValues(columnIndex, values) {
  13794. this.innerColumns.splice(columnIndex, 1, values);
  13795. let tmpIndex = uni.$u.deepClone(this.innerIndex);
  13796. for (let i = 0; i < this.innerColumns.length; i++) {
  13797. if (i > this.columnIndex) {
  13798. tmpIndex[i] = 0;
  13799. }
  13800. }
  13801. this.setIndexs(tmpIndex);
  13802. },
  13803. // 获取对应列的所有选项
  13804. getColumnValues(columnIndex) {
  13805. (async () => {
  13806. await uni.$u.sleep();
  13807. })();
  13808. return this.innerColumns[columnIndex];
  13809. },
  13810. // 设置整体各列的columns的值
  13811. setColumns(columns) {
  13812. formatAppLog("log", "at uni_modules/uview-plus/components/u-picker/u-picker.vue:217", columns);
  13813. this.innerColumns = uni.$u.deepClone(columns);
  13814. if (this.innerIndex.length === 0) {
  13815. this.innerIndex = new Array(columns.length).fill(0);
  13816. }
  13817. },
  13818. // 获取各列选中值对应的索引
  13819. getIndexs() {
  13820. return this.innerIndex;
  13821. },
  13822. // 获取各列选中的值
  13823. getValues() {
  13824. (async () => {
  13825. await uni.$u.sleep();
  13826. })();
  13827. return this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]);
  13828. }
  13829. }
  13830. };
  13831. function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) {
  13832. const _component_u_toolbar = resolveEasycom(vue.resolveDynamicComponent("u-toolbar"), __easycom_0$4);
  13833. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  13834. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_3$4);
  13835. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  13836. show: _ctx.show,
  13837. onClose: $options.closeHandler
  13838. }, {
  13839. default: vue.withCtx(() => [
  13840. vue.createElementVNode("view", { class: "u-picker" }, [
  13841. _ctx.showToolbar ? (vue.openBlock(), vue.createBlock(_component_u_toolbar, {
  13842. key: 0,
  13843. cancelColor: _ctx.cancelColor,
  13844. confirmColor: _ctx.confirmColor,
  13845. cancelText: _ctx.cancelText,
  13846. confirmText: _ctx.confirmText,
  13847. title: _ctx.title,
  13848. onCancel: $options.cancel,
  13849. onConfirm: $options.confirm
  13850. }, null, 8, ["cancelColor", "confirmColor", "cancelText", "confirmText", "title", "onCancel", "onConfirm"])) : vue.createCommentVNode("v-if", true),
  13851. vue.createElementVNode("picker-view", {
  13852. class: "u-picker__view",
  13853. indicatorStyle: `height: ${_ctx.$u.addUnit(_ctx.itemHeight)}`,
  13854. value: $data.innerIndex,
  13855. immediateChange: _ctx.immediateChange,
  13856. style: vue.normalizeStyle({
  13857. height: `${_ctx.$u.addUnit(_ctx.visibleItemCount * _ctx.itemHeight)}`
  13858. }),
  13859. onChange: _cache[0] || (_cache[0] = (...args) => $options.changeHandler && $options.changeHandler(...args))
  13860. }, [
  13861. (vue.openBlock(true), vue.createElementBlock(
  13862. vue.Fragment,
  13863. null,
  13864. vue.renderList($data.innerColumns, (item, index2) => {
  13865. return vue.openBlock(), vue.createElementBlock("picker-view-column", {
  13866. key: index2,
  13867. class: "u-picker__view__column"
  13868. }, [
  13869. _ctx.$u.test.array(item) ? (vue.openBlock(true), vue.createElementBlock(
  13870. vue.Fragment,
  13871. { key: 0 },
  13872. vue.renderList(item, (item1, index1) => {
  13873. return vue.openBlock(), vue.createElementBlock(
  13874. "text",
  13875. {
  13876. class: "u-picker__view__column__item u-line-1",
  13877. key: index1,
  13878. style: vue.normalizeStyle({
  13879. height: _ctx.$u.addUnit(_ctx.itemHeight),
  13880. lineHeight: _ctx.$u.addUnit(_ctx.itemHeight),
  13881. fontWeight: index1 === $data.innerIndex[index2] ? "bold" : "normal"
  13882. })
  13883. },
  13884. vue.toDisplayString($options.getItemText(item1)),
  13885. 5
  13886. /* TEXT, STYLE */
  13887. );
  13888. }),
  13889. 128
  13890. /* KEYED_FRAGMENT */
  13891. )) : vue.createCommentVNode("v-if", true)
  13892. ]);
  13893. }),
  13894. 128
  13895. /* KEYED_FRAGMENT */
  13896. ))
  13897. ], 44, ["indicatorStyle", "value", "immediateChange"]),
  13898. _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  13899. key: 1,
  13900. class: "u-picker--loading"
  13901. }, [
  13902. vue.createVNode(_component_u_loading_icon, { mode: "circle" })
  13903. ])) : vue.createCommentVNode("v-if", true)
  13904. ])
  13905. ]),
  13906. _: 1
  13907. /* STABLE */
  13908. }, 8, ["show", "onClose"]);
  13909. }
  13910. const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["render", _sfc_render$1l], ["__scopeId", "data-v-91b05052"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-picker/u-picker.vue"]]);
  13911. const _sfc_main$1l = {
  13912. __name: "RejectButton",
  13913. emits: ["reject"],
  13914. setup(__props, { expose: __expose, emit: __emit }) {
  13915. __expose();
  13916. const emit2 = __emit;
  13917. const showRejectPicker = vue.ref(false);
  13918. const rejectReasons = vue.ref([]);
  13919. const getRejectReason = async () => {
  13920. const res2 = await uni.$u.http.get("/app/sysDict/getDict?key=route_exception_reason ");
  13921. if (res2.code == 200) {
  13922. rejectReasons.value = res2.data.map((item) => item.dictValue);
  13923. }
  13924. };
  13925. getRejectReason();
  13926. const handleReject = () => {
  13927. showRejectPicker.value = true;
  13928. };
  13929. const confirmReject = (e) => {
  13930. const reason = e.value[0];
  13931. emit2("reject", reason);
  13932. showRejectPicker.value = false;
  13933. };
  13934. const __returned__ = { emit: emit2, showRejectPicker, rejectReasons, getRejectReason, handleReject, confirmReject, ref: vue.ref };
  13935. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  13936. return __returned__;
  13937. }
  13938. };
  13939. function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
  13940. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  13941. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$1);
  13942. return vue.openBlock(), vue.createElementBlock("view", { style: { "width": "50%" } }, [
  13943. vue.createVNode(
  13944. _component_u_button,
  13945. vue.mergeProps({
  13946. type: "warning",
  13947. text: "驳回",
  13948. size: "small",
  13949. onClick: $setup.handleReject
  13950. }, _ctx.$attrs),
  13951. null,
  13952. 16
  13953. /* FULL_PROPS */
  13954. ),
  13955. vue.createCommentVNode(" 驳回原因选择器 "),
  13956. vue.createVNode(_component_u_picker, {
  13957. show: $setup.showRejectPicker,
  13958. columns: [$setup.rejectReasons],
  13959. onConfirm: $setup.confirmReject,
  13960. onCancel: _cache[0] || (_cache[0] = ($event) => $setup.showRejectPicker = false)
  13961. }, null, 8, ["show", "columns"])
  13962. ]);
  13963. }
  13964. const RejectButton = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["render", _sfc_render$1k], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/RejectButton.vue"]]);
  13965. const _sfc_main$1k = {
  13966. __name: "ExceptionItem",
  13967. props: {
  13968. order: {
  13969. type: Object,
  13970. default: () => ({
  13971. orderNo: "",
  13972. expressNo: "",
  13973. estimatedPrice: "",
  13974. pusher: "",
  13975. pushTime: ""
  13976. })
  13977. }
  13978. },
  13979. emits: ["refresh"],
  13980. setup(__props, { expose: __expose, emit: __emit }) {
  13981. __expose();
  13982. const props2 = __props;
  13983. const emit2 = __emit;
  13984. const handleCheckLogistics = () => {
  13985. uni.navigateTo({
  13986. url: `/pages/index/express/logistics-detail?orderId=${props2.order.orderId}&status=${props2.order.checkStatus}&id=${props2.order.id}`
  13987. });
  13988. };
  13989. function handleButtonClick(checkStatus, reason) {
  13990. uni.$u.http.post("/app/orderexception/update", {
  13991. id: props2.order.id,
  13992. checkStatus,
  13993. refusalReason: reason
  13994. }).then((res2) => {
  13995. if (res2.code == 200) {
  13996. if (checkStatus == 2) {
  13997. let text = props2.order.waybillCode + "签收成功";
  13998. uni.$u.ttsModule.speak(text);
  13999. }
  14000. uni.$u.toast("操作成功");
  14001. emit2("refresh");
  14002. } else {
  14003. uni.$u.toast(res2.msg);
  14004. }
  14005. });
  14006. }
  14007. const __returned__ = { props: props2, emit: emit2, handleCheckLogistics, handleButtonClick, ref: vue.ref, ApproveButton, RejectButton };
  14008. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14009. return __returned__;
  14010. }
  14011. };
  14012. function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) {
  14013. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  14014. return vue.openBlock(), vue.createElementBlock("view", { class: "exception-item" }, [
  14015. vue.createCommentVNode(" 订单信息 "),
  14016. vue.createElementVNode("view", { class: "info-section flex-1" }, [
  14017. vue.createElementVNode("view", { class: "info-row" }, [
  14018. vue.createElementVNode("text", { class: "label" }, "订单编号:"),
  14019. vue.createElementVNode(
  14020. "text",
  14021. { class: "value" },
  14022. vue.toDisplayString($props.order.orderId),
  14023. 1
  14024. /* TEXT */
  14025. )
  14026. ]),
  14027. vue.createElementVNode("view", { class: "info-row" }, [
  14028. vue.createElementVNode("text", { class: "label" }, "快递单号:"),
  14029. vue.createElementVNode(
  14030. "text",
  14031. { class: "value" },
  14032. vue.toDisplayString($props.order.waybillCode),
  14033. 1
  14034. /* TEXT */
  14035. )
  14036. ]),
  14037. vue.createElementVNode("view", { class: "info-row" }, [
  14038. vue.createElementVNode("text", { class: "label" }, "预估单价:"),
  14039. vue.createElementVNode(
  14040. "text",
  14041. { class: "value" },
  14042. vue.toDisplayString($props.order.expectMoney) + "元",
  14043. 1
  14044. /* TEXT */
  14045. )
  14046. ]),
  14047. vue.createElementVNode("view", { class: "info-row" }, [
  14048. vue.createElementVNode("text", { class: "label" }, "推送人:"),
  14049. vue.createElementVNode(
  14050. "text",
  14051. { class: "value" },
  14052. vue.toDisplayString($props.order.createName),
  14053. 1
  14054. /* TEXT */
  14055. )
  14056. ]),
  14057. vue.createElementVNode("view", {
  14058. class: "info-row",
  14059. style: { "margin-bottom": "0" }
  14060. }, [
  14061. vue.createElementVNode("text", { class: "label" }, "推送时间:"),
  14062. vue.createElementVNode(
  14063. "text",
  14064. { class: "value" },
  14065. vue.toDisplayString($props.order.createTime),
  14066. 1
  14067. /* TEXT */
  14068. )
  14069. ])
  14070. ]),
  14071. vue.createCommentVNode(" 操作按钮 "),
  14072. vue.createElementVNode("view", { class: "action-section" }, [
  14073. vue.createVNode(_component_u_button, {
  14074. type: "primary",
  14075. text: "查看物流",
  14076. size: "small",
  14077. onClick: $setup.handleCheckLogistics
  14078. }),
  14079. $props.order.checkStatus == 1 ? (vue.openBlock(), vue.createBlock($setup["ApproveButton"], {
  14080. key: 0,
  14081. onApprove: _cache[0] || (_cache[0] = ($event) => $setup.handleButtonClick(2))
  14082. })) : vue.createCommentVNode("v-if", true),
  14083. $props.order.checkStatus == 1 ? (vue.openBlock(), vue.createBlock($setup["RejectButton"], {
  14084. key: 1,
  14085. onReject: _cache[1] || (_cache[1] = (reason) => $setup.handleButtonClick(3, reason))
  14086. })) : vue.createCommentVNode("v-if", true),
  14087. $props.order.checkStatus == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  14088. key: 2,
  14089. style: { "color": "#19be6b" }
  14090. }, "[已签收]")) : vue.createCommentVNode("v-if", true),
  14091. $props.order.checkStatus == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  14092. key: 3,
  14093. style: { "color": "#f00" }
  14094. }, "[已驳回]")) : vue.createCommentVNode("v-if", true)
  14095. ])
  14096. ]);
  14097. }
  14098. const ExceptionItem = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1j], ["__scopeId", "data-v-e0527396"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/ExceptionItem.vue"]]);
  14099. const _sfc_main$1j = {
  14100. __name: "route-exception",
  14101. setup(__props, { expose: __expose }) {
  14102. __expose();
  14103. const tabList = ["待处理订单", "历史异常签收"];
  14104. const curNow = vue.ref(0);
  14105. const exceptionList = vue.ref([]);
  14106. let urlList = ["/app/orderexception/pagelist", "/app/orderexception/getPageLoglist"];
  14107. const requestStr = vue.ref(urlList[0]);
  14108. function sectionChange(index2) {
  14109. curNow.value = index2;
  14110. requestStr.value = urlList[index2];
  14111. handleSearch();
  14112. }
  14113. const pageScrollRef = vue.ref(null);
  14114. const otherParams = vue.ref({ search: "" });
  14115. const updateList = (list) => {
  14116. exceptionList.value = list;
  14117. };
  14118. const handleSearch = () => {
  14119. var _a;
  14120. (_a = pageScrollRef.value) == null ? void 0 : _a.resetUpScroll();
  14121. };
  14122. const handleScan = () => {
  14123. uni.scanCode({
  14124. success: (res2) => {
  14125. otherParams.value.search = res2.result;
  14126. handleSearch();
  14127. }
  14128. });
  14129. };
  14130. onLoad(() => {
  14131. uni.$u.useGlobalEvent((e) => {
  14132. otherParams.value.search = e.barcode;
  14133. handleSearch();
  14134. });
  14135. });
  14136. const __returned__ = { tabList, curNow, exceptionList, get urlList() {
  14137. return urlList;
  14138. }, set urlList(v) {
  14139. urlList = v;
  14140. }, requestStr, sectionChange, pageScrollRef, otherParams, updateList, handleSearch, handleScan, ref: vue.ref, get onLoad() {
  14141. return onLoad;
  14142. }, ExceptionItem, PageScroll };
  14143. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14144. return __returned__;
  14145. }
  14146. };
  14147. function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
  14148. const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$5);
  14149. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$3);
  14150. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  14151. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  14152. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14153. vue.createCommentVNode(" 列表区域 "),
  14154. vue.createVNode($setup["PageScroll"], {
  14155. ref: "pageScrollRef",
  14156. height: "100vh",
  14157. requestStr: $setup.requestStr,
  14158. onUpdateList: $setup.updateList,
  14159. otherParams: $setup.otherParams
  14160. }, {
  14161. default: vue.withCtx(() => [
  14162. vue.createVNode(_component_u_sticky, { "offset-top": 0 }, {
  14163. default: vue.withCtx(() => [
  14164. vue.createCommentVNode(" 顶部标签页 "),
  14165. vue.createVNode(_component_u_subsection, {
  14166. fontSize: "16",
  14167. list: $setup.tabList,
  14168. current: $setup.curNow,
  14169. onChange: $setup.sectionChange,
  14170. mode: "subsection",
  14171. class: "tabs-list"
  14172. }, null, 8, ["current"])
  14173. ]),
  14174. _: 1
  14175. /* STABLE */
  14176. }),
  14177. vue.createElementVNode("view", { class: "list-container" }, [
  14178. (vue.openBlock(true), vue.createElementBlock(
  14179. vue.Fragment,
  14180. null,
  14181. vue.renderList($setup.exceptionList, (item) => {
  14182. return vue.openBlock(), vue.createBlock($setup["ExceptionItem"], {
  14183. key: item.orderNo,
  14184. order: item,
  14185. onRefresh: $setup.handleSearch
  14186. }, null, 8, ["order"]);
  14187. }),
  14188. 128
  14189. /* KEYED_FRAGMENT */
  14190. ))
  14191. ])
  14192. ]),
  14193. _: 1
  14194. /* STABLE */
  14195. }, 8, ["requestStr", "otherParams"]),
  14196. vue.createCommentVNode(" 底部搜索框 "),
  14197. vue.createElementVNode("view", { class: "search-bar fixed-bottom" }, [
  14198. vue.createVNode(_component_u_search, {
  14199. modelValue: $setup.otherParams.search,
  14200. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.otherParams.search = $event),
  14201. placeholder: "请输入物流单号/订单编号",
  14202. "show-action": false,
  14203. inputStyle: { fontSize: "32rpx" },
  14204. onSearch: $setup.handleSearch,
  14205. height: "80rpx",
  14206. shape: "round"
  14207. }, null, 8, ["modelValue"]),
  14208. vue.createVNode(_component_u_icon, {
  14209. name: "scan",
  14210. size: "28",
  14211. color: "#19be6b",
  14212. onClick: $setup.handleScan
  14213. })
  14214. ])
  14215. ]);
  14216. }
  14217. const PagesIndexExpressRouteException = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$1i], ["__scopeId", "data-v-388e5b84"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/route-exception.vue"]]);
  14218. const placeholderStyle$1 = "font-size:32rpx";
  14219. const _sfc_main$1i = {
  14220. __name: "warehouse-sign",
  14221. setup(__props, { expose: __expose }) {
  14222. __expose();
  14223. const customStyle = vue.reactive({
  14224. height: "90rpx"
  14225. });
  14226. const selectedWarehouse = vue.ref("");
  14227. const form = vue.ref({
  14228. "packageCode": "",
  14229. "godownId": ""
  14230. });
  14231. const showSelector = vue.ref(false);
  14232. function openWarehouseSelector() {
  14233. showSelector.value = true;
  14234. }
  14235. function handleWarehouseSelected(item) {
  14236. selectedWarehouse.value = item.godownName;
  14237. form.value.godownId = item.id;
  14238. }
  14239. function scanCode() {
  14240. uni.scanCode({
  14241. success: (res2) => {
  14242. form.value.packageCode = res2.result;
  14243. handleBarcode(res2.result);
  14244. },
  14245. fail: (err) => {
  14246. uni.$u.toast("扫码失败");
  14247. }
  14248. });
  14249. }
  14250. function handleBarcode(code2) {
  14251. if (!code2)
  14252. return uni.$u.toast("请输入物流单号");
  14253. uni.$u.http.post("/app/ordersign/toGodownSign", form.value).then((res2) => {
  14254. if (res2.code == 200) {
  14255. let text = code2 + "到仓签收成功";
  14256. uni.$u.ttsModule.speak(text);
  14257. } else {
  14258. let text = code2 + "订单不存在";
  14259. uni.$u.ttsModule.speak(text);
  14260. }
  14261. });
  14262. }
  14263. function getUserBindWarehouse() {
  14264. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
  14265. var _a, _b;
  14266. if (res2.code == 200) {
  14267. selectedWarehouse.value = (_a = res2.data) == null ? void 0 : _a.godownName;
  14268. form.value.godownId = (_b = res2.data) == null ? void 0 : _b.id;
  14269. }
  14270. });
  14271. }
  14272. onLoad(() => {
  14273. getUserBindWarehouse();
  14274. uni.$u.useGlobalEvent((e) => {
  14275. form.value.packageCode = e.barcode;
  14276. handleBarcode(e.barcode);
  14277. });
  14278. });
  14279. const __returned__ = { placeholderStyle: placeholderStyle$1, customStyle, selectedWarehouse, form, showSelector, openWarehouseSelector, handleWarehouseSelected, scanCode, handleBarcode, getUserBindWarehouse, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  14280. return onLoad;
  14281. }, WarehouseSelector };
  14282. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14283. return __returned__;
  14284. }
  14285. };
  14286. function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
  14287. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  14288. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  14289. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14290. vue.createElementVNode("view", { class: "main-content" }, [
  14291. vue.createElementVNode("view", { class: "input-group" }, [
  14292. vue.createVNode(_component_u_input, {
  14293. customStyle: $setup.customStyle,
  14294. "placeholder-style": $setup.placeholderStyle,
  14295. modelValue: $setup.selectedWarehouse,
  14296. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedWarehouse = $event),
  14297. placeholder: "请选择仓库",
  14298. readonly: "",
  14299. border: "surround"
  14300. }, null, 8, ["customStyle", "modelValue"]),
  14301. vue.createVNode(_component_u_button, {
  14302. customStyle: $setup.customStyle,
  14303. type: "info",
  14304. color: "#a4adb3",
  14305. onClick: $setup.openWarehouseSelector,
  14306. text: "选择"
  14307. }, null, 8, ["customStyle"])
  14308. ]),
  14309. vue.createElementVNode("view", { class: "input-group" }, [
  14310. vue.createVNode(_component_u_input, {
  14311. customStyle: $setup.customStyle,
  14312. "placeholder-style": $setup.placeholderStyle,
  14313. modelValue: $setup.form.packageCode,
  14314. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.packageCode = $event),
  14315. placeholder: "扫描/输入物流单号",
  14316. border: "surround"
  14317. }, null, 8, ["customStyle", "modelValue"]),
  14318. vue.createVNode(_component_u_button, {
  14319. customStyle: $setup.customStyle,
  14320. type: "info",
  14321. color: "#a4adb3",
  14322. onClick: _cache[2] || (_cache[2] = ($event) => $setup.handleBarcode($setup.form.packageCode)),
  14323. text: "确定"
  14324. }, null, 8, ["customStyle"])
  14325. ])
  14326. ]),
  14327. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  14328. vue.createVNode(_component_u_button, {
  14329. size: "large",
  14330. type: "success",
  14331. onClick: $setup.scanCode,
  14332. text: "扫码",
  14333. class: "scan-button"
  14334. })
  14335. ]),
  14336. vue.createVNode($setup["WarehouseSelector"], {
  14337. show: $setup.showSelector,
  14338. "onUpdate:show": _cache[3] || (_cache[3] = ($event) => $setup.showSelector = $event),
  14339. onWarehouseSelected: $setup.handleWarehouseSelected
  14340. }, null, 8, ["show"])
  14341. ]);
  14342. }
  14343. const PagesIndexExpressWarehouseSign = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$1h], ["__scopeId", "data-v-7473f06e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/warehouse-sign.vue"]]);
  14344. const baseUrl = "http://bk.shuhi.com";
  14345. function initRequest() {
  14346. formatAppLog("log", "at config/request.js:9", "初始化了 http 请求代码");
  14347. uni.$u.http.setConfig((config2) => {
  14348. config2.baseURL = baseUrl;
  14349. config2.custom.toast = true;
  14350. return config2;
  14351. });
  14352. uni.$u.http.interceptors.request.use((config2) => {
  14353. config2.data = config2.data || {};
  14354. let token = store.token || uni.getStorageSync("token");
  14355. config2.header.Authorization = token ? `Bearer ${token}` : "";
  14356. return config2;
  14357. }, (config2) => {
  14358. return Promise.reject(config2);
  14359. });
  14360. uni.$u.http.interceptors.response.use((response) => {
  14361. var _a;
  14362. const data = response.data;
  14363. const custom = (_a = response.config) == null ? void 0 : _a.custom;
  14364. if (data.code !== 200) {
  14365. if (data.code === 401) {
  14366. uni.$u.toast(data.msg || "身份认证失败,请先登录");
  14367. uni.removeStorageSync("token");
  14368. store.setToken("");
  14369. setTimeout(() => {
  14370. uni.$u.route({
  14371. type: "reLaunch",
  14372. url: "/pages/login/login"
  14373. // 跳转到登录页
  14374. });
  14375. }, 1e3);
  14376. } else {
  14377. if (custom.toast !== false) {
  14378. uni.$u.toast(data.msg);
  14379. }
  14380. return data;
  14381. }
  14382. }
  14383. return data;
  14384. }, (response) => {
  14385. return Promise.reject(response);
  14386. });
  14387. }
  14388. const _sfc_main$1h = {
  14389. __name: "index",
  14390. props: {
  14391. filename: {
  14392. type: [Array, String],
  14393. default: () => []
  14394. },
  14395. url: {
  14396. type: String
  14397. },
  14398. notFile: {
  14399. type: Boolean,
  14400. default: false
  14401. },
  14402. tips: {
  14403. type: String
  14404. },
  14405. disabled: {
  14406. type: Boolean,
  14407. default: false
  14408. },
  14409. isUpdate: {
  14410. type: Boolean,
  14411. default: false
  14412. }
  14413. },
  14414. emits: ["update:filename", "update:keyValue", "success"],
  14415. setup(__props, { expose: __expose, emit: __emit }) {
  14416. __expose();
  14417. const emit2 = __emit;
  14418. const props2 = __props;
  14419. const fileList = vue.ref([]);
  14420. vue.watch(() => props2.filename, (filename) => {
  14421. if (!filename)
  14422. return fileList.value = [];
  14423. if (typeof filename == "string") {
  14424. fileList.value = filename.split(",").map((v) => ({
  14425. url: baseUrl + v
  14426. }));
  14427. } else {
  14428. fileList.value = filename && filename.length > 0 ? filename.map((v) => ({
  14429. url: v.url || v
  14430. })) : [];
  14431. }
  14432. }, {
  14433. immediate: true,
  14434. deep: true
  14435. });
  14436. const afterRead = async (e) => {
  14437. const {
  14438. file
  14439. } = e;
  14440. fileList.value.push({
  14441. ...file,
  14442. status: "uploading",
  14443. message: "上传中..."
  14444. });
  14445. const result = await uploadFilePromise(file.url);
  14446. formatAppLog("log", "at components/cy-upload/index.vue:68", result, "result");
  14447. fileList.value.forEach((v, index2) => {
  14448. if (index2 == fileList.value.length - 1) {
  14449. v.url = result.url;
  14450. v.status = "success";
  14451. v.message = "";
  14452. }
  14453. });
  14454. formatAppLog("log", "at components/cy-upload/index.vue:77", fileList.value, "fileList.value");
  14455. emit2("update:filename", fileList.value.map((v) => v.url));
  14456. emit2("success", result);
  14457. };
  14458. const deletePic = (event) => {
  14459. fileList.value.splice(event.index, 1);
  14460. };
  14461. const uploadFilePromise = (url2, baseStr = "/app/common/upload") => {
  14462. let token = uni.getStorageSync("token");
  14463. return new Promise((resolve, reject) => {
  14464. uni.uploadFile({
  14465. url: baseUrl + baseStr,
  14466. // 图片上传地址
  14467. filePath: url2,
  14468. name: "file",
  14469. header: {
  14470. "Authorization": token
  14471. },
  14472. success: (res2) => {
  14473. let respic = JSON.parse(res2.data);
  14474. resolve(respic);
  14475. }
  14476. });
  14477. });
  14478. };
  14479. const __returned__ = { emit: emit2, props: props2, fileList, afterRead, deletePic, uploadFilePromise, watch: vue.watch, ref: vue.ref, get baseUrl() {
  14480. return baseUrl;
  14481. } };
  14482. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14483. return __returned__;
  14484. }
  14485. };
  14486. function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) {
  14487. const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_0$9);
  14488. return vue.openBlock(), vue.createElementBlock(
  14489. vue.Fragment,
  14490. null,
  14491. [
  14492. vue.createVNode(_component_u_upload, vue.mergeProps(_ctx.$attrs, {
  14493. fileList: $setup.fileList,
  14494. onAfterRead: $setup.afterRead,
  14495. onDelete: $setup.deletePic,
  14496. notFile: $props.notFile,
  14497. disabled: $props.disabled
  14498. }), null, 16, ["fileList", "notFile", "disabled"]),
  14499. $props.tips ? (vue.openBlock(), vue.createElementBlock(
  14500. "view",
  14501. {
  14502. key: 0,
  14503. class: "tips"
  14504. },
  14505. vue.toDisplayString($props.tips),
  14506. 1
  14507. /* TEXT */
  14508. )) : vue.createCommentVNode("v-if", true)
  14509. ],
  14510. 64
  14511. /* STABLE_FRAGMENT */
  14512. );
  14513. }
  14514. const cyUpload = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1g], ["__scopeId", "data-v-5002576b"], ["__file", "E:/书嗨项目/shuhi-app-fornt/components/cy-upload/index.vue"]]);
  14515. const placeholderStyle = "font-size:32rpx";
  14516. const _sfc_main$1g = {
  14517. __name: "weight-modify",
  14518. setup(__props, { expose: __expose }) {
  14519. __expose();
  14520. const customStyle = vue.reactive({
  14521. height: "90rpx"
  14522. });
  14523. const formRef = vue.ref(null);
  14524. const form = vue.ref({
  14525. "packageCode": "",
  14526. "batchNum": "",
  14527. "godownId": "",
  14528. "otherInfo": "",
  14529. "actualWeight": "",
  14530. "imgUrlList": []
  14531. });
  14532. const rules2 = {
  14533. packageCode: [{
  14534. required: true,
  14535. message: "请输入物流单号",
  14536. trigger: "blur"
  14537. }],
  14538. actualWeight: [{
  14539. required: true,
  14540. message: "请输入重量",
  14541. trigger: "blur"
  14542. }]
  14543. };
  14544. function scanCode() {
  14545. uni.scanCode({
  14546. success: (res2) => {
  14547. form.value.packageCode = res2.result;
  14548. },
  14549. fail: (err) => {
  14550. uni.$u.toast("扫码失败");
  14551. }
  14552. });
  14553. }
  14554. function submitForm() {
  14555. formRef.value.validate().then((valid) => {
  14556. if (valid) {
  14557. uni.$u.http.post("/app/ordersign/changeWeight", form.value).then((res2) => {
  14558. if (res2.code == 200) {
  14559. uni.$u.toast("重量修改成功");
  14560. let text = code + "已提交审核";
  14561. uni.$u.ttsModule.speak(text);
  14562. } else {
  14563. let text = code + "订单不存在";
  14564. uni.$u.ttsModule.speak(text);
  14565. }
  14566. });
  14567. }
  14568. });
  14569. }
  14570. onLoad(() => {
  14571. uni.$u.useGlobalEvent((e) => {
  14572. form.value.packageCode = e.barcode;
  14573. });
  14574. });
  14575. const __returned__ = { placeholderStyle, customStyle, formRef, form, rules: rules2, scanCode, submitForm, ref: vue.ref, reactive: vue.reactive, get onLoad() {
  14576. return onLoad;
  14577. }, cyUpload };
  14578. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14579. return __returned__;
  14580. }
  14581. };
  14582. function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) {
  14583. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  14584. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$a);
  14585. const _component_u__form = resolveEasycom(vue.resolveDynamicComponent("u--form"), __easycom_2$6);
  14586. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  14587. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14588. vue.createVNode(_component_u__form, {
  14589. ref: "formRef",
  14590. model: $setup.form,
  14591. rules: $setup.rules,
  14592. "label-width": "165px",
  14593. "label-position": "top",
  14594. labelStyle: { fontSize: "32rpx" },
  14595. errorType: "toast"
  14596. }, {
  14597. default: vue.withCtx(() => [
  14598. vue.createCommentVNode(" 物流单号输入 "),
  14599. vue.createVNode(_component_u_form_item, {
  14600. label: "",
  14601. prop: "packageCode"
  14602. }, {
  14603. default: vue.withCtx(() => [
  14604. vue.createVNode(_component_u_input, {
  14605. placeholderStyle: $setup.placeholderStyle,
  14606. customStyle: $setup.customStyle,
  14607. modelValue: $setup.form.packageCode,
  14608. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.packageCode = $event),
  14609. placeholder: "扫描/输入物流单号",
  14610. border: "surround",
  14611. name: "packageCode"
  14612. }, null, 8, ["customStyle", "modelValue"])
  14613. ]),
  14614. _: 1
  14615. /* STABLE */
  14616. }),
  14617. vue.createCommentVNode(" 重量输入 "),
  14618. vue.createVNode(_component_u_form_item, {
  14619. label: "重量(kg)",
  14620. prop: "actualWeight"
  14621. }, {
  14622. default: vue.withCtx(() => [
  14623. vue.createVNode(_component_u_input, {
  14624. placeholderStyle: $setup.placeholderStyle,
  14625. customStyle: $setup.customStyle,
  14626. modelValue: $setup.form.actualWeight,
  14627. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.actualWeight = $event),
  14628. placeholder: "请输入重量",
  14629. border: "surround",
  14630. name: "actualWeight",
  14631. type: "number"
  14632. }, null, 8, ["customStyle", "modelValue"])
  14633. ]),
  14634. _: 1
  14635. /* STABLE */
  14636. }),
  14637. vue.createCommentVNode(" 图片上传 "),
  14638. vue.createVNode(_component_u_form_item, {
  14639. label: "上传图片",
  14640. prop: "imgUrlList"
  14641. }, {
  14642. default: vue.withCtx(() => [
  14643. vue.createVNode($setup["cyUpload"], {
  14644. filename: $setup.form.imgUrlList,
  14645. "onUpdate:filename": _cache[2] || (_cache[2] = ($event) => $setup.form.imgUrlList = $event),
  14646. name: "imgUrlList",
  14647. limit: 10,
  14648. "max-size": 1024 * 1024
  14649. }, null, 8, ["filename"])
  14650. ]),
  14651. _: 1
  14652. /* STABLE */
  14653. })
  14654. ]),
  14655. _: 1
  14656. /* STABLE */
  14657. }, 8, ["model"]),
  14658. vue.createCommentVNode(" 底部按钮 "),
  14659. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  14660. vue.createVNode(_component_u_button, {
  14661. size: "large",
  14662. type: "warning",
  14663. onClick: $setup.scanCode,
  14664. text: "扫码",
  14665. class: "scan-button"
  14666. }),
  14667. vue.createVNode(_component_u_button, {
  14668. size: "large",
  14669. type: "success",
  14670. onClick: $setup.submitForm,
  14671. text: "提交",
  14672. class: "submit-button"
  14673. })
  14674. ])
  14675. ]);
  14676. }
  14677. const PagesIndexExpressWeightModify = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["render", _sfc_render$1f], ["__scopeId", "data-v-e6126507"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/weight-modify.vue"]]);
  14678. const _sfc_main$1f = {
  14679. __name: "confirm-receipt",
  14680. setup(__props, { expose: __expose }) {
  14681. __expose();
  14682. const formData = vue.ref({
  14683. searchType: "2",
  14684. search: ""
  14685. });
  14686. const searchKeyword = vue.ref("");
  14687. const handleSubmit = () => {
  14688. formatAppLog("log", "at pages/index/audit/confirm-receipt.vue:48", "查询:", searchKeyword.value);
  14689. if (!formData.value.search) {
  14690. uni.$u.toast("请扫描/输入物流单号");
  14691. return;
  14692. }
  14693. uni.$u.http.post("/app/orderinfo/confirmOrder", formData.value).then((res2) => {
  14694. formatAppLog("log", "at pages/index/audit/confirm-receipt.vue:54", res2);
  14695. if (res2.code == 200) {
  14696. let text = code + "收货成功";
  14697. uni.$u.ttsModule.speak(text);
  14698. } else {
  14699. let text = code + "订单不存在";
  14700. uni.$u.ttsModule.speak(text);
  14701. }
  14702. });
  14703. };
  14704. const handleScan = () => {
  14705. uni.scanCode({
  14706. success: (res2) => {
  14707. formData.value.search = res2.result;
  14708. handleSubmit();
  14709. }
  14710. });
  14711. };
  14712. onLoad(() => {
  14713. uni.$u.useGlobalEvent((e) => {
  14714. formData.value.search = e.barcode;
  14715. handleSubmit();
  14716. });
  14717. });
  14718. const __returned__ = { formData, searchKeyword, handleSubmit, handleScan, ref: vue.ref, get onLoad() {
  14719. return onLoad;
  14720. } };
  14721. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14722. return __returned__;
  14723. }
  14724. };
  14725. function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
  14726. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
  14727. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$4);
  14728. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  14729. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  14730. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$3);
  14731. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14732. vue.createCommentVNode(" 底部按钮 "),
  14733. vue.createElementVNode("view", { class: "footer" }, [
  14734. vue.createCommentVNode(" 查询区域 "),
  14735. vue.createElementVNode("view", { class: "query-section" }, [
  14736. vue.createVNode(_component_u_radio_group, {
  14737. modelValue: $setup.formData.searchType,
  14738. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.searchType = $event)
  14739. }, {
  14740. default: vue.withCtx(() => [
  14741. vue.createVNode(_component_u_radio, {
  14742. label: "查订单",
  14743. name: "1",
  14744. labelSize: "16px",
  14745. iconSize: "16px"
  14746. }),
  14747. vue.createVNode(_component_u_radio, {
  14748. label: "查物流",
  14749. "custom-style": "margin-left:20px",
  14750. name: "2",
  14751. labelSize: "16px",
  14752. iconSize: "16px"
  14753. })
  14754. ]),
  14755. _: 1
  14756. /* STABLE */
  14757. }, 8, ["modelValue"]),
  14758. vue.createElementVNode("view", { class: "search-box" }, [
  14759. vue.createVNode(_component_u_input, {
  14760. "custom-style": "font-size:32rpx",
  14761. "placeholder-style": "fong-size:32rpx",
  14762. modelValue: $setup.formData.search,
  14763. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.search = $event),
  14764. placeholder: $setup.formData.searchType == "1" ? "扫描/输入订单号" : "扫描/输入物流单号",
  14765. border: "surround",
  14766. clearable: ""
  14767. }, null, 8, ["modelValue", "placeholder"]),
  14768. vue.createVNode(_component_u_button, {
  14769. color: "#c8c8c8",
  14770. text: "查询",
  14771. onClick: $setup.handleSubmit
  14772. })
  14773. ])
  14774. ]),
  14775. vue.createVNode(_component_u_divider),
  14776. vue.createElementVNode("view", { style: { "display": "flex" } }, [
  14777. vue.createVNode(_component_u_button, {
  14778. size: "large",
  14779. type: "success",
  14780. text: "确认收货扫码",
  14781. onClick: $setup.handleScan
  14782. })
  14783. ])
  14784. ])
  14785. ]);
  14786. }
  14787. const PagesIndexAuditConfirmReceipt = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["render", _sfc_render$1e], ["__scopeId", "data-v-fec7d541"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/confirm-receipt.vue"]]);
  14788. const props$b = {
  14789. props: {
  14790. // 是否开启顶部安全区适配
  14791. safeAreaInsetTop: {
  14792. type: Boolean,
  14793. default: props$E.navbar.safeAreaInsetTop
  14794. },
  14795. // 固定在顶部时,是否生成一个等高元素,以防止塌陷
  14796. placeholder: {
  14797. type: Boolean,
  14798. default: props$E.navbar.placeholder
  14799. },
  14800. // 是否固定在顶部
  14801. fixed: {
  14802. type: Boolean,
  14803. default: props$E.navbar.fixed
  14804. },
  14805. // 是否显示下边框
  14806. border: {
  14807. type: Boolean,
  14808. default: props$E.navbar.border
  14809. },
  14810. // 左边的图标
  14811. leftIcon: {
  14812. type: String,
  14813. default: props$E.navbar.leftIcon
  14814. },
  14815. // 左边的提示文字
  14816. leftText: {
  14817. type: String,
  14818. default: props$E.navbar.leftText
  14819. },
  14820. // 左右的提示文字
  14821. rightText: {
  14822. type: String,
  14823. default: props$E.navbar.rightText
  14824. },
  14825. // 右边的图标
  14826. rightIcon: {
  14827. type: String,
  14828. default: props$E.navbar.rightIcon
  14829. },
  14830. // 标题
  14831. title: {
  14832. type: [String, Number],
  14833. default: props$E.navbar.title
  14834. },
  14835. // 背景颜色
  14836. bgColor: {
  14837. type: String,
  14838. default: props$E.navbar.bgColor
  14839. },
  14840. // 标题的宽度
  14841. titleWidth: {
  14842. type: [String, Number],
  14843. default: props$E.navbar.titleWidth
  14844. },
  14845. // 导航栏高度
  14846. height: {
  14847. type: [String, Number],
  14848. default: props$E.navbar.height
  14849. },
  14850. // 左侧返回图标的大小
  14851. leftIconSize: {
  14852. type: [String, Number],
  14853. default: props$E.navbar.leftIconSize
  14854. },
  14855. // 左侧返回图标的颜色
  14856. leftIconColor: {
  14857. type: String,
  14858. default: props$E.navbar.leftIconColor
  14859. },
  14860. // 点击左侧区域(返回图标),是否自动返回上一页
  14861. autoBack: {
  14862. type: Boolean,
  14863. default: props$E.navbar.autoBack
  14864. },
  14865. // 标题的样式,对象或字符串
  14866. titleStyle: {
  14867. type: [String, Object],
  14868. default: props$E.navbar.titleStyle
  14869. }
  14870. }
  14871. };
  14872. const _sfc_main$1e = {
  14873. name: "u-navbar",
  14874. mixins: [mpMixin, mixin, props$b],
  14875. data() {
  14876. return {};
  14877. },
  14878. methods: {
  14879. // 点击左侧区域
  14880. leftClick() {
  14881. this.$emit("leftClick");
  14882. if (this.autoBack) {
  14883. uni.navigateBack();
  14884. }
  14885. },
  14886. // 点击右侧区域
  14887. rightClick() {
  14888. this.$emit("rightClick");
  14889. }
  14890. }
  14891. };
  14892. function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) {
  14893. const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$7);
  14894. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  14895. return vue.openBlock(), vue.createElementBlock("view", { class: "u-navbar" }, [
  14896. _ctx.fixed && _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock(
  14897. "view",
  14898. {
  14899. key: 0,
  14900. class: "u-navbar__placeholder",
  14901. style: vue.normalizeStyle({
  14902. height: _ctx.$u.addUnit(_ctx.$u.getPx(_ctx.height) + _ctx.$u.sys().statusBarHeight, "px")
  14903. })
  14904. },
  14905. null,
  14906. 4
  14907. /* STYLE */
  14908. )) : vue.createCommentVNode("v-if", true),
  14909. vue.createElementVNode(
  14910. "view",
  14911. {
  14912. class: vue.normalizeClass([_ctx.fixed && "u-navbar--fixed"])
  14913. },
  14914. [
  14915. _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, {
  14916. key: 0,
  14917. bgColor: _ctx.bgColor
  14918. }, null, 8, ["bgColor"])) : vue.createCommentVNode("v-if", true),
  14919. vue.createElementVNode(
  14920. "view",
  14921. {
  14922. class: vue.normalizeClass(["u-navbar__content", [_ctx.border && "u-border-bottom"]]),
  14923. style: vue.normalizeStyle({
  14924. height: _ctx.$u.addUnit(_ctx.height),
  14925. backgroundColor: _ctx.bgColor
  14926. })
  14927. },
  14928. [
  14929. vue.createElementVNode("view", {
  14930. class: "u-navbar__content__left",
  14931. "hover-class": "u-navbar__content__left--hover",
  14932. "hover-start-time": "150",
  14933. onClick: _cache[0] || (_cache[0] = (...args) => $options.leftClick && $options.leftClick(...args))
  14934. }, [
  14935. vue.renderSlot(_ctx.$slots, "left", {}, () => [
  14936. _ctx.leftIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  14937. key: 0,
  14938. name: _ctx.leftIcon,
  14939. size: _ctx.leftIconSize,
  14940. color: _ctx.leftIconColor
  14941. }, null, 8, ["name", "size", "color"])) : vue.createCommentVNode("v-if", true),
  14942. _ctx.leftText ? (vue.openBlock(), vue.createElementBlock(
  14943. "text",
  14944. {
  14945. key: 1,
  14946. style: vue.normalizeStyle({
  14947. color: _ctx.leftIconColor
  14948. }),
  14949. class: "u-navbar__content__left__text"
  14950. },
  14951. vue.toDisplayString(_ctx.leftText),
  14952. 5
  14953. /* TEXT, STYLE */
  14954. )) : vue.createCommentVNode("v-if", true)
  14955. ], true)
  14956. ]),
  14957. vue.renderSlot(_ctx.$slots, "center", {}, () => [
  14958. vue.createElementVNode(
  14959. "text",
  14960. {
  14961. class: "u-line-1 u-navbar__content__title",
  14962. style: vue.normalizeStyle([{
  14963. width: _ctx.$u.addUnit(_ctx.titleWidth)
  14964. }, _ctx.$u.addStyle(_ctx.titleStyle)])
  14965. },
  14966. vue.toDisplayString(_ctx.title),
  14967. 5
  14968. /* TEXT, STYLE */
  14969. )
  14970. ], true),
  14971. _ctx.$slots.right || _ctx.rightIcon || _ctx.rightText ? (vue.openBlock(), vue.createElementBlock("view", {
  14972. key: 0,
  14973. class: "u-navbar__content__right",
  14974. onClick: _cache[1] || (_cache[1] = (...args) => $options.rightClick && $options.rightClick(...args))
  14975. }, [
  14976. vue.renderSlot(_ctx.$slots, "right", {}, () => [
  14977. _ctx.rightIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  14978. key: 0,
  14979. name: _ctx.rightIcon,
  14980. size: "20"
  14981. }, null, 8, ["name"])) : vue.createCommentVNode("v-if", true),
  14982. _ctx.rightText ? (vue.openBlock(), vue.createElementBlock(
  14983. "text",
  14984. {
  14985. key: 1,
  14986. class: "u-navbar__content__right__text"
  14987. },
  14988. vue.toDisplayString(_ctx.rightText),
  14989. 1
  14990. /* TEXT */
  14991. )) : vue.createCommentVNode("v-if", true)
  14992. ], true)
  14993. ])) : vue.createCommentVNode("v-if", true)
  14994. ],
  14995. 6
  14996. /* CLASS, STYLE */
  14997. )
  14998. ],
  14999. 2
  15000. /* CLASS */
  15001. )
  15002. ]);
  15003. }
  15004. const __easycom_2$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$1d], ["__scopeId", "data-v-f631659b"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-navbar/u-navbar.vue"]]);
  15005. const props$a = {
  15006. props: {
  15007. // 步进器标识符,在change回调返回
  15008. name: {
  15009. type: [String, Number],
  15010. default: props$E.numberBox.name
  15011. },
  15012. // 用于双向绑定的值,初始化时设置设为默认min值(最小值)
  15013. modelValue: {
  15014. type: [String, Number],
  15015. default: props$E.numberBox.value
  15016. },
  15017. // 最小值
  15018. min: {
  15019. type: [String, Number],
  15020. default: props$E.numberBox.min
  15021. },
  15022. // 最大值
  15023. max: {
  15024. type: [String, Number],
  15025. default: props$E.numberBox.max
  15026. },
  15027. // 加减的步长,可为小数
  15028. step: {
  15029. type: [String, Number],
  15030. default: props$E.numberBox.step
  15031. },
  15032. // 是否只允许输入整数
  15033. integer: {
  15034. type: Boolean,
  15035. default: props$E.numberBox.integer
  15036. },
  15037. // 是否禁用,包括输入框,加减按钮
  15038. disabled: {
  15039. type: Boolean,
  15040. default: props$E.numberBox.disabled
  15041. },
  15042. // 是否禁用输入框
  15043. disabledInput: {
  15044. type: Boolean,
  15045. default: props$E.numberBox.disabledInput
  15046. },
  15047. // 是否开启异步变更,开启后需要手动控制输入值
  15048. asyncChange: {
  15049. type: Boolean,
  15050. default: props$E.numberBox.asyncChange
  15051. },
  15052. // 输入框宽度,单位为px
  15053. inputWidth: {
  15054. type: [String, Number],
  15055. default: props$E.numberBox.inputWidth
  15056. },
  15057. // 是否显示减少按钮
  15058. showMinus: {
  15059. type: Boolean,
  15060. default: props$E.numberBox.showMinus
  15061. },
  15062. // 是否显示增加按钮
  15063. showPlus: {
  15064. type: Boolean,
  15065. default: props$E.numberBox.showPlus
  15066. },
  15067. // 显示的小数位数
  15068. decimalLength: {
  15069. type: [String, Number, null],
  15070. default: props$E.numberBox.decimalLength
  15071. },
  15072. // 是否开启长按加减手势
  15073. longPress: {
  15074. type: Boolean,
  15075. default: props$E.numberBox.longPress
  15076. },
  15077. // 输入框文字和加减按钮图标的颜色
  15078. color: {
  15079. type: String,
  15080. default: props$E.numberBox.color
  15081. },
  15082. // 按钮大小,宽高等于此值,单位px,输入框高度和此值保持一致
  15083. buttonSize: {
  15084. type: [String, Number],
  15085. default: props$E.numberBox.buttonSize
  15086. },
  15087. // 输入框和按钮的背景颜色
  15088. bgColor: {
  15089. type: String,
  15090. default: props$E.numberBox.bgColor
  15091. },
  15092. // 指定光标于键盘的距离,避免键盘遮挡输入框,单位px
  15093. cursorSpacing: {
  15094. type: [String, Number],
  15095. default: props$E.numberBox.cursorSpacing
  15096. },
  15097. // 是否禁用增加按钮
  15098. disablePlus: {
  15099. type: Boolean,
  15100. default: props$E.numberBox.disablePlus
  15101. },
  15102. // 是否禁用减少按钮
  15103. disableMinus: {
  15104. type: Boolean,
  15105. default: props$E.numberBox.disableMinus
  15106. },
  15107. // 加减按钮图标的样式
  15108. iconStyle: {
  15109. type: [Object, String],
  15110. default: props$E.numberBox.iconStyle
  15111. }
  15112. }
  15113. };
  15114. const _sfc_main$1d = {
  15115. name: "u-number-box",
  15116. mixins: [mpMixin, mixin, props$a],
  15117. data() {
  15118. return {
  15119. // 输入框实际操作的值
  15120. currentValue: "",
  15121. // 定时器
  15122. longPressTimer: null
  15123. };
  15124. },
  15125. watch: {
  15126. // 多个值之间,只要一个值发生变化,都要重新检查check()函数
  15127. watchChange(n) {
  15128. this.check();
  15129. },
  15130. // 监听v-mode的变化,重新初始化内部的值
  15131. modelValue(n) {
  15132. if (n !== this.currentValue) {
  15133. this.currentValue = this.format(this.modelValue);
  15134. }
  15135. }
  15136. },
  15137. computed: {
  15138. getCursorSpacing() {
  15139. return uni.$u.getPx(this.cursorSpacing);
  15140. },
  15141. // 按钮的样式
  15142. buttonStyle() {
  15143. return (type2) => {
  15144. const style = {
  15145. backgroundColor: this.bgColor,
  15146. height: uni.$u.addUnit(this.buttonSize),
  15147. color: this.color
  15148. };
  15149. if (this.isDisabled(type2)) {
  15150. style.backgroundColor = "#f7f8fa";
  15151. }
  15152. return style;
  15153. };
  15154. },
  15155. // 输入框的样式
  15156. inputStyle() {
  15157. this.disabled || this.disabledInput;
  15158. const style = {
  15159. color: this.color,
  15160. backgroundColor: this.bgColor,
  15161. height: uni.$u.addUnit(this.buttonSize),
  15162. width: uni.$u.addUnit(this.inputWidth)
  15163. };
  15164. return style;
  15165. },
  15166. // 用于监听多个值发生变化
  15167. watchChange() {
  15168. return [this.integer, this.decimalLength, this.min, this.max];
  15169. },
  15170. isDisabled() {
  15171. return (type2) => {
  15172. if (type2 === "plus") {
  15173. return this.disabled || this.disablePlus || this.currentValue >= this.max;
  15174. }
  15175. return this.disabled || this.disableMinus || this.currentValue <= this.min;
  15176. };
  15177. }
  15178. },
  15179. mounted() {
  15180. this.init();
  15181. },
  15182. emits: ["update:modelValue", "focus", "blur", "overlimit", "change", "plus", "minus"],
  15183. methods: {
  15184. init() {
  15185. this.currentValue = this.format(this.modelValue);
  15186. },
  15187. // 格式化整理数据,限制范围
  15188. format(value2) {
  15189. value2 = this.filter(value2);
  15190. value2 = value2 === "" ? 0 : +value2;
  15191. value2 = Math.max(Math.min(this.max, value2), this.min);
  15192. if (this.decimalLength !== null) {
  15193. value2 = value2.toFixed(this.decimalLength);
  15194. }
  15195. return value2;
  15196. },
  15197. // 过滤非法的字符
  15198. filter(value2) {
  15199. value2 = String(value2).replace(/[^0-9.-]/g, "");
  15200. if (this.integer && value2.indexOf(".") !== -1) {
  15201. value2 = value2.split(".")[0];
  15202. }
  15203. return value2;
  15204. },
  15205. check() {
  15206. const val = this.format(this.currentValue);
  15207. if (val !== this.currentValue) {
  15208. this.currentValue = val;
  15209. }
  15210. },
  15211. // 判断是否出于禁止操作状态
  15212. // isDisabled(type) {
  15213. // if (type === 'plus') {
  15214. // // 在点击增加按钮情况下,判断整体的disabled,是否单独禁用增加按钮,以及当前值是否大于最大的允许值
  15215. // return (
  15216. // this.disabled ||
  15217. // this.disablePlus ||
  15218. // this.currentValue >= this.max
  15219. // )
  15220. // }
  15221. // // 点击减少按钮同理
  15222. // return (
  15223. // this.disabled ||
  15224. // this.disableMinus ||
  15225. // this.currentValue <= this.min
  15226. // )
  15227. // },
  15228. // 输入框活动焦点
  15229. onFocus(event) {
  15230. this.$emit("focus", {
  15231. ...event.detail,
  15232. name: this.name
  15233. });
  15234. },
  15235. // 输入框失去焦点
  15236. onBlur(event) {
  15237. this.format(event.detail.value);
  15238. this.$emit(
  15239. "blur",
  15240. {
  15241. ...event.detail,
  15242. name: this.name
  15243. }
  15244. );
  15245. },
  15246. // 输入框值发生变化
  15247. onInput(e) {
  15248. const {
  15249. value: value2 = ""
  15250. } = e.detail || {};
  15251. if (value2 === "")
  15252. return;
  15253. let formatted = this.filter(value2);
  15254. if (this.decimalLength !== null && formatted.indexOf(".") !== -1) {
  15255. const pair = formatted.split(".");
  15256. formatted = `${pair[0]}.${pair[1].slice(0, this.decimalLength)}`;
  15257. }
  15258. formatted = this.format(formatted);
  15259. this.emitChange(formatted);
  15260. },
  15261. // 发出change事件
  15262. emitChange(value2) {
  15263. if (!this.asyncChange) {
  15264. this.$nextTick(() => {
  15265. this.$emit("update:modelValue", value2);
  15266. this.currentValue = value2;
  15267. this.$forceUpdate();
  15268. });
  15269. }
  15270. this.$emit("change", {
  15271. value: value2,
  15272. name: this.name
  15273. });
  15274. },
  15275. onChange() {
  15276. const {
  15277. type: type2
  15278. } = this;
  15279. if (this.isDisabled(type2)) {
  15280. return this.$emit("overlimit", type2);
  15281. }
  15282. const diff = type2 === "minus" ? -this.step : +this.step;
  15283. const value2 = this.format(this.add(+this.currentValue, diff));
  15284. this.emitChange(value2);
  15285. this.$emit(type2);
  15286. },
  15287. // 对值扩大后进行四舍五入,再除以扩大因子,避免出现浮点数操作的精度问题
  15288. add(num1, num2) {
  15289. const cardinal = Math.pow(10, 10);
  15290. return Math.round((num1 + num2) * cardinal) / cardinal;
  15291. },
  15292. // 点击加减按钮
  15293. clickHandler(type2) {
  15294. this.type = type2;
  15295. this.onChange();
  15296. },
  15297. longPressStep() {
  15298. this.clearTimeout();
  15299. this.longPressTimer = setTimeout(() => {
  15300. this.onChange();
  15301. this.longPressStep();
  15302. }, 250);
  15303. },
  15304. onTouchStart(type2) {
  15305. if (!this.longPress)
  15306. return;
  15307. this.clearTimeout();
  15308. this.type = type2;
  15309. this.longPressTimer = setTimeout(() => {
  15310. this.onChange();
  15311. this.longPressStep();
  15312. }, 600);
  15313. },
  15314. // 触摸结束,清除定时器,停止长按加减
  15315. onTouchEnd() {
  15316. if (!this.longPress)
  15317. return;
  15318. this.clearTimeout();
  15319. },
  15320. // 清除定时器
  15321. clearTimeout() {
  15322. clearTimeout(this.longPressTimer);
  15323. this.longPressTimer = null;
  15324. }
  15325. }
  15326. };
  15327. function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) {
  15328. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  15329. return vue.openBlock(), vue.createElementBlock("view", { class: "u-number-box" }, [
  15330. _ctx.showMinus && _ctx.$slots.minus ? (vue.openBlock(), vue.createElementBlock(
  15331. "view",
  15332. {
  15333. key: 0,
  15334. class: "u-number-box__slot",
  15335. onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => $options.clickHandler("minus"), ["stop"])),
  15336. onTouchstart: _cache[1] || (_cache[1] = ($event) => $options.onTouchStart("minus")),
  15337. onTouchend: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"]))
  15338. },
  15339. [
  15340. vue.renderSlot(_ctx.$slots, "minus", {}, void 0, true)
  15341. ],
  15342. 32
  15343. /* NEED_HYDRATION */
  15344. )) : _ctx.showMinus ? (vue.openBlock(), vue.createElementBlock(
  15345. "view",
  15346. {
  15347. key: 1,
  15348. class: vue.normalizeClass(["u-number-box__minus", { "u-number-box__minus--disabled": $options.isDisabled("minus") }]),
  15349. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.clickHandler("minus"), ["stop"])),
  15350. onTouchstart: _cache[4] || (_cache[4] = ($event) => $options.onTouchStart("minus")),
  15351. onTouchend: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"])),
  15352. "hover-class": "u-number-box__minus--hover",
  15353. "hover-stay-time": "150",
  15354. style: vue.normalizeStyle([$options.buttonStyle("minus")])
  15355. },
  15356. [
  15357. vue.createVNode(_component_u_icon, {
  15358. name: "minus",
  15359. color: $options.isDisabled("minus") ? "#c8c9cc" : "#323233",
  15360. size: "15",
  15361. bold: "",
  15362. customStyle: _ctx.iconStyle
  15363. }, null, 8, ["color", "customStyle"])
  15364. ],
  15365. 38
  15366. /* CLASS, STYLE, NEED_HYDRATION */
  15367. )) : vue.createCommentVNode("v-if", true),
  15368. vue.renderSlot(_ctx.$slots, "input", {}, () => [
  15369. vue.withDirectives(vue.createElementVNode("input", {
  15370. disabled: _ctx.disabledInput || _ctx.disabled,
  15371. "cursor-spacing": $options.getCursorSpacing,
  15372. class: vue.normalizeClass([{ "u-number-box__input--disabled": _ctx.disabled || _ctx.disabledInput }, "u-number-box__input"]),
  15373. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.currentValue = $event),
  15374. onBlur: _cache[7] || (_cache[7] = (...args) => $options.onBlur && $options.onBlur(...args)),
  15375. onFocus: _cache[8] || (_cache[8] = (...args) => $options.onFocus && $options.onFocus(...args)),
  15376. onInput: _cache[9] || (_cache[9] = (...args) => $options.onInput && $options.onInput(...args)),
  15377. type: "number",
  15378. style: vue.normalizeStyle([$options.inputStyle])
  15379. }, null, 46, ["disabled", "cursor-spacing"]), [
  15380. [vue.vModelText, $data.currentValue]
  15381. ])
  15382. ], true),
  15383. _ctx.showPlus && _ctx.$slots.plus ? (vue.openBlock(), vue.createElementBlock(
  15384. "view",
  15385. {
  15386. key: 2,
  15387. class: "u-number-box__slot",
  15388. onClick: _cache[10] || (_cache[10] = vue.withModifiers(($event) => $options.clickHandler("plus"), ["stop"])),
  15389. onTouchstart: _cache[11] || (_cache[11] = ($event) => $options.onTouchStart("plus")),
  15390. onTouchend: _cache[12] || (_cache[12] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"]))
  15391. },
  15392. [
  15393. vue.renderSlot(_ctx.$slots, "plus", {}, void 0, true)
  15394. ],
  15395. 32
  15396. /* NEED_HYDRATION */
  15397. )) : _ctx.showPlus ? (vue.openBlock(), vue.createElementBlock(
  15398. "view",
  15399. {
  15400. key: 3,
  15401. class: vue.normalizeClass(["u-number-box__plus", { "u-number-box__minus--disabled": $options.isDisabled("plus") }]),
  15402. onClick: _cache[13] || (_cache[13] = vue.withModifiers(($event) => $options.clickHandler("plus"), ["stop"])),
  15403. onTouchstart: _cache[14] || (_cache[14] = ($event) => $options.onTouchStart("plus")),
  15404. onTouchend: _cache[15] || (_cache[15] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"])),
  15405. "hover-class": "u-number-box__plus--hover",
  15406. "hover-stay-time": "150",
  15407. style: vue.normalizeStyle([$options.buttonStyle("plus")])
  15408. },
  15409. [
  15410. vue.createVNode(_component_u_icon, {
  15411. name: "plus",
  15412. color: $options.isDisabled("plus") ? "#c8c9cc" : "#323233",
  15413. size: "15",
  15414. bold: "",
  15415. customStyle: _ctx.iconStyle
  15416. }, null, 8, ["color", "customStyle"])
  15417. ],
  15418. 38
  15419. /* CLASS, STYLE, NEED_HYDRATION */
  15420. )) : vue.createCommentVNode("v-if", true)
  15421. ]);
  15422. }
  15423. const __easycom_3$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$1c], ["__scopeId", "data-v-eb6f6237"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-number-box/u-number-box.vue"]]);
  15424. const _sfc_main$1c = {
  15425. __name: "scan-order",
  15426. setup(__props, { expose: __expose }) {
  15427. __expose();
  15428. const isbnList = vue.ref([]);
  15429. const showModal = vue.ref(false);
  15430. const newIsbn = vue.ref("");
  15431. const removeItem = (index2) => {
  15432. isbnList.value.splice(index2, 1);
  15433. };
  15434. const goBack = () => {
  15435. uni.navigateBack();
  15436. };
  15437. function clearAll() {
  15438. isbnList.value.length = 0;
  15439. }
  15440. const addOrUpdateIsbn = (isbn) => {
  15441. const existingItem = isbnList.value.find((item) => item.isbn === isbn);
  15442. if (existingItem) {
  15443. existingItem.quantity += 1;
  15444. } else {
  15445. isbnList.value.push({
  15446. isbn,
  15447. quantity: 1
  15448. });
  15449. }
  15450. };
  15451. function handleIsbn(isbn) {
  15452. if (isValidISBN(isbn)) {
  15453. addOrUpdateIsbn(isbn);
  15454. } else {
  15455. uni.$u.ttsModule.speak("不正确的ISBN码");
  15456. }
  15457. }
  15458. const handleScan = () => {
  15459. uni.scanCode({
  15460. success: (res2) => {
  15461. handleIsbn(res2.result);
  15462. }
  15463. });
  15464. };
  15465. const isValidISBN = (isbn) => {
  15466. return /^97[89]\d{10}$/.test(isbn);
  15467. };
  15468. const handleQuery = () => {
  15469. if (isbnList.value.length === 0) {
  15470. uni.showToast({
  15471. title: "请先添加ISBN",
  15472. icon: "none"
  15473. });
  15474. return;
  15475. }
  15476. uni.setStorageSync("isbnList", isbnList.value);
  15477. uni.navigateTo({
  15478. url: "/pages/index/audit/isbn-order"
  15479. });
  15480. };
  15481. const addIsbn = () => {
  15482. if (isValidISBN(newIsbn.value)) {
  15483. addOrUpdateIsbn(newIsbn.value);
  15484. showModal.value = false;
  15485. newIsbn.value = "";
  15486. } else {
  15487. uni.$u.ttsModule.speak("不正确的ISBN码");
  15488. }
  15489. };
  15490. onLoad(() => {
  15491. uni.$u.useGlobalEvent((e) => {
  15492. addOrUpdateIsbn(e.barcode);
  15493. });
  15494. });
  15495. const __returned__ = { isbnList, showModal, newIsbn, removeItem, goBack, clearAll, addOrUpdateIsbn, handleIsbn, handleScan, isValidISBN, handleQuery, addIsbn, ref: vue.ref, get onLoad() {
  15496. return onLoad;
  15497. } };
  15498. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15499. return __returned__;
  15500. }
  15501. };
  15502. function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
  15503. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  15504. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_2$2);
  15505. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$3);
  15506. const _component_u_number_box = resolveEasycom(vue.resolveDynamicComponent("u-number-box"), __easycom_3$3);
  15507. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  15508. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  15509. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_3$4);
  15510. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  15511. vue.createVNode(_component_u_navbar, {
  15512. title: "扫书查单",
  15513. border: false,
  15514. fixed: "",
  15515. bgColor: "#22ac38",
  15516. leftIconColor: "#fff",
  15517. titleStyle: "font-size:36rpx;color:#fff"
  15518. }, {
  15519. left: vue.withCtx(() => [
  15520. vue.createVNode(_component_u_icon, {
  15521. name: "arrow-left",
  15522. color: "#fff",
  15523. size: "20",
  15524. onClick: $setup.goBack
  15525. })
  15526. ]),
  15527. right: vue.withCtx(() => [
  15528. vue.createElementVNode("text", {
  15529. style: { "color": "#fff", "font-size": "32rpx" },
  15530. type: "primary",
  15531. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showModal = true)
  15532. }, "新增")
  15533. ]),
  15534. _: 1
  15535. /* STABLE */
  15536. }),
  15537. vue.createCommentVNode(" 顶部操作栏 "),
  15538. vue.createVNode(_component_u_sticky, null, {
  15539. default: vue.withCtx(() => [
  15540. vue.createElementVNode("view", {
  15541. class: "header",
  15542. onClick: $setup.clearAll
  15543. }, "清除全部"),
  15544. vue.createCommentVNode(" 提示信息 "),
  15545. vue.createElementVNode("view", { class: "tips" }, [
  15546. vue.createElementVNode("text", null, "请勿录入审核为不良的书籍ISBN!"),
  15547. vue.createElementVNode("text", { class: "sub-tips" }, "不良书籍的ISBN可能是错误的!")
  15548. ])
  15549. ]),
  15550. _: 1
  15551. /* STABLE */
  15552. }),
  15553. vue.createCommentVNode(" ISBN列表 "),
  15554. vue.createElementVNode("scroll-view", {
  15555. "scroll-y": "",
  15556. class: "isbn-list"
  15557. }, [
  15558. (vue.openBlock(true), vue.createElementBlock(
  15559. vue.Fragment,
  15560. null,
  15561. vue.renderList($setup.isbnList, (item, index2) => {
  15562. return vue.openBlock(), vue.createElementBlock("view", {
  15563. key: index2,
  15564. class: "isbn-item"
  15565. }, [
  15566. vue.createElementVNode("view", { class: "item-left" }, [
  15567. vue.createVNode(_component_u_icon, {
  15568. name: "minus-circle-fill",
  15569. color: "#dd524d",
  15570. size: "24",
  15571. onClick: ($event) => $setup.removeItem(index2)
  15572. }, null, 8, ["onClick"]),
  15573. vue.createElementVNode(
  15574. "text",
  15575. { class: "index" },
  15576. vue.toDisplayString(index2 + 1) + "、",
  15577. 1
  15578. /* TEXT */
  15579. ),
  15580. vue.createElementVNode(
  15581. "text",
  15582. { class: "isbn" },
  15583. vue.toDisplayString(item.isbn),
  15584. 1
  15585. /* TEXT */
  15586. )
  15587. ]),
  15588. vue.createVNode(_component_u_number_box, {
  15589. modelValue: item.quantity,
  15590. "onUpdate:modelValue": ($event) => item.quantity = $event,
  15591. disableMinus: item.quantity <= 1
  15592. }, null, 8, ["modelValue", "onUpdate:modelValue", "disableMinus"])
  15593. ]);
  15594. }),
  15595. 128
  15596. /* KEYED_FRAGMENT */
  15597. ))
  15598. ]),
  15599. vue.createCommentVNode(" 底部按钮 "),
  15600. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  15601. vue.createVNode(_component_u_button, {
  15602. size: "large",
  15603. type: "warning",
  15604. text: "扫码加书",
  15605. onClick: $setup.handleScan
  15606. }),
  15607. vue.createVNode(_component_u_button, {
  15608. size: "large",
  15609. type: "primary",
  15610. text: "查询",
  15611. onClick: $setup.handleQuery
  15612. })
  15613. ]),
  15614. vue.createCommentVNode(" ISBN Input Modal "),
  15615. vue.createVNode(_component_u_popup, {
  15616. show: $setup.showModal,
  15617. mode: "center",
  15618. customStyle: "width: 84%;border-radius:10px"
  15619. }, {
  15620. default: vue.withCtx(() => [
  15621. vue.createElementVNode("view", { class: "modal-content" }, [
  15622. vue.createElementVNode("text", null, "输入ISBN码"),
  15623. vue.createVNode(_component_u_input, {
  15624. modelValue: $setup.newIsbn,
  15625. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.newIsbn = $event),
  15626. placeholder: "请输入ISBN码",
  15627. "custom-style": "margin:60rpx 0"
  15628. }, null, 8, ["modelValue"]),
  15629. vue.createElementVNode("view", { class: "modal-buttons" }, [
  15630. vue.createVNode(_component_u_button, {
  15631. text: "取消",
  15632. onClick: _cache[2] || (_cache[2] = ($event) => $setup.showModal = false)
  15633. }),
  15634. vue.createVNode(_component_u_button, {
  15635. type: "primary",
  15636. text: "确定",
  15637. onClick: $setup.addIsbn
  15638. })
  15639. ])
  15640. ])
  15641. ]),
  15642. _: 1
  15643. /* STABLE */
  15644. }, 8, ["show"])
  15645. ]);
  15646. }
  15647. const PagesIndexAuditScanOrder = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$1b], ["__scopeId", "data-v-1af411ea"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/scan-order.vue"]]);
  15648. const _sfc_main$1b = {
  15649. __name: "orderItem",
  15650. props: {
  15651. item: {
  15652. type: Object,
  15653. default: () => {
  15654. }
  15655. }
  15656. },
  15657. setup(__props, { expose: __expose }) {
  15658. __expose();
  15659. const props2 = __props;
  15660. const statusEnum = {
  15661. "0": "创建",
  15662. "1": "用户删除",
  15663. "2": "下单(待初审)",
  15664. "3": "初审(待取书)",
  15665. "4": "初审未通过",
  15666. "5": "快递取书(待签收)",
  15667. "6": "快递签收(待收货)",
  15668. "7": "物流签收(路由异常)",
  15669. "8": "仓库收货(待审核)",
  15670. "9": "审核中(审核未提交)",
  15671. "10": "已审核(待付款)",
  15672. "11": "已完成"
  15673. };
  15674. const maskedNickName = vue.computed(() => {
  15675. if (!props2.item.nickName)
  15676. return "";
  15677. return props2.item.nickName.charAt(0) + "*".repeat(props2.item.nickName.length - 1);
  15678. });
  15679. let statusText = vue.computed(() => {
  15680. return props2.item.status ? statusEnum[props2.item.status] : "-";
  15681. });
  15682. const statusColor = vue.ref("#FF4D4F");
  15683. const copyToClipboard = (text) => {
  15684. uni.setClipboardData({
  15685. data: text,
  15686. success: () => {
  15687. uni.showToast({
  15688. title: "复制成功",
  15689. icon: "success"
  15690. });
  15691. }
  15692. });
  15693. };
  15694. const handleAudit = () => {
  15695. uni.navigateTo({
  15696. url: `/pages/index/detail/index?id=${props2.item.orderId}`
  15697. });
  15698. };
  15699. const handleView = () => {
  15700. uni.navigateTo({
  15701. url: `/pages/index/detail/index?id=${props2.item.orderId}&type=2`
  15702. });
  15703. };
  15704. const __returned__ = { props: props2, statusEnum, maskedNickName, get statusText() {
  15705. return statusText;
  15706. }, set statusText(v) {
  15707. statusText = v;
  15708. }, statusColor, copyToClipboard, handleAudit, handleView, ref: vue.ref, computed: vue.computed };
  15709. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15710. return __returned__;
  15711. }
  15712. };
  15713. function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
  15714. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  15715. return vue.openBlock(), vue.createElementBlock("view", { class: "order-card" }, [
  15716. vue.createCommentVNode(" 用户信息 "),
  15717. vue.createElementVNode("view", { class: "user-info" }, [
  15718. vue.createElementVNode("image", {
  15719. class: "avatar",
  15720. src: $props.item.imgPath,
  15721. mode: "aspectFill"
  15722. }, null, 8, ["src"]),
  15723. vue.createElementVNode("view", { class: "user-details" }, [
  15724. vue.createElementVNode(
  15725. "text",
  15726. { class: "username" },
  15727. vue.toDisplayString($props.item.plat == 1 ? "微信用户" : "支付宝用户") + " (" + vue.toDisplayString($setup.maskedNickName) + ")",
  15728. 1
  15729. /* TEXT */
  15730. ),
  15731. vue.createElementVNode(
  15732. "text",
  15733. { class: "date" },
  15734. "共卖出" + vue.toDisplayString($props.item.totalNum) + "本书",
  15735. 1
  15736. /* TEXT */
  15737. ),
  15738. vue.createElementVNode(
  15739. "text",
  15740. { class: "date" },
  15741. "来自" + vue.toDisplayString($props.item.sendSsq),
  15742. 1
  15743. /* TEXT */
  15744. )
  15745. ]),
  15746. vue.createElementVNode("view", { class: "user-details right-items" }, [
  15747. vue.createElementVNode(
  15748. "text",
  15749. { class: "date" },
  15750. vue.toDisplayString($props.item.schedulePickupStartTime),
  15751. 1
  15752. /* TEXT */
  15753. ),
  15754. vue.createElementVNode(
  15755. "text",
  15756. {
  15757. class: "status",
  15758. style: vue.normalizeStyle({ color: $setup.statusColor })
  15759. },
  15760. "[" + vue.toDisplayString($setup.statusText) + "]",
  15761. 5
  15762. /* TEXT, STYLE */
  15763. )
  15764. ])
  15765. ]),
  15766. vue.createCommentVNode(" 订单详情 "),
  15767. vue.createElementVNode("view", { class: "order-details" }, [
  15768. vue.createElementVNode("view", { class: "detail-row flex flex-col" }, [
  15769. vue.createElementVNode("view", { class: "flex-1" }, [
  15770. vue.createElementVNode("text", null, "订单ID:"),
  15771. vue.createElementVNode(
  15772. "text",
  15773. {
  15774. class: "link",
  15775. onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyToClipboard($props.item.orderId))
  15776. },
  15777. vue.toDisplayString($props.item.orderId),
  15778. 1
  15779. /* TEXT */
  15780. )
  15781. ]),
  15782. vue.createElementVNode("view", { class: "flex-1" }, [
  15783. vue.createElementVNode("text", null, "运单号:"),
  15784. vue.createElementVNode(
  15785. "text",
  15786. {
  15787. class: "link",
  15788. onClick: _cache[1] || (_cache[1] = ($event) => $setup.copyToClipboard($props.item.waybillCode))
  15789. },
  15790. vue.toDisplayString($props.item.waybillCode),
  15791. 1
  15792. /* TEXT */
  15793. )
  15794. ])
  15795. ]),
  15796. vue.createElementVNode("view", { class: "detail-row" }, [
  15797. vue.createElementVNode(
  15798. "text",
  15799. { class: "flex-1" },
  15800. "预估金额:" + vue.toDisplayString($props.item.expectMoney || 0),
  15801. 1
  15802. /* TEXT */
  15803. ),
  15804. vue.createElementVNode(
  15805. "text",
  15806. { class: "flex-1" },
  15807. "审核金额:" + vue.toDisplayString($props.item.finalMoney || "待核算"),
  15808. 1
  15809. /* TEXT */
  15810. )
  15811. ]),
  15812. vue.createElementVNode("view", { class: "detail-row" }, [
  15813. vue.createElementVNode(
  15814. "text",
  15815. null,
  15816. "内部备注:" + vue.toDisplayString($props.item.manageRemark ? $props.item.manageRemark[0].remark : "-"),
  15817. 1
  15818. /* TEXT */
  15819. )
  15820. ])
  15821. ]),
  15822. vue.createCommentVNode(" 操作按钮 "),
  15823. vue.createElementVNode("view", { class: "action-buttons" }, [
  15824. vue.createVNode(_component_u_button, {
  15825. size: "small",
  15826. type: "primary",
  15827. onClick: $setup.handleAudit
  15828. }, {
  15829. default: vue.withCtx(() => [
  15830. vue.createTextVNode("到货审核")
  15831. ]),
  15832. _: 1
  15833. /* STABLE */
  15834. }),
  15835. vue.createVNode(_component_u_button, {
  15836. size: "small",
  15837. onClick: $setup.handleView
  15838. }, {
  15839. default: vue.withCtx(() => [
  15840. vue.createTextVNode("查看")
  15841. ]),
  15842. _: 1
  15843. /* STABLE */
  15844. })
  15845. ])
  15846. ]);
  15847. }
  15848. const orderItem = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$1a], ["__scopeId", "data-v-12bc2a79"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/components/orderItem.vue"]]);
  15849. const _sfc_main$1a = {
  15850. __name: "isbn-order",
  15851. setup(__props, { expose: __expose }) {
  15852. __expose();
  15853. const otherParams = vue.ref({
  15854. isbnList: ""
  15855. });
  15856. const scrollRef = vue.ref(null);
  15857. const refreshList = () => {
  15858. var _a;
  15859. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  15860. };
  15861. let dataList = vue.ref([]);
  15862. const updateList = (data, page2) => {
  15863. dataList.value = data;
  15864. if (data.length > 0 && page2 == 1) {
  15865. uni.$u.ttsModule.speak("查询到" + data.length + "条数据");
  15866. }
  15867. if (data.length == 0 && page2 == 1) {
  15868. uni.$u.ttsModule.speak("未查询到数据");
  15869. }
  15870. };
  15871. onLoad(() => {
  15872. const storedList = uni.getStorageSync("isbnList");
  15873. if (storedList) {
  15874. otherParams.value.isbnList = storedList.map((v) => v.isbn);
  15875. refreshList();
  15876. }
  15877. });
  15878. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  15879. return dataList;
  15880. }, set dataList(v) {
  15881. dataList = v;
  15882. }, updateList, reactive: vue.reactive, PageScroll, OrderItem: orderItem, ref: vue.ref, get onLoad() {
  15883. return onLoad;
  15884. } };
  15885. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15886. return __returned__;
  15887. }
  15888. };
  15889. function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
  15890. return vue.openBlock(), vue.createElementBlock("view", {
  15891. class: "common-page",
  15892. style: { "padding": "0" }
  15893. }, [
  15894. vue.createVNode($setup["PageScroll"], {
  15895. requestStr: "/app/orderinfo/getOrderListByIsbn",
  15896. onUpdateList: $setup.updateList,
  15897. ref: "scrollRef",
  15898. otherParams: $setup.otherParams,
  15899. method: "post"
  15900. }, {
  15901. default: vue.withCtx(() => [
  15902. $setup.dataList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  15903. key: 0,
  15904. class: "list-con"
  15905. }, [
  15906. (vue.openBlock(true), vue.createElementBlock(
  15907. vue.Fragment,
  15908. null,
  15909. vue.renderList($setup.dataList, (cell) => {
  15910. return vue.openBlock(), vue.createBlock($setup["OrderItem"], {
  15911. key: cell.id,
  15912. item: cell,
  15913. class: "mt-20"
  15914. }, null, 8, ["item"]);
  15915. }),
  15916. 128
  15917. /* KEYED_FRAGMENT */
  15918. ))
  15919. ])) : vue.createCommentVNode("v-if", true)
  15920. ]),
  15921. _: 1
  15922. /* STABLE */
  15923. }, 8, ["otherParams"])
  15924. ]);
  15925. }
  15926. const PagesIndexAuditIsbnOrder = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$19], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/isbn-order.vue"]]);
  15927. const _sfc_main$19 = {
  15928. __name: "express-order",
  15929. setup(__props, { expose: __expose }) {
  15930. __expose();
  15931. const form = vue.ref({
  15932. searchType: "2",
  15933. search: ""
  15934. });
  15935. const handleSearch = () => {
  15936. formatAppLog("log", "at pages/index/audit/express-order.vue:45", "查询:", form.value.search);
  15937. uni.$u.http.get("/app/orderinfo/getOrderInfoForCheck", {
  15938. params: {
  15939. ...form.value
  15940. }
  15941. }).then((res2) => {
  15942. if (res2.code == 200) {
  15943. uni.setStorageSync("orderDetail", res2.data);
  15944. uni.navigateTo({
  15945. url: `/pages/index/detail/index?id=${res2.data.orderId}`
  15946. });
  15947. } else {
  15948. if (res2.code == 500) {
  15949. let text = form.value.search + "订单不存在";
  15950. uni.$u.ttsModule.speak(text);
  15951. } else {
  15952. uni.$u.toast(res2.msg);
  15953. uni.$u.ttsModule.speak(res2.msg);
  15954. }
  15955. }
  15956. });
  15957. };
  15958. const handleScan = () => {
  15959. uni.scanCode({
  15960. success: (res2) => {
  15961. form.value.search = res2.result;
  15962. handleSearch();
  15963. }
  15964. });
  15965. };
  15966. onLoad(() => {
  15967. uni.$u.useGlobalEvent((e) => {
  15968. form.value.search = e.barcode;
  15969. handleSearch();
  15970. });
  15971. });
  15972. const __returned__ = { form, handleSearch, handleScan, ref: vue.ref, get onLoad() {
  15973. return onLoad;
  15974. } };
  15975. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15976. return __returned__;
  15977. }
  15978. };
  15979. function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
  15980. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
  15981. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$4);
  15982. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  15983. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  15984. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$3);
  15985. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  15986. vue.createCommentVNode(" 底部按钮 "),
  15987. vue.createElementVNode("view", { class: "footer" }, [
  15988. vue.createCommentVNode(" 查询区域 "),
  15989. vue.createElementVNode("view", { class: "query-section" }, [
  15990. vue.createVNode(_component_u_radio_group, {
  15991. modelValue: $setup.form.searchType,
  15992. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.searchType = $event)
  15993. }, {
  15994. default: vue.withCtx(() => [
  15995. vue.createVNode(_component_u_radio, {
  15996. label: "查订单",
  15997. name: "1",
  15998. "label-size": "17"
  15999. }),
  16000. vue.createVNode(_component_u_radio, {
  16001. label: "查物流",
  16002. "custom-style": "margin-left:20px",
  16003. name: "2",
  16004. "label-size": "17"
  16005. })
  16006. ]),
  16007. _: 1
  16008. /* STABLE */
  16009. }, 8, ["modelValue"]),
  16010. vue.createElementVNode("view", { class: "search-box" }, [
  16011. vue.createVNode(_component_u_input, {
  16012. "custom-style": "width:100rpx",
  16013. modelValue: $setup.form.search,
  16014. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.search = $event),
  16015. placeholder: $setup.form.searchType == "1" ? "扫描/输入订单编号" : "扫描/输入物流单号",
  16016. border: "surround",
  16017. clearable: "",
  16018. "placeholder-style": "font-size:32rpx"
  16019. }, null, 8, ["modelValue", "placeholder"]),
  16020. vue.createVNode(_component_u_button, {
  16021. color: "#c8c8c8",
  16022. text: "查询",
  16023. onClick: $setup.handleSearch
  16024. })
  16025. ])
  16026. ]),
  16027. vue.createVNode(_component_u_divider),
  16028. vue.createElementVNode("view", { style: { "display": "flex" } }, [
  16029. vue.createVNode(_component_u_button, {
  16030. size: "large",
  16031. type: "success",
  16032. text: "扫码",
  16033. onClick: $setup.handleScan
  16034. })
  16035. ])
  16036. ])
  16037. ]);
  16038. }
  16039. const PagesIndexAuditExpressOrder = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$18], ["__scopeId", "data-v-b27ee25f"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/express-order.vue"]]);
  16040. const _sfc_main$18 = {
  16041. __name: "AuditorSelector",
  16042. props: {
  16043. show: {
  16044. type: Boolean,
  16045. default: false
  16046. }
  16047. },
  16048. emits: ["update:show", "auditor-selected"],
  16049. setup(__props, { expose: __expose, emit: __emit }) {
  16050. __expose();
  16051. const props2 = __props;
  16052. const emit2 = __emit;
  16053. const searchKeyword = vue.ref("");
  16054. const searchResults = vue.ref([]);
  16055. const historyAuditors = vue.ref(uni.getStorageSync("historyAuditors") || []);
  16056. const checkUserId = vue.ref("");
  16057. const auditorSearch = (name) => {
  16058. formatAppLog("log", "at pages/index/detail/components/AuditorSelector.vue:66", name);
  16059. uni.$u.http.get("/app/appUser/getCheckUser?name=" + name).then((res2) => {
  16060. if (res2.code == 200) {
  16061. searchResults.value = res2.data;
  16062. }
  16063. });
  16064. };
  16065. const handleSearch = () => {
  16066. auditorSearch(searchKeyword.value);
  16067. };
  16068. const selectItem = vue.ref({});
  16069. const selectAuditor = (item) => {
  16070. checkUserId.value = item.userId;
  16071. selectItem.value = item;
  16072. };
  16073. const handleClose = () => {
  16074. emit2("update:show", false);
  16075. searchKeyword.value = "";
  16076. };
  16077. const handleConfirm = () => {
  16078. if (checkUserId.value) {
  16079. emit2("auditor-selected", selectItem.value);
  16080. uni.setStorageSync("checkUserInfo", selectItem.value);
  16081. addToHistory(selectItem.value);
  16082. handleClose();
  16083. }
  16084. };
  16085. const addToHistory = (item) => {
  16086. const existingIndex = historyAuditors.value.findIndex((auditor) => auditor.userId === item.userId);
  16087. if (existingIndex !== -1) {
  16088. historyAuditors.value.splice(existingIndex, 1);
  16089. }
  16090. historyAuditors.value.unshift(item);
  16091. if (historyAuditors.value.length > 10) {
  16092. historyAuditors.value.pop();
  16093. }
  16094. uni.setStorageSync("historyAuditors", historyAuditors.value);
  16095. };
  16096. vue.onMounted(() => {
  16097. const storedHistory = uni.getStorageSync("historyAuditors") || [];
  16098. historyAuditors.value = storedHistory;
  16099. });
  16100. const __returned__ = { props: props2, emit: emit2, searchKeyword, searchResults, historyAuditors, checkUserId, auditorSearch, handleSearch, selectItem, selectAuditor, handleClose, handleConfirm, addToHistory, ref: vue.ref, onMounted: vue.onMounted };
  16101. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16102. return __returned__;
  16103. }
  16104. };
  16105. function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
  16106. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  16107. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$4);
  16108. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  16109. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_3$4);
  16110. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  16111. show: $props.show,
  16112. onClose: $setup.handleClose,
  16113. mode: "bottom",
  16114. round: "10"
  16115. }, {
  16116. default: vue.withCtx(() => [
  16117. vue.createElementVNode("view", { class: "auditor-selector" }, [
  16118. vue.createElementVNode("view", { style: { "flex": "1" } }, [
  16119. vue.createCommentVNode(" Title "),
  16120. vue.createElementVNode("view", { class: "header" }, [
  16121. vue.createElementVNode("text", { class: "title" }, "绑定审核员")
  16122. ]),
  16123. vue.createCommentVNode(" Search Box "),
  16124. vue.createElementVNode("view", { class: "search-box" }, [
  16125. vue.createVNode(_component_u_search, {
  16126. inputStyle: { "height": "80rpx", "font-size": "16px" },
  16127. actionStyle: { "font-size": "16px", color: "#22ac38" },
  16128. modelValue: $setup.searchKeyword,
  16129. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchKeyword = $event),
  16130. placeholder: "搜索审核员",
  16131. "show-action": true,
  16132. "action-text": "搜索",
  16133. onSearch: $setup.handleSearch,
  16134. onCustom: $setup.handleSearch
  16135. }, null, 8, ["modelValue"])
  16136. ]),
  16137. vue.createCommentVNode(" Search Results "),
  16138. $setup.searchResults.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  16139. key: 0,
  16140. class: "search-result"
  16141. }, [
  16142. vue.createElementVNode("text", { class: "section-title" }, "搜索结果"),
  16143. vue.createElementVNode("view", { class: "tag-group" }, [
  16144. (vue.openBlock(true), vue.createElementBlock(
  16145. vue.Fragment,
  16146. null,
  16147. vue.renderList($setup.searchResults, (item) => {
  16148. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  16149. key: item,
  16150. text: item.userName,
  16151. plain: $setup.checkUserId !== item.userId,
  16152. shape: "circle",
  16153. onClick: ($event) => $setup.selectAuditor(item),
  16154. size: "large"
  16155. }, null, 8, ["text", "plain", "onClick"]);
  16156. }),
  16157. 128
  16158. /* KEYED_FRAGMENT */
  16159. ))
  16160. ])
  16161. ])) : vue.createCommentVNode("v-if", true),
  16162. vue.createCommentVNode(" History "),
  16163. $setup.historyAuditors.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  16164. key: 1,
  16165. class: "history-section"
  16166. }, [
  16167. vue.createElementVNode("text", { class: "section-title" }, "历史绑定"),
  16168. vue.createElementVNode("view", { class: "tag-group" }, [
  16169. (vue.openBlock(true), vue.createElementBlock(
  16170. vue.Fragment,
  16171. null,
  16172. vue.renderList($setup.historyAuditors, (item) => {
  16173. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  16174. key: item,
  16175. text: item.userName,
  16176. plain: $setup.checkUserId !== item.userId,
  16177. shape: "circle",
  16178. onClick: ($event) => $setup.selectAuditor(item),
  16179. size: "large"
  16180. }, null, 8, ["text", "plain", "onClick"]);
  16181. }),
  16182. 128
  16183. /* KEYED_FRAGMENT */
  16184. ))
  16185. ])
  16186. ])) : vue.createCommentVNode("v-if", true)
  16187. ]),
  16188. vue.createCommentVNode(" Footer Buttons "),
  16189. vue.createElementVNode("view", { class: "footer" }, [
  16190. vue.createVNode(_component_u_button, {
  16191. onClick: $setup.handleClose,
  16192. text: "取消",
  16193. plain: "",
  16194. shape: "circle"
  16195. }),
  16196. vue.createVNode(_component_u_button, {
  16197. type: "primary",
  16198. onClick: $setup.handleConfirm,
  16199. text: "确定",
  16200. shape: "circle"
  16201. })
  16202. ])
  16203. ])
  16204. ]),
  16205. _: 1
  16206. /* STABLE */
  16207. }, 8, ["show"]);
  16208. }
  16209. const AuditorSelector = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$17], ["__scopeId", "data-v-8d9417b9"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/AuditorSelector.vue"]]);
  16210. const props$9 = {
  16211. props: {
  16212. // 输入框的内容
  16213. value: {
  16214. type: [String, Number],
  16215. default: props$E.textarea.value
  16216. },
  16217. // 输入框的内容
  16218. modelValue: {
  16219. type: [String, Number],
  16220. default: props$E.textarea.value
  16221. },
  16222. // 输入框为空时占位符
  16223. placeholder: {
  16224. type: [String, Number],
  16225. default: props$E.textarea.placeholder
  16226. },
  16227. // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
  16228. placeholderClass: {
  16229. type: String,
  16230. default: props$E.input.placeholderClass
  16231. },
  16232. // 指定placeholder的样式
  16233. placeholderStyle: {
  16234. type: [String, Object],
  16235. default: props$E.input.placeholderStyle
  16236. },
  16237. // 输入框高度
  16238. height: {
  16239. type: [String, Number],
  16240. default: props$E.textarea.height
  16241. },
  16242. // 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效
  16243. confirmType: {
  16244. type: String,
  16245. default: props$E.textarea.confirmType
  16246. },
  16247. // 是否禁用
  16248. disabled: {
  16249. type: Boolean,
  16250. default: props$E.textarea.disabled
  16251. },
  16252. // 是否显示统计字数
  16253. count: {
  16254. type: Boolean,
  16255. default: props$E.textarea.count
  16256. },
  16257. // 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现
  16258. focus: {
  16259. type: Boolean,
  16260. default: props$E.textarea.focus
  16261. },
  16262. // 是否自动增加高度
  16263. autoHeight: {
  16264. type: Boolean,
  16265. default: props$E.textarea.autoHeight
  16266. },
  16267. // 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true
  16268. fixed: {
  16269. type: Boolean,
  16270. default: props$E.textarea.fixed
  16271. },
  16272. // 指定光标与键盘的距离
  16273. cursorSpacing: {
  16274. type: Number,
  16275. default: props$E.textarea.cursorSpacing
  16276. },
  16277. // 指定focus时的光标位置
  16278. cursor: {
  16279. type: [String, Number],
  16280. default: props$E.textarea.cursor
  16281. },
  16282. // 是否显示键盘上方带有”完成“按钮那一栏,
  16283. showConfirmBar: {
  16284. type: Boolean,
  16285. default: props$E.textarea.showConfirmBar
  16286. },
  16287. // 光标起始位置,自动聚焦时有效,需与selection-end搭配使用
  16288. selectionStart: {
  16289. type: Number,
  16290. default: props$E.textarea.selectionStart
  16291. },
  16292. // 光标结束位置,自动聚焦时有效,需与selection-start搭配使用
  16293. selectionEnd: {
  16294. type: Number,
  16295. default: props$E.textarea.selectionEnd
  16296. },
  16297. // 键盘弹起时,是否自动上推页面
  16298. adjustPosition: {
  16299. type: Boolean,
  16300. default: props$E.textarea.adjustPosition
  16301. },
  16302. // 是否去掉 iOS 下的默认内边距,只微信小程序有效
  16303. disableDefaultPadding: {
  16304. type: Boolean,
  16305. default: props$E.textarea.disableDefaultPadding
  16306. },
  16307. // focus时,点击页面的时候不收起键盘,只微信小程序有效
  16308. holdKeyboard: {
  16309. type: Boolean,
  16310. default: props$E.textarea.holdKeyboard
  16311. },
  16312. // 最大输入长度,设置为 -1 的时候不限制最大长度
  16313. maxlength: {
  16314. type: [String, Number],
  16315. default: props$E.textarea.maxlength
  16316. },
  16317. // 边框类型,surround-四周边框,bottom-底部边框
  16318. border: {
  16319. type: String,
  16320. default: props$E.textarea.border
  16321. },
  16322. // 用于处理或者过滤输入框内容的方法
  16323. formatter: {
  16324. type: [Function, null],
  16325. default: props$E.textarea.formatter
  16326. },
  16327. // 是否忽略组件内对文本合成系统事件的处理
  16328. ignoreCompositionEvent: {
  16329. type: Boolean,
  16330. default: true
  16331. }
  16332. }
  16333. };
  16334. const _sfc_main$17 = {
  16335. name: "u-textarea",
  16336. mixins: [mpMixin, mixin, props$9],
  16337. data() {
  16338. return {
  16339. // 输入框的值
  16340. innerValue: "",
  16341. // 是否处于获得焦点状态
  16342. focused: false,
  16343. // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
  16344. firstChange: true,
  16345. // value绑定值的变化是由内部还是外部引起的
  16346. changeFromInner: false,
  16347. // 过滤处理方法
  16348. innerFormatter: (value2) => value2
  16349. };
  16350. },
  16351. created() {
  16352. },
  16353. watch: {
  16354. modelValue: {
  16355. immediate: true,
  16356. handler(newVal, oldVal) {
  16357. this.innerValue = newVal;
  16358. this.firstChange = false;
  16359. this.changeFromInner = false;
  16360. }
  16361. }
  16362. },
  16363. computed: {
  16364. // 组件的类名
  16365. textareaClass() {
  16366. let classes = [], { border, disabled } = this;
  16367. border === "surround" && (classes = classes.concat(["u-border", "u-textarea--radius"]));
  16368. border === "bottom" && (classes = classes.concat([
  16369. "u-border-bottom",
  16370. "u-textarea--no-radius"
  16371. ]));
  16372. disabled && classes.push("u-textarea--disabled");
  16373. return classes.join(" ");
  16374. },
  16375. // 组件的样式
  16376. textareaStyle() {
  16377. const style = {};
  16378. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  16379. }
  16380. },
  16381. emits: ["update:modelValue", "linechange", "focus", "blur", "change", "confirm", "keyboardheightchange"],
  16382. methods: {
  16383. // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
  16384. setFormatter(e) {
  16385. this.innerFormatter = e;
  16386. },
  16387. onFocus(e) {
  16388. this.$emit("focus", e);
  16389. },
  16390. onBlur(e) {
  16391. this.$emit("blur", e);
  16392. uni.$u.formValidate(this, "blur");
  16393. },
  16394. onLinechange(e) {
  16395. this.$emit("linechange", e);
  16396. },
  16397. onInput(e) {
  16398. let { value: value2 = "" } = e.detail || {};
  16399. const formatter = this.formatter || this.innerFormatter;
  16400. const formatValue = formatter(value2);
  16401. this.innerValue = value2;
  16402. this.$nextTick(() => {
  16403. this.innerValue = formatValue;
  16404. this.valueChange();
  16405. });
  16406. },
  16407. // 内容发生变化,进行处理
  16408. valueChange() {
  16409. const value2 = this.innerValue;
  16410. this.$nextTick(() => {
  16411. this.$emit("update:modelValue", value2);
  16412. this.changeFromInner = true;
  16413. this.$emit("change", value2);
  16414. uni.$u.formValidate(this, "change");
  16415. });
  16416. },
  16417. onConfirm(e) {
  16418. this.$emit("confirm", e);
  16419. },
  16420. onKeyboardheightchange(e) {
  16421. this.$emit("keyboardheightchange", e);
  16422. }
  16423. }
  16424. };
  16425. function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
  16426. return vue.openBlock(), vue.createElementBlock(
  16427. "view",
  16428. {
  16429. class: vue.normalizeClass(["u-textarea", $options.textareaClass]),
  16430. style: vue.normalizeStyle([$options.textareaStyle])
  16431. },
  16432. [
  16433. vue.createElementVNode("textarea", {
  16434. class: "u-textarea__field",
  16435. value: $data.innerValue,
  16436. style: vue.normalizeStyle({ height: _ctx.$u.addUnit(_ctx.height) }),
  16437. placeholder: _ctx.placeholder,
  16438. "placeholder-style": _ctx.$u.addStyle(_ctx.placeholderStyle, "string"),
  16439. "placeholder-class": _ctx.placeholderClass,
  16440. disabled: _ctx.disabled,
  16441. focus: _ctx.focus,
  16442. autoHeight: _ctx.autoHeight,
  16443. fixed: _ctx.fixed,
  16444. cursorSpacing: _ctx.cursorSpacing,
  16445. cursor: _ctx.cursor,
  16446. showConfirmBar: _ctx.showConfirmBar,
  16447. selectionStart: _ctx.selectionStart,
  16448. selectionEnd: _ctx.selectionEnd,
  16449. adjustPosition: _ctx.adjustPosition,
  16450. disableDefaultPadding: _ctx.disableDefaultPadding,
  16451. holdKeyboard: _ctx.holdKeyboard,
  16452. maxlength: _ctx.maxlength,
  16453. "confirm-type": _ctx.confirmType,
  16454. ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
  16455. onFocus: _cache[0] || (_cache[0] = (...args) => $options.onFocus && $options.onFocus(...args)),
  16456. onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)),
  16457. onLinechange: _cache[2] || (_cache[2] = (...args) => $options.onLinechange && $options.onLinechange(...args)),
  16458. onInput: _cache[3] || (_cache[3] = (...args) => $options.onInput && $options.onInput(...args)),
  16459. onConfirm: _cache[4] || (_cache[4] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
  16460. onKeyboardheightchange: _cache[5] || (_cache[5] = (...args) => $options.onKeyboardheightchange && $options.onKeyboardheightchange(...args))
  16461. }, null, 44, ["value", "placeholder", "placeholder-style", "placeholder-class", "disabled", "focus", "autoHeight", "fixed", "cursorSpacing", "cursor", "showConfirmBar", "selectionStart", "selectionEnd", "adjustPosition", "disableDefaultPadding", "holdKeyboard", "maxlength", "confirm-type", "ignoreCompositionEvent"]),
  16462. _ctx.count ? (vue.openBlock(), vue.createElementBlock(
  16463. "text",
  16464. {
  16465. key: 0,
  16466. class: "u-textarea__count",
  16467. style: vue.normalizeStyle({
  16468. "background-color": _ctx.disabled ? "transparent" : "#fff"
  16469. })
  16470. },
  16471. vue.toDisplayString($data.innerValue.length) + "/" + vue.toDisplayString(_ctx.maxlength),
  16472. 5
  16473. /* TEXT, STYLE */
  16474. )) : vue.createCommentVNode("v-if", true)
  16475. ],
  16476. 6
  16477. /* CLASS, STYLE */
  16478. );
  16479. }
  16480. const __easycom_3$2 = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$16], ["__scopeId", "data-v-b6c174a6"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-textarea/u-textarea.vue"]]);
  16481. const _sfc_main$16 = {
  16482. __name: "OrderInfo",
  16483. props: {
  16484. orderId: String,
  16485. estimatedAmount: Number,
  16486. userNote: String,
  16487. detail: Object
  16488. // Add more props as needed
  16489. },
  16490. setup(__props, { expose: __expose }) {
  16491. __expose();
  16492. const props2 = __props;
  16493. let finalExpressList = { "1": "顺丰快递", "2": "京东快递", "3": "德邦快递" };
  16494. let finalExpressText = vue.computed(() => {
  16495. return props2.detail.finalExpress ? finalExpressList[props2.detail.finalExpress] : "";
  16496. });
  16497. const statusEnum = {
  16498. 0: "创建",
  16499. 1: "用户删除",
  16500. 2: "下单(待初审)",
  16501. 3: "初审(待取书)",
  16502. 4: "初审未通过",
  16503. 5: "快递取书(待签收)",
  16504. 6: "快递签收(待收货)",
  16505. 7: "物流签收(路由异常)",
  16506. 8: "仓库收货(待审核)",
  16507. 9: "审核中(审核未提交)",
  16508. 10: "已审核(待付款)",
  16509. 11: "已完成"
  16510. };
  16511. let statusText = vue.computed(() => {
  16512. return statusEnum[props2.detail.status] || "未知状态";
  16513. });
  16514. const maskedSendMobile = vue.computed(() => {
  16515. if (props2.detail.sendMobile && props2.detail.sendMobile.length === 11) {
  16516. return props2.detail.sendMobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
  16517. }
  16518. return props2.detail.sendMobile;
  16519. });
  16520. function copyToClipboard(text) {
  16521. uni.setClipboardData({
  16522. data: text,
  16523. success: function() {
  16524. uni.showToast({
  16525. title: "复制成功",
  16526. icon: "success"
  16527. });
  16528. },
  16529. fail: function(err) {
  16530. formatAppLog("error", "at pages/index/detail/components/OrderInfo.vue:120", "Could not copy text: ", err);
  16531. }
  16532. });
  16533. }
  16534. const showModal = vue.ref(false);
  16535. const internalRemark = vue.ref("");
  16536. function fillRemark(text) {
  16537. internalRemark.value = text;
  16538. }
  16539. const remarkInfo = vue.ref({});
  16540. function handleRemark() {
  16541. var _a;
  16542. showModal.value = true;
  16543. remarkInfo.value = ((_a = props2.detail.manageRemark) == null ? void 0 : _a[0]) || {};
  16544. internalRemark.value = remarkInfo.value.remark || "";
  16545. }
  16546. function confirmRemark() {
  16547. uni.$u.http.post("/app/orderinfo/setManageRemark", {
  16548. orderId: props2.detail.orderId,
  16549. remark: internalRemark.value,
  16550. id: remarkInfo.value.id
  16551. }).then((res2) => {
  16552. if (res2.code == 200) {
  16553. uni.$u.toast("保存成功");
  16554. uni.$u.ttsModule.speak("保存成功");
  16555. showModal.value = false;
  16556. } else {
  16557. uni.$u.toast(res2.msg);
  16558. }
  16559. });
  16560. }
  16561. const __returned__ = { props: props2, get finalExpressList() {
  16562. return finalExpressList;
  16563. }, set finalExpressList(v) {
  16564. finalExpressList = v;
  16565. }, get finalExpressText() {
  16566. return finalExpressText;
  16567. }, set finalExpressText(v) {
  16568. finalExpressText = v;
  16569. }, statusEnum, get statusText() {
  16570. return statusText;
  16571. }, set statusText(v) {
  16572. statusText = v;
  16573. }, maskedSendMobile, copyToClipboard, showModal, internalRemark, fillRemark, remarkInfo, handleRemark, confirmRemark, computed: vue.computed, ref: vue.ref, watch: vue.watch };
  16574. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16575. return __returned__;
  16576. }
  16577. };
  16578. function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
  16579. var _a;
  16580. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  16581. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$2);
  16582. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$4);
  16583. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$2);
  16584. return vue.openBlock(), vue.createElementBlock(
  16585. vue.Fragment,
  16586. null,
  16587. [
  16588. vue.createElementVNode("view", { class: "order-info bg-white" }, [
  16589. vue.createElementVNode("view", { class: "info-item flex" }, [
  16590. vue.createElementVNode("text", { class: "label" }, "订单编号"),
  16591. vue.createElementVNode(
  16592. "text",
  16593. {
  16594. style: { "color": "#22ac38" },
  16595. class: "flex-1 text-center content",
  16596. onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyToClipboard($props.detail.orderId))
  16597. },
  16598. vue.toDisplayString($props.detail.orderId),
  16599. 1
  16600. /* TEXT */
  16601. )
  16602. ]),
  16603. vue.createElementVNode("view", { class: "info-item" }, [
  16604. vue.createElementVNode("text", { class: "label" }, "预估金额"),
  16605. vue.createElementVNode(
  16606. "text",
  16607. { class: "content" },
  16608. vue.toDisplayString($props.detail.expectMoney),
  16609. 1
  16610. /* TEXT */
  16611. ),
  16612. vue.createElementVNode("text", { class: "label border-left" }, "审核金额"),
  16613. vue.createElementVNode(
  16614. "text",
  16615. { class: "content" },
  16616. vue.toDisplayString($props.detail.expectMoney),
  16617. 1
  16618. /* TEXT */
  16619. )
  16620. ]),
  16621. vue.createElementVNode("view", { class: "info-item" }, [
  16622. vue.createElementVNode("text", { class: "label" }, "用户备注"),
  16623. vue.createElementVNode(
  16624. "text",
  16625. { class: "content" },
  16626. vue.toDisplayString($props.detail.userRemark),
  16627. 1
  16628. /* TEXT */
  16629. )
  16630. ]),
  16631. vue.createElementVNode("view", {
  16632. class: "info-item",
  16633. onClick: $setup.handleRemark
  16634. }, [
  16635. vue.createElementVNode("text", { class: "label" }, "内部备注"),
  16636. vue.createElementVNode(
  16637. "text",
  16638. { class: "content" },
  16639. vue.toDisplayString($props.detail.manageRemark ? $props.detail.manageRemark.length > 0 ? (_a = $props.detail.manageRemark[0]) == null ? void 0 : _a.remark : " " : " "),
  16640. 1
  16641. /* TEXT */
  16642. )
  16643. ]),
  16644. vue.createElementVNode("view", { class: "info-item" }, [
  16645. vue.createElementVNode("text", { class: "label" }, "订单状态"),
  16646. vue.createElementVNode(
  16647. "text",
  16648. {
  16649. class: "content",
  16650. style: { "color": "#c5493e" }
  16651. },
  16652. "[" + vue.toDisplayString($setup.statusText) + "]",
  16653. 1
  16654. /* TEXT */
  16655. )
  16656. ]),
  16657. vue.createElementVNode("view", { class: "info-item" }, [
  16658. vue.createElementVNode("text", { class: "label" }, "快递"),
  16659. vue.createElementVNode(
  16660. "text",
  16661. { class: "content" },
  16662. vue.toDisplayString($setup.finalExpressText) + "(单号:" + vue.toDisplayString($props.detail.waybillCode) + ")",
  16663. 1
  16664. /* TEXT */
  16665. )
  16666. ]),
  16667. vue.createElementVNode("view", { class: "info-item" }, [
  16668. vue.createElementVNode("text", { class: "label" }, [
  16669. vue.createTextVNode("发件人"),
  16670. vue.createElementVNode("text", { style: { "color": "#e99d42" } }, "(所有单)")
  16671. ]),
  16672. vue.createElementVNode("view", { class: "content flex flex-a-c flex-j-c" }, [
  16673. vue.createElementVNode("text", {
  16674. class: "content-text",
  16675. onClick: _cache[1] || (_cache[1] = ($event) => $setup.copyToClipboard($props.detail.sendMobile))
  16676. }, "复制"),
  16677. vue.createElementVNode(
  16678. "text",
  16679. { class: "content-text ml-10 mr-10" },
  16680. vue.toDisplayString($setup.maskedSendMobile),
  16681. 1
  16682. /* TEXT */
  16683. ),
  16684. $props.detail.orderFrom == 1 ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  16685. key: 0,
  16686. name: "weixin-circle-fill",
  16687. size: "18",
  16688. color: "#22ac38"
  16689. })) : vue.createCommentVNode("v-if", true),
  16690. $props.detail.orderFrom == 2 ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  16691. key: 1,
  16692. name: "zhifubao-circle-fill",
  16693. size: "18",
  16694. color: "#999"
  16695. })) : vue.createCommentVNode("v-if", true)
  16696. ])
  16697. ]),
  16698. vue.createElementVNode("view", { class: "info-item" }, [
  16699. vue.createElementVNode("text", { class: "label" }, "发货地址"),
  16700. vue.createElementVNode(
  16701. "text",
  16702. { class: "content" },
  16703. vue.toDisplayString($props.detail.sendAddress),
  16704. 1
  16705. /* TEXT */
  16706. )
  16707. ]),
  16708. vue.createElementVNode("view", { class: "info-item" }, [
  16709. vue.createElementVNode("text", { class: "label" }, "收货仓库"),
  16710. vue.createElementVNode(
  16711. "text",
  16712. { class: "content" },
  16713. vue.toDisplayString($props.detail.recipientAddress) + "-" + vue.toDisplayString($props.detail.recipientGodown) + "-" + vue.toDisplayString($props.detail.recipientName),
  16714. 1
  16715. /* TEXT */
  16716. )
  16717. ])
  16718. ]),
  16719. vue.createVNode(_component_u_modal, {
  16720. show: $setup.showModal,
  16721. "onUpdate:show": _cache[8] || (_cache[8] = ($event) => $setup.showModal = $event),
  16722. title: "编辑内部备注",
  16723. showCancelButton: true,
  16724. onConfirm: $setup.confirmRemark
  16725. }, {
  16726. default: vue.withCtx(() => [
  16727. vue.createElementVNode("view", { class: "modal-content w100" }, [
  16728. vue.createVNode(_component_u_textarea, {
  16729. modelValue: $setup.internalRemark,
  16730. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.internalRemark = $event),
  16731. placeholder: "编辑内部备注",
  16732. autoHeight: "",
  16733. style: { "min-height": "100px" }
  16734. }, null, 8, ["modelValue"]),
  16735. vue.createElementVNode("view", { class: "mt-20 common-title" }, "快速填入"),
  16736. vue.createElementVNode("view", { class: "quick-fill mt-16" }, [
  16737. vue.createVNode(_component_u_tag, {
  16738. class: "mr-10 mb-10",
  16739. onClick: _cache[3] || (_cache[3] = ($event) => $setup.fillRemark("少书给客服")),
  16740. text: "少书给客服"
  16741. }),
  16742. vue.createVNode(_component_u_tag, {
  16743. class: "mr-10 mb-10",
  16744. onClick: _cache[4] || (_cache[4] = ($event) => $setup.fillRemark("多书给客服")),
  16745. text: "多书给客服"
  16746. }),
  16747. vue.createVNode(_component_u_tag, {
  16748. class: "mr-10 mb-10",
  16749. onClick: _cache[5] || (_cache[5] = ($event) => $setup.fillRemark("子母件")),
  16750. text: "子母件"
  16751. }),
  16752. vue.createVNode(_component_u_tag, {
  16753. class: "mr-10 mb-10",
  16754. onClick: _cache[6] || (_cache[6] = ($event) => $setup.fillRemark("书单不符给客服")),
  16755. text: "书单不符给客服"
  16756. }),
  16757. vue.createVNode(_component_u_tag, {
  16758. class: "mr-10 mb-10",
  16759. onClick: _cache[7] || (_cache[7] = ($event) => $setup.fillRemark("需理赔给客服")),
  16760. text: "需理赔给客服"
  16761. })
  16762. ])
  16763. ])
  16764. ]),
  16765. _: 1
  16766. /* STABLE */
  16767. }, 8, ["show"])
  16768. ],
  16769. 64
  16770. /* STABLE_FRAGMENT */
  16771. );
  16772. }
  16773. const OrderInfo = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$15], ["__scopeId", "data-v-034ad4bc"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/OrderInfo.vue"]]);
  16774. const _sfc_main$15 = {
  16775. __name: "UserInfoCard",
  16776. props: {
  16777. detail: {
  16778. type: Object,
  16779. default: () => ({})
  16780. }
  16781. },
  16782. setup(__props, { expose: __expose }) {
  16783. __expose();
  16784. const props2 = __props;
  16785. const formattedName = vue.computed(() => {
  16786. var _a, _b;
  16787. return ((_b = (_a = props2.detail) == null ? void 0 : _a.userNick) == null ? void 0 : _b.charAt(0)) + "**";
  16788. });
  16789. const statusClass = vue.computed(() => {
  16790. return props2.detail.userStatus == 1 ? "color-green" : "color-red";
  16791. });
  16792. const blacklistAction = vue.computed(() => {
  16793. return props2.detail.userStatus == 1 ? "加入黑名单" : "移除黑名单";
  16794. });
  16795. const showModal = vue.ref(false);
  16796. const showBlacklistModal = vue.ref(false);
  16797. const reason = vue.ref("");
  16798. const toggleBlacklist = () => {
  16799. showBlacklistModal.value = true;
  16800. };
  16801. const confirmBlacklist = () => {
  16802. let apiStr = props2.detail.userStatus == 1 ? "/app/appUser/setUserBlack" : "app/appUser/removeUserBlack";
  16803. uni.$u.http.post(apiStr, {
  16804. userId: props2.detail.userId,
  16805. reason: reason.value
  16806. }).then((res2) => {
  16807. if (res2.code == 200) {
  16808. uni.$u.toast("操作成功");
  16809. showBlacklistModal.value = false;
  16810. props2.detail.userStatus = props2.detail.userStatus == 1 ? 2 : 1;
  16811. } else {
  16812. uni.$u.toast(res2.msg);
  16813. }
  16814. });
  16815. };
  16816. const __returned__ = { props: props2, formattedName, statusClass, blacklistAction, showModal, showBlacklistModal, reason, toggleBlacklist, confirmBlacklist, ref: vue.ref, computed: vue.computed };
  16817. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16818. return __returned__;
  16819. }
  16820. };
  16821. function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
  16822. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$2);
  16823. return vue.openBlock(), vue.createElementBlock("view", { class: "user-info-card bg-white mt-16" }, [
  16824. vue.createElementVNode("view", { class: "header" }, [
  16825. vue.createElementVNode(
  16826. "text",
  16827. { style: { "color": "#666" } },
  16828. vue.toDisplayString($props.detail.orderTime),
  16829. 1
  16830. /* TEXT */
  16831. ),
  16832. vue.createElementVNode("text", {
  16833. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showModal = true),
  16834. class: "color-green"
  16835. }, "[查看订单日志]")
  16836. ]),
  16837. vue.createElementVNode("view", { class: "content flex flex-j-b" }, [
  16838. vue.createElementVNode("image", {
  16839. src: $props.detail.imgPath,
  16840. class: "user-image"
  16841. }, null, 8, ["src"]),
  16842. vue.createElementVNode("view", { class: "flex flex-a-e flex-1 ml-12" }, [
  16843. vue.createElementVNode("view", { class: "flex flex-d flex-1" }, [
  16844. vue.createElementVNode("text", { class: "color-green" }, [
  16845. vue.createTextVNode(
  16846. vue.toDisplayString($setup.formattedName),
  16847. 1
  16848. /* TEXT */
  16849. ),
  16850. vue.createElementVNode("text", { style: { "color": "#e99d42" } }, "(所有单)")
  16851. ]),
  16852. vue.createElementVNode(
  16853. "text",
  16854. {
  16855. class: "common-text",
  16856. style: { "margin-top": "10rpx" }
  16857. },
  16858. "共卖出" + vue.toDisplayString($props.detail.totalNum) + "本书",
  16859. 1
  16860. /* TEXT */
  16861. ),
  16862. vue.createElementVNode(
  16863. "text",
  16864. { class: "common-text" },
  16865. "来自" + vue.toDisplayString($props.detail.sendSsq),
  16866. 1
  16867. /* TEXT */
  16868. ),
  16869. vue.createElementVNode("text", {
  16870. class: "common-text",
  16871. style: { "margin-top": "10rpx" }
  16872. }, [
  16873. vue.createTextVNode("用户状态: "),
  16874. vue.createElementVNode(
  16875. "text",
  16876. {
  16877. class: vue.normalizeClass($setup.statusClass)
  16878. },
  16879. vue.toDisplayString($props.detail.userStatus == 1 ? "正常" : $props.detail.userStatus == 2 ? "黑名单" : "-"),
  16880. 3
  16881. /* TEXT, CLASS */
  16882. )
  16883. ])
  16884. ]),
  16885. vue.createElementVNode(
  16886. "text",
  16887. {
  16888. style: { "min-width": "160rpx" },
  16889. onClick: $setup.toggleBlacklist,
  16890. class: "color-red"
  16891. },
  16892. "[" + vue.toDisplayString($setup.blacklistAction) + "]",
  16893. 1
  16894. /* TEXT */
  16895. )
  16896. ])
  16897. ]),
  16898. vue.createVNode(_component_u_modal, {
  16899. show: $setup.showModal,
  16900. "onUpdate:show": _cache[1] || (_cache[1] = ($event) => $setup.showModal = $event),
  16901. title: "订单日志",
  16902. showCancelButton: false,
  16903. confirmText: "关闭",
  16904. onConfirm: _cache[2] || (_cache[2] = ($event) => $setup.showModal = false),
  16905. class: "log-modal"
  16906. }, {
  16907. default: vue.withCtx(() => [
  16908. vue.createElementVNode("view", { class: "log-container" }, [
  16909. (vue.openBlock(true), vue.createElementBlock(
  16910. vue.Fragment,
  16911. null,
  16912. vue.renderList($props.detail.logVoList, (log, index2) => {
  16913. return vue.openBlock(), vue.createElementBlock("view", {
  16914. class: "log-item",
  16915. key: index2
  16916. }, [
  16917. vue.createElementVNode(
  16918. "view",
  16919. { class: "log-item-content" },
  16920. vue.toDisplayString(log.content),
  16921. 1
  16922. /* TEXT */
  16923. ),
  16924. vue.createElementVNode(
  16925. "view",
  16926. { class: "log-item-name common-text" },
  16927. "操作人:" + vue.toDisplayString(log.createName),
  16928. 1
  16929. /* TEXT */
  16930. ),
  16931. vue.createElementVNode(
  16932. "view",
  16933. { class: "log-item-time common-text" },
  16934. "操作时间:" + vue.toDisplayString(log.createTime),
  16935. 1
  16936. /* TEXT */
  16937. )
  16938. ]);
  16939. }),
  16940. 128
  16941. /* KEYED_FRAGMENT */
  16942. ))
  16943. ])
  16944. ]),
  16945. _: 1
  16946. /* STABLE */
  16947. }, 8, ["show"]),
  16948. vue.createVNode(_component_u_modal, {
  16949. show: $setup.showBlacklistModal,
  16950. "onUpdate:show": _cache[4] || (_cache[4] = ($event) => $setup.showBlacklistModal = $event),
  16951. title: "拉黑用户",
  16952. showCancelButton: true,
  16953. confirmText: "提交",
  16954. cancelText: "取消",
  16955. onConfirm: $setup.confirmBlacklist,
  16956. onCancel: _cache[5] || (_cache[5] = ($event) => $setup.showBlacklistModal = false)
  16957. }, {
  16958. default: vue.withCtx(() => [
  16959. vue.withDirectives(vue.createElementVNode(
  16960. "textarea",
  16961. {
  16962. class: "reason-textarea",
  16963. placeholder: "请输入拉黑原因...",
  16964. autoHeight: "",
  16965. "bg-color": "#f8f8f8",
  16966. "border-radius": "10rpx",
  16967. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.reason = $event),
  16968. height: "100px"
  16969. },
  16970. null,
  16971. 512
  16972. /* NEED_PATCH */
  16973. ), [
  16974. [vue.vModelText, $setup.reason]
  16975. ])
  16976. ]),
  16977. _: 1
  16978. /* STABLE */
  16979. }, 8, ["show"])
  16980. ]);
  16981. }
  16982. const UserInfoCard = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$14], ["__scopeId", "data-v-42a1a738"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/UserInfoCard.vue"]]);
  16983. const _sfc_main$14 = {
  16984. __name: "LogisticsTimeline",
  16985. props: {
  16986. list: {
  16987. type: Array,
  16988. default: []
  16989. }
  16990. },
  16991. setup(__props, { expose: __expose }) {
  16992. __expose();
  16993. const props2 = __props;
  16994. const __returned__ = { props: props2 };
  16995. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16996. return __returned__;
  16997. }
  16998. };
  16999. function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
  17000. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  17001. return vue.openBlock(), vue.createElementBlock("view", {
  17002. "scroll-y": "",
  17003. class: "timeline-container"
  17004. }, [
  17005. (vue.openBlock(true), vue.createElementBlock(
  17006. vue.Fragment,
  17007. null,
  17008. vue.renderList($props.list, (item, index2) => {
  17009. return vue.openBlock(), vue.createElementBlock("view", {
  17010. key: index2,
  17011. class: "timeline-item"
  17012. }, [
  17013. vue.createElementVNode("view", { class: "timeline-icon" }, [
  17014. vue.createVNode(_component_u_icon, {
  17015. name: "map-fill",
  17016. color: "#19be6b",
  17017. size: "16"
  17018. })
  17019. ]),
  17020. vue.createElementVNode("view", { class: "timeline-content" }, [
  17021. vue.createElementVNode(
  17022. "text",
  17023. { class: "title" },
  17024. vue.toDisplayString(item.title),
  17025. 1
  17026. /* TEXT */
  17027. ),
  17028. vue.createElementVNode(
  17029. "text",
  17030. { class: "desc" },
  17031. vue.toDisplayString(item.description),
  17032. 1
  17033. /* TEXT */
  17034. ),
  17035. vue.createElementVNode(
  17036. "text",
  17037. { class: "time" },
  17038. vue.toDisplayString(item.time),
  17039. 1
  17040. /* TEXT */
  17041. )
  17042. ]),
  17043. index2 < $props.list.length - 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  17044. key: 0,
  17045. class: "timeline-line"
  17046. })) : vue.createCommentVNode("v-if", true)
  17047. ]);
  17048. }),
  17049. 128
  17050. /* KEYED_FRAGMENT */
  17051. ))
  17052. ]);
  17053. }
  17054. const LogisticsTimeline = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$13], ["__scopeId", "data-v-140e9488"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/LogisticsTimeline.vue"]]);
  17055. const _sfc_main$13 = {
  17056. __name: "BookItem",
  17057. props: {
  17058. item: Object,
  17059. showClose: {
  17060. type: Boolean,
  17061. default: false
  17062. }
  17063. },
  17064. setup(__props, { expose: __expose }) {
  17065. __expose();
  17066. const props2 = __props;
  17067. const goodNum = vue.computed(() => {
  17068. var _a;
  17069. return ((_a = props2.item.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 1).length) || 0;
  17070. });
  17071. const badNum = vue.computed(() => {
  17072. var _a;
  17073. return ((_a = props2.item.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 3).length) || 0;
  17074. });
  17075. const reasons = vue.computed(() => {
  17076. let list = props2.item.auditCommentList;
  17077. if (!list)
  17078. return "";
  17079. if (list.length > 0) {
  17080. let poorList = list.filter((v) => v.sts == 3);
  17081. if (poorList.length == 0)
  17082. return "";
  17083. return poorList.map((v) => v.com).join("/");
  17084. }
  17085. });
  17086. const __returned__ = { props: props2, goodNum, badNum, reasons, computed: vue.computed };
  17087. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  17088. return __returned__;
  17089. }
  17090. };
  17091. function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
  17092. return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [
  17093. vue.createElementVNode("view", { class: "flex w100" }, [
  17094. vue.createElementVNode("view", { class: "flex-d" }, [
  17095. vue.createElementVNode("image", {
  17096. style: { "width": "70px", "height": "90px" },
  17097. src: $props.item.cover,
  17098. mode: "aspectFill"
  17099. }, null, 8, ["src"]),
  17100. !$props.showClose ? (vue.openBlock(), vue.createElementBlock(
  17101. "view",
  17102. {
  17103. key: 0,
  17104. class: "quantity mt-24"
  17105. },
  17106. "数量: " + vue.toDisplayString($props.item.num),
  17107. 1
  17108. /* TEXT */
  17109. )) : vue.createCommentVNode("v-if", true)
  17110. ]),
  17111. vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
  17112. vue.createElementVNode(
  17113. "view",
  17114. { class: "common-title mb-20" },
  17115. vue.toDisplayString($props.item.bookName),
  17116. 1
  17117. /* TEXT */
  17118. ),
  17119. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  17120. vue.createElementVNode(
  17121. "view",
  17122. { class: "isbn" },
  17123. "ISBN: " + vue.toDisplayString($props.item.isbn),
  17124. 1
  17125. /* TEXT */
  17126. ),
  17127. vue.createElementVNode(
  17128. "view",
  17129. { class: "set" },
  17130. "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "不是"),
  17131. 1
  17132. /* TEXT */
  17133. )
  17134. ]),
  17135. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  17136. vue.createElementVNode(
  17137. "view",
  17138. { class: "price" },
  17139. "定价: " + vue.toDisplayString($props.item.bookPrice),
  17140. 1
  17141. /* TEXT */
  17142. ),
  17143. vue.createElementVNode(
  17144. "view",
  17145. { class: "estimate" },
  17146. "预估单价: " + vue.toDisplayString(($props.item.recycleDiscount * $props.item.bookPrice * 0.1).toFixed(2)),
  17147. 1
  17148. /* TEXT */
  17149. )
  17150. ]),
  17151. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  17152. vue.createElementVNode(
  17153. "view",
  17154. { class: "discount" },
  17155. "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
  17156. 1
  17157. /* TEXT */
  17158. ),
  17159. vue.createElementVNode("view", { class: "review" }, [
  17160. vue.createTextVNode("审核金额: "),
  17161. vue.createElementVNode(
  17162. "text",
  17163. { class: "color-red" },
  17164. vue.toDisplayString($props.item.finalMoney || 0),
  17165. 1
  17166. /* TEXT */
  17167. )
  17168. ])
  17169. ]),
  17170. vue.createElementVNode("view", { class: "quality mb-10" }, [
  17171. vue.createTextVNode(
  17172. " 品相: 良好(" + vue.toDisplayString($setup.goodNum) + ") 、 一般(" + vue.toDisplayString($props.item.averageNum || 0) + ") 、 ",
  17173. 1
  17174. /* TEXT */
  17175. ),
  17176. vue.createElementVNode(
  17177. "text",
  17178. {
  17179. class: vue.normalizeClass($props.item.badNum > 0 ? "color-red" : "")
  17180. },
  17181. "极差(" + vue.toDisplayString($setup.badNum) + ")",
  17182. 3
  17183. /* TEXT, CLASS */
  17184. )
  17185. ]),
  17186. $setup.reasons ? (vue.openBlock(), vue.createElementBlock(
  17187. "view",
  17188. {
  17189. key: 0,
  17190. class: "color-red"
  17191. },
  17192. "原因:" + vue.toDisplayString($setup.reasons),
  17193. 1
  17194. /* TEXT */
  17195. )) : vue.createCommentVNode("v-if", true)
  17196. ])
  17197. ])
  17198. ]);
  17199. }
  17200. const BookItem$2 = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$12], ["__scopeId", "data-v-a629889e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/BookItem.vue"]]);
  17201. const pinyin = {
  17202. "a": "啊阿锕",
  17203. "ai": "埃挨哎唉哀皑癌蔼矮艾碍爱隘诶捱嗳嗌嫒瑷暧砹锿霭",
  17204. "an": "鞍氨安俺按暗岸胺案谙埯揞犴庵桉铵鹌顸黯",
  17205. "ang": "肮昂盎",
  17206. "ao": "凹敖熬翱袄傲奥懊澳坳拗嗷噢岙廒遨媪骜聱螯鏊鳌鏖",
  17207. "ba": "芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸茇菝萆捭岜灞杷钯粑鲅魃",
  17208. "bai": "白柏百摆佰败拜稗薜掰鞴",
  17209. "ban": "斑班搬扳般颁板版扮拌伴瓣半办绊阪坂豳钣瘢癍舨",
  17210. "bang": "邦帮梆榜膀绑棒磅蚌镑傍谤蒡螃",
  17211. "bao": "苞胞包褒雹保堡饱宝抱报暴豹鲍爆勹葆宀孢煲鸨褓趵龅",
  17212. "bo": "剥薄玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳亳蕃啵饽檗擘礴钹鹁簸跛",
  17213. "bei": "杯碑悲卑北辈背贝钡倍狈备惫焙被孛陂邶埤蓓呗怫悖碚鹎褙鐾",
  17214. "ben": "奔苯本笨畚坌锛",
  17215. "beng": "崩绷甭泵蹦迸唪嘣甏",
  17216. "bi": "逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛匕仳俾芘荜荸吡哔狴庳愎滗濞弼妣婢嬖璧贲畀铋秕裨筚箅篦舭襞跸髀",
  17217. "bian": "鞭边编贬扁便变卞辨辩辫遍匾弁苄忭汴缏煸砭碥稹窆蝙笾鳊",
  17218. "biao": "标彪膘表婊骠飑飙飚灬镖镳瘭裱鳔",
  17219. "bie": "鳖憋别瘪蹩鳘",
  17220. "bin": "彬斌濒滨宾摈傧浜缤玢殡膑镔髌鬓",
  17221. "bing": "兵冰柄丙秉饼炳病并禀邴摒绠枋槟燹",
  17222. "bu": "捕卜哺补埠不布步簿部怖拊卟逋瓿晡钚醭",
  17223. "ca": "擦嚓礤",
  17224. "cai": "猜裁材才财睬踩采彩菜蔡",
  17225. "can": "餐参蚕残惭惨灿骖璨粲黪",
  17226. "cang": "苍舱仓沧藏伧",
  17227. "cao": "操糙槽曹草艹嘈漕螬艚",
  17228. "ce": "厕策侧册测刂帻恻",
  17229. "ceng": "层蹭噌",
  17230. "cha": "插叉茬茶查碴搽察岔差诧猹馇汊姹杈楂槎檫钗锸镲衩",
  17231. "chai": "拆柴豺侪茈瘥虿龇",
  17232. "chan": "搀掺蝉馋谗缠铲产阐颤冁谄谶蒇廛忏潺澶孱羼婵嬗骣觇禅镡裣蟾躔",
  17233. "chang": "昌猖场尝常长偿肠厂敞畅唱倡伥鬯苌菖徜怅惝阊娼嫦昶氅鲳",
  17234. "chao": "超抄钞朝嘲潮巢吵炒怊绉晁耖",
  17235. "che": "车扯撤掣彻澈坼屮砗",
  17236. "chen": "郴臣辰尘晨忱沉陈趁衬称谌抻嗔宸琛榇肜胂碜龀",
  17237. "cheng": "撑城橙成呈乘程惩澄诚承逞骋秤埕嵊徵浈枨柽樘晟塍瞠铖裎蛏酲",
  17238. "chi": "吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽傺墀芪茌搋叱哧啻嗤彳饬沲媸敕胝眙眵鸱瘛褫蚩螭笞篪豉踅踟魑",
  17239. "chong": "充冲虫崇宠茺忡憧铳艟",
  17240. "chou": "抽酬畴踌稠愁筹仇绸瞅丑俦圳帱惆溴妯瘳雠鲋",
  17241. "chu": "臭初出橱厨躇锄雏滁除楚础储矗搐触处亍刍憷绌杵楮樗蜍蹰黜",
  17242. "chuan": "揣川穿椽传船喘串掾舛惴遄巛氚钏镩舡",
  17243. "chuang": "疮窗幢床闯创怆",
  17244. "chui": "吹炊捶锤垂陲棰槌",
  17245. "chun": "春椿醇唇淳纯蠢促莼沌肫朐鹑蝽",
  17246. "chuo": "戳绰蔟辶辍镞踔龊",
  17247. "ci": "疵茨磁雌辞慈瓷词此刺赐次荠呲嵯鹚螅糍趑",
  17248. "cong": "聪葱囱匆从丛偬苁淙骢琮璁枞",
  17249. "cu": "凑粗醋簇猝殂蹙",
  17250. "cuan": "蹿篡窜汆撺昕爨",
  17251. "cui": "摧崔催脆瘁粹淬翠萃悴璀榱隹",
  17252. "cun": "村存寸磋忖皴",
  17253. "cuo": "撮搓措挫错厝脞锉矬痤鹾蹉躜",
  17254. "da": "搭达答瘩打大耷哒嗒怛妲疸褡笪靼鞑",
  17255. "dai": "呆歹傣戴带殆代贷袋待逮怠埭甙呔岱迨逯骀绐玳黛",
  17256. "dan": "耽担丹单郸掸胆旦氮但惮淡诞弹蛋亻儋卩萏啖澹檐殚赕眈瘅聃箪",
  17257. "dang": "当挡党荡档谠凼菪宕砀铛裆",
  17258. "dao": "刀捣蹈倒岛祷导到稻悼道盗叨啁忉洮氘焘忑纛",
  17259. "de": "德得的锝",
  17260. "deng": "蹬灯登等瞪凳邓噔嶝戥磴镫簦",
  17261. "di": "堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔氐籴诋谛邸坻莜荻嘀娣柢棣觌砥碲睇镝羝骶",
  17262. "dian": "颠掂滇碘点典靛垫电佃甸店惦奠淀殿丶阽坫埝巅玷癜癫簟踮",
  17263. "diao": "碉叼雕凋刁掉吊钓调轺铞蜩粜貂",
  17264. "die": "跌爹碟蝶迭谍叠佚垤堞揲喋渫轶牒瓞褶耋蹀鲽鳎",
  17265. "ding": "丁盯叮钉顶鼎锭定订丢仃啶玎腚碇町铤疔耵酊",
  17266. "dong": "东冬董懂动栋侗恫冻洞垌咚岽峒夂氡胨胴硐鸫",
  17267. "dou": "兜抖斗陡豆逗痘蔸钭窦窬蚪篼酡",
  17268. "du": "都督毒犊独读堵睹赌杜镀肚度渡妒芏嘟渎椟橐牍蠹笃髑黩",
  17269. "duan": "端短锻段断缎彖椴煅簖",
  17270. "dui": "堆兑队对怼憝碓",
  17271. "dun": "墩吨蹲敦顿囤钝盾遁炖砘礅盹镦趸",
  17272. "duo": "掇哆多夺垛躲朵跺舵剁惰堕咄哚缍柁铎裰踱",
  17273. "e": "蛾峨鹅俄额讹娥恶厄扼遏鄂饿噩谔垩垭苊莪萼呃愕屙婀轭曷腭硪锇锷鹗颚鳄",
  17274. "en": "恩蒽摁唔嗯",
  17275. "er": "而儿耳尔饵洱二贰迩珥铒鸸鲕",
  17276. "fa": "发罚筏伐乏阀法珐垡砝",
  17277. "fan": "藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛蘩幡犭梵攵燔畈蹯",
  17278. "fang": "坊芳方肪房防妨仿访纺放匚邡彷钫舫鲂",
  17279. "fei": "菲非啡飞肥匪诽吠肺废沸费芾狒悱淝妃绋绯榧腓斐扉祓砩镄痱蜚篚翡霏鲱",
  17280. "fen": "芬酚吩氛分纷坟焚汾粉奋份忿愤粪偾瀵棼愍鲼鼢",
  17281. "feng": "丰封枫蜂峰锋风疯烽逢冯缝讽奉凤俸酆葑沣砜",
  17282. "fu": "佛否夫敷肤孵扶拂辐幅氟符伏俘服浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐匐凫郛芙苻茯莩菔呋幞滏艴孚驸绂桴赙黻黼罘稃馥虍蚨蜉蝠蝮麸趺跗鳆",
  17283. "ga": "噶嘎蛤尬呷尕尜旮钆",
  17284. "gai": "该改概钙盖溉丐陔垓戤赅胲",
  17285. "gan": "干甘杆柑竿肝赶感秆敢赣坩苷尴擀泔淦澉绀橄旰矸疳酐",
  17286. "gang": "冈刚钢缸肛纲岗港戆罡颃筻",
  17287. "gong": "杠工攻功恭龚供躬公宫弓巩汞拱贡共蕻廾咣珙肱蚣蛩觥",
  17288. "gao": "篙皋高膏羔糕搞镐稿告睾诰郜蒿藁缟槔槁杲锆",
  17289. "ge": "哥歌搁戈鸽胳疙割革葛格阁隔铬个各鬲仡哿塥嗝纥搿膈硌铪镉袼颌虼舸骼髂",
  17290. "gei": "给",
  17291. "gen": "根跟亘茛哏艮",
  17292. "geng": "耕更庚羹埂耿梗哽赓鲠",
  17293. "gou": "钩勾沟苟狗垢构购够佝诟岣遘媾缑觏彀鸲笱篝鞲",
  17294. "gu": "辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇嘏诂菰哌崮汩梏轱牯牿胍臌毂瞽罟钴锢瓠鸪鹄痼蛄酤觚鲴骰鹘",
  17295. "gua": "刮瓜剐寡挂褂卦诖呱栝鸹",
  17296. "guai": "乖拐怪哙",
  17297. "guan": "棺关官冠观管馆罐惯灌贯倌莞掼涫盥鹳鳏",
  17298. "guang": "光广逛犷桄胱疒",
  17299. "gui": "瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽匦刿庋宄妫桧炅晷皈簋鲑鳜",
  17300. "gun": "辊滚棍丨衮绲磙鲧",
  17301. "guo": "锅郭国果裹过馘蠃埚掴呙囗帼崞猓椁虢锞聒蜮蜾蝈",
  17302. "ha": "哈",
  17303. "hai": "骸孩海氦亥害骇咴嗨颏醢",
  17304. "han": "酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉邗菡撖阚瀚晗焓颔蚶鼾",
  17305. "hen": "夯痕很狠恨",
  17306. "hang": "杭航沆绗珩桁",
  17307. "hao": "壕嚎豪毫郝好耗号浩薅嗥嚆濠灏昊皓颢蚝",
  17308. "he": "呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺诃劾壑藿嗑嗬阖盍蚵翮",
  17309. "hei": "嘿黑",
  17310. "heng": "哼亨横衡恒訇蘅",
  17311. "hong": "轰哄烘虹鸿洪宏弘红黉讧荭薨闳泓",
  17312. "hou": "喉侯猴吼厚候后堠後逅瘊篌糇鲎骺",
  17313. "hu": "呼乎忽瑚壶葫胡蝴狐糊湖弧虎唬护互沪户冱唿囫岵猢怙惚浒滹琥槲轷觳烀煳戽扈祜鹕鹱笏醐斛",
  17314. "hua": "花哗华猾滑画划化话劐浍骅桦铧稞",
  17315. "huai": "槐徊怀淮坏还踝",
  17316. "huan": "欢环桓缓换患唤痪豢焕涣宦幻郇奂垸擐圜洹浣漶寰逭缳锾鲩鬟",
  17317. "huang": "荒慌黄磺蝗簧皇凰惶煌晃幌恍谎隍徨湟潢遑璜肓癀蟥篁鳇",
  17318. "hui": "灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘诙茴荟蕙哕喙隳洄彗缋珲晖恚虺蟪麾",
  17319. "hun": "荤昏婚魂浑混诨馄阍溷缗",
  17320. "huo": "豁活伙火获或惑霍货祸攉嚯夥钬锪镬耠蠖",
  17321. "ji": "击圾基机畸稽积箕肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪居丌乩剞佶佴脔墼芨芰萁蒺蕺掎叽咭哜唧岌嵴洎彐屐骥畿玑楫殛戟戢赍觊犄齑矶羁嵇稷瘠瘵虮笈笄暨跻跽霁鲚鲫髻麂",
  17322. "jia": "嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁伽郏拮岬浃迦珈戛胛恝铗镓痂蛱笳袈跏",
  17323. "jian": "歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件健舰剑饯渐溅涧建僭谏谫菅蒹搛囝湔蹇謇缣枧柙楗戋戬牮犍毽腱睑锏鹣裥笕箴翦趼踺鲣鞯",
  17324. "jiang": "僵姜将浆江疆蒋桨奖讲匠酱降茳洚绛缰犟礓耩糨豇",
  17325. "jiao": "蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫佼僬茭挢噍峤徼姣纟敫皎鹪蛟醮跤鲛",
  17326. "jie": "窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届偈讦诘喈嗟獬婕孑桀獒碣锴疖袷颉蚧羯鲒骱髫",
  17327. "jin": "巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸尽卺荩堇噤馑廑妗缙瑾槿赆觐钅锓衿矜",
  17328. "jing": "劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净刭儆阱菁獍憬泾迳弪婧肼胫腈旌",
  17329. "jiong": "炯窘冂迥扃",
  17330. "jiu": "揪究纠玖韭久灸九酒厩救旧臼舅咎就疚僦啾阄柩桕鹫赳鬏",
  17331. "ju": "鞠拘狙疽驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧倨讵苣苴莒掬遽屦琚枸椐榘榉橘犋飓钜锔窭裾趄醵踽龃雎鞫",
  17332. "juan": "捐鹃娟倦眷卷绢鄄狷涓桊蠲锩镌隽",
  17333. "jue": "撅攫抉掘倔爵觉决诀绝厥劂谲矍蕨噘崛獗孓珏桷橛爝镢蹶觖",
  17334. "jun": "均菌钧军君峻俊竣浚郡骏捃狻皲筠麇",
  17335. "ka": "喀咖卡佧咔胩",
  17336. "ke": "咯坷苛柯棵磕颗科壳咳可渴克刻客课岢恪溘骒缂珂轲氪瞌钶疴窠蝌髁",
  17337. "kai": "开揩楷凯慨剀垲蒈忾恺铠锎",
  17338. "kan": "刊堪勘坎砍看侃凵莰莶戡龛瞰",
  17339. "kang": "康慷糠扛抗亢炕坑伉闶钪",
  17340. "kao": "考拷烤靠尻栲犒铐",
  17341. "ken": "肯啃垦恳垠裉颀",
  17342. "keng": "吭忐铿",
  17343. "kong": "空恐孔控倥崆箜",
  17344. "kou": "抠口扣寇芤蔻叩眍筘",
  17345. "ku": "枯哭窟苦酷库裤刳堀喾绔骷",
  17346. "kua": "夸垮挎跨胯侉",
  17347. "kuai": "块筷侩快蒯郐蒉狯脍",
  17348. "kuan": "宽款髋",
  17349. "kuang": "匡筐狂框矿眶旷况诓诳邝圹夼哐纩贶",
  17350. "kui": "亏盔岿窥葵奎魁傀馈愧溃馗匮夔隗揆喹喟悝愦阕逵暌睽聩蝰篑臾跬",
  17351. "kun": "坤昆捆困悃阃琨锟醌鲲髡",
  17352. "kuo": "括扩廓阔蛞",
  17353. "la": "垃拉喇蜡腊辣啦剌摺邋旯砬瘌",
  17354. "lai": "莱来赖崃徕涞濑赉睐铼癞籁",
  17355. "lan": "蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥啉岚懔漤榄斓罱镧褴",
  17356. "lang": "琅榔狼廊郎朗浪莨蒗啷阆锒稂螂",
  17357. "lao": "捞劳牢老佬姥酪烙涝唠崂栳铑铹痨醪",
  17358. "le": "勒乐肋仂叻嘞泐鳓",
  17359. "lei": "雷镭蕾磊累儡垒擂类泪羸诔荽咧漯嫘缧檑耒酹",
  17360. "ling": "棱冷拎玲菱零龄铃伶羚凌灵陵岭领另令酃塄苓呤囹泠绫柃棂瓴聆蛉翎鲮",
  17361. "leng": "楞愣",
  17362. "li": "厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐痢立粒沥隶力璃哩俪俚郦坜苈莅蓠藜捩呖唳喱猁溧澧逦娌嫠骊缡珞枥栎轹戾砺詈罹锂鹂疠疬蛎蜊蠡笠篥粝醴跞雳鲡鳢黧",
  17363. "lian": "俩联莲连镰廉怜涟帘敛脸链恋炼练挛蔹奁潋濂娈琏楝殓臁膦裢蠊鲢",
  17364. "liang": "粮凉梁粱良两辆量晾亮谅墚椋踉靓魉",
  17365. "liao": "撩聊僚疗燎寥辽潦了撂镣廖料蓼尥嘹獠寮缭钌鹩耢",
  17366. "lie": "列裂烈劣猎冽埒洌趔躐鬣",
  17367. "lin": "琳林磷霖临邻鳞淋凛赁吝蔺嶙廪遴檩辚瞵粼躏麟",
  17368. "liu": "溜琉榴硫馏留刘瘤流柳六抡偻蒌泖浏遛骝绺旒熘锍镏鹨鎏",
  17369. "long": "龙聋咙笼窿隆垄拢陇弄垅茏泷珑栊胧砻癃",
  17370. "lou": "楼娄搂篓漏陋喽嵝镂瘘耧蝼髅",
  17371. "lu": "芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮垆摅撸噜泸渌漉璐栌橹轳辂辘氇胪镥鸬鹭簏舻鲈",
  17372. "lv": "驴吕铝侣旅履屡缕虑氯律率滤绿捋闾榈膂稆褛",
  17373. "luan": "峦孪滦卵乱栾鸾銮",
  17374. "lue": "掠略锊",
  17375. "lun": "轮伦仑沦纶论囵",
  17376. "luo": "萝螺罗逻锣箩骡裸落洛骆络倮荦摞猡泺椤脶镙瘰雒",
  17377. "ma": "妈麻玛码蚂马骂嘛吗唛犸嬷杩麽",
  17378. "mai": "埋买麦卖迈脉劢荬咪霾",
  17379. "man": "瞒馒蛮满蔓曼慢漫谩墁幔缦熳镘颟螨鳗鞔",
  17380. "mang": "芒茫盲忙莽邙漭朦硭蟒",
  17381. "meng": "氓萌蒙檬盟锰猛梦孟勐甍瞢懵礞虻蜢蠓艋艨黾",
  17382. "miao": "猫苗描瞄藐秒渺庙妙喵邈缈缪杪淼眇鹋蜱",
  17383. "mao": "茅锚毛矛铆卯茂冒帽貌贸侔袤勖茆峁瑁昴牦耄旄懋瞀蛑蝥蟊髦",
  17384. "me": "么",
  17385. "mei": "玫枚梅酶霉煤没眉媒镁每美昧寐妹媚坶莓嵋猸浼湄楣镅鹛袂魅",
  17386. "men": "门闷们扪玟焖懑钔",
  17387. "mi": "眯醚靡糜迷谜弥米秘觅泌蜜密幂芈冖谧蘼嘧猕獯汨宓弭脒敉糸縻麋",
  17388. "mian": "棉眠绵冕免勉娩缅面沔湎腼眄",
  17389. "mie": "蔑灭咩蠛篾",
  17390. "min": "民抿皿敏悯闽苠岷闵泯珉",
  17391. "ming": "明螟鸣铭名命冥茗溟暝瞑酩",
  17392. "miu": "谬",
  17393. "mo": "摸摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谟茉蓦馍嫫镆秣瘼耱蟆貊貘",
  17394. "mou": "谋牟某厶哞婺眸鍪",
  17395. "mu": "拇牡亩姆母墓暮幕募慕木目睦牧穆仫苜呒沐毪钼",
  17396. "na": "拿哪呐钠那娜纳内捺肭镎衲箬",
  17397. "nai": "氖乃奶耐奈鼐艿萘柰",
  17398. "nan": "南男难囊喃囡楠腩蝻赧",
  17399. "nao": "挠脑恼闹孬垴猱瑙硇铙蛲",
  17400. "ne": "淖呢讷",
  17401. "nei": "馁",
  17402. "nen": "嫩能枘恁",
  17403. "ni": "妮霓倪泥尼拟你匿腻逆溺伲坭猊怩滠昵旎祢慝睨铌鲵",
  17404. "nian": "蔫拈年碾撵捻念廿辇黏鲇鲶",
  17405. "niang": "娘酿",
  17406. "niao": "鸟尿茑嬲脲袅",
  17407. "nie": "捏聂孽啮镊镍涅乜陧蘖嗫肀颞臬蹑",
  17408. "nin": "您柠",
  17409. "ning": "狞凝宁拧泞佞蓥咛甯聍",
  17410. "niu": "牛扭钮纽狃忸妞蚴",
  17411. "nong": "脓浓农侬",
  17412. "nu": "奴努怒呶帑弩胬孥驽",
  17413. "nv": "女恧钕衄",
  17414. "nuan": "暖",
  17415. "nuenue": "虐",
  17416. "nue": "疟谑",
  17417. "nuo": "挪懦糯诺傩搦喏锘",
  17418. "ou": "哦欧鸥殴藕呕偶沤怄瓯耦",
  17419. "pa": "啪趴爬帕怕琶葩筢",
  17420. "pai": "拍排牌徘湃派俳蒎",
  17421. "pan": "攀潘盘磐盼畔判叛爿泮袢襻蟠蹒",
  17422. "pang": "乓庞旁耪胖滂逄",
  17423. "pao": "抛咆刨炮袍跑泡匏狍庖脬疱",
  17424. "pei": "呸胚培裴赔陪配佩沛掊辔帔淠旆锫醅霈",
  17425. "pen": "喷盆湓",
  17426. "peng": "砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯堋嘭怦蟛",
  17427. "pi": "砒霹批披劈琵毗啤脾疲皮匹痞僻屁譬丕陴邳郫圮鼙擗噼庀媲纰枇甓睥罴铍痦癖疋蚍貔",
  17428. "pian": "篇偏片骗谝骈犏胼褊翩蹁",
  17429. "piao": "飘漂瓢票剽嘌嫖缥殍瞟螵",
  17430. "pie": "撇瞥丿苤氕",
  17431. "pin": "拼频贫品聘拚姘嫔榀牝颦",
  17432. "ping": "乒坪苹萍平凭瓶评屏俜娉枰鲆",
  17433. "po": "坡泼颇婆破魄迫粕叵鄱溥珀钋钷皤笸",
  17434. "pou": "剖裒踣",
  17435. "pu": "扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑匍噗濮璞氆镤镨蹼",
  17436. "qi": "期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫亟亓圻芑萋葺嘁屺岐汔淇骐绮琪琦杞桤槭欹祺憩碛蛴蜞綦綮趿蹊鳍麒",
  17437. "qia": "掐恰洽葜",
  17438. "qian": "牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉佥阡芊芡荨掮岍悭慊骞搴褰缱椠肷愆钤虔箝",
  17439. "qiang": "枪呛腔羌墙蔷强抢嫱樯戗炝锖锵镪襁蜣羟跫跄",
  17440. "qiao": "橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍劁诮谯荞愀憔缲樵毳硗跷鞒",
  17441. "qie": "切茄且怯窃郄唼惬妾挈锲箧",
  17442. "qin": "钦侵亲秦琴勤芹擒禽寝沁芩蓁蕲揿吣嗪噙溱檎螓衾",
  17443. "qing": "青轻氢倾卿清擎晴氰情顷请庆倩苘圊檠磬蜻罄箐謦鲭黥",
  17444. "qiong": "琼穷邛茕穹筇銎",
  17445. "qiu": "秋丘邱球求囚酋泅俅氽巯艽犰湫逑遒楸赇鸠虬蚯蝤裘糗鳅鼽",
  17446. "qu": "趋区蛆曲躯屈驱渠取娶龋趣去诎劬蕖蘧岖衢阒璩觑氍祛磲癯蛐蠼麴瞿黢",
  17447. "quan": "圈颧权醛泉全痊拳犬券劝诠荃獾悛绻辁畎铨蜷筌鬈",
  17448. "que": "缺炔瘸却鹊榷确雀阙悫",
  17449. "qun": "裙群逡",
  17450. "ran": "然燃冉染苒髯",
  17451. "rang": "瓤壤攘嚷让禳穰",
  17452. "rao": "饶扰绕荛娆桡",
  17453. "ruo": "惹若弱",
  17454. "re": "热偌",
  17455. "ren": "壬仁人忍韧任认刃妊纫仞荏葚饪轫稔衽",
  17456. "reng": "扔仍",
  17457. "ri": "日",
  17458. "rong": "戎茸蓉荣融熔溶容绒冗嵘狨缛榕蝾",
  17459. "rou": "揉柔肉糅蹂鞣",
  17460. "ru": "茹蠕儒孺如辱乳汝入褥蓐薷嚅洳溽濡铷襦颥",
  17461. "ruan": "软阮朊",
  17462. "rui": "蕊瑞锐芮蕤睿蚋",
  17463. "run": "闰润",
  17464. "sa": "撒洒萨卅仨挲飒",
  17465. "sai": "腮鳃塞赛噻",
  17466. "san": "三叁伞散彡馓氵毵糁霰",
  17467. "sang": "桑嗓丧搡磉颡",
  17468. "sao": "搔骚扫嫂埽臊瘙鳋",
  17469. "se": "瑟色涩啬铩铯穑",
  17470. "sen": "森",
  17471. "seng": "僧",
  17472. "sha": "莎砂杀刹沙纱傻啥煞脎歃痧裟霎鲨",
  17473. "shai": "筛晒酾",
  17474. "shan": "珊苫杉山删煽衫闪陕擅赡膳善汕扇缮剡讪鄯埏芟潸姗骟膻钐疝蟮舢跚鳝",
  17475. "shang": "墒伤商赏晌上尚裳垧绱殇熵觞",
  17476. "shao": "梢捎稍烧芍勺韶少哨邵绍劭苕潲蛸笤筲艄",
  17477. "she": "奢赊蛇舌舍赦摄射慑涉社设厍佘猞畲麝",
  17478. "shen": "砷申呻伸身深娠绅神沈审婶甚肾慎渗诜谂吲哂渖椹矧蜃",
  17479. "sheng": "声生甥牲升绳省盛剩胜圣丞渑媵眚笙",
  17480. "shi": "师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试谥埘莳蓍弑唑饣轼耆贳炻礻铈铊螫舐筮豕鲥鲺",
  17481. "shou": "收手首守寿授售受瘦兽扌狩绶艏",
  17482. "shu": "蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱恕倏塾菽忄沭涑澍姝纾毹腧殳镯秫鹬",
  17483. "shua": "刷耍唰涮",
  17484. "shuai": "摔衰甩帅蟀",
  17485. "shuan": "栓拴闩",
  17486. "shuang": "霜双爽孀",
  17487. "shui": "谁水睡税",
  17488. "shun": "吮瞬顺舜恂",
  17489. "shuo": "说硕朔烁蒴搠嗍濯妁槊铄",
  17490. "si": "斯撕嘶思私司丝死肆寺嗣四伺似饲巳厮俟兕菥咝汜泗澌姒驷缌祀祠锶鸶耜蛳笥",
  17491. "song": "松耸怂颂送宋讼诵凇菘崧嵩忪悚淞竦",
  17492. "sou": "搜艘擞嗽叟嗖嗾馊溲飕瞍锼螋",
  17493. "su": "苏酥俗素速粟僳塑溯宿诉肃夙谡蔌嗉愫簌觫稣",
  17494. "suan": "酸蒜算",
  17495. "sui": "虽隋随绥髓碎岁穗遂隧祟蓑冫谇濉邃燧眭睢",
  17496. "sun": "孙损笋荪狲飧榫跣隼",
  17497. "suo": "梭唆缩琐索锁所唢嗦娑桫睃羧",
  17498. "ta": "塌他它她塔獭挞蹋踏闼溻遢榻沓",
  17499. "tai": "胎苔抬台泰酞太态汰邰薹肽炱钛跆鲐",
  17500. "tan": "坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭郯蕈昙钽锬覃",
  17501. "tang": "汤塘搪堂棠膛唐糖傥饧溏瑭铴镗耥螗螳羰醣",
  17502. "thang": "倘躺淌",
  17503. "theng": "趟烫",
  17504. "tao": "掏涛滔绦萄桃逃淘陶讨套挑鼗啕韬饕",
  17505. "te": "特",
  17506. "teng": "藤腾疼誊滕",
  17507. "ti": "梯剔踢锑提题蹄啼体替嚏惕涕剃屉荑悌逖绨缇鹈裼醍",
  17508. "tian": "天添填田甜恬舔腆掭忝阗殄畋钿蚺",
  17509. "tiao": "条迢眺跳佻祧铫窕龆鲦",
  17510. "tie": "贴铁帖萜餮",
  17511. "ting": "厅听烃汀廷停亭庭挺艇莛葶婷梃蜓霆",
  17512. "tong": "通桐酮瞳同铜彤童桶捅筒统痛佟僮仝茼嗵恸潼砼",
  17513. "tou": "偷投头透亠",
  17514. "tu": "凸秃突图徒途涂屠土吐兔堍荼菟钍酴",
  17515. "tuan": "湍团疃",
  17516. "tui": "推颓腿蜕褪退忒煺",
  17517. "tun": "吞屯臀饨暾豚窀",
  17518. "tuo": "拖托脱鸵陀驮驼椭妥拓唾乇佗坨庹沱柝砣箨舄跎鼍",
  17519. "wa": "挖哇蛙洼娃瓦袜佤娲腽",
  17520. "wai": "歪外",
  17521. "wan": "豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕剜芄苋菀纨绾琬脘畹蜿箢",
  17522. "wang": "汪王亡枉网往旺望忘妄罔尢惘辋魍",
  17523. "wei": "威巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫倭偎诿隈葳薇帏帷崴嵬猥猬闱沩洧涠逶娓玮韪軎炜煨熨痿艉鲔",
  17524. "wen": "瘟温蚊文闻纹吻稳紊问刎愠阌汶璺韫殁雯",
  17525. "weng": "嗡翁瓮蓊蕹",
  17526. "wo": "挝蜗涡窝我斡卧握沃莴幄渥杌肟龌",
  17527. "wu": "巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误兀仵阢邬圬芴庑怃忤浯寤迕妩骛牾焐鹉鹜蜈鋈鼯",
  17528. "xi": "昔熙析西硒矽晰嘻吸锡牺稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细僖兮隰郗茜葸蓰奚唏徙饩阋浠淅屣嬉玺樨曦觋欷熹禊禧钸皙穸蜥蟋舾羲粞翕醯鼷",
  17529. "xia": "瞎虾匣霞辖暇峡侠狭下厦夏吓掀葭嗄狎遐瑕硖瘕罅黠",
  17530. "xian": "锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线冼藓岘猃暹娴氙祆鹇痫蚬筅籼酰跹",
  17531. "xiang": "相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象芗葙饷庠骧缃蟓鲞飨",
  17532. "xiao": "萧硝霄削哮嚣销消宵淆晓小孝校肖啸笑效哓咻崤潇逍骁绡枭枵筱箫魈",
  17533. "xie": "楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑偕亵勰燮薤撷廨瀣邂绁缬榭榍歙躞",
  17534. "xin": "薪芯锌欣辛新忻心信衅囟馨莘歆铽鑫",
  17535. "xing": "星腥猩惺兴刑型形邢行醒幸杏性姓陉荇荥擤悻硎",
  17536. "xiong": "兄凶胸匈汹雄熊芎",
  17537. "xiu": "休修羞朽嗅锈秀袖绣莠岫馐庥鸺貅髹",
  17538. "xu": "墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续讴诩圩蓿怵洫溆顼栩煦砉盱胥糈醑",
  17539. "xuan": "轩喧宣悬旋玄选癣眩绚儇谖萱揎馔泫洵渲漩璇楦暄炫煊碹铉镟痃",
  17540. "xue": "靴薛学穴雪血噱泶鳕",
  17541. "xun": "勋熏循旬询寻驯巡殉汛训讯逊迅巽埙荀薰峋徇浔曛窨醺鲟",
  17542. "ya": "压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶伢揠吖岈迓娅琊桠氩砑睚痖",
  17543. "yan": "焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验厣靥赝俨偃兖讠谳郾鄢芫菸崦恹闫阏洇湮滟妍嫣琰晏胭腌焱罨筵酽魇餍鼹",
  17544. "yang": "殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾徉怏泱炀烊恙蛘鞅",
  17545. "yao": "邀腰妖瑶摇尧遥窑谣姚咬舀药要耀夭爻吆崾徭瀹幺珧杳曜肴鹞窈繇鳐",
  17546. "ye": "椰噎耶爷野冶也页掖业叶曳腋夜液谒邺揶馀晔烨铘",
  17547. "yi": "一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎刈劓佾诒圪圯埸懿苡薏弈奕挹弋呓咦咿噫峄嶷猗饴怿怡悒漪迤驿缢殪贻旖熠钇镒镱痍瘗癔翊衤蜴舣羿翳酏黟",
  17548. "yin": "茵荫因殷音阴姻吟银淫寅饮尹引隐印胤鄞堙茚喑狺夤氤铟瘾蚓霪龈",
  17549. "ying": "英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映嬴郢茔莺萦撄嘤膺滢潆瀛瑛璎楹鹦瘿颍罂",
  17550. "yo": "哟唷",
  17551. "yong": "拥佣臃痈庸雍踊蛹咏泳涌永恿勇用俑壅墉慵邕镛甬鳙饔",
  17552. "you": "幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼卣攸侑莸呦囿宥柚猷牖铕疣蝣鱿黝鼬",
  17553. "yu": "迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉浴寓裕预豫驭禺毓伛俣谀谕萸蓣揄喁圄圉嵛狳饫庾阈妪妤纡瑜昱觎腴欤於煜燠聿钰鹆瘐瘀窳蝓竽舁雩龉",
  17554. "yuan": "鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院塬沅媛瑗橼爰眢鸢螈鼋",
  17555. "yue": "曰约越跃钥岳粤月悦阅龠樾刖钺",
  17556. "yun": "耘云郧匀陨允运蕴酝晕韵孕郓芸狁恽纭殒昀氲",
  17557. "za": "匝砸杂拶咂",
  17558. "zai": "栽哉灾宰载再在咱崽甾",
  17559. "zan": "攒暂赞瓒昝簪糌趱錾",
  17560. "zang": "赃脏葬奘戕臧",
  17561. "zao": "遭糟凿藻枣早澡蚤躁噪造皂灶燥唣缫",
  17562. "ze": "责择则泽仄赜啧迮昃笮箦舴",
  17563. "zei": "贼",
  17564. "zen": "怎谮",
  17565. "zeng": "增憎曾赠缯甑罾锃",
  17566. "zha": "扎喳渣札轧铡闸眨栅榨咋乍炸诈揸吒咤哳怍砟痄蚱齄",
  17567. "zhai": "摘斋宅窄债寨砦",
  17568. "zhan": "瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽谵搌旃",
  17569. "zhang": "樟章彰漳张掌涨杖丈帐账仗胀瘴障仉鄣幛嶂獐嫜璋蟑",
  17570. "zhao": "招昭找沼赵照罩兆肇召爪诏棹钊笊",
  17571. "zhe": "遮折哲蛰辙者锗蔗这浙谪陬柘辄磔鹧褚蜇赭",
  17572. "zhen": "珍斟真甄砧臻贞针侦枕疹诊震振镇阵缜桢榛轸赈胗朕祯畛鸩",
  17573. "zheng": "蒸挣睁征狰争怔整拯正政帧症郑证诤峥钲铮筝",
  17574. "zhi": "芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒卮陟郅埴芷摭帙忮彘咫骘栉枳栀桎轵轾攴贽膣祉祗黹雉鸷痣蛭絷酯跖踬踯豸觯",
  17575. "zhong": "中盅忠钟衷终种肿重仲众冢锺螽舂舯踵",
  17576. "zhou": "舟周州洲诌粥轴肘帚咒皱宙昼骤啄着倜诹荮鬻纣胄碡籀舳酎鲷",
  17577. "zhu": "珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑住注祝驻伫侏邾苎茱洙渚潴驺杼槠橥炷铢疰瘃蚰竺箸翥躅麈",
  17578. "zhua": "抓",
  17579. "zhuai": "拽",
  17580. "zhuan": "专砖转撰赚篆抟啭颛",
  17581. "zhuang": "桩庄装妆撞壮状丬",
  17582. "zhui": "椎锥追赘坠缀萑骓缒",
  17583. "zhun": "谆准",
  17584. "zhuo": "捉拙卓桌琢茁酌灼浊倬诼廴蕞擢啜浞涿杓焯禚斫",
  17585. "zi": "兹咨资姿滋淄孜紫仔籽滓子自渍字谘嵫姊孳缁梓辎赀恣眦锱秭耔笫粢觜訾鲻髭",
  17586. "zong": "鬃棕踪宗综总纵腙粽",
  17587. "zou": "邹走奏揍鄹鲰",
  17588. "zu": "租足卒族祖诅阻组俎菹啐徂驵蹴",
  17589. "zuan": "钻纂攥缵",
  17590. "zui": "嘴醉最罪",
  17591. "zun": "尊遵撙樽鳟",
  17592. "zuo": "昨左佐柞做作坐座阝阼胙祚酢",
  17593. "cou": "薮楱辏腠",
  17594. "nang": "攮哝囔馕曩",
  17595. "o": "喔",
  17596. "dia": "嗲",
  17597. "chuai": "嘬膪踹",
  17598. "cen": "岑涔",
  17599. "diu": "铥",
  17600. "nou": "耨",
  17601. "fou": "缶",
  17602. "bia": "髟"
  17603. };
  17604. const _ToPinyin = class _ToPinyin {
  17605. constructor() {
  17606. }
  17607. static getInstance() {
  17608. if (!this.instance) {
  17609. this.instance = new _ToPinyin();
  17610. }
  17611. return this.instance;
  17612. }
  17613. // 转首字母 this.chineseToInitials(this.chineseToPinYin('你好')) this.chineseToInitials('NiHao')
  17614. chineseToInitials(word) {
  17615. let SX = "";
  17616. for (var i = 0; i < word.length; i++) {
  17617. var c = word.charAt(i);
  17618. if (/^[A-Z]+$/.test(c)) {
  17619. SX += c;
  17620. }
  17621. }
  17622. return SX;
  17623. }
  17624. // 转拼音
  17625. chineseToPinYin(l1) {
  17626. var l2 = l1.length;
  17627. var I1 = "";
  17628. var reg = new RegExp("[a-zA-Z0-9]");
  17629. for (var i = 0; i < l2; i++) {
  17630. var val = l1.substr(i, 1);
  17631. var name = this.arraySearch(val, pinyin);
  17632. if (reg.test(val)) {
  17633. I1 += val.toLocaleUpperCase();
  17634. } else if (name !== false) {
  17635. I1 += name;
  17636. }
  17637. }
  17638. I1 = I1.replace(/ /g, "-");
  17639. while (I1.indexOf("--") > 0) {
  17640. I1 = I1.replace("--", "-");
  17641. }
  17642. return I1;
  17643. }
  17644. arraySearch(l1, l2) {
  17645. for (var name in pinyin) {
  17646. if (pinyin[name].indexOf(l1) !== -1) {
  17647. return this.ucfirst(name);
  17648. }
  17649. }
  17650. return false;
  17651. }
  17652. ucfirst(l1) {
  17653. if (l1.length > 0) {
  17654. var first = l1.substr(0, 1).toUpperCase();
  17655. var spare = l1.substr(1, l1.length);
  17656. return first + spare;
  17657. }
  17658. }
  17659. };
  17660. __publicField(_ToPinyin, "instance");
  17661. let ToPinyin = _ToPinyin;
  17662. const toPinyin = ToPinyin.getInstance();
  17663. const _sfc_main$12 = {
  17664. __name: "BookInfo",
  17665. props: {
  17666. bookList: {
  17667. type: Array,
  17668. default: () => []
  17669. },
  17670. detail: {
  17671. type: Object,
  17672. default: () => ({})
  17673. },
  17674. isShow: {
  17675. type: Boolean,
  17676. default: true
  17677. }
  17678. },
  17679. emits: ["get-all-firstLetter"],
  17680. setup(__props, { expose: __expose, emit: __emit }) {
  17681. __expose();
  17682. const props2 = __props;
  17683. const emit2 = __emit;
  17684. const auditNum = vue.computed(() => {
  17685. return props2.bookList.reduce((total, item) => {
  17686. var _a;
  17687. return total + ((_a = item.auditCommentList) == null ? void 0 : _a.length) || 0;
  17688. }, 0);
  17689. });
  17690. function handleBookClick(book) {
  17691. if (props2.detail.status == 10) {
  17692. uni.$u.ttsModule.speak("此订单已审核");
  17693. return;
  17694. }
  17695. uni.navigateTo({
  17696. url: `/pages/index/detail/book-audit?isbn=${book.isbn}&orderId=${props2.detail.orderId}`
  17697. });
  17698. uni.setStorageSync("auditBook", book);
  17699. }
  17700. function getAuditCateNum(cate) {
  17701. let auditList = [];
  17702. props2.bookList.forEach((v) => {
  17703. auditList.push(...v.auditCommentList || []);
  17704. });
  17705. return auditList.filter((v) => v.sts == cate).length;
  17706. }
  17707. const formatBookList = (list) => {
  17708. const poorBooks = { title: "极差", list: [], backgroundColor: "#de868f", id: "poor" };
  17709. const goodBooks = { title: "良好", list: [], backgroundColor: "#81b337", id: "good" };
  17710. const otherBooks = [];
  17711. const allFirstLetter = [];
  17712. list.forEach((book) => {
  17713. var _a, _b;
  17714. book.goodNum = ((_a = book.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 1).length) || 0;
  17715. book.badNum = ((_b = book.auditCommentList) == null ? void 0 : _b.filter((v) => v.sts == 3).length) || 0;
  17716. if (book.badNum > 0) {
  17717. poorBooks.list.push(book);
  17718. } else if (book.goodNum > 0) {
  17719. goodBooks.list.push(book);
  17720. } else {
  17721. let firstLetter;
  17722. const char = book.bookName.charAt(0);
  17723. if (/^[A-Za-z]$/.test(char)) {
  17724. firstLetter = char.toUpperCase();
  17725. } else if (/^[\u4E00-\u9FA5]$/.test(char)) {
  17726. firstLetter = toPinyin.chineseToInitials(toPinyin.chineseToPinYin(char));
  17727. } else {
  17728. firstLetter = char;
  17729. }
  17730. let bool = otherBooks.some((item) => item.title == firstLetter);
  17731. if (!bool) {
  17732. otherBooks.push({ id: firstLetter, title: firstLetter, list: [{ ...book }] });
  17733. allFirstLetter.push(firstLetter);
  17734. emit2("get-all-firstLetter", allFirstLetter);
  17735. } else {
  17736. otherBooks.find((item) => item.title == firstLetter).list.push(book);
  17737. }
  17738. }
  17739. });
  17740. return { poorBooks, goodBooks, otherBooks };
  17741. };
  17742. const formatList = vue.ref([]);
  17743. vue.watch(() => props2.bookList, (newVal) => {
  17744. let { poorBooks, goodBooks, otherBooks } = formatBookList(newVal);
  17745. let poor = poorBooks.list.length > 0 ? poorBooks : {};
  17746. let good = goodBooks.list.length > 0 ? goodBooks : {};
  17747. formatList.value = [...otherBooks, poor, good];
  17748. }, { immediate: true, deep: true });
  17749. 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() {
  17750. return toPinyin;
  17751. } };
  17752. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  17753. return __returned__;
  17754. }
  17755. };
  17756. function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
  17757. return vue.openBlock(), vue.createElementBlock("view", { class: "book-info" }, [
  17758. $props.isShow ? (vue.openBlock(), vue.createElementBlock(
  17759. vue.Fragment,
  17760. { key: 0 },
  17761. [
  17762. vue.createElementVNode(
  17763. "view",
  17764. {
  17765. class: "font-bold mt-12 mb-10",
  17766. style: { "padding": "0 20rpx" }
  17767. },
  17768. vue.toDisplayString($props.bookList.length) + "条记录,共" + vue.toDisplayString($props.detail.totalNum) + "本,已审" + vue.toDisplayString($setup.auditNum || 0) + "本 ",
  17769. 1
  17770. /* TEXT */
  17771. ),
  17772. vue.createElementVNode(
  17773. "view",
  17774. {
  17775. class: "font-light",
  17776. style: { "padding": "0 20rpx" }
  17777. },
  17778. " 其中已审:良好" + vue.toDisplayString($setup.getAuditCateNum(1)) + "本,一般0本,极差" + vue.toDisplayString($setup.getAuditCateNum(3)) + "本 ",
  17779. 1
  17780. /* TEXT */
  17781. )
  17782. ],
  17783. 64
  17784. /* STABLE_FRAGMENT */
  17785. )) : vue.createCommentVNode("v-if", true),
  17786. (vue.openBlock(true), vue.createElementBlock(
  17787. vue.Fragment,
  17788. null,
  17789. vue.renderList($setup.formatList, (item) => {
  17790. return vue.withDirectives((vue.openBlock(), vue.createElementBlock("view", {
  17791. class: "book-info-item bg-white mt-12",
  17792. style: vue.normalizeStyle({ backgroundColor: item.backgroundColor }),
  17793. key: item.title,
  17794. id: item.id
  17795. }, [
  17796. vue.createElementVNode(
  17797. "view",
  17798. { class: "book-info-item-title" },
  17799. vue.toDisplayString(item.title),
  17800. 1
  17801. /* TEXT */
  17802. ),
  17803. vue.createElementVNode("view", { class: "book-info-item-list" }, [
  17804. (vue.openBlock(true), vue.createElementBlock(
  17805. vue.Fragment,
  17806. null,
  17807. vue.renderList(item.list, (book) => {
  17808. return vue.openBlock(), vue.createBlock($setup["BookItem"], {
  17809. key: book.bookId,
  17810. item: book,
  17811. onClick: ($event) => $setup.handleBookClick(book)
  17812. }, null, 8, ["item", "onClick"]);
  17813. }),
  17814. 128
  17815. /* KEYED_FRAGMENT */
  17816. ))
  17817. ])
  17818. ], 12, ["id"])), [
  17819. [vue.vShow, item == null ? void 0 : item.title]
  17820. ]);
  17821. }),
  17822. 128
  17823. /* KEYED_FRAGMENT */
  17824. ))
  17825. ]);
  17826. }
  17827. const BookInfo = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$11], ["__scopeId", "data-v-8c7d14f9"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/BookInfo.vue"]]);
  17828. const props$8 = {
  17829. props: {
  17830. // 图片地址
  17831. src: {
  17832. type: String,
  17833. default: props$E.image.src
  17834. },
  17835. // 裁剪模式
  17836. mode: {
  17837. type: String,
  17838. default: props$E.image.mode
  17839. },
  17840. // 宽度,单位任意
  17841. width: {
  17842. type: [String, Number],
  17843. default: props$E.image.width
  17844. },
  17845. // 高度,单位任意
  17846. height: {
  17847. type: [String, Number],
  17848. default: props$E.image.height
  17849. },
  17850. // 图片形状,circle-圆形,square-方形
  17851. shape: {
  17852. type: String,
  17853. default: props$E.image.shape
  17854. },
  17855. // 圆角,单位任意
  17856. radius: {
  17857. type: [String, Number],
  17858. default: props$E.image.radius
  17859. },
  17860. // 是否懒加载,微信小程序、App、百度小程序、字节跳动小程序
  17861. lazyLoad: {
  17862. type: Boolean,
  17863. default: props$E.image.lazyLoad
  17864. },
  17865. // 开启长按图片显示识别微信小程序码菜单
  17866. showMenuByLongpress: {
  17867. type: Boolean,
  17868. default: props$E.image.showMenuByLongpress
  17869. },
  17870. // 加载中的图标,或者小图片
  17871. loadingIcon: {
  17872. type: String,
  17873. default: props$E.image.loadingIcon
  17874. },
  17875. // 加载失败的图标,或者小图片
  17876. errorIcon: {
  17877. type: String,
  17878. default: props$E.image.errorIcon
  17879. },
  17880. // 是否显示加载中的图标或者自定义的slot
  17881. showLoading: {
  17882. type: Boolean,
  17883. default: props$E.image.showLoading
  17884. },
  17885. // 是否显示加载错误的图标或者自定义的slot
  17886. showError: {
  17887. type: Boolean,
  17888. default: props$E.image.showError
  17889. },
  17890. // 是否需要淡入效果
  17891. fade: {
  17892. type: Boolean,
  17893. default: props$E.image.fade
  17894. },
  17895. // 只支持网络资源,只对微信小程序有效
  17896. webp: {
  17897. type: Boolean,
  17898. default: props$E.image.webp
  17899. },
  17900. // 过渡时间,单位ms
  17901. duration: {
  17902. type: [String, Number],
  17903. default: props$E.image.duration
  17904. },
  17905. // 背景颜色,用于深色页面加载图片时,为了和背景色融合
  17906. bgColor: {
  17907. type: String,
  17908. default: props$E.image.bgColor
  17909. }
  17910. }
  17911. };
  17912. const _sfc_main$11 = {
  17913. name: "u-image",
  17914. mixins: [mpMixin, mixin, props$8],
  17915. data() {
  17916. return {
  17917. // 图片是否加载错误,如果是,则显示错误占位图
  17918. isError: false,
  17919. // 初始化组件时,默认为加载中状态
  17920. loading: true,
  17921. // 不透明度,为了实现淡入淡出的效果
  17922. opacity: 1,
  17923. // 过渡时间,因为props的值无法修改,故需要一个中间值
  17924. durationTime: this.duration,
  17925. // 图片加载完成时,去掉背景颜色,因为如果是png图片,就会显示灰色的背景
  17926. backgroundStyle: {},
  17927. // 用于fade模式的控制组件显示与否
  17928. show: false
  17929. };
  17930. },
  17931. watch: {
  17932. src: {
  17933. immediate: true,
  17934. handler(n) {
  17935. if (!n) {
  17936. this.isError = true;
  17937. } else {
  17938. this.isError = false;
  17939. this.loading = true;
  17940. }
  17941. }
  17942. }
  17943. },
  17944. computed: {
  17945. wrapStyle() {
  17946. let style = {};
  17947. style.width = this.$u.addUnit(this.width);
  17948. style.height = this.$u.addUnit(this.height);
  17949. style.borderRadius = this.shape == "circle" ? "10000px" : uni.$u.addUnit(this.radius);
  17950. style.overflow = this.radius > 0 ? "hidden" : "visible";
  17951. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  17952. }
  17953. },
  17954. mounted() {
  17955. this.show = true;
  17956. },
  17957. emits: ["click", "error", "load"],
  17958. methods: {
  17959. // 点击图片
  17960. onClick() {
  17961. this.$emit("click");
  17962. },
  17963. // 图片加载失败
  17964. onErrorHandler(err) {
  17965. this.loading = false;
  17966. this.isError = true;
  17967. this.$emit("error", err);
  17968. },
  17969. // 图片加载完成,标记loading结束
  17970. onLoadHandler(event) {
  17971. this.loading = false;
  17972. this.isError = false;
  17973. this.$emit("load", event);
  17974. this.removeBgColor();
  17975. },
  17976. // 移除图片的背景色
  17977. removeBgColor() {
  17978. this.backgroundStyle = {
  17979. backgroundColor: "transparent"
  17980. };
  17981. }
  17982. }
  17983. };
  17984. function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
  17985. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  17986. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
  17987. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  17988. mode: "fade",
  17989. show: $data.show,
  17990. duration: _ctx.fade ? 1e3 : 0
  17991. }, {
  17992. default: vue.withCtx(() => [
  17993. vue.createElementVNode(
  17994. "view",
  17995. {
  17996. class: "u-image",
  17997. onClick: _cache[2] || (_cache[2] = (...args) => $options.onClick && $options.onClick(...args)),
  17998. style: vue.normalizeStyle([$options.wrapStyle, $data.backgroundStyle])
  17999. },
  18000. [
  18001. !$data.isError ? (vue.openBlock(), vue.createElementBlock("image", {
  18002. key: 0,
  18003. src: _ctx.src,
  18004. mode: _ctx.mode,
  18005. onError: _cache[0] || (_cache[0] = (...args) => $options.onErrorHandler && $options.onErrorHandler(...args)),
  18006. onLoad: _cache[1] || (_cache[1] = (...args) => $options.onLoadHandler && $options.onLoadHandler(...args)),
  18007. "show-menu-by-longpress": _ctx.showMenuByLongpress,
  18008. "lazy-load": _ctx.lazyLoad,
  18009. class: "u-image__image",
  18010. style: vue.normalizeStyle({
  18011. borderRadius: _ctx.shape == "circle" ? "10000px" : _ctx.$u.addUnit(_ctx.radius),
  18012. width: _ctx.$u.addUnit(_ctx.width),
  18013. height: _ctx.$u.addUnit(_ctx.height)
  18014. })
  18015. }, null, 44, ["src", "mode", "show-menu-by-longpress", "lazy-load"])) : vue.createCommentVNode("v-if", true),
  18016. _ctx.showLoading && $data.loading ? (vue.openBlock(), vue.createElementBlock(
  18017. "view",
  18018. {
  18019. key: 1,
  18020. class: "u-image__loading",
  18021. style: vue.normalizeStyle({
  18022. borderRadius: _ctx.shape == "circle" ? "50%" : _ctx.$u.addUnit(_ctx.radius),
  18023. backgroundColor: this.bgColor,
  18024. width: _ctx.$u.addUnit(_ctx.width),
  18025. height: _ctx.$u.addUnit(_ctx.height)
  18026. })
  18027. },
  18028. [
  18029. vue.renderSlot(_ctx.$slots, "loading", {}, () => [
  18030. vue.createVNode(_component_u_icon, {
  18031. name: _ctx.loadingIcon,
  18032. width: _ctx.width,
  18033. height: _ctx.height
  18034. }, null, 8, ["name", "width", "height"])
  18035. ], true)
  18036. ],
  18037. 4
  18038. /* STYLE */
  18039. )) : vue.createCommentVNode("v-if", true),
  18040. _ctx.showError && $data.isError && !$data.loading ? (vue.openBlock(), vue.createElementBlock(
  18041. "view",
  18042. {
  18043. key: 2,
  18044. class: "u-image__error",
  18045. style: vue.normalizeStyle({
  18046. borderRadius: _ctx.shape == "circle" ? "50%" : _ctx.$u.addUnit(_ctx.radius),
  18047. width: _ctx.$u.addUnit(_ctx.width),
  18048. height: _ctx.$u.addUnit(_ctx.height)
  18049. })
  18050. },
  18051. [
  18052. vue.renderSlot(_ctx.$slots, "error", {}, () => [
  18053. vue.createVNode(_component_u_icon, {
  18054. name: _ctx.errorIcon,
  18055. width: _ctx.width,
  18056. height: _ctx.height
  18057. }, null, 8, ["name", "width", "height"])
  18058. ], true)
  18059. ],
  18060. 4
  18061. /* STYLE */
  18062. )) : vue.createCommentVNode("v-if", true)
  18063. ],
  18064. 4
  18065. /* STYLE */
  18066. )
  18067. ]),
  18068. _: 3
  18069. /* FORWARDED */
  18070. }, 8, ["show", "duration"]);
  18071. }
  18072. const __easycom_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$10], ["__scopeId", "data-v-abebd402"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-image/u-image.vue"]]);
  18073. const _sfc_main$10 = {
  18074. __name: "FileInfo",
  18075. props: {
  18076. orderId: {
  18077. type: String,
  18078. default: ""
  18079. },
  18080. annexType: {
  18081. type: Number,
  18082. default: 1
  18083. },
  18084. isbn: {
  18085. type: String,
  18086. default: ""
  18087. }
  18088. },
  18089. setup(__props, { expose: __expose }) {
  18090. __expose();
  18091. const form = vue.ref({
  18092. imgInfo: [],
  18093. remark: ""
  18094. });
  18095. const props2 = __props;
  18096. const fileList = vue.ref([]);
  18097. function getFileList() {
  18098. uni.$u.http.get("/app/orderinfo/getOrderAnnexList", {
  18099. params: {
  18100. orderId: props2.orderId,
  18101. annexType: props2.annexType,
  18102. isbn: props2.isbn
  18103. }
  18104. }).then((res2) => {
  18105. if (res2.code == 200) {
  18106. fileList.value = res2.data;
  18107. }
  18108. });
  18109. }
  18110. getFileList();
  18111. const handleUpload = () => {
  18112. formatAppLog("log", "at pages/index/detail/components/FileInfo.vue:73", form.value);
  18113. let data = {
  18114. orderId: props2.orderId,
  18115. annexType: props2.annexType,
  18116. isbn: props2.isbn,
  18117. ...form.value
  18118. };
  18119. uni.$u.http.post("/app/orderinfo/setOrderAnnex", data).then((res2) => {
  18120. if (res2.code == 200) {
  18121. uni.$u.toast("上传成功");
  18122. form.value.imgInfo = [];
  18123. form.value.remark = "";
  18124. getFileList();
  18125. } else {
  18126. uni.$u.toast(res2.msg);
  18127. }
  18128. });
  18129. };
  18130. const __returned__ = { form, props: props2, fileList, getFileList, handleUpload, ref: vue.ref, cyUpload };
  18131. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18132. return __returned__;
  18133. }
  18134. };
  18135. function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
  18136. var _a;
  18137. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$2);
  18138. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  18139. const _component_u_image = resolveEasycom(vue.resolveDynamicComponent("u-image"), __easycom_2$1);
  18140. return vue.openBlock(), vue.createElementBlock("view", { class: "file-info bg-white" }, [
  18141. vue.createElementVNode("view", { class: "file-info-container" }, [
  18142. vue.createVNode($setup["cyUpload"], {
  18143. filename: $setup.form.imgInfo,
  18144. "onUpdate:filename": _cache[0] || (_cache[0] = ($event) => $setup.form.imgInfo = $event),
  18145. limit: 3
  18146. }, null, 8, ["filename"]),
  18147. vue.createVNode(_component_u_textarea, {
  18148. modelValue: $setup.form.remark,
  18149. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.remark = $event),
  18150. placeholder: "上传说明...",
  18151. autoHeight: "",
  18152. style: { "min-height": "60px" }
  18153. }, null, 8, ["modelValue"]),
  18154. vue.createElementVNode("view", { class: "flex flex-a-c flex-j-c" }, [
  18155. vue.createVNode(_component_u_button, {
  18156. class: "mt-24",
  18157. type: "primary",
  18158. onClick: $setup.handleUpload
  18159. }, {
  18160. default: vue.withCtx(() => [
  18161. vue.createTextVNode("上传(最多上传3张)")
  18162. ]),
  18163. _: 1
  18164. /* STABLE */
  18165. })
  18166. ])
  18167. ]),
  18168. vue.createElementVNode("view", { class: "file-info-list" }, [
  18169. vue.createElementVNode("view", { class: "file-info-list-title text-center" }, "已上传记录"),
  18170. !((_a = $setup.fileList) == null ? void 0 : _a.length) ? (vue.openBlock(), vue.createElementBlock("view", {
  18171. key: 0,
  18172. class: "file-info-list-content mt-24 mb-24 text-center"
  18173. }, "还没有上传记录")) : (vue.openBlock(true), vue.createElementBlock(
  18174. vue.Fragment,
  18175. { key: 1 },
  18176. vue.renderList($setup.fileList, (item) => {
  18177. return vue.openBlock(), vue.createElementBlock("view", {
  18178. class: "file-info-item",
  18179. key: item.id
  18180. }, [
  18181. vue.createElementVNode("view", { class: "file-info-item-img flex flex-a-c" }, [
  18182. (vue.openBlock(true), vue.createElementBlock(
  18183. vue.Fragment,
  18184. null,
  18185. vue.renderList(item.imgInfo, (img) => {
  18186. return vue.openBlock(), vue.createBlock(_component_u_image, {
  18187. src: img,
  18188. width: "90",
  18189. height: "90",
  18190. style: { "margin-right": "10px" }
  18191. }, null, 8, ["src"]);
  18192. }),
  18193. 256
  18194. /* UNKEYED_FRAGMENT */
  18195. ))
  18196. ]),
  18197. vue.createElementVNode("view", { class: "file-info-item-info mt-10 font-14" }, [
  18198. vue.createElementVNode(
  18199. "view",
  18200. { class: "file-info-item-info-name" },
  18201. "上传说明:" + vue.toDisplayString(item.remark),
  18202. 1
  18203. /* TEXT */
  18204. ),
  18205. vue.createElementVNode("view", { class: "file-info-item-info-name mt-10" }, [
  18206. vue.createElementVNode(
  18207. "text",
  18208. null,
  18209. vue.toDisplayString(item.createTime),
  18210. 1
  18211. /* TEXT */
  18212. ),
  18213. vue.createElementVNode(
  18214. "text",
  18215. { class: "ml-20" },
  18216. vue.toDisplayString(item.createName),
  18217. 1
  18218. /* TEXT */
  18219. )
  18220. ])
  18221. ])
  18222. ]);
  18223. }),
  18224. 128
  18225. /* KEYED_FRAGMENT */
  18226. ))
  18227. ])
  18228. ]);
  18229. }
  18230. const FileInfo = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$$], ["__scopeId", "data-v-b4cf7c83"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/FileInfo.vue"]]);
  18231. const _sfc_main$$ = {
  18232. __name: "index",
  18233. setup(__props, { expose: __expose }) {
  18234. __expose();
  18235. const showAuditorSelector = vue.ref(false);
  18236. const selectedAuditor = vue.ref({});
  18237. const handleAuditorSelected = (auditor) => {
  18238. selectedAuditor.value = auditor;
  18239. orderDetail.value.auditUserId = auditor.userId;
  18240. orderDetail.value.auditUserName = auditor.userName;
  18241. };
  18242. const toView = vue.ref("");
  18243. function scrollToView(to) {
  18244. toView.value = to;
  18245. uni.pageScrollTo({
  18246. selector: "#" + to,
  18247. duration: 200
  18248. });
  18249. }
  18250. function scrollToTop() {
  18251. uni.pageScrollTo({
  18252. top: 0,
  18253. duration: 200
  18254. });
  18255. }
  18256. function handleBindCode() {
  18257. uni.$u.toast("暂无开发");
  18258. }
  18259. const list = vue.ref(["图书清单", "物流信息", "上传附件"]);
  18260. const current = vue.ref(0);
  18261. const handleSectionChange = (index2) => {
  18262. current.value = index2;
  18263. };
  18264. const allLetters = vue.ref([]);
  18265. function onGetAllFirstLetter(data) {
  18266. allLetters.value = data;
  18267. }
  18268. function handleLogisticsConfirm() {
  18269. uni.showModal({
  18270. title: "提示",
  18271. content: "是否确认物流签收?",
  18272. success: (res2) => {
  18273. if (res2.confirm) {
  18274. uni.showLoading({ title: "加载中...", mask: true });
  18275. uni.$u.http.post("/app/orderinfo/signLogistics", {
  18276. params: {
  18277. searchType: 1,
  18278. "search": orderId.value
  18279. }
  18280. }).then((res3) => {
  18281. if (res3.code == 200) {
  18282. uni.showToast({ title: "签收成功", icon: "none" });
  18283. uni.$u.ttsModule.speak("签收成功");
  18284. uni.navigateBack();
  18285. }
  18286. }).finally(() => {
  18287. uni.hideLoading();
  18288. });
  18289. }
  18290. }
  18291. });
  18292. }
  18293. function handleConfirm() {
  18294. uni.showModal({
  18295. title: "提示",
  18296. content: "是否确认收货?",
  18297. success: (res2) => {
  18298. if (res2.confirm) {
  18299. uni.showLoading({ title: "加载中...", mask: true });
  18300. uni.$u.http.post("/app/orderinfo/confirmOrder", {
  18301. searchType: 1,
  18302. "search": orderDetail.value.orderId
  18303. }).then((res3) => {
  18304. if (res3.code == 200) {
  18305. uni.showToast({ title: "确认收货成功", icon: "none" });
  18306. uni.$u.ttsModule.speak("确认收货成功");
  18307. getOrderDetail();
  18308. }
  18309. }).finally(() => {
  18310. uni.hideLoading();
  18311. });
  18312. }
  18313. }
  18314. });
  18315. }
  18316. function handleComplete() {
  18317. let bookList = orderDetail.value.detailVoList;
  18318. let bool = bookList.some((item) => {
  18319. var _a;
  18320. return ((_a = item.auditCommentList) == null ? void 0 : _a.length) < item.num;
  18321. });
  18322. if (bool) {
  18323. let text = "还有未审核的书";
  18324. uni.$u.toast(text);
  18325. uni.$u.ttsModule.speak(text);
  18326. return;
  18327. } else {
  18328. uni.$u.http.post("/app/orderinfo/checkOrderFinish", {
  18329. checkUserId: orderDetail.value.auditUserId,
  18330. "orderId": orderDetail.value.orderId
  18331. }).then((res2) => {
  18332. if (res2.code == 200) {
  18333. uni.showToast({ title: "审核完成", icon: "none" });
  18334. uni.$u.ttsModule.speak("审核完成");
  18335. uni.navigateBack();
  18336. }
  18337. });
  18338. }
  18339. }
  18340. const orderDetail = vue.ref({ status: 0 });
  18341. function getOrderDetail() {
  18342. if (!orderId.value)
  18343. return;
  18344. uni.showLoading({
  18345. title: "加载中...",
  18346. mask: true
  18347. });
  18348. uni.$u.http.get("/app/orderinfo/getOrderInfoForCheck", {
  18349. params: {
  18350. searchType: 1,
  18351. "search": orderId.value
  18352. }
  18353. }).then((res2) => {
  18354. if (res2.code == 200) {
  18355. orderDetail.value = res2.data;
  18356. if (isOnLoad.value) {
  18357. if (res2.data.manageRemark.length > 0 && res2.data.status < 10) {
  18358. uni.$u.ttsModule.speak("此订单有备注信息,请注意查看");
  18359. }
  18360. if (res2.data.warnArea && res2.data.warnArea.length > 0) {
  18361. let text = `此订单来源于${res2.data.warnArea}`;
  18362. uni.$u.ttsModule.speak(text);
  18363. }
  18364. isOnLoad.value = false;
  18365. if (res2.data.auditUserId) {
  18366. let auditUserInfo = {
  18367. userName: res2.data.auditUserName,
  18368. userId: res2.data.auditUserId
  18369. };
  18370. uni.setStorageSync("checkUserInfo", auditUserInfo);
  18371. } else {
  18372. let userInfo = uni.getStorageSync("userInfo");
  18373. if (userInfo) {
  18374. orderDetail.value.auditUserName = userInfo.userName;
  18375. orderDetail.value.auditUserId = userInfo.userId;
  18376. uni.setStorageSync("checkUserInfo", {
  18377. userName: userInfo.userName,
  18378. userId: userInfo.userId
  18379. });
  18380. }
  18381. }
  18382. }
  18383. } else {
  18384. uni.$u.toast(res2.msg);
  18385. }
  18386. }).finally(() => {
  18387. uni.hideLoading();
  18388. });
  18389. }
  18390. function checkIsbn(isbn) {
  18391. const isbn13Regex = /^(?:97[89]-?\d{1,5}-?\d{1,7}-?\d{1,6}-?\d)$/;
  18392. if (isbn13Regex.test(isbn)) {
  18393. return true;
  18394. }
  18395. return false;
  18396. }
  18397. function handleScan(isbn) {
  18398. if (!checkIsbn(isbn)) {
  18399. let text = `不是正确的ISBN码`;
  18400. uni.$u.ttsModule.speak(text);
  18401. return;
  18402. }
  18403. if (orderDetail.value.status == 10) {
  18404. uni.$u.ttsModule.speak("此订单已审核");
  18405. return;
  18406. }
  18407. let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
  18408. formatAppLog("log", "at pages/index/detail/index.vue:262", isbns.includes(isbn), "isbns");
  18409. if (isbns.includes(isbn)) {
  18410. let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
  18411. formatAppLog("log", "at pages/index/detail/index.vue:266", orderDetail.value.detailVoList, book, "book");
  18412. if (book.auditCommentList.every((item) => item.sts == 1)) {
  18413. let text = `${isbn}已审核为良好`;
  18414. return uni.$u.ttsModule.speak(text);
  18415. }
  18416. if (book.suit == 1) {
  18417. let text = `${isbn}请注意套装书是否齐全`;
  18418. uni.$u.ttsModule.speak(text);
  18419. }
  18420. if (book.bookWarn == 1) {
  18421. let text = `请注意${isbn}需要取出`;
  18422. uni.$u.ttsModule.speak(text);
  18423. }
  18424. uni.navigateTo({
  18425. url: `/pages/index/detail/book-audit?isbn=${isbn}&orderId=${orderDetail.value.orderId}`
  18426. });
  18427. uni.setStorageSync("auditBook", book);
  18428. uni.setStorageSync("orderDetail", orderDetail.value);
  18429. } else {
  18430. let text = `此订单中不存在${isbn}这本书 `;
  18431. uni.$u.ttsModule.speak(text);
  18432. }
  18433. }
  18434. function handleScanCode() {
  18435. uni.scanCode({
  18436. success: (res2) => {
  18437. formatAppLog("log", "at pages/index/detail/index.vue:298", typeof res2.result, "res");
  18438. res2.result && handleScan(res2.result);
  18439. }
  18440. });
  18441. }
  18442. const orderId = vue.ref("");
  18443. const isOnLoad = vue.ref(false);
  18444. const type2 = vue.ref(1);
  18445. onLoad((option) => {
  18446. orderId.value = option.id;
  18447. getOrderDetail();
  18448. isOnLoad.value = true;
  18449. type2.value = option.type || 1;
  18450. uni.removeStorageSync("scannedBooks");
  18451. uni.$u.useGlobalEvent((e) => {
  18452. if (e.barcode) {
  18453. handleScan(e.barcode);
  18454. }
  18455. });
  18456. });
  18457. onShow(() => {
  18458. getOrderDetail();
  18459. });
  18460. const __returned__ = { showAuditorSelector, selectedAuditor, handleAuditorSelected, toView, scrollToView, scrollToTop, handleBindCode, list, current, handleSectionChange, allLetters, onGetAllFirstLetter, handleLogisticsConfirm, handleConfirm, handleComplete, orderDetail, getOrderDetail, checkIsbn, handleScan, handleScanCode, orderId, isOnLoad, type: type2, ref: vue.ref, get onLoad() {
  18461. return onLoad;
  18462. }, get onShow() {
  18463. return onShow;
  18464. }, AuditorSelector, OrderInfo, UserInfoCard, LogisticsTimeline, BookInfo, FileInfo };
  18465. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18466. return __returned__;
  18467. }
  18468. };
  18469. function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
  18470. var _a;
  18471. const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$5);
  18472. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  18473. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  18474. return vue.openBlock(), vue.createElementBlock(
  18475. "view",
  18476. {
  18477. class: vue.normalizeClass(["order-detail", { "fixed-bottom-2": $setup.type == 2 }])
  18478. },
  18479. [
  18480. vue.createElementVNode("scroll-view", {
  18481. class: "scroller",
  18482. "scroll-into-view": $setup.toView,
  18483. "scroll-y": "true",
  18484. "scroll-with-animation": "true"
  18485. }, [
  18486. vue.createElementVNode("view", { class: "flex flex-a-c flex-j-b bg-white bind-audit mb-16" }, [
  18487. vue.createElementVNode("text", null, "绑定审核员"),
  18488. vue.createElementVNode(
  18489. "text",
  18490. { class: "text-center flex-1" },
  18491. vue.toDisplayString($setup.orderDetail.auditUserName || ((_a = $setup.selectedAuditor) == null ? void 0 : _a.userName) || ""),
  18492. 1
  18493. /* TEXT */
  18494. ),
  18495. vue.createElementVNode("text", {
  18496. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showAuditorSelector = true),
  18497. class: "color-primary"
  18498. }, "绑定")
  18499. ]),
  18500. vue.createVNode($setup["OrderInfo"], { detail: $setup.orderDetail }, null, 8, ["detail"]),
  18501. vue.createVNode($setup["UserInfoCard"], { detail: $setup.orderDetail }, null, 8, ["detail"]),
  18502. vue.createElementVNode("view", {
  18503. class: "mt-16",
  18504. style: { "padding": "0 6rpx" }
  18505. }, [
  18506. vue.createVNode(_component_u_subsection, {
  18507. list: $setup.list,
  18508. mode: "subsection",
  18509. current: $setup.current,
  18510. onChange: $setup.handleSectionChange
  18511. }, null, 8, ["list", "current"]),
  18512. $setup.current == 0 ? (vue.openBlock(), vue.createBlock($setup["BookInfo"], {
  18513. key: 0,
  18514. bookList: $setup.orderDetail.detailVoList,
  18515. detail: $setup.orderDetail,
  18516. onGetAllFirstLetter: $setup.onGetAllFirstLetter
  18517. }, null, 8, ["bookList", "detail"])) : vue.createCommentVNode("v-if", true),
  18518. $setup.current == 1 ? (vue.openBlock(), vue.createBlock($setup["LogisticsTimeline"], {
  18519. key: 1,
  18520. list: $setup.orderDetail.trackingVoList
  18521. }, null, 8, ["list"])) : vue.createCommentVNode("v-if", true),
  18522. $setup.current == 2 ? (vue.openBlock(), vue.createBlock($setup["FileInfo"], {
  18523. key: 2,
  18524. orderId: $setup.orderDetail.orderId
  18525. }, null, 8, ["orderId"])) : vue.createCommentVNode("v-if", true)
  18526. ])
  18527. ], 8, ["scroll-into-view"]),
  18528. vue.createElementVNode("view", { class: "fixed-left" }, [
  18529. vue.createElementVNode("view", {
  18530. class: "bind-code common-bg",
  18531. style: { "margin-bottom": "30px", "padding": "20rpx" },
  18532. onClick: $setup.handleBindCode
  18533. }, "绑码 "),
  18534. vue.createElementVNode("view", { class: "common-bg flex flex-a-c flex-j-c flex-d" }, [
  18535. vue.createElementVNode("view", {
  18536. class: "book-status-item",
  18537. onClick: _cache[1] || (_cache[1] = ($event) => $setup.scrollToView("good"))
  18538. }, "良好"),
  18539. vue.createElementVNode("view", {
  18540. class: "book-status-item item-center",
  18541. onClick: _cache[2] || (_cache[2] = ($event) => $setup.scrollToView("average"))
  18542. }, "一般"),
  18543. vue.createElementVNode("view", {
  18544. class: "book-status-item",
  18545. onClick: _cache[3] || (_cache[3] = ($event) => $setup.scrollToView("poor"))
  18546. }, "极差")
  18547. ])
  18548. ]),
  18549. vue.createElementVNode("view", { class: "fixed-right" }, [
  18550. vue.createElementVNode("view", { class: "letter-bg flex flex-a-c flex-j-c flex-d" }, [
  18551. vue.createElementVNode("view", { class: "letter-item" }, [
  18552. vue.createVNode(_component_u_icon, {
  18553. name: "arrow-up-fill",
  18554. size: "20",
  18555. color: "#ffffff",
  18556. onClick: $setup.scrollToTop
  18557. })
  18558. ]),
  18559. (vue.openBlock(true), vue.createElementBlock(
  18560. vue.Fragment,
  18561. null,
  18562. vue.renderList($setup.allLetters, (item) => {
  18563. return vue.openBlock(), vue.createElementBlock("view", {
  18564. class: "letter-item",
  18565. onClick: ($event) => $setup.scrollToView(item)
  18566. }, vue.toDisplayString(item), 9, ["onClick"]);
  18567. }),
  18568. 256
  18569. /* UNKEYED_FRAGMENT */
  18570. ))
  18571. ])
  18572. ]),
  18573. $setup.type != 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  18574. key: 0,
  18575. class: "common-bg fixed-bottom"
  18576. }, [
  18577. $setup.orderDetail.status == 5 ? (vue.openBlock(), vue.createBlock(_component_u_button, {
  18578. key: 0,
  18579. type: "warning",
  18580. size: "large",
  18581. onClick: $setup.handleLogisticsConfirm
  18582. }, {
  18583. default: vue.withCtx(() => [
  18584. vue.createTextVNode("物流签收")
  18585. ]),
  18586. _: 1
  18587. /* STABLE */
  18588. })) : vue.createCommentVNode("v-if", true),
  18589. $setup.orderDetail.status == 6 ? (vue.openBlock(), vue.createBlock(_component_u_button, {
  18590. key: 1,
  18591. type: "primary",
  18592. size: "large",
  18593. onClick: $setup.handleConfirm
  18594. }, {
  18595. default: vue.withCtx(() => [
  18596. vue.createTextVNode("确认收货")
  18597. ]),
  18598. _: 1
  18599. /* STABLE */
  18600. })) : vue.createCommentVNode("v-if", true),
  18601. $setup.orderDetail.status == 8 || $setup.orderDetail.status == 9 || $setup.orderDetail.status == 10 ? (vue.openBlock(), vue.createElementBlock(
  18602. vue.Fragment,
  18603. { key: 2 },
  18604. [
  18605. vue.createVNode(_component_u_button, {
  18606. type: "warning",
  18607. size: "large",
  18608. onClick: $setup.handleScanCode
  18609. }, {
  18610. default: vue.withCtx(() => [
  18611. vue.createTextVNode("扫码")
  18612. ]),
  18613. _: 1
  18614. /* STABLE */
  18615. }),
  18616. vue.createVNode(_component_u_button, {
  18617. type: "primary",
  18618. size: "large",
  18619. onClick: $setup.handleComplete
  18620. }, {
  18621. default: vue.withCtx(() => [
  18622. vue.createTextVNode("完成")
  18623. ]),
  18624. _: 1
  18625. /* STABLE */
  18626. })
  18627. ],
  18628. 64
  18629. /* STABLE_FRAGMENT */
  18630. )) : vue.createCommentVNode("v-if", true)
  18631. ])) : vue.createCommentVNode("v-if", true),
  18632. vue.createVNode($setup["AuditorSelector"], {
  18633. show: $setup.showAuditorSelector,
  18634. "onUpdate:show": _cache[4] || (_cache[4] = ($event) => $setup.showAuditorSelector = $event),
  18635. onAuditorSelected: $setup.handleAuditorSelected
  18636. }, null, 8, ["show"])
  18637. ],
  18638. 2
  18639. /* CLASS */
  18640. );
  18641. }
  18642. const PagesIndexDetailIndex = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$_], ["__scopeId", "data-v-8b10f148"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/index.vue"]]);
  18643. const _sfc_main$_ = {
  18644. __name: "AuditInfo",
  18645. props: {
  18646. detail: {
  18647. type: Object,
  18648. default: () => ({})
  18649. }
  18650. },
  18651. emits: ["selected"],
  18652. setup(__props, { expose: __expose, emit: __emit }) {
  18653. const props2 = __props;
  18654. const auditCommentList = vue.ref([]);
  18655. vue.watch(() => {
  18656. var _a;
  18657. return (_a = props2.detail) == null ? void 0 : _a.auditCommentList;
  18658. }, (newVal) => {
  18659. if (!newVal)
  18660. return;
  18661. auditCommentList.value = newVal.map((item) => ({
  18662. ...item,
  18663. isbn: props2.detail.isbn,
  18664. comList: item.com ? typeof item.com === "string" ? item.com.split(",") : item.com : []
  18665. }));
  18666. }, { immediate: true, deep: true });
  18667. const auditList = vue.ref([{ sts: 1, label: "品相良好" }, { sts: 2, label: "品相一般", disabled: true }, { sts: 3, label: "品相极差" }]);
  18668. const emit2 = __emit;
  18669. const radioClick = (audit, index2, sts) => {
  18670. if (sts == 2)
  18671. return;
  18672. audit.sts = sts;
  18673. auditCommentList.value[index2] = audit;
  18674. formatReason();
  18675. };
  18676. const getAuditCateNum = (cate) => {
  18677. var _a, _b;
  18678. return ((_b = (_a = props2.detail.auditCommentList) == null ? void 0 : _a.filter((item) => item.sts == cate)) == null ? void 0 : _b.length) || 0;
  18679. };
  18680. let reasonList = vue.ref([
  18681. { sts: 3, label: "明显泛黄水印/发霉/明显异味" },
  18682. { sts: 3, label: "老化泛黄褪色/污渍" },
  18683. { sts: 3, label: "明显破损/脱胶缺页/书籍变型" },
  18684. { sts: 3, label: "无此书" },
  18685. { sts: 3, label: "印刷不清晰" },
  18686. { sts: 3, label: "无防伪" },
  18687. { sts: 3, label: "无外护封/无ISBN" },
  18688. { sts: 3, label: "无此书多其他书" },
  18689. { sts: 3, label: "笔记杂乱/习题做完" },
  18690. { sts: 3, label: "有笔记贴" },
  18691. { sts: 3, label: "套装缺册" },
  18692. { sts: 3, label: "听力无光盘" },
  18693. { sts: 3, label: "图书馆/藏书印章" }
  18694. ]);
  18695. const formatReason = () => {
  18696. let list = auditCommentList.value.map((item, index2) => ({
  18697. ...item,
  18698. idx: index2,
  18699. com: item.comList.join(",")
  18700. }));
  18701. formatAppLog("log", "at pages/index/detail/components/AuditInfo.vue:92", list, "list");
  18702. return list;
  18703. };
  18704. const toggleReason = (audit, index2, item) => {
  18705. const idx = audit.comList.indexOf(item.label);
  18706. if (idx > -1) {
  18707. audit.comList.splice(idx, 1);
  18708. } else {
  18709. audit.comList.push(item.label);
  18710. }
  18711. auditCommentList.value[index2] = audit;
  18712. };
  18713. __expose({
  18714. formatReason
  18715. });
  18716. const __returned__ = { props: props2, auditCommentList, auditList, emit: emit2, radioClick, getAuditCateNum, get reasonList() {
  18717. return reasonList;
  18718. }, set reasonList(v) {
  18719. reasonList = v;
  18720. }, formatReason, toggleReason, ref: vue.ref, watch: vue.watch };
  18721. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18722. return __returned__;
  18723. }
  18724. };
  18725. function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
  18726. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$4);
  18727. return vue.openBlock(), vue.createElementBlock("view", { class: "audit-info" }, [
  18728. vue.createElementVNode(
  18729. "view",
  18730. {
  18731. class: "font-bold mt-16",
  18732. style: { "padding": "0 20rpx" }
  18733. },
  18734. " 该书共" + vue.toDisplayString($props.detail.num) + "本,其中:良好" + vue.toDisplayString($setup.getAuditCateNum(1)) + "本,一般" + vue.toDisplayString($setup.getAuditCateNum(2)) + "本,极差" + vue.toDisplayString($setup.getAuditCateNum(3)) + "本 ",
  18735. 1
  18736. /* TEXT */
  18737. ),
  18738. $setup.auditCommentList.length > 0 ? (vue.openBlock(true), vue.createElementBlock(
  18739. vue.Fragment,
  18740. { key: 0 },
  18741. vue.renderList($setup.auditCommentList, (audit, index2) => {
  18742. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  18743. vue.createElementVNode(
  18744. "view",
  18745. {
  18746. class: "mt-10 bind-code",
  18747. style: { "padding": "10rpx 20rpx" }
  18748. },
  18749. " 第" + vue.toDisplayString(index2 + 1) + "本的审核意见 ",
  18750. 1
  18751. /* TEXT */
  18752. ),
  18753. vue.createElementVNode("view", {
  18754. class: "mt-20 bg-white flex flex-j-a flex-a-c",
  18755. style: { "padding": "20rpx", "border-radius": "10rpx" }
  18756. }, [
  18757. (vue.openBlock(true), vue.createElementBlock(
  18758. vue.Fragment,
  18759. null,
  18760. vue.renderList($setup.auditList, (item, idx) => {
  18761. return vue.openBlock(), vue.createElementBlock("view", {
  18762. class: "u-page__tag-item",
  18763. key: idx
  18764. }, [
  18765. vue.createVNode(_component_u_tag, {
  18766. size: "large",
  18767. text: item.label,
  18768. plain: audit.sts != item.sts,
  18769. type: "primary",
  18770. name: item.sts,
  18771. class: vue.normalizeClass({ "disabled": item.sts == 2 }),
  18772. onClick: ($event) => $setup.radioClick(audit, index2, item.sts)
  18773. }, null, 8, ["text", "plain", "name", "class", "onClick"])
  18774. ]);
  18775. }),
  18776. 128
  18777. /* KEYED_FRAGMENT */
  18778. ))
  18779. ]),
  18780. audit.sts == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  18781. key: 0,
  18782. class: "mt-20 bg-white",
  18783. style: { "padding": "20rpx", "border-radius": "10rpx" }
  18784. }, [
  18785. vue.createElementVNode("view", { class: "flex flex-a-c flex-wrap" }, [
  18786. (vue.openBlock(true), vue.createElementBlock(
  18787. vue.Fragment,
  18788. null,
  18789. vue.renderList($setup.reasonList, (item, idx) => {
  18790. return vue.openBlock(), vue.createElementBlock("view", {
  18791. class: vue.normalizeClass(["mr-10 reason-item", { "selected": audit.comList.includes(item.label) }]),
  18792. key: idx,
  18793. onClick: ($event) => $setup.toggleReason(audit, index2, item)
  18794. }, vue.toDisplayString(item.label), 11, ["onClick"]);
  18795. }),
  18796. 128
  18797. /* KEYED_FRAGMENT */
  18798. ))
  18799. ])
  18800. ])) : vue.createCommentVNode("v-if", true)
  18801. ]);
  18802. }),
  18803. 128
  18804. /* KEYED_FRAGMENT */
  18805. )) : vue.createCommentVNode("v-if", true)
  18806. ]);
  18807. }
  18808. const AuditInfo = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$Z], ["__scopeId", "data-v-9873c737"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/AuditInfo.vue"]]);
  18809. const _sfc_main$Z = {
  18810. __name: "book-audit",
  18811. setup(__props, { expose: __expose }) {
  18812. __expose();
  18813. const detail = vue.ref({});
  18814. const getBookInfo = (isbn) => {
  18815. uni.$u.http.get(`/app/book/getBookByIsbn/${isbn}`).then((res2) => {
  18816. if (res2.code == 200) {
  18817. detail.value = res2.data;
  18818. }
  18819. });
  18820. };
  18821. const list = vue.ref(["图书审核", "绑码", "附件信息"]);
  18822. const current = vue.ref(0);
  18823. const handleSectionChange = (index2) => {
  18824. current.value = index2;
  18825. };
  18826. const auditData = vue.ref([]);
  18827. const handleAuditSelected = (data) => {
  18828. auditData.value = data.map((item, index2) => {
  18829. item.idx = index2;
  18830. formatAppLog("log", "at pages/index/detail/book-audit.vue:77", index2, item.com, "item.com", Array.isArray(item.com));
  18831. item.com = Array.isArray(item.com) ? item.com.join(",") : item.com;
  18832. return item;
  18833. });
  18834. formatAppLog("log", "at pages/index/detail/book-audit.vue:81", auditData.value, "auditData.value");
  18835. };
  18836. const scannedBooks = vue.ref([]);
  18837. function checkIsbn(isbn) {
  18838. let reg = /(?:[0-9]+\-?){9}[0-9X]|(?:978|979)\-?(?:[0-9]+\-?){10}/;
  18839. if (reg.test(isbn)) {
  18840. return true;
  18841. }
  18842. return false;
  18843. }
  18844. function handleScan(isbn) {
  18845. var _a, _b, _c;
  18846. if (!checkIsbn(isbn)) {
  18847. let text = `不是正确的ISBN码`;
  18848. uni.$u.ttsModule.speak(text);
  18849. return;
  18850. }
  18851. let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
  18852. orderDetail.value.totalNum;
  18853. if (isbns.includes(isbn)) {
  18854. let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
  18855. if (book.num == ((_a = book.auditCommentList) == null ? void 0 : _a.length)) {
  18856. let text = "";
  18857. if (book.auditCommentList.every((item) => item.sts == 1)) {
  18858. text = `${isbn}已审核为良好`;
  18859. uni.$u.ttsModule.speak(text);
  18860. return;
  18861. } else {
  18862. text = `${isbn}已审核为极差`;
  18863. scannedBooks.value.push(isbn);
  18864. uni.$u.ttsModule.speak(text);
  18865. uni.setStorageSync("scannedBooks", scannedBooks.value);
  18866. uni.navigateTo({
  18867. url: `/pages/index/detail/batch-audit?orderId=${orderId.value}`
  18868. });
  18869. }
  18870. } else {
  18871. let hasAuditNum = ((_b = book.auditCommentList) == null ? void 0 : _b.length) || 0;
  18872. let notAuditNum = book.num - hasAuditNum;
  18873. let poorNum = ((_c = book.auditCommentList) == null ? void 0 : _c.filter((item) => item.sts == 3).length) || 0;
  18874. let scannedNum = scannedBooks.value.filter((item) => item == isbn).length || 0;
  18875. if (scannedNum >= notAuditNum + poorNum) {
  18876. let text = `${isbn}已超出订单中的数量`;
  18877. return uni.$u.ttsModule.speak(text);
  18878. } else {
  18879. if (book.suit == 1) {
  18880. let text = `${isbn}请注意套装书是否齐全`;
  18881. uni.$u.ttsModule.speak(text);
  18882. }
  18883. if (book.bookWarn == 1) {
  18884. let text = `请注意${isbn}需要取出`;
  18885. uni.$u.ttsModule.speak(text);
  18886. }
  18887. if (scannedNum >= notAuditNum && scannedNum < notAuditNum + poorNum) {
  18888. let text = `${isbn}已审核为极差`;
  18889. uni.$u.ttsModule.speak(text);
  18890. }
  18891. scannedBooks.value.push(isbn);
  18892. formatAppLog("log", "at pages/index/detail/book-audit.vue:153", scannedBooks.value, "book-audit");
  18893. uni.setStorageSync("scannedBooks", scannedBooks.value);
  18894. uni.navigateTo({
  18895. url: `/pages/index/detail/batch-audit?orderId=${orderId.value}`
  18896. });
  18897. }
  18898. }
  18899. } else {
  18900. let text = `此订单中不存在${isbn}这本书 `;
  18901. uni.$u.ttsModule.speak(text);
  18902. }
  18903. }
  18904. function handleScanCode() {
  18905. uni.scanCode({
  18906. success: (res2) => {
  18907. handleScan(res2.result);
  18908. }
  18909. });
  18910. }
  18911. const auditInfoRef = vue.ref();
  18912. const handleAudit = () => {
  18913. var _a;
  18914. let checkList = (_a = auditInfoRef.value) == null ? void 0 : _a.formatReason(auditData.value);
  18915. let checkUserInfo = uni.getStorageSync("checkUserInfo");
  18916. if (checkUserInfo.userId) {
  18917. checkUserId.value = checkUserInfo.userId;
  18918. } else {
  18919. uni.$u.toast("请先选择审核人");
  18920. }
  18921. uni.$u.http.post("/app/orderinfo/checkOrder", {
  18922. "checkUserId": checkUserId.value,
  18923. "orderId": orderId.value,
  18924. "checkList": checkList
  18925. }).then((res2) => {
  18926. if (res2.code == 200) {
  18927. uni.showToast({ title: "审核成功", icon: "none" });
  18928. uni.$u.ttsModule.speak("审核成功");
  18929. uni.navigateBack();
  18930. } else {
  18931. uni.$u.toast(res2.msg);
  18932. }
  18933. });
  18934. };
  18935. const auditBook = vue.ref({});
  18936. const checkUserId = vue.ref();
  18937. const orderId = vue.ref();
  18938. const orderDetail = vue.ref({});
  18939. onLoad((options) => {
  18940. options.isbn && getBookInfo(options.isbn);
  18941. scannedBooks.value = [options.isbn];
  18942. auditBook.value = uni.getStorageSync("auditBook");
  18943. orderId.value = options.orderId;
  18944. orderDetail.value = uni.getStorageSync("orderDetail");
  18945. uni.$u.useGlobalEvent((e) => {
  18946. if (e.barcode) {
  18947. handleScan(e.barcode);
  18948. }
  18949. });
  18950. });
  18951. onShow(() => {
  18952. var _a;
  18953. checkUserId.value = (_a = uni.getStorageSync("userInfo")) == null ? void 0 : _a.userId;
  18954. });
  18955. const __returned__ = { detail, getBookInfo, list, current, handleSectionChange, auditData, handleAuditSelected, scannedBooks, checkIsbn, handleScan, handleScanCode, auditInfoRef, handleAudit, auditBook, checkUserId, orderId, orderDetail, ref: vue.ref, get onLoad() {
  18956. return onLoad;
  18957. }, get onShow() {
  18958. return onShow;
  18959. }, AuditInfo, FileInfo };
  18960. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18961. return __returned__;
  18962. }
  18963. };
  18964. function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
  18965. const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$5);
  18966. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  18967. return vue.openBlock(), vue.createElementBlock("view", { class: "book-audit" }, [
  18968. vue.createElementVNode("view", {
  18969. class: "bg-white flex flex-a-c",
  18970. style: { "padding": "20rpx", "border-radius": "10rpx" }
  18971. }, [
  18972. vue.createElementVNode("image", {
  18973. src: $setup.detail.cover,
  18974. mode: "aspectFill",
  18975. style: { "width": "80px", "height": "100px" }
  18976. }, null, 8, ["src"]),
  18977. vue.createElementVNode("view", { class: "flex flex-d flex-1 ml-20" }, [
  18978. vue.createElementVNode(
  18979. "text",
  18980. { class: "common-title mb-20" },
  18981. vue.toDisplayString($setup.detail.bookName),
  18982. 1
  18983. /* TEXT */
  18984. ),
  18985. vue.createElementVNode("text", { class: "text-sm" }, [
  18986. vue.createTextVNode("ISBN: "),
  18987. vue.createElementVNode(
  18988. "text",
  18989. { class: "color-primary" },
  18990. vue.toDisplayString($setup.detail.isbn),
  18991. 1
  18992. /* TEXT */
  18993. )
  18994. ]),
  18995. vue.createElementVNode("text", { class: "text-sm mt-6" }, [
  18996. vue.createTextVNode("作者: "),
  18997. vue.createElementVNode(
  18998. "text",
  18999. null,
  19000. vue.toDisplayString($setup.detail.author),
  19001. 1
  19002. /* TEXT */
  19003. )
  19004. ]),
  19005. vue.createElementVNode("text", { class: "text-sm mt-6" }, [
  19006. vue.createTextVNode("出版社: "),
  19007. vue.createElementVNode(
  19008. "text",
  19009. null,
  19010. vue.toDisplayString($setup.detail.publish),
  19011. 1
  19012. /* TEXT */
  19013. )
  19014. ])
  19015. ])
  19016. ]),
  19017. vue.createElementVNode("view", {
  19018. class: "mt-20 bg-white price-info",
  19019. style: { "border-radius": "10rpx" }
  19020. }, [
  19021. vue.createElementVNode("view", { class: "flex" }, [
  19022. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  19023. vue.createElementVNode("text", { class: "label" }, "定价"),
  19024. vue.createElementVNode(
  19025. "text",
  19026. { class: "content" },
  19027. vue.toDisplayString($setup.detail.price),
  19028. 1
  19029. /* TEXT */
  19030. )
  19031. ]),
  19032. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  19033. vue.createElementVNode("text", { class: "label" }, "回收折扣"),
  19034. vue.createElementVNode(
  19035. "text",
  19036. { class: "content" },
  19037. vue.toDisplayString($setup.detail.recycleDiscount),
  19038. 1
  19039. /* TEXT */
  19040. )
  19041. ])
  19042. ]),
  19043. vue.createElementVNode("view", { class: "flex flex-a-c" }, [
  19044. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  19045. vue.createElementVNode("text", { class: "label" }, "预估金额"),
  19046. vue.createElementVNode(
  19047. "text",
  19048. { class: "content" },
  19049. vue.toDisplayString($setup.detail.price),
  19050. 1
  19051. /* TEXT */
  19052. )
  19053. ]),
  19054. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  19055. vue.createElementVNode("text", { class: "label" }, "审核金额"),
  19056. vue.createElementVNode("text", { class: "content" }, vue.toDisplayString("0.00"))
  19057. ])
  19058. ])
  19059. ]),
  19060. vue.createElementVNode("view", { class: "mt-20" }, [
  19061. vue.createVNode(_component_u_subsection, {
  19062. list: $setup.list,
  19063. mode: "subsection",
  19064. current: $setup.current,
  19065. onChange: $setup.handleSectionChange
  19066. }, null, 8, ["list", "current"]),
  19067. $setup.current == 0 ? (vue.openBlock(), vue.createBlock($setup["AuditInfo"], {
  19068. key: 0,
  19069. detail: $setup.auditBook,
  19070. ref: "auditInfoRef"
  19071. }, null, 8, ["detail"])) : vue.createCommentVNode("v-if", true),
  19072. $setup.current == 2 ? (vue.openBlock(), vue.createBlock($setup["FileInfo"], {
  19073. key: 1,
  19074. orderId: $setup.orderId,
  19075. annexType: 2,
  19076. isbn: $setup.auditBook.isbn
  19077. }, null, 8, ["orderId", "isbn"])) : vue.createCommentVNode("v-if", true)
  19078. ]),
  19079. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  19080. vue.createVNode(_component_u_button, {
  19081. type: "warning",
  19082. size: "large",
  19083. onClick: $setup.handleScanCode
  19084. }, {
  19085. default: vue.withCtx(() => [
  19086. vue.createTextVNode("扫码")
  19087. ]),
  19088. _: 1
  19089. /* STABLE */
  19090. }),
  19091. vue.createVNode(_component_u_button, {
  19092. type: "primary",
  19093. size: "large",
  19094. onClick: $setup.handleAudit
  19095. }, {
  19096. default: vue.withCtx(() => [
  19097. vue.createTextVNode("确定")
  19098. ]),
  19099. _: 1
  19100. /* STABLE */
  19101. })
  19102. ])
  19103. ]);
  19104. }
  19105. const PagesIndexDetailBookAudit = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$Y], ["__scopeId", "data-v-376f8a68"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/book-audit.vue"]]);
  19106. const _sfc_main$Y = {
  19107. __name: "BookItem2",
  19108. props: {
  19109. item: Object,
  19110. showClose: {
  19111. type: Boolean,
  19112. default: false
  19113. }
  19114. },
  19115. emits: ["close"],
  19116. setup(__props, { expose: __expose, emit: __emit }) {
  19117. __expose();
  19118. const props2 = __props;
  19119. const emit2 = __emit;
  19120. const handleClose = () => {
  19121. emit2("close", props2.item.isbn);
  19122. };
  19123. const __returned__ = { props: props2, emit: emit2, handleClose, computed: vue.computed };
  19124. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19125. return __returned__;
  19126. }
  19127. };
  19128. function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
  19129. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  19130. return vue.openBlock(), vue.createElementBlock(
  19131. "view",
  19132. {
  19133. class: vue.normalizeClass(["card", { "card-close": $props.showClose }])
  19134. },
  19135. [
  19136. vue.createElementVNode("view", { class: "flex w100" }, [
  19137. vue.createElementVNode("view", { class: "flex-d" }, [
  19138. vue.createElementVNode("image", {
  19139. style: { "width": "70px", "height": "90px" },
  19140. src: $props.item.cover,
  19141. mode: "aspectFill"
  19142. }, null, 8, ["src"]),
  19143. !$props.showClose ? (vue.openBlock(), vue.createElementBlock(
  19144. "view",
  19145. {
  19146. key: 0,
  19147. class: "quantity mt-24"
  19148. },
  19149. "数量: " + vue.toDisplayString($props.item.num),
  19150. 1
  19151. /* TEXT */
  19152. )) : vue.createCommentVNode("v-if", true)
  19153. ]),
  19154. vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
  19155. vue.createElementVNode(
  19156. "view",
  19157. { class: "common-title mb-20" },
  19158. vue.toDisplayString($props.item.bookName),
  19159. 1
  19160. /* TEXT */
  19161. ),
  19162. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  19163. vue.createElementVNode(
  19164. "view",
  19165. { class: "isbn" },
  19166. "ISBN: " + vue.toDisplayString($props.item.isbn),
  19167. 1
  19168. /* TEXT */
  19169. ),
  19170. vue.createElementVNode(
  19171. "view",
  19172. { class: "set" },
  19173. "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "不是"),
  19174. 1
  19175. /* TEXT */
  19176. )
  19177. ]),
  19178. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  19179. vue.createElementVNode(
  19180. "view",
  19181. { class: "price" },
  19182. "定价: " + vue.toDisplayString($props.item.price),
  19183. 1
  19184. /* TEXT */
  19185. ),
  19186. vue.createElementVNode(
  19187. "view",
  19188. { class: "estimate" },
  19189. "预估单价: " + vue.toDisplayString($props.item.expectMoney || 0),
  19190. 1
  19191. /* TEXT */
  19192. )
  19193. ]),
  19194. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  19195. vue.createElementVNode(
  19196. "view",
  19197. { class: "discount" },
  19198. "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
  19199. 1
  19200. /* TEXT */
  19201. ),
  19202. vue.createElementVNode("view", { class: "review" }, [
  19203. vue.createTextVNode("审核金额: "),
  19204. vue.createElementVNode(
  19205. "text",
  19206. { class: "color-red" },
  19207. vue.toDisplayString($props.item.review || 0),
  19208. 1
  19209. /* TEXT */
  19210. )
  19211. ])
  19212. ])
  19213. ])
  19214. ]),
  19215. $props.showClose ? (vue.openBlock(), vue.createElementBlock("view", {
  19216. key: 0,
  19217. class: "quantity-icon mt-24"
  19218. }, [
  19219. vue.createVNode(_component_u_icon, {
  19220. name: "close-circle-fill",
  19221. size: "18",
  19222. color: "#999",
  19223. onClick: $setup.handleClose
  19224. })
  19225. ])) : vue.createCommentVNode("v-if", true)
  19226. ],
  19227. 2
  19228. /* CLASS */
  19229. );
  19230. }
  19231. const BookItem$1 = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$X], ["__scopeId", "data-v-469f67ea"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/components/BookItem2.vue"]]);
  19232. const _sfc_main$X = {
  19233. __name: "batch-audit",
  19234. setup(__props, { expose: __expose }) {
  19235. __expose();
  19236. const detailMap = vue.ref({});
  19237. const scannedBooksDetail = vue.ref([]);
  19238. const getBookInfo = (isbn) => {
  19239. if (detailMap.value[isbn]) {
  19240. scannedBooksDetail.value.push(detailMap.value[isbn]);
  19241. return;
  19242. }
  19243. uni.$u.http.get(`/app/book/getSimpleBookInfoByIsbn/${isbn}`).then((res2) => {
  19244. if (res2.code == 200) {
  19245. detailMap.value[isbn] = res2.data;
  19246. scannedBooksDetail.value.push(res2.data);
  19247. formatAppLog("log", "at pages/index/detail/batch-audit.vue:38", scannedBooksDetail.value, "xxaaxx");
  19248. }
  19249. });
  19250. };
  19251. function checkIsbn(isbn) {
  19252. let reg = /(?:[0-9]+\-?){9}[0-9X]|(?:978|979)\-?(?:[0-9]+\-?){10}/;
  19253. if (reg.test(isbn)) {
  19254. return true;
  19255. }
  19256. return false;
  19257. }
  19258. const scannedBooks = vue.ref([]);
  19259. function handleScan(isbn) {
  19260. var _a, _b, _c;
  19261. if (!checkIsbn(isbn)) {
  19262. let text = `不是正确的ISBN码`;
  19263. uni.$u.ttsModule.speak(text);
  19264. return;
  19265. }
  19266. let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
  19267. orderDetail.value.totalNum;
  19268. if (isbns.includes(isbn)) {
  19269. let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
  19270. if (book.num == ((_a = book.auditCommentList) == null ? void 0 : _a.length)) {
  19271. let text = "";
  19272. if (book.auditCommentList.every((item) => item.sts == 1)) {
  19273. text = `${isbn}已审核为良好`;
  19274. uni.$u.ttsModule.speak(text);
  19275. return;
  19276. } else {
  19277. text = `${isbn}已审核为极差`;
  19278. scannedBooks.value.push(isbn);
  19279. uni.$u.ttsModule.speak(text);
  19280. getBookInfo(isbn);
  19281. }
  19282. } else {
  19283. let hasAuditNum = ((_b = book.auditCommentList) == null ? void 0 : _b.length) || 0;
  19284. let notAuditNum = book.num - hasAuditNum;
  19285. let poorNum = ((_c = book.auditCommentList) == null ? void 0 : _c.filter((item) => item.sts == 3).length) || 0;
  19286. let scannedNum = scannedBooks.value.filter((item) => item == isbn).length || 0;
  19287. formatAppLog("log", "at pages/index/detail/batch-audit.vue:86", scannedNum, poorNum, notAuditNum, "scannedNum");
  19288. if (scannedNum >= notAuditNum + poorNum) {
  19289. let text = `${isbn}已超出订单中的数量`;
  19290. return uni.$u.ttsModule.speak(text);
  19291. } else {
  19292. if (book.suit == 1) {
  19293. let text = `${isbn}请注意套装书是否齐全`;
  19294. uni.$u.ttsModule.speak(text);
  19295. }
  19296. if (book.bookWarn == 1) {
  19297. let text = `请注意${isbn}需要取出`;
  19298. uni.$u.ttsModule.speak(text);
  19299. }
  19300. if (scannedNum >= notAuditNum && scannedNum < notAuditNum + poorNum) {
  19301. let text = `${isbn}已审核为极差`;
  19302. uni.$u.ttsModule.speak(text);
  19303. }
  19304. scannedBooks.value.push(isbn);
  19305. getBookInfo(isbn);
  19306. }
  19307. }
  19308. } else {
  19309. let text = `此订单中不存在${isbn}这本书 `;
  19310. uni.$u.ttsModule.speak(text);
  19311. }
  19312. }
  19313. function handleScanCode() {
  19314. uni.scanCode({
  19315. success: (res2) => {
  19316. handleScan(res2.result);
  19317. }
  19318. });
  19319. }
  19320. const checkUserId = vue.ref();
  19321. const orderId = vue.ref();
  19322. const orderDetail = vue.ref({});
  19323. const showModal = vue.ref(false);
  19324. const isQualitySelected = vue.ref(false);
  19325. const showQualityModal = () => {
  19326. showModal.value = true;
  19327. };
  19328. const closeModal = () => {
  19329. showModal.value = false;
  19330. };
  19331. const toggleQuality = () => {
  19332. isQualitySelected.value = !isQualitySelected.value;
  19333. };
  19334. const handleAudit = () => {
  19335. if (!isQualitySelected.value) {
  19336. uni.$u.toast("请选择品相");
  19337. uni.$u.ttsModule.speak("请选择品相");
  19338. return;
  19339. }
  19340. let checkUserInfo = uni.getStorageSync("checkUserInfo");
  19341. if (checkUserInfo.userId) {
  19342. checkUserId.value = checkUserInfo.userId;
  19343. }
  19344. uni.$u.http.post("/app/orderinfo/checkOrder", {
  19345. "checkUserId": checkUserId.value,
  19346. "orderId": orderId.value,
  19347. "checkList": scannedBooks.value.map((isbn) => ({ sts: 1, com: "", isbn }))
  19348. }).then((res2) => {
  19349. if (res2.code == 200) {
  19350. uni.showToast({ title: "审核成功", icon: "none" });
  19351. uni.$u.ttsModule.speak("审核成功");
  19352. uni.navigateBack({ delta: 2 });
  19353. } else {
  19354. uni.$u.toast(res2.msg);
  19355. }
  19356. });
  19357. };
  19358. onLoad((options) => {
  19359. orderId.value = options.orderId;
  19360. orderDetail.value = uni.getStorageSync("orderDetail");
  19361. scannedBooks.value = uni.getStorageSync("scannedBooks");
  19362. scannedBooks.value.forEach((isbn) => {
  19363. getBookInfo(isbn);
  19364. });
  19365. uni.$u.useGlobalEvent((e) => {
  19366. if (e.barcode) {
  19367. handleScan(e.barcode);
  19368. }
  19369. });
  19370. });
  19371. const __returned__ = { detailMap, scannedBooksDetail, getBookInfo, checkIsbn, scannedBooks, handleScan, handleScanCode, checkUserId, orderId, orderDetail, showModal, isQualitySelected, showQualityModal, closeModal, toggleQuality, handleAudit, ref: vue.ref, get onLoad() {
  19372. return onLoad;
  19373. }, get onShow() {
  19374. return onShow;
  19375. }, BookItem: BookItem$1 };
  19376. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19377. return __returned__;
  19378. }
  19379. };
  19380. function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
  19381. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  19382. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$2);
  19383. return vue.openBlock(), vue.createElementBlock("view", { class: "batch-audit" }, [
  19384. (vue.openBlock(true), vue.createElementBlock(
  19385. vue.Fragment,
  19386. null,
  19387. vue.renderList($setup.scannedBooksDetail, (item) => {
  19388. return vue.openBlock(), vue.createBlock($setup["BookItem"], {
  19389. key: item.isbn,
  19390. item,
  19391. showClose: ""
  19392. }, null, 8, ["item"]);
  19393. }),
  19394. 128
  19395. /* KEYED_FRAGMENT */
  19396. )),
  19397. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  19398. vue.createVNode(_component_u_button, {
  19399. type: "warning",
  19400. size: "large",
  19401. onClick: $setup.handleScanCode
  19402. }, {
  19403. default: vue.withCtx(() => [
  19404. vue.createTextVNode("扫码")
  19405. ]),
  19406. _: 1
  19407. /* STABLE */
  19408. }),
  19409. vue.createVNode(_component_u_button, {
  19410. type: "primary",
  19411. size: "large",
  19412. onClick: $setup.showQualityModal
  19413. }, {
  19414. default: vue.withCtx(() => [
  19415. vue.createTextVNode("确定")
  19416. ]),
  19417. _: 1
  19418. /* STABLE */
  19419. })
  19420. ]),
  19421. vue.createVNode(_component_u_modal, {
  19422. show: $setup.showModal,
  19423. title: "品相选择",
  19424. onCancel: $setup.closeModal,
  19425. showCancelButton: true,
  19426. closeOnClickOverlay: true,
  19427. onConfirm: $setup.handleAudit
  19428. }, {
  19429. default: vue.withCtx(() => [
  19430. vue.createElementVNode("view", { class: "quality-selector" }, [
  19431. vue.createElementVNode(
  19432. "view",
  19433. {
  19434. class: vue.normalizeClass(["quality-circle", { "selected": $setup.isQualitySelected }]),
  19435. onClick: $setup.toggleQuality
  19436. },
  19437. [
  19438. vue.createElementVNode("text", null, "良好")
  19439. ],
  19440. 2
  19441. /* CLASS */
  19442. )
  19443. ])
  19444. ]),
  19445. _: 1
  19446. /* STABLE */
  19447. }, 8, ["show"])
  19448. ]);
  19449. }
  19450. const PagesIndexDetailBatchAudit = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$W], ["__scopeId", "data-v-bc156c69"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/batch-audit.vue"]]);
  19451. const _sfc_main$W = {
  19452. __name: "sender",
  19453. setup(__props, { expose: __expose }) {
  19454. __expose();
  19455. const otherParams = vue.ref({
  19456. search: ""
  19457. });
  19458. const scrollRef = vue.ref(null);
  19459. const refreshList = () => {
  19460. var _a;
  19461. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  19462. };
  19463. let dataList = vue.ref([]);
  19464. const updateList = (data, page2) => {
  19465. dataList.value = data;
  19466. if (!isSearch.value)
  19467. return;
  19468. if (data.length > 0) {
  19469. uni.$u.ttsModule.speak("查询到" + data.length + "条数据");
  19470. } else {
  19471. uni.$u.ttsModule.speak("未查询到数据");
  19472. }
  19473. isSearch.value = false;
  19474. };
  19475. const isSearch = vue.ref(false);
  19476. const handleSearch = () => {
  19477. isSearch.value = true;
  19478. refreshList();
  19479. };
  19480. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  19481. return dataList;
  19482. }, set dataList(v) {
  19483. dataList = v;
  19484. }, updateList, isSearch, handleSearch, reactive: vue.reactive, PageScroll, OrderItem: orderItem, ref: vue.ref, get onLoad() {
  19485. return onLoad;
  19486. } };
  19487. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19488. return __returned__;
  19489. }
  19490. };
  19491. function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
  19492. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  19493. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$3);
  19494. return vue.openBlock(), vue.createElementBlock("view", {
  19495. class: "common-page",
  19496. style: { "padding": "0" }
  19497. }, [
  19498. vue.createVNode($setup["PageScroll"], {
  19499. requestStr: "/app/orderinfo/getOrderListByUserInfo",
  19500. onUpdateList: $setup.updateList,
  19501. ref: "scrollRef",
  19502. otherParams: $setup.otherParams
  19503. }, {
  19504. default: vue.withCtx(() => [
  19505. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  19506. default: vue.withCtx(() => [
  19507. vue.createElementVNode("view", { class: "search-area" }, [
  19508. vue.createVNode(_component_u_search, {
  19509. placeholder: "请输入发件人姓名或电话",
  19510. searchIconSize: 18,
  19511. bgColor: "#f6f7f6",
  19512. onSearch: $setup.handleSearch,
  19513. modelValue: $setup.otherParams.search,
  19514. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.otherParams.search = $event),
  19515. "custom-style": "font-size:32rpx",
  19516. "placeholder-style": "font-size:32rpx",
  19517. clearabled: true,
  19518. focus: false,
  19519. showAction: false,
  19520. height: 36
  19521. }, null, 8, ["modelValue"])
  19522. ])
  19523. ]),
  19524. _: 1
  19525. /* STABLE */
  19526. }),
  19527. $setup.dataList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  19528. key: 0,
  19529. class: "list-con"
  19530. }, [
  19531. (vue.openBlock(true), vue.createElementBlock(
  19532. vue.Fragment,
  19533. null,
  19534. vue.renderList($setup.dataList, (cell) => {
  19535. return vue.openBlock(), vue.createBlock($setup["OrderItem"], {
  19536. key: cell.id,
  19537. item: cell,
  19538. class: "mt-20"
  19539. }, null, 8, ["item"]);
  19540. }),
  19541. 128
  19542. /* KEYED_FRAGMENT */
  19543. ))
  19544. ])) : vue.createCommentVNode("v-if", true)
  19545. ]),
  19546. _: 1
  19547. /* STABLE */
  19548. }, 8, ["otherParams"])
  19549. ]);
  19550. }
  19551. const PagesIndexAuditSender = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$V], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/sender.vue"]]);
  19552. const _sfc_main$V = {
  19553. __name: "audit",
  19554. setup(__props, { expose: __expose }) {
  19555. __expose();
  19556. const otherParams = vue.ref({
  19557. sender: ""
  19558. });
  19559. const scrollRef = vue.ref(null);
  19560. const refreshList = () => {
  19561. var _a;
  19562. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  19563. };
  19564. let dataList = vue.ref([{
  19565. date: "2024-10-24",
  19566. orderNum: 423,
  19567. auditNum: 293,
  19568. trueNum: 323
  19569. }, {
  19570. date: "2024-10-24",
  19571. orderNum: 423,
  19572. auditNum: 293,
  19573. trueNum: 323
  19574. }, {
  19575. date: "2024-10-24",
  19576. orderNum: 423,
  19577. auditNum: 293,
  19578. trueNum: 323
  19579. }]);
  19580. const updateList = (data) => {
  19581. dataList.value = data;
  19582. };
  19583. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  19584. return dataList;
  19585. }, set dataList(v) {
  19586. dataList = v;
  19587. }, updateList, reactive: vue.reactive, PageScroll, ref: vue.ref, get onLoad() {
  19588. return onLoad;
  19589. } };
  19590. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19591. return __returned__;
  19592. }
  19593. };
  19594. function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
  19595. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$3);
  19596. return vue.openBlock(), vue.createElementBlock("view", {
  19597. class: "common-page",
  19598. style: { "padding": "0" }
  19599. }, [
  19600. vue.createVNode($setup["PageScroll"], {
  19601. requestStr: "/team/token/shop/invite/page",
  19602. onUpdateList: $setup.updateList,
  19603. ref: "scrollRef",
  19604. otherParams: $setup.otherParams
  19605. }, {
  19606. default: vue.withCtx(() => [
  19607. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  19608. default: vue.withCtx(() => [
  19609. vue.createElementVNode("view", { class: "search-area flex-a" }, [
  19610. vue.createElementVNode("view", { class: "text-item flex-1" }, "审核日期"),
  19611. vue.createElementVNode("view", { class: "text-item flex-1" }, "订单数量"),
  19612. vue.createElementVNode("view", { class: "text-item flex-1" }, "审书数量"),
  19613. vue.createElementVNode("view", { class: "text-item flex-1" }, "实际回收")
  19614. ])
  19615. ]),
  19616. _: 1
  19617. /* STABLE */
  19618. }),
  19619. vue.createElementVNode("view", { class: "list-con" }, [
  19620. (vue.openBlock(true), vue.createElementBlock(
  19621. vue.Fragment,
  19622. null,
  19623. vue.renderList($setup.dataList, (item, index2) => {
  19624. return vue.openBlock(), vue.createElementBlock("view", {
  19625. key: index2,
  19626. class: "flex-a"
  19627. }, [
  19628. vue.createElementVNode(
  19629. "view",
  19630. { class: "text-item flex-1" },
  19631. vue.toDisplayString(item.date),
  19632. 1
  19633. /* TEXT */
  19634. ),
  19635. vue.createElementVNode(
  19636. "view",
  19637. { class: "text-item flex-1" },
  19638. vue.toDisplayString(item.orderNum),
  19639. 1
  19640. /* TEXT */
  19641. ),
  19642. vue.createElementVNode(
  19643. "view",
  19644. { class: "text-item flex-1" },
  19645. vue.toDisplayString(item.auditNum),
  19646. 1
  19647. /* TEXT */
  19648. ),
  19649. vue.createElementVNode(
  19650. "view",
  19651. { class: "text-item flex-1" },
  19652. vue.toDisplayString(item.trueNum),
  19653. 1
  19654. /* TEXT */
  19655. )
  19656. ]);
  19657. }),
  19658. 128
  19659. /* KEYED_FRAGMENT */
  19660. ))
  19661. ])
  19662. ]),
  19663. _: 1
  19664. /* STABLE */
  19665. }, 8, ["otherParams"])
  19666. ]);
  19667. }
  19668. const PagesIndexStatisticAudit = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$U], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/audit.vue"]]);
  19669. const icons = {
  19670. "id": "2852637",
  19671. "name": "uniui图标库",
  19672. "font_family": "uniicons",
  19673. "css_prefix_text": "uniui-",
  19674. "description": "",
  19675. "glyphs": [
  19676. {
  19677. "icon_id": "25027049",
  19678. "name": "yanse",
  19679. "font_class": "color",
  19680. "unicode": "e6cf",
  19681. "unicode_decimal": 59087
  19682. },
  19683. {
  19684. "icon_id": "25027048",
  19685. "name": "wallet",
  19686. "font_class": "wallet",
  19687. "unicode": "e6b1",
  19688. "unicode_decimal": 59057
  19689. },
  19690. {
  19691. "icon_id": "25015720",
  19692. "name": "settings-filled",
  19693. "font_class": "settings-filled",
  19694. "unicode": "e6ce",
  19695. "unicode_decimal": 59086
  19696. },
  19697. {
  19698. "icon_id": "25015434",
  19699. "name": "shimingrenzheng-filled",
  19700. "font_class": "auth-filled",
  19701. "unicode": "e6cc",
  19702. "unicode_decimal": 59084
  19703. },
  19704. {
  19705. "icon_id": "24934246",
  19706. "name": "shop-filled",
  19707. "font_class": "shop-filled",
  19708. "unicode": "e6cd",
  19709. "unicode_decimal": 59085
  19710. },
  19711. {
  19712. "icon_id": "24934159",
  19713. "name": "staff-filled-01",
  19714. "font_class": "staff-filled",
  19715. "unicode": "e6cb",
  19716. "unicode_decimal": 59083
  19717. },
  19718. {
  19719. "icon_id": "24932461",
  19720. "name": "VIP-filled",
  19721. "font_class": "vip-filled",
  19722. "unicode": "e6c6",
  19723. "unicode_decimal": 59078
  19724. },
  19725. {
  19726. "icon_id": "24932462",
  19727. "name": "plus_circle_fill",
  19728. "font_class": "plus-filled",
  19729. "unicode": "e6c7",
  19730. "unicode_decimal": 59079
  19731. },
  19732. {
  19733. "icon_id": "24932463",
  19734. "name": "folder_add-filled",
  19735. "font_class": "folder-add-filled",
  19736. "unicode": "e6c8",
  19737. "unicode_decimal": 59080
  19738. },
  19739. {
  19740. "icon_id": "24932464",
  19741. "name": "yanse-filled",
  19742. "font_class": "color-filled",
  19743. "unicode": "e6c9",
  19744. "unicode_decimal": 59081
  19745. },
  19746. {
  19747. "icon_id": "24932465",
  19748. "name": "tune-filled",
  19749. "font_class": "tune-filled",
  19750. "unicode": "e6ca",
  19751. "unicode_decimal": 59082
  19752. },
  19753. {
  19754. "icon_id": "24932455",
  19755. "name": "a-rilidaka-filled",
  19756. "font_class": "calendar-filled",
  19757. "unicode": "e6c0",
  19758. "unicode_decimal": 59072
  19759. },
  19760. {
  19761. "icon_id": "24932456",
  19762. "name": "notification-filled",
  19763. "font_class": "notification-filled",
  19764. "unicode": "e6c1",
  19765. "unicode_decimal": 59073
  19766. },
  19767. {
  19768. "icon_id": "24932457",
  19769. "name": "wallet-filled",
  19770. "font_class": "wallet-filled",
  19771. "unicode": "e6c2",
  19772. "unicode_decimal": 59074
  19773. },
  19774. {
  19775. "icon_id": "24932458",
  19776. "name": "paihangbang-filled",
  19777. "font_class": "medal-filled",
  19778. "unicode": "e6c3",
  19779. "unicode_decimal": 59075
  19780. },
  19781. {
  19782. "icon_id": "24932459",
  19783. "name": "gift-filled",
  19784. "font_class": "gift-filled",
  19785. "unicode": "e6c4",
  19786. "unicode_decimal": 59076
  19787. },
  19788. {
  19789. "icon_id": "24932460",
  19790. "name": "fire-filled",
  19791. "font_class": "fire-filled",
  19792. "unicode": "e6c5",
  19793. "unicode_decimal": 59077
  19794. },
  19795. {
  19796. "icon_id": "24928001",
  19797. "name": "refreshempty",
  19798. "font_class": "refreshempty",
  19799. "unicode": "e6bf",
  19800. "unicode_decimal": 59071
  19801. },
  19802. {
  19803. "icon_id": "24926853",
  19804. "name": "location-ellipse",
  19805. "font_class": "location-filled",
  19806. "unicode": "e6af",
  19807. "unicode_decimal": 59055
  19808. },
  19809. {
  19810. "icon_id": "24926735",
  19811. "name": "person-filled",
  19812. "font_class": "person-filled",
  19813. "unicode": "e69d",
  19814. "unicode_decimal": 59037
  19815. },
  19816. {
  19817. "icon_id": "24926703",
  19818. "name": "personadd-filled",
  19819. "font_class": "personadd-filled",
  19820. "unicode": "e698",
  19821. "unicode_decimal": 59032
  19822. },
  19823. {
  19824. "icon_id": "24923351",
  19825. "name": "back",
  19826. "font_class": "back",
  19827. "unicode": "e6b9",
  19828. "unicode_decimal": 59065
  19829. },
  19830. {
  19831. "icon_id": "24923352",
  19832. "name": "forward",
  19833. "font_class": "forward",
  19834. "unicode": "e6ba",
  19835. "unicode_decimal": 59066
  19836. },
  19837. {
  19838. "icon_id": "24923353",
  19839. "name": "arrowthinright",
  19840. "font_class": "arrow-right",
  19841. "unicode": "e6bb",
  19842. "unicode_decimal": 59067
  19843. },
  19844. {
  19845. "icon_id": "24923353",
  19846. "name": "arrowthinright",
  19847. "font_class": "arrowthinright",
  19848. "unicode": "e6bb",
  19849. "unicode_decimal": 59067
  19850. },
  19851. {
  19852. "icon_id": "24923354",
  19853. "name": "arrowthinleft",
  19854. "font_class": "arrow-left",
  19855. "unicode": "e6bc",
  19856. "unicode_decimal": 59068
  19857. },
  19858. {
  19859. "icon_id": "24923354",
  19860. "name": "arrowthinleft",
  19861. "font_class": "arrowthinleft",
  19862. "unicode": "e6bc",
  19863. "unicode_decimal": 59068
  19864. },
  19865. {
  19866. "icon_id": "24923355",
  19867. "name": "arrowthinup",
  19868. "font_class": "arrow-up",
  19869. "unicode": "e6bd",
  19870. "unicode_decimal": 59069
  19871. },
  19872. {
  19873. "icon_id": "24923355",
  19874. "name": "arrowthinup",
  19875. "font_class": "arrowthinup",
  19876. "unicode": "e6bd",
  19877. "unicode_decimal": 59069
  19878. },
  19879. {
  19880. "icon_id": "24923356",
  19881. "name": "arrowthindown",
  19882. "font_class": "arrow-down",
  19883. "unicode": "e6be",
  19884. "unicode_decimal": 59070
  19885. },
  19886. {
  19887. "icon_id": "24923356",
  19888. "name": "arrowthindown",
  19889. "font_class": "arrowthindown",
  19890. "unicode": "e6be",
  19891. "unicode_decimal": 59070
  19892. },
  19893. {
  19894. "icon_id": "24923349",
  19895. "name": "arrowdown",
  19896. "font_class": "bottom",
  19897. "unicode": "e6b8",
  19898. "unicode_decimal": 59064
  19899. },
  19900. {
  19901. "icon_id": "24923349",
  19902. "name": "arrowdown",
  19903. "font_class": "arrowdown",
  19904. "unicode": "e6b8",
  19905. "unicode_decimal": 59064
  19906. },
  19907. {
  19908. "icon_id": "24923346",
  19909. "name": "arrowright",
  19910. "font_class": "right",
  19911. "unicode": "e6b5",
  19912. "unicode_decimal": 59061
  19913. },
  19914. {
  19915. "icon_id": "24923346",
  19916. "name": "arrowright",
  19917. "font_class": "arrowright",
  19918. "unicode": "e6b5",
  19919. "unicode_decimal": 59061
  19920. },
  19921. {
  19922. "icon_id": "24923347",
  19923. "name": "arrowup",
  19924. "font_class": "top",
  19925. "unicode": "e6b6",
  19926. "unicode_decimal": 59062
  19927. },
  19928. {
  19929. "icon_id": "24923347",
  19930. "name": "arrowup",
  19931. "font_class": "arrowup",
  19932. "unicode": "e6b6",
  19933. "unicode_decimal": 59062
  19934. },
  19935. {
  19936. "icon_id": "24923348",
  19937. "name": "arrowleft",
  19938. "font_class": "left",
  19939. "unicode": "e6b7",
  19940. "unicode_decimal": 59063
  19941. },
  19942. {
  19943. "icon_id": "24923348",
  19944. "name": "arrowleft",
  19945. "font_class": "arrowleft",
  19946. "unicode": "e6b7",
  19947. "unicode_decimal": 59063
  19948. },
  19949. {
  19950. "icon_id": "24923334",
  19951. "name": "eye",
  19952. "font_class": "eye",
  19953. "unicode": "e651",
  19954. "unicode_decimal": 58961
  19955. },
  19956. {
  19957. "icon_id": "24923335",
  19958. "name": "eye-filled",
  19959. "font_class": "eye-filled",
  19960. "unicode": "e66a",
  19961. "unicode_decimal": 58986
  19962. },
  19963. {
  19964. "icon_id": "24923336",
  19965. "name": "eye-slash",
  19966. "font_class": "eye-slash",
  19967. "unicode": "e6b3",
  19968. "unicode_decimal": 59059
  19969. },
  19970. {
  19971. "icon_id": "24923337",
  19972. "name": "eye-slash-filled",
  19973. "font_class": "eye-slash-filled",
  19974. "unicode": "e6b4",
  19975. "unicode_decimal": 59060
  19976. },
  19977. {
  19978. "icon_id": "24923305",
  19979. "name": "info-filled",
  19980. "font_class": "info-filled",
  19981. "unicode": "e649",
  19982. "unicode_decimal": 58953
  19983. },
  19984. {
  19985. "icon_id": "24923299",
  19986. "name": "reload-01",
  19987. "font_class": "reload",
  19988. "unicode": "e6b2",
  19989. "unicode_decimal": 59058
  19990. },
  19991. {
  19992. "icon_id": "24923195",
  19993. "name": "mic_slash_fill",
  19994. "font_class": "micoff-filled",
  19995. "unicode": "e6b0",
  19996. "unicode_decimal": 59056
  19997. },
  19998. {
  19999. "icon_id": "24923165",
  20000. "name": "map-pin-ellipse",
  20001. "font_class": "map-pin-ellipse",
  20002. "unicode": "e6ac",
  20003. "unicode_decimal": 59052
  20004. },
  20005. {
  20006. "icon_id": "24923166",
  20007. "name": "map-pin",
  20008. "font_class": "map-pin",
  20009. "unicode": "e6ad",
  20010. "unicode_decimal": 59053
  20011. },
  20012. {
  20013. "icon_id": "24923167",
  20014. "name": "location",
  20015. "font_class": "location",
  20016. "unicode": "e6ae",
  20017. "unicode_decimal": 59054
  20018. },
  20019. {
  20020. "icon_id": "24923064",
  20021. "name": "starhalf",
  20022. "font_class": "starhalf",
  20023. "unicode": "e683",
  20024. "unicode_decimal": 59011
  20025. },
  20026. {
  20027. "icon_id": "24923065",
  20028. "name": "star",
  20029. "font_class": "star",
  20030. "unicode": "e688",
  20031. "unicode_decimal": 59016
  20032. },
  20033. {
  20034. "icon_id": "24923066",
  20035. "name": "star-filled",
  20036. "font_class": "star-filled",
  20037. "unicode": "e68f",
  20038. "unicode_decimal": 59023
  20039. },
  20040. {
  20041. "icon_id": "24899646",
  20042. "name": "a-rilidaka",
  20043. "font_class": "calendar",
  20044. "unicode": "e6a0",
  20045. "unicode_decimal": 59040
  20046. },
  20047. {
  20048. "icon_id": "24899647",
  20049. "name": "fire",
  20050. "font_class": "fire",
  20051. "unicode": "e6a1",
  20052. "unicode_decimal": 59041
  20053. },
  20054. {
  20055. "icon_id": "24899648",
  20056. "name": "paihangbang",
  20057. "font_class": "medal",
  20058. "unicode": "e6a2",
  20059. "unicode_decimal": 59042
  20060. },
  20061. {
  20062. "icon_id": "24899649",
  20063. "name": "font",
  20064. "font_class": "font",
  20065. "unicode": "e6a3",
  20066. "unicode_decimal": 59043
  20067. },
  20068. {
  20069. "icon_id": "24899650",
  20070. "name": "gift",
  20071. "font_class": "gift",
  20072. "unicode": "e6a4",
  20073. "unicode_decimal": 59044
  20074. },
  20075. {
  20076. "icon_id": "24899651",
  20077. "name": "link",
  20078. "font_class": "link",
  20079. "unicode": "e6a5",
  20080. "unicode_decimal": 59045
  20081. },
  20082. {
  20083. "icon_id": "24899652",
  20084. "name": "notification",
  20085. "font_class": "notification",
  20086. "unicode": "e6a6",
  20087. "unicode_decimal": 59046
  20088. },
  20089. {
  20090. "icon_id": "24899653",
  20091. "name": "staff",
  20092. "font_class": "staff",
  20093. "unicode": "e6a7",
  20094. "unicode_decimal": 59047
  20095. },
  20096. {
  20097. "icon_id": "24899654",
  20098. "name": "VIP",
  20099. "font_class": "vip",
  20100. "unicode": "e6a8",
  20101. "unicode_decimal": 59048
  20102. },
  20103. {
  20104. "icon_id": "24899655",
  20105. "name": "folder_add",
  20106. "font_class": "folder-add",
  20107. "unicode": "e6a9",
  20108. "unicode_decimal": 59049
  20109. },
  20110. {
  20111. "icon_id": "24899656",
  20112. "name": "tune",
  20113. "font_class": "tune",
  20114. "unicode": "e6aa",
  20115. "unicode_decimal": 59050
  20116. },
  20117. {
  20118. "icon_id": "24899657",
  20119. "name": "shimingrenzheng",
  20120. "font_class": "auth",
  20121. "unicode": "e6ab",
  20122. "unicode_decimal": 59051
  20123. },
  20124. {
  20125. "icon_id": "24899565",
  20126. "name": "person",
  20127. "font_class": "person",
  20128. "unicode": "e699",
  20129. "unicode_decimal": 59033
  20130. },
  20131. {
  20132. "icon_id": "24899566",
  20133. "name": "email-filled",
  20134. "font_class": "email-filled",
  20135. "unicode": "e69a",
  20136. "unicode_decimal": 59034
  20137. },
  20138. {
  20139. "icon_id": "24899567",
  20140. "name": "phone-filled",
  20141. "font_class": "phone-filled",
  20142. "unicode": "e69b",
  20143. "unicode_decimal": 59035
  20144. },
  20145. {
  20146. "icon_id": "24899568",
  20147. "name": "phone",
  20148. "font_class": "phone",
  20149. "unicode": "e69c",
  20150. "unicode_decimal": 59036
  20151. },
  20152. {
  20153. "icon_id": "24899570",
  20154. "name": "email",
  20155. "font_class": "email",
  20156. "unicode": "e69e",
  20157. "unicode_decimal": 59038
  20158. },
  20159. {
  20160. "icon_id": "24899571",
  20161. "name": "personadd",
  20162. "font_class": "personadd",
  20163. "unicode": "e69f",
  20164. "unicode_decimal": 59039
  20165. },
  20166. {
  20167. "icon_id": "24899558",
  20168. "name": "chatboxes-filled",
  20169. "font_class": "chatboxes-filled",
  20170. "unicode": "e692",
  20171. "unicode_decimal": 59026
  20172. },
  20173. {
  20174. "icon_id": "24899559",
  20175. "name": "contact",
  20176. "font_class": "contact",
  20177. "unicode": "e693",
  20178. "unicode_decimal": 59027
  20179. },
  20180. {
  20181. "icon_id": "24899560",
  20182. "name": "chatbubble-filled",
  20183. "font_class": "chatbubble-filled",
  20184. "unicode": "e694",
  20185. "unicode_decimal": 59028
  20186. },
  20187. {
  20188. "icon_id": "24899561",
  20189. "name": "contact-filled",
  20190. "font_class": "contact-filled",
  20191. "unicode": "e695",
  20192. "unicode_decimal": 59029
  20193. },
  20194. {
  20195. "icon_id": "24899562",
  20196. "name": "chatboxes",
  20197. "font_class": "chatboxes",
  20198. "unicode": "e696",
  20199. "unicode_decimal": 59030
  20200. },
  20201. {
  20202. "icon_id": "24899563",
  20203. "name": "chatbubble",
  20204. "font_class": "chatbubble",
  20205. "unicode": "e697",
  20206. "unicode_decimal": 59031
  20207. },
  20208. {
  20209. "icon_id": "24881290",
  20210. "name": "upload-filled",
  20211. "font_class": "upload-filled",
  20212. "unicode": "e68e",
  20213. "unicode_decimal": 59022
  20214. },
  20215. {
  20216. "icon_id": "24881292",
  20217. "name": "upload",
  20218. "font_class": "upload",
  20219. "unicode": "e690",
  20220. "unicode_decimal": 59024
  20221. },
  20222. {
  20223. "icon_id": "24881293",
  20224. "name": "weixin",
  20225. "font_class": "weixin",
  20226. "unicode": "e691",
  20227. "unicode_decimal": 59025
  20228. },
  20229. {
  20230. "icon_id": "24881274",
  20231. "name": "compose",
  20232. "font_class": "compose",
  20233. "unicode": "e67f",
  20234. "unicode_decimal": 59007
  20235. },
  20236. {
  20237. "icon_id": "24881275",
  20238. "name": "qq",
  20239. "font_class": "qq",
  20240. "unicode": "e680",
  20241. "unicode_decimal": 59008
  20242. },
  20243. {
  20244. "icon_id": "24881276",
  20245. "name": "download-filled",
  20246. "font_class": "download-filled",
  20247. "unicode": "e681",
  20248. "unicode_decimal": 59009
  20249. },
  20250. {
  20251. "icon_id": "24881277",
  20252. "name": "pengyouquan",
  20253. "font_class": "pyq",
  20254. "unicode": "e682",
  20255. "unicode_decimal": 59010
  20256. },
  20257. {
  20258. "icon_id": "24881279",
  20259. "name": "sound",
  20260. "font_class": "sound",
  20261. "unicode": "e684",
  20262. "unicode_decimal": 59012
  20263. },
  20264. {
  20265. "icon_id": "24881280",
  20266. "name": "trash-filled",
  20267. "font_class": "trash-filled",
  20268. "unicode": "e685",
  20269. "unicode_decimal": 59013
  20270. },
  20271. {
  20272. "icon_id": "24881281",
  20273. "name": "sound-filled",
  20274. "font_class": "sound-filled",
  20275. "unicode": "e686",
  20276. "unicode_decimal": 59014
  20277. },
  20278. {
  20279. "icon_id": "24881282",
  20280. "name": "trash",
  20281. "font_class": "trash",
  20282. "unicode": "e687",
  20283. "unicode_decimal": 59015
  20284. },
  20285. {
  20286. "icon_id": "24881284",
  20287. "name": "videocam-filled",
  20288. "font_class": "videocam-filled",
  20289. "unicode": "e689",
  20290. "unicode_decimal": 59017
  20291. },
  20292. {
  20293. "icon_id": "24881285",
  20294. "name": "spinner-cycle",
  20295. "font_class": "spinner-cycle",
  20296. "unicode": "e68a",
  20297. "unicode_decimal": 59018
  20298. },
  20299. {
  20300. "icon_id": "24881286",
  20301. "name": "weibo",
  20302. "font_class": "weibo",
  20303. "unicode": "e68b",
  20304. "unicode_decimal": 59019
  20305. },
  20306. {
  20307. "icon_id": "24881288",
  20308. "name": "videocam",
  20309. "font_class": "videocam",
  20310. "unicode": "e68c",
  20311. "unicode_decimal": 59020
  20312. },
  20313. {
  20314. "icon_id": "24881289",
  20315. "name": "download",
  20316. "font_class": "download",
  20317. "unicode": "e68d",
  20318. "unicode_decimal": 59021
  20319. },
  20320. {
  20321. "icon_id": "24879601",
  20322. "name": "help",
  20323. "font_class": "help",
  20324. "unicode": "e679",
  20325. "unicode_decimal": 59001
  20326. },
  20327. {
  20328. "icon_id": "24879602",
  20329. "name": "navigate-filled",
  20330. "font_class": "navigate-filled",
  20331. "unicode": "e67a",
  20332. "unicode_decimal": 59002
  20333. },
  20334. {
  20335. "icon_id": "24879603",
  20336. "name": "plusempty",
  20337. "font_class": "plusempty",
  20338. "unicode": "e67b",
  20339. "unicode_decimal": 59003
  20340. },
  20341. {
  20342. "icon_id": "24879604",
  20343. "name": "smallcircle",
  20344. "font_class": "smallcircle",
  20345. "unicode": "e67c",
  20346. "unicode_decimal": 59004
  20347. },
  20348. {
  20349. "icon_id": "24879605",
  20350. "name": "minus-filled",
  20351. "font_class": "minus-filled",
  20352. "unicode": "e67d",
  20353. "unicode_decimal": 59005
  20354. },
  20355. {
  20356. "icon_id": "24879606",
  20357. "name": "micoff",
  20358. "font_class": "micoff",
  20359. "unicode": "e67e",
  20360. "unicode_decimal": 59006
  20361. },
  20362. {
  20363. "icon_id": "24879588",
  20364. "name": "closeempty",
  20365. "font_class": "closeempty",
  20366. "unicode": "e66c",
  20367. "unicode_decimal": 58988
  20368. },
  20369. {
  20370. "icon_id": "24879589",
  20371. "name": "clear",
  20372. "font_class": "clear",
  20373. "unicode": "e66d",
  20374. "unicode_decimal": 58989
  20375. },
  20376. {
  20377. "icon_id": "24879590",
  20378. "name": "navigate",
  20379. "font_class": "navigate",
  20380. "unicode": "e66e",
  20381. "unicode_decimal": 58990
  20382. },
  20383. {
  20384. "icon_id": "24879591",
  20385. "name": "minus",
  20386. "font_class": "minus",
  20387. "unicode": "e66f",
  20388. "unicode_decimal": 58991
  20389. },
  20390. {
  20391. "icon_id": "24879592",
  20392. "name": "image",
  20393. "font_class": "image",
  20394. "unicode": "e670",
  20395. "unicode_decimal": 58992
  20396. },
  20397. {
  20398. "icon_id": "24879593",
  20399. "name": "mic",
  20400. "font_class": "mic",
  20401. "unicode": "e671",
  20402. "unicode_decimal": 58993
  20403. },
  20404. {
  20405. "icon_id": "24879594",
  20406. "name": "paperplane",
  20407. "font_class": "paperplane",
  20408. "unicode": "e672",
  20409. "unicode_decimal": 58994
  20410. },
  20411. {
  20412. "icon_id": "24879595",
  20413. "name": "close",
  20414. "font_class": "close",
  20415. "unicode": "e673",
  20416. "unicode_decimal": 58995
  20417. },
  20418. {
  20419. "icon_id": "24879596",
  20420. "name": "help-filled",
  20421. "font_class": "help-filled",
  20422. "unicode": "e674",
  20423. "unicode_decimal": 58996
  20424. },
  20425. {
  20426. "icon_id": "24879597",
  20427. "name": "plus-filled",
  20428. "font_class": "paperplane-filled",
  20429. "unicode": "e675",
  20430. "unicode_decimal": 58997
  20431. },
  20432. {
  20433. "icon_id": "24879598",
  20434. "name": "plus",
  20435. "font_class": "plus",
  20436. "unicode": "e676",
  20437. "unicode_decimal": 58998
  20438. },
  20439. {
  20440. "icon_id": "24879599",
  20441. "name": "mic-filled",
  20442. "font_class": "mic-filled",
  20443. "unicode": "e677",
  20444. "unicode_decimal": 58999
  20445. },
  20446. {
  20447. "icon_id": "24879600",
  20448. "name": "image-filled",
  20449. "font_class": "image-filled",
  20450. "unicode": "e678",
  20451. "unicode_decimal": 59e3
  20452. },
  20453. {
  20454. "icon_id": "24855900",
  20455. "name": "locked-filled",
  20456. "font_class": "locked-filled",
  20457. "unicode": "e668",
  20458. "unicode_decimal": 58984
  20459. },
  20460. {
  20461. "icon_id": "24855901",
  20462. "name": "info",
  20463. "font_class": "info",
  20464. "unicode": "e669",
  20465. "unicode_decimal": 58985
  20466. },
  20467. {
  20468. "icon_id": "24855903",
  20469. "name": "locked",
  20470. "font_class": "locked",
  20471. "unicode": "e66b",
  20472. "unicode_decimal": 58987
  20473. },
  20474. {
  20475. "icon_id": "24855884",
  20476. "name": "camera-filled",
  20477. "font_class": "camera-filled",
  20478. "unicode": "e658",
  20479. "unicode_decimal": 58968
  20480. },
  20481. {
  20482. "icon_id": "24855885",
  20483. "name": "chat-filled",
  20484. "font_class": "chat-filled",
  20485. "unicode": "e659",
  20486. "unicode_decimal": 58969
  20487. },
  20488. {
  20489. "icon_id": "24855886",
  20490. "name": "camera",
  20491. "font_class": "camera",
  20492. "unicode": "e65a",
  20493. "unicode_decimal": 58970
  20494. },
  20495. {
  20496. "icon_id": "24855887",
  20497. "name": "circle",
  20498. "font_class": "circle",
  20499. "unicode": "e65b",
  20500. "unicode_decimal": 58971
  20501. },
  20502. {
  20503. "icon_id": "24855888",
  20504. "name": "checkmarkempty",
  20505. "font_class": "checkmarkempty",
  20506. "unicode": "e65c",
  20507. "unicode_decimal": 58972
  20508. },
  20509. {
  20510. "icon_id": "24855889",
  20511. "name": "chat",
  20512. "font_class": "chat",
  20513. "unicode": "e65d",
  20514. "unicode_decimal": 58973
  20515. },
  20516. {
  20517. "icon_id": "24855890",
  20518. "name": "circle-filled",
  20519. "font_class": "circle-filled",
  20520. "unicode": "e65e",
  20521. "unicode_decimal": 58974
  20522. },
  20523. {
  20524. "icon_id": "24855891",
  20525. "name": "flag",
  20526. "font_class": "flag",
  20527. "unicode": "e65f",
  20528. "unicode_decimal": 58975
  20529. },
  20530. {
  20531. "icon_id": "24855892",
  20532. "name": "flag-filled",
  20533. "font_class": "flag-filled",
  20534. "unicode": "e660",
  20535. "unicode_decimal": 58976
  20536. },
  20537. {
  20538. "icon_id": "24855893",
  20539. "name": "gear-filled",
  20540. "font_class": "gear-filled",
  20541. "unicode": "e661",
  20542. "unicode_decimal": 58977
  20543. },
  20544. {
  20545. "icon_id": "24855894",
  20546. "name": "home",
  20547. "font_class": "home",
  20548. "unicode": "e662",
  20549. "unicode_decimal": 58978
  20550. },
  20551. {
  20552. "icon_id": "24855895",
  20553. "name": "home-filled",
  20554. "font_class": "home-filled",
  20555. "unicode": "e663",
  20556. "unicode_decimal": 58979
  20557. },
  20558. {
  20559. "icon_id": "24855896",
  20560. "name": "gear",
  20561. "font_class": "gear",
  20562. "unicode": "e664",
  20563. "unicode_decimal": 58980
  20564. },
  20565. {
  20566. "icon_id": "24855897",
  20567. "name": "smallcircle-filled",
  20568. "font_class": "smallcircle-filled",
  20569. "unicode": "e665",
  20570. "unicode_decimal": 58981
  20571. },
  20572. {
  20573. "icon_id": "24855898",
  20574. "name": "map-filled",
  20575. "font_class": "map-filled",
  20576. "unicode": "e666",
  20577. "unicode_decimal": 58982
  20578. },
  20579. {
  20580. "icon_id": "24855899",
  20581. "name": "map",
  20582. "font_class": "map",
  20583. "unicode": "e667",
  20584. "unicode_decimal": 58983
  20585. },
  20586. {
  20587. "icon_id": "24855825",
  20588. "name": "refresh-filled",
  20589. "font_class": "refresh-filled",
  20590. "unicode": "e656",
  20591. "unicode_decimal": 58966
  20592. },
  20593. {
  20594. "icon_id": "24855826",
  20595. "name": "refresh",
  20596. "font_class": "refresh",
  20597. "unicode": "e657",
  20598. "unicode_decimal": 58967
  20599. },
  20600. {
  20601. "icon_id": "24855808",
  20602. "name": "cloud-upload",
  20603. "font_class": "cloud-upload",
  20604. "unicode": "e645",
  20605. "unicode_decimal": 58949
  20606. },
  20607. {
  20608. "icon_id": "24855809",
  20609. "name": "cloud-download-filled",
  20610. "font_class": "cloud-download-filled",
  20611. "unicode": "e646",
  20612. "unicode_decimal": 58950
  20613. },
  20614. {
  20615. "icon_id": "24855810",
  20616. "name": "cloud-download",
  20617. "font_class": "cloud-download",
  20618. "unicode": "e647",
  20619. "unicode_decimal": 58951
  20620. },
  20621. {
  20622. "icon_id": "24855811",
  20623. "name": "cloud-upload-filled",
  20624. "font_class": "cloud-upload-filled",
  20625. "unicode": "e648",
  20626. "unicode_decimal": 58952
  20627. },
  20628. {
  20629. "icon_id": "24855813",
  20630. "name": "redo",
  20631. "font_class": "redo",
  20632. "unicode": "e64a",
  20633. "unicode_decimal": 58954
  20634. },
  20635. {
  20636. "icon_id": "24855814",
  20637. "name": "images-filled",
  20638. "font_class": "images-filled",
  20639. "unicode": "e64b",
  20640. "unicode_decimal": 58955
  20641. },
  20642. {
  20643. "icon_id": "24855815",
  20644. "name": "undo-filled",
  20645. "font_class": "undo-filled",
  20646. "unicode": "e64c",
  20647. "unicode_decimal": 58956
  20648. },
  20649. {
  20650. "icon_id": "24855816",
  20651. "name": "more",
  20652. "font_class": "more",
  20653. "unicode": "e64d",
  20654. "unicode_decimal": 58957
  20655. },
  20656. {
  20657. "icon_id": "24855817",
  20658. "name": "more-filled",
  20659. "font_class": "more-filled",
  20660. "unicode": "e64e",
  20661. "unicode_decimal": 58958
  20662. },
  20663. {
  20664. "icon_id": "24855818",
  20665. "name": "undo",
  20666. "font_class": "undo",
  20667. "unicode": "e64f",
  20668. "unicode_decimal": 58959
  20669. },
  20670. {
  20671. "icon_id": "24855819",
  20672. "name": "images",
  20673. "font_class": "images",
  20674. "unicode": "e650",
  20675. "unicode_decimal": 58960
  20676. },
  20677. {
  20678. "icon_id": "24855821",
  20679. "name": "paperclip",
  20680. "font_class": "paperclip",
  20681. "unicode": "e652",
  20682. "unicode_decimal": 58962
  20683. },
  20684. {
  20685. "icon_id": "24855822",
  20686. "name": "settings",
  20687. "font_class": "settings",
  20688. "unicode": "e653",
  20689. "unicode_decimal": 58963
  20690. },
  20691. {
  20692. "icon_id": "24855823",
  20693. "name": "search",
  20694. "font_class": "search",
  20695. "unicode": "e654",
  20696. "unicode_decimal": 58964
  20697. },
  20698. {
  20699. "icon_id": "24855824",
  20700. "name": "redo-filled",
  20701. "font_class": "redo-filled",
  20702. "unicode": "e655",
  20703. "unicode_decimal": 58965
  20704. },
  20705. {
  20706. "icon_id": "24841702",
  20707. "name": "list",
  20708. "font_class": "list",
  20709. "unicode": "e644",
  20710. "unicode_decimal": 58948
  20711. },
  20712. {
  20713. "icon_id": "24841489",
  20714. "name": "mail-open-filled",
  20715. "font_class": "mail-open-filled",
  20716. "unicode": "e63a",
  20717. "unicode_decimal": 58938
  20718. },
  20719. {
  20720. "icon_id": "24841491",
  20721. "name": "hand-thumbsdown-filled",
  20722. "font_class": "hand-down-filled",
  20723. "unicode": "e63c",
  20724. "unicode_decimal": 58940
  20725. },
  20726. {
  20727. "icon_id": "24841492",
  20728. "name": "hand-thumbsdown",
  20729. "font_class": "hand-down",
  20730. "unicode": "e63d",
  20731. "unicode_decimal": 58941
  20732. },
  20733. {
  20734. "icon_id": "24841493",
  20735. "name": "hand-thumbsup-filled",
  20736. "font_class": "hand-up-filled",
  20737. "unicode": "e63e",
  20738. "unicode_decimal": 58942
  20739. },
  20740. {
  20741. "icon_id": "24841494",
  20742. "name": "hand-thumbsup",
  20743. "font_class": "hand-up",
  20744. "unicode": "e63f",
  20745. "unicode_decimal": 58943
  20746. },
  20747. {
  20748. "icon_id": "24841496",
  20749. "name": "heart-filled",
  20750. "font_class": "heart-filled",
  20751. "unicode": "e641",
  20752. "unicode_decimal": 58945
  20753. },
  20754. {
  20755. "icon_id": "24841498",
  20756. "name": "mail-open",
  20757. "font_class": "mail-open",
  20758. "unicode": "e643",
  20759. "unicode_decimal": 58947
  20760. },
  20761. {
  20762. "icon_id": "24841488",
  20763. "name": "heart",
  20764. "font_class": "heart",
  20765. "unicode": "e639",
  20766. "unicode_decimal": 58937
  20767. },
  20768. {
  20769. "icon_id": "24839963",
  20770. "name": "loop",
  20771. "font_class": "loop",
  20772. "unicode": "e633",
  20773. "unicode_decimal": 58931
  20774. },
  20775. {
  20776. "icon_id": "24839866",
  20777. "name": "pulldown",
  20778. "font_class": "pulldown",
  20779. "unicode": "e632",
  20780. "unicode_decimal": 58930
  20781. },
  20782. {
  20783. "icon_id": "24813798",
  20784. "name": "scan",
  20785. "font_class": "scan",
  20786. "unicode": "e62a",
  20787. "unicode_decimal": 58922
  20788. },
  20789. {
  20790. "icon_id": "24813786",
  20791. "name": "bars",
  20792. "font_class": "bars",
  20793. "unicode": "e627",
  20794. "unicode_decimal": 58919
  20795. },
  20796. {
  20797. "icon_id": "24813788",
  20798. "name": "cart-filled",
  20799. "font_class": "cart-filled",
  20800. "unicode": "e629",
  20801. "unicode_decimal": 58921
  20802. },
  20803. {
  20804. "icon_id": "24813790",
  20805. "name": "checkbox",
  20806. "font_class": "checkbox",
  20807. "unicode": "e62b",
  20808. "unicode_decimal": 58923
  20809. },
  20810. {
  20811. "icon_id": "24813791",
  20812. "name": "checkbox-filled",
  20813. "font_class": "checkbox-filled",
  20814. "unicode": "e62c",
  20815. "unicode_decimal": 58924
  20816. },
  20817. {
  20818. "icon_id": "24813794",
  20819. "name": "shop",
  20820. "font_class": "shop",
  20821. "unicode": "e62f",
  20822. "unicode_decimal": 58927
  20823. },
  20824. {
  20825. "icon_id": "24813795",
  20826. "name": "headphones",
  20827. "font_class": "headphones",
  20828. "unicode": "e630",
  20829. "unicode_decimal": 58928
  20830. },
  20831. {
  20832. "icon_id": "24813796",
  20833. "name": "cart",
  20834. "font_class": "cart",
  20835. "unicode": "e631",
  20836. "unicode_decimal": 58929
  20837. }
  20838. ]
  20839. };
  20840. const getVal = (val) => {
  20841. const reg = /^[0-9]*$/g;
  20842. return typeof val === "number" || reg.test(val) ? val + "px" : val;
  20843. };
  20844. const _sfc_main$U = {
  20845. name: "UniIcons",
  20846. emits: ["click"],
  20847. props: {
  20848. type: {
  20849. type: String,
  20850. default: ""
  20851. },
  20852. color: {
  20853. type: String,
  20854. default: "#333333"
  20855. },
  20856. size: {
  20857. type: [Number, String],
  20858. default: 16
  20859. },
  20860. customPrefix: {
  20861. type: String,
  20862. default: ""
  20863. }
  20864. },
  20865. data() {
  20866. return {
  20867. icons: icons.glyphs
  20868. };
  20869. },
  20870. computed: {
  20871. unicode() {
  20872. let code2 = this.icons.find((v) => v.font_class === this.type);
  20873. if (code2) {
  20874. return unescape(`%u${code2.unicode}`);
  20875. }
  20876. return "";
  20877. },
  20878. iconSize() {
  20879. return getVal(this.size);
  20880. }
  20881. },
  20882. methods: {
  20883. _onClick() {
  20884. this.$emit("click");
  20885. }
  20886. }
  20887. };
  20888. function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
  20889. return vue.openBlock(), vue.createElementBlock(
  20890. "text",
  20891. {
  20892. style: vue.normalizeStyle({ color: $props.color, "font-size": $options.iconSize }),
  20893. class: vue.normalizeClass(["uni-icons", ["uniui-" + $props.type, $props.customPrefix, $props.customPrefix ? $props.type : ""]]),
  20894. onClick: _cache[0] || (_cache[0] = (...args) => $options._onClick && $options._onClick(...args))
  20895. },
  20896. null,
  20897. 6
  20898. /* CLASS, STYLE */
  20899. );
  20900. }
  20901. const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$T], ["__scopeId", "data-v-d31e1c47"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uni-icons/components/uni-icons/uni-icons.vue"]]);
  20902. let Calendar$1 = class Calendar {
  20903. constructor({
  20904. selected,
  20905. startDate,
  20906. endDate,
  20907. range: range2
  20908. } = {}) {
  20909. this.date = this.getDateObj(/* @__PURE__ */ new Date());
  20910. this.selected = selected || [];
  20911. this.startDate = startDate;
  20912. this.endDate = endDate;
  20913. this.range = range2;
  20914. this.cleanMultipleStatus();
  20915. this.weeks = {};
  20916. this.lastHover = false;
  20917. }
  20918. /**
  20919. * 设置日期
  20920. * @param {Object} date
  20921. */
  20922. setDate(date3) {
  20923. const selectDate = this.getDateObj(date3);
  20924. this.getWeeks(selectDate.fullDate);
  20925. }
  20926. /**
  20927. * 清理多选状态
  20928. */
  20929. cleanMultipleStatus() {
  20930. this.multipleStatus = {
  20931. before: "",
  20932. after: "",
  20933. data: []
  20934. };
  20935. }
  20936. setStartDate(startDate) {
  20937. this.startDate = startDate;
  20938. }
  20939. setEndDate(endDate) {
  20940. this.endDate = endDate;
  20941. }
  20942. getPreMonthObj(date3) {
  20943. date3 = fixIosDateFormat(date3);
  20944. date3 = new Date(date3);
  20945. const oldMonth = date3.getMonth();
  20946. date3.setMonth(oldMonth - 1);
  20947. const newMonth = date3.getMonth();
  20948. if (oldMonth !== 0 && newMonth - oldMonth === 0) {
  20949. date3.setMonth(newMonth - 1);
  20950. }
  20951. return this.getDateObj(date3);
  20952. }
  20953. getNextMonthObj(date3) {
  20954. date3 = fixIosDateFormat(date3);
  20955. date3 = new Date(date3);
  20956. const oldMonth = date3.getMonth();
  20957. date3.setMonth(oldMonth + 1);
  20958. const newMonth = date3.getMonth();
  20959. if (newMonth - oldMonth > 1) {
  20960. date3.setMonth(newMonth - 1);
  20961. }
  20962. return this.getDateObj(date3);
  20963. }
  20964. /**
  20965. * 获取指定格式Date对象
  20966. */
  20967. getDateObj(date3) {
  20968. date3 = fixIosDateFormat(date3);
  20969. date3 = new Date(date3);
  20970. return {
  20971. fullDate: getDate(date3),
  20972. year: date3.getFullYear(),
  20973. month: addZero(date3.getMonth() + 1),
  20974. date: addZero(date3.getDate()),
  20975. day: date3.getDay()
  20976. };
  20977. }
  20978. /**
  20979. * 获取上一个月日期集合
  20980. */
  20981. getPreMonthDays(amount2, dateObj) {
  20982. const result = [];
  20983. for (let i = amount2 - 1; i >= 0; i--) {
  20984. const month = dateObj.month > 1 ? dateObj.month - 1 : 12;
  20985. const year = month === 12 ? dateObj.year - 1 : dateObj.year;
  20986. const date3 = new Date(year, month, -i).getDate();
  20987. const fullDate = `${year}-${addZero(month)}-${addZero(date3)}`;
  20988. let multiples = this.multipleStatus.data;
  20989. let multiplesStatus = -1;
  20990. if (this.range && multiples) {
  20991. multiplesStatus = multiples.findIndex((item) => {
  20992. return this.dateEqual(item, fullDate);
  20993. });
  20994. }
  20995. const checked = multiplesStatus !== -1;
  20996. const extraInfo = this.selected && this.selected.find((item) => {
  20997. if (this.dateEqual(fullDate, item.date)) {
  20998. return item;
  20999. }
  21000. });
  21001. result.push({
  21002. fullDate,
  21003. year,
  21004. month,
  21005. date: date3,
  21006. multiple: this.range ? checked : false,
  21007. beforeMultiple: this.isLogicBefore(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  21008. afterMultiple: this.isLogicAfter(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  21009. disable: this.startDate && !dateCompare(this.startDate, fullDate) || this.endDate && !dateCompare(fullDate, this.endDate),
  21010. isToday: fullDate === this.date.fullDate,
  21011. userChecked: false,
  21012. extraInfo
  21013. });
  21014. }
  21015. return result;
  21016. }
  21017. /**
  21018. * 获取本月日期集合
  21019. */
  21020. getCurrentMonthDays(amount2, dateObj) {
  21021. const result = [];
  21022. const fullDate = this.date.fullDate;
  21023. for (let i = 1; i <= amount2; i++) {
  21024. const currentDate = `${dateObj.year}-${dateObj.month}-${addZero(i)}`;
  21025. const isToday = fullDate === currentDate;
  21026. const extraInfo = this.selected && this.selected.find((item) => {
  21027. if (this.dateEqual(currentDate, item.date)) {
  21028. return item;
  21029. }
  21030. });
  21031. if (this.startDate) {
  21032. dateCompare(this.startDate, currentDate);
  21033. }
  21034. if (this.endDate) {
  21035. dateCompare(currentDate, this.endDate);
  21036. }
  21037. let multiples = this.multipleStatus.data;
  21038. let multiplesStatus = -1;
  21039. if (this.range && multiples) {
  21040. multiplesStatus = multiples.findIndex((item) => {
  21041. return this.dateEqual(item, currentDate);
  21042. });
  21043. }
  21044. const checked = multiplesStatus !== -1;
  21045. result.push({
  21046. fullDate: currentDate,
  21047. year: dateObj.year,
  21048. month: dateObj.month,
  21049. date: i,
  21050. multiple: this.range ? checked : false,
  21051. beforeMultiple: this.isLogicBefore(currentDate, this.multipleStatus.before, this.multipleStatus.after),
  21052. afterMultiple: this.isLogicAfter(currentDate, this.multipleStatus.before, this.multipleStatus.after),
  21053. disable: this.startDate && !dateCompare(this.startDate, currentDate) || this.endDate && !dateCompare(currentDate, this.endDate),
  21054. isToday,
  21055. userChecked: false,
  21056. extraInfo
  21057. });
  21058. }
  21059. return result;
  21060. }
  21061. /**
  21062. * 获取下一个月日期集合
  21063. */
  21064. _getNextMonthDays(amount2, dateObj) {
  21065. const result = [];
  21066. dateObj.month + 1;
  21067. for (let i = 1; i <= amount2; i++) {
  21068. const month = dateObj.month === 12 ? 1 : dateObj.month * 1 + 1;
  21069. const year = month === 1 ? dateObj.year + 1 : dateObj.year;
  21070. const fullDate = `${year}-${addZero(month)}-${addZero(i)}`;
  21071. let multiples = this.multipleStatus.data;
  21072. let multiplesStatus = -1;
  21073. if (this.range && multiples) {
  21074. multiplesStatus = multiples.findIndex((item) => {
  21075. return this.dateEqual(item, fullDate);
  21076. });
  21077. }
  21078. const checked = multiplesStatus !== -1;
  21079. const extraInfo = this.selected && this.selected.find((item) => {
  21080. if (this.dateEqual(fullDate, item.date)) {
  21081. return item;
  21082. }
  21083. });
  21084. result.push({
  21085. fullDate,
  21086. year,
  21087. date: i,
  21088. month,
  21089. multiple: this.range ? checked : false,
  21090. beforeMultiple: this.isLogicBefore(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  21091. afterMultiple: this.isLogicAfter(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  21092. disable: this.startDate && !dateCompare(this.startDate, fullDate) || this.endDate && !dateCompare(fullDate, this.endDate),
  21093. isToday: fullDate === this.date.fullDate,
  21094. userChecked: false,
  21095. extraInfo
  21096. });
  21097. }
  21098. return result;
  21099. }
  21100. /**
  21101. * 获取当前日期详情
  21102. * @param {Object} date
  21103. */
  21104. getInfo(date3) {
  21105. if (!date3) {
  21106. date3 = /* @__PURE__ */ new Date();
  21107. }
  21108. return this.calendar.find((item) => item.fullDate === this.getDateObj(date3).fullDate);
  21109. }
  21110. /**
  21111. * 比较时间是否相等
  21112. */
  21113. dateEqual(before, after) {
  21114. before = new Date(fixIosDateFormat(before));
  21115. after = new Date(fixIosDateFormat(after));
  21116. return before.valueOf() === after.valueOf();
  21117. }
  21118. /**
  21119. * 比较真实起始日期
  21120. */
  21121. isLogicBefore(currentDate, before, after) {
  21122. let logicBefore = before;
  21123. if (before && after) {
  21124. logicBefore = dateCompare(before, after) ? before : after;
  21125. }
  21126. return this.dateEqual(logicBefore, currentDate);
  21127. }
  21128. isLogicAfter(currentDate, before, after) {
  21129. let logicAfter = after;
  21130. if (before && after) {
  21131. logicAfter = dateCompare(before, after) ? after : before;
  21132. }
  21133. return this.dateEqual(logicAfter, currentDate);
  21134. }
  21135. /**
  21136. * 获取日期范围内所有日期
  21137. * @param {Object} begin
  21138. * @param {Object} end
  21139. */
  21140. geDateAll(begin, end) {
  21141. var arr = [];
  21142. var ab = begin.split("-");
  21143. var ae = end.split("-");
  21144. var db = /* @__PURE__ */ new Date();
  21145. db.setFullYear(ab[0], ab[1] - 1, ab[2]);
  21146. var de = /* @__PURE__ */ new Date();
  21147. de.setFullYear(ae[0], ae[1] - 1, ae[2]);
  21148. var unixDb = db.getTime() - 24 * 60 * 60 * 1e3;
  21149. var unixDe = de.getTime() - 24 * 60 * 60 * 1e3;
  21150. for (var k = unixDb; k <= unixDe; ) {
  21151. k = k + 24 * 60 * 60 * 1e3;
  21152. arr.push(this.getDateObj(new Date(parseInt(k))).fullDate);
  21153. }
  21154. return arr;
  21155. }
  21156. /**
  21157. * 获取多选状态
  21158. */
  21159. setMultiple(fullDate) {
  21160. if (!this.range)
  21161. return;
  21162. let {
  21163. before,
  21164. after
  21165. } = this.multipleStatus;
  21166. if (before && after) {
  21167. if (!this.lastHover) {
  21168. this.lastHover = true;
  21169. return;
  21170. }
  21171. this.multipleStatus.before = fullDate;
  21172. this.multipleStatus.after = "";
  21173. this.multipleStatus.data = [];
  21174. this.multipleStatus.fulldate = "";
  21175. this.lastHover = false;
  21176. } else {
  21177. if (!before) {
  21178. this.multipleStatus.before = fullDate;
  21179. this.lastHover = false;
  21180. } else {
  21181. this.multipleStatus.after = fullDate;
  21182. if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
  21183. this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
  21184. } else {
  21185. this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
  21186. }
  21187. this.lastHover = true;
  21188. }
  21189. }
  21190. this.getWeeks(fullDate);
  21191. }
  21192. /**
  21193. * 鼠标 hover 更新多选状态
  21194. */
  21195. setHoverMultiple(fullDate) {
  21196. if (!this.range || this.lastHover)
  21197. return;
  21198. const { before } = this.multipleStatus;
  21199. if (!before) {
  21200. this.multipleStatus.before = fullDate;
  21201. } else {
  21202. this.multipleStatus.after = fullDate;
  21203. if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
  21204. this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
  21205. } else {
  21206. this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
  21207. }
  21208. }
  21209. this.getWeeks(fullDate);
  21210. }
  21211. /**
  21212. * 更新默认值多选状态
  21213. */
  21214. setDefaultMultiple(before, after) {
  21215. this.multipleStatus.before = before;
  21216. this.multipleStatus.after = after;
  21217. if (before && after) {
  21218. if (dateCompare(before, after)) {
  21219. this.multipleStatus.data = this.geDateAll(before, after);
  21220. this.getWeeks(after);
  21221. } else {
  21222. this.multipleStatus.data = this.geDateAll(after, before);
  21223. this.getWeeks(before);
  21224. }
  21225. }
  21226. }
  21227. /**
  21228. * 获取每周数据
  21229. * @param {Object} dateData
  21230. */
  21231. getWeeks(dateData) {
  21232. const {
  21233. year,
  21234. month
  21235. } = this.getDateObj(dateData);
  21236. const preMonthDayAmount = new Date(year, month - 1, 1).getDay();
  21237. const preMonthDays = this.getPreMonthDays(preMonthDayAmount, this.getDateObj(dateData));
  21238. const currentMonthDayAmount = new Date(year, month, 0).getDate();
  21239. const currentMonthDays = this.getCurrentMonthDays(currentMonthDayAmount, this.getDateObj(dateData));
  21240. const nextMonthDayAmount = 42 - preMonthDayAmount - currentMonthDayAmount;
  21241. const nextMonthDays = this._getNextMonthDays(nextMonthDayAmount, this.getDateObj(dateData));
  21242. const calendarDays = [...preMonthDays, ...currentMonthDays, ...nextMonthDays];
  21243. const weeks = new Array(6);
  21244. for (let i = 0; i < calendarDays.length; i++) {
  21245. const index2 = Math.floor(i / 7);
  21246. if (!weeks[index2]) {
  21247. weeks[index2] = new Array(7);
  21248. }
  21249. weeks[index2][i % 7] = calendarDays[i];
  21250. }
  21251. this.calendar = calendarDays;
  21252. this.weeks = weeks;
  21253. }
  21254. };
  21255. function getDateTime(date3, hideSecond) {
  21256. return `${getDate(date3)} ${getTime(date3, hideSecond)}`;
  21257. }
  21258. function getDate(date3) {
  21259. date3 = fixIosDateFormat(date3);
  21260. date3 = new Date(date3);
  21261. const year = date3.getFullYear();
  21262. const month = date3.getMonth() + 1;
  21263. const day = date3.getDate();
  21264. return `${year}-${addZero(month)}-${addZero(day)}`;
  21265. }
  21266. function getTime(date3, hideSecond) {
  21267. date3 = fixIosDateFormat(date3);
  21268. date3 = new Date(date3);
  21269. const hour = date3.getHours();
  21270. const minute = date3.getMinutes();
  21271. const second = date3.getSeconds();
  21272. return hideSecond ? `${addZero(hour)}:${addZero(minute)}` : `${addZero(hour)}:${addZero(minute)}:${addZero(second)}`;
  21273. }
  21274. function addZero(num) {
  21275. if (num < 10) {
  21276. num = `0${num}`;
  21277. }
  21278. return num;
  21279. }
  21280. function getDefaultSecond(hideSecond) {
  21281. return hideSecond ? "00:00" : "00:00:00";
  21282. }
  21283. function dateCompare(startDate, endDate) {
  21284. startDate = new Date(fixIosDateFormat(startDate));
  21285. endDate = new Date(fixIosDateFormat(endDate));
  21286. return startDate <= endDate;
  21287. }
  21288. function checkDate(date3) {
  21289. const dateReg = /((19|20)\d{2})(-|\/)\d{1,2}(-|\/)\d{1,2}/g;
  21290. return date3.match(dateReg);
  21291. }
  21292. 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])?$/;
  21293. function fixIosDateFormat(value2) {
  21294. if (typeof value2 === "string" && dateTimeReg.test(value2)) {
  21295. value2 = value2.replace(/-/g, "/");
  21296. }
  21297. return value2;
  21298. }
  21299. const _sfc_main$T = {
  21300. props: {
  21301. weeks: {
  21302. type: Object,
  21303. default() {
  21304. return {};
  21305. }
  21306. },
  21307. calendar: {
  21308. type: Object,
  21309. default: () => {
  21310. return {};
  21311. }
  21312. },
  21313. selected: {
  21314. type: Array,
  21315. default: () => {
  21316. return [];
  21317. }
  21318. },
  21319. checkHover: {
  21320. type: Boolean,
  21321. default: false
  21322. }
  21323. },
  21324. methods: {
  21325. choiceDate(weeks) {
  21326. this.$emit("change", weeks);
  21327. },
  21328. handleMousemove(weeks) {
  21329. this.$emit("handleMouse", weeks);
  21330. }
  21331. }
  21332. };
  21333. function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
  21334. return vue.openBlock(), vue.createElementBlock(
  21335. "view",
  21336. {
  21337. class: vue.normalizeClass(["uni-calendar-item__weeks-box", {
  21338. "uni-calendar-item--disable": $props.weeks.disable,
  21339. "uni-calendar-item--before-checked-x": $props.weeks.beforeMultiple,
  21340. "uni-calendar-item--multiple": $props.weeks.multiple,
  21341. "uni-calendar-item--after-checked-x": $props.weeks.afterMultiple
  21342. }]),
  21343. onClick: _cache[0] || (_cache[0] = ($event) => $options.choiceDate($props.weeks)),
  21344. onMouseenter: _cache[1] || (_cache[1] = ($event) => $options.handleMousemove($props.weeks))
  21345. },
  21346. [
  21347. vue.createElementVNode(
  21348. "view",
  21349. {
  21350. class: vue.normalizeClass(["uni-calendar-item__weeks-box-item", {
  21351. "uni-calendar-item--checked": $props.calendar.fullDate === $props.weeks.fullDate && ($props.calendar.userChecked || !$props.checkHover),
  21352. "uni-calendar-item--checked-range-text": $props.checkHover,
  21353. "uni-calendar-item--before-checked": $props.weeks.beforeMultiple,
  21354. "uni-calendar-item--multiple": $props.weeks.multiple,
  21355. "uni-calendar-item--after-checked": $props.weeks.afterMultiple,
  21356. "uni-calendar-item--disable": $props.weeks.disable
  21357. }])
  21358. },
  21359. [
  21360. $props.selected && $props.weeks.extraInfo ? (vue.openBlock(), vue.createElementBlock("text", {
  21361. key: 0,
  21362. class: "uni-calendar-item__weeks-box-circle"
  21363. })) : vue.createCommentVNode("v-if", true),
  21364. vue.createElementVNode(
  21365. "text",
  21366. { class: "uni-calendar-item__weeks-box-text uni-calendar-item__weeks-box-text-disable uni-calendar-item--checked-text" },
  21367. vue.toDisplayString($props.weeks.date),
  21368. 1
  21369. /* TEXT */
  21370. )
  21371. ],
  21372. 2
  21373. /* CLASS */
  21374. ),
  21375. vue.createElementVNode(
  21376. "view",
  21377. {
  21378. class: vue.normalizeClass({ "uni-calendar-item--today": $props.weeks.isToday })
  21379. },
  21380. null,
  21381. 2
  21382. /* CLASS */
  21383. )
  21384. ],
  21385. 34
  21386. /* CLASS, NEED_HYDRATION */
  21387. );
  21388. }
  21389. const calendarItem = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$S], ["__scopeId", "data-v-3c762a01"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue"]]);
  21390. const isObject$1 = (val) => val !== null && typeof val === "object";
  21391. const defaultDelimiters = ["{", "}"];
  21392. class BaseFormatter {
  21393. constructor() {
  21394. this._caches = /* @__PURE__ */ Object.create(null);
  21395. }
  21396. interpolate(message, values, delimiters = defaultDelimiters) {
  21397. if (!values) {
  21398. return [message];
  21399. }
  21400. let tokens = this._caches[message];
  21401. if (!tokens) {
  21402. tokens = parse(message, delimiters);
  21403. this._caches[message] = tokens;
  21404. }
  21405. return compile(tokens, values);
  21406. }
  21407. }
  21408. const RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  21409. const RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  21410. function parse(format2, [startDelimiter, endDelimiter]) {
  21411. const tokens = [];
  21412. let position = 0;
  21413. let text = "";
  21414. while (position < format2.length) {
  21415. let char = format2[position++];
  21416. if (char === startDelimiter) {
  21417. if (text) {
  21418. tokens.push({ type: "text", value: text });
  21419. }
  21420. text = "";
  21421. let sub = "";
  21422. char = format2[position++];
  21423. while (char !== void 0 && char !== endDelimiter) {
  21424. sub += char;
  21425. char = format2[position++];
  21426. }
  21427. const isClosed = char === endDelimiter;
  21428. const type2 = RE_TOKEN_LIST_VALUE.test(sub) ? "list" : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? "named" : "unknown";
  21429. tokens.push({ value: sub, type: type2 });
  21430. } else {
  21431. text += char;
  21432. }
  21433. }
  21434. text && tokens.push({ type: "text", value: text });
  21435. return tokens;
  21436. }
  21437. function compile(tokens, values) {
  21438. const compiled = [];
  21439. let index2 = 0;
  21440. const mode = Array.isArray(values) ? "list" : isObject$1(values) ? "named" : "unknown";
  21441. if (mode === "unknown") {
  21442. return compiled;
  21443. }
  21444. while (index2 < tokens.length) {
  21445. const token = tokens[index2];
  21446. switch (token.type) {
  21447. case "text":
  21448. compiled.push(token.value);
  21449. break;
  21450. case "list":
  21451. compiled.push(values[parseInt(token.value, 10)]);
  21452. break;
  21453. case "named":
  21454. if (mode === "named") {
  21455. compiled.push(values[token.value]);
  21456. } else {
  21457. {
  21458. console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`);
  21459. }
  21460. }
  21461. break;
  21462. case "unknown":
  21463. {
  21464. console.warn(`Detect 'unknown' type of token!`);
  21465. }
  21466. break;
  21467. }
  21468. index2++;
  21469. }
  21470. return compiled;
  21471. }
  21472. const LOCALE_ZH_HANS = "zh-Hans";
  21473. const LOCALE_ZH_HANT = "zh-Hant";
  21474. const LOCALE_EN = "en";
  21475. const LOCALE_FR = "fr";
  21476. const LOCALE_ES = "es";
  21477. const hasOwnProperty = Object.prototype.hasOwnProperty;
  21478. const hasOwn = (val, key) => hasOwnProperty.call(val, key);
  21479. const defaultFormatter = new BaseFormatter();
  21480. function include(str, parts) {
  21481. return !!parts.find((part) => str.indexOf(part) !== -1);
  21482. }
  21483. function startsWith(str, parts) {
  21484. return parts.find((part) => str.indexOf(part) === 0);
  21485. }
  21486. function normalizeLocale(locale, messages2) {
  21487. if (!locale) {
  21488. return;
  21489. }
  21490. locale = locale.trim().replace(/_/g, "-");
  21491. if (messages2 && messages2[locale]) {
  21492. return locale;
  21493. }
  21494. locale = locale.toLowerCase();
  21495. if (locale === "chinese") {
  21496. return LOCALE_ZH_HANS;
  21497. }
  21498. if (locale.indexOf("zh") === 0) {
  21499. if (locale.indexOf("-hans") > -1) {
  21500. return LOCALE_ZH_HANS;
  21501. }
  21502. if (locale.indexOf("-hant") > -1) {
  21503. return LOCALE_ZH_HANT;
  21504. }
  21505. if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) {
  21506. return LOCALE_ZH_HANT;
  21507. }
  21508. return LOCALE_ZH_HANS;
  21509. }
  21510. let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  21511. if (messages2 && Object.keys(messages2).length > 0) {
  21512. locales = Object.keys(messages2);
  21513. }
  21514. const lang = startsWith(locale, locales);
  21515. if (lang) {
  21516. return lang;
  21517. }
  21518. }
  21519. class I18n {
  21520. constructor({ locale, fallbackLocale, messages: messages2, watcher, formater: formater2 }) {
  21521. this.locale = LOCALE_EN;
  21522. this.fallbackLocale = LOCALE_EN;
  21523. this.message = {};
  21524. this.messages = {};
  21525. this.watchers = [];
  21526. if (fallbackLocale) {
  21527. this.fallbackLocale = fallbackLocale;
  21528. }
  21529. this.formater = formater2 || defaultFormatter;
  21530. this.messages = messages2 || {};
  21531. this.setLocale(locale || LOCALE_EN);
  21532. if (watcher) {
  21533. this.watchLocale(watcher);
  21534. }
  21535. }
  21536. setLocale(locale) {
  21537. const oldLocale = this.locale;
  21538. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  21539. if (!this.messages[this.locale]) {
  21540. this.messages[this.locale] = {};
  21541. }
  21542. this.message = this.messages[this.locale];
  21543. if (oldLocale !== this.locale) {
  21544. this.watchers.forEach((watcher) => {
  21545. watcher(this.locale, oldLocale);
  21546. });
  21547. }
  21548. }
  21549. getLocale() {
  21550. return this.locale;
  21551. }
  21552. watchLocale(fn) {
  21553. const index2 = this.watchers.push(fn) - 1;
  21554. return () => {
  21555. this.watchers.splice(index2, 1);
  21556. };
  21557. }
  21558. add(locale, message, override = true) {
  21559. const curMessages = this.messages[locale];
  21560. if (curMessages) {
  21561. if (override) {
  21562. Object.assign(curMessages, message);
  21563. } else {
  21564. Object.keys(message).forEach((key) => {
  21565. if (!hasOwn(curMessages, key)) {
  21566. curMessages[key] = message[key];
  21567. }
  21568. });
  21569. }
  21570. } else {
  21571. this.messages[locale] = message;
  21572. }
  21573. }
  21574. f(message, values, delimiters) {
  21575. return this.formater.interpolate(message, values, delimiters).join("");
  21576. }
  21577. t(key, locale, values) {
  21578. let message = this.message;
  21579. if (typeof locale === "string") {
  21580. locale = normalizeLocale(locale, this.messages);
  21581. locale && (message = this.messages[locale]);
  21582. } else {
  21583. values = locale;
  21584. }
  21585. if (!hasOwn(message, key)) {
  21586. console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`);
  21587. return key;
  21588. }
  21589. return this.formater.interpolate(message[key], values).join("");
  21590. }
  21591. }
  21592. function watchAppLocale(appVm, i18n) {
  21593. if (appVm.$watchLocale) {
  21594. appVm.$watchLocale((newLocale) => {
  21595. i18n.setLocale(newLocale);
  21596. });
  21597. } else {
  21598. appVm.$watch(() => appVm.$locale, (newLocale) => {
  21599. i18n.setLocale(newLocale);
  21600. });
  21601. }
  21602. }
  21603. function getDefaultLocale() {
  21604. if (typeof uni !== "undefined" && uni.getLocale) {
  21605. return uni.getLocale();
  21606. }
  21607. if (typeof global !== "undefined" && global.getLocale) {
  21608. return global.getLocale();
  21609. }
  21610. return LOCALE_EN;
  21611. }
  21612. function initVueI18n(locale, messages2 = {}, fallbackLocale, watcher) {
  21613. if (typeof locale !== "string") {
  21614. const options = [
  21615. messages2,
  21616. locale
  21617. ];
  21618. locale = options[0];
  21619. messages2 = options[1];
  21620. }
  21621. if (typeof locale !== "string") {
  21622. locale = getDefaultLocale();
  21623. }
  21624. if (typeof fallbackLocale !== "string") {
  21625. fallbackLocale = typeof __uniConfig !== "undefined" && __uniConfig.fallbackLocale || LOCALE_EN;
  21626. }
  21627. const i18n = new I18n({
  21628. locale,
  21629. fallbackLocale,
  21630. messages: messages2,
  21631. watcher
  21632. });
  21633. let t2 = (key, values) => {
  21634. if (typeof getApp !== "function") {
  21635. t2 = function(key2, values2) {
  21636. return i18n.t(key2, values2);
  21637. };
  21638. } else {
  21639. let isWatchedAppLocale = false;
  21640. t2 = function(key2, values2) {
  21641. const appVm = getApp().$vm;
  21642. if (appVm) {
  21643. appVm.$locale;
  21644. if (!isWatchedAppLocale) {
  21645. isWatchedAppLocale = true;
  21646. watchAppLocale(appVm, i18n);
  21647. }
  21648. }
  21649. return i18n.t(key2, values2);
  21650. };
  21651. }
  21652. return t2(key, values);
  21653. };
  21654. return {
  21655. i18n,
  21656. f(message, values, delimiters) {
  21657. return i18n.f(message, values, delimiters);
  21658. },
  21659. t(key, values) {
  21660. return t2(key, values);
  21661. },
  21662. add(locale2, message, override = true) {
  21663. return i18n.add(locale2, message, override);
  21664. },
  21665. watch(fn) {
  21666. return i18n.watchLocale(fn);
  21667. },
  21668. getLocale() {
  21669. return i18n.getLocale();
  21670. },
  21671. setLocale(newLocale) {
  21672. return i18n.setLocale(newLocale);
  21673. }
  21674. };
  21675. }
  21676. const en = {
  21677. "uni-datetime-picker.selectDate": "select date",
  21678. "uni-datetime-picker.selectTime": "select time",
  21679. "uni-datetime-picker.selectDateTime": "select date and time",
  21680. "uni-datetime-picker.startDate": "start date",
  21681. "uni-datetime-picker.endDate": "end date",
  21682. "uni-datetime-picker.startTime": "start time",
  21683. "uni-datetime-picker.endTime": "end time",
  21684. "uni-datetime-picker.ok": "ok",
  21685. "uni-datetime-picker.clear": "clear",
  21686. "uni-datetime-picker.cancel": "cancel",
  21687. "uni-datetime-picker.year": "-",
  21688. "uni-datetime-picker.month": "",
  21689. "uni-calender.MON": "MON",
  21690. "uni-calender.TUE": "TUE",
  21691. "uni-calender.WED": "WED",
  21692. "uni-calender.THU": "THU",
  21693. "uni-calender.FRI": "FRI",
  21694. "uni-calender.SAT": "SAT",
  21695. "uni-calender.SUN": "SUN",
  21696. "uni-calender.confirm": "confirm"
  21697. };
  21698. const zhHans = {
  21699. "uni-datetime-picker.selectDate": "选择日期",
  21700. "uni-datetime-picker.selectTime": "选择时间",
  21701. "uni-datetime-picker.selectDateTime": "选择日期时间",
  21702. "uni-datetime-picker.startDate": "开始日期",
  21703. "uni-datetime-picker.endDate": "结束日期",
  21704. "uni-datetime-picker.startTime": "开始时间",
  21705. "uni-datetime-picker.endTime": "结束时间",
  21706. "uni-datetime-picker.ok": "确定",
  21707. "uni-datetime-picker.clear": "清除",
  21708. "uni-datetime-picker.cancel": "取消",
  21709. "uni-datetime-picker.year": "年",
  21710. "uni-datetime-picker.month": "月",
  21711. "uni-calender.SUN": "日",
  21712. "uni-calender.MON": "一",
  21713. "uni-calender.TUE": "二",
  21714. "uni-calender.WED": "三",
  21715. "uni-calender.THU": "四",
  21716. "uni-calender.FRI": "五",
  21717. "uni-calender.SAT": "六",
  21718. "uni-calender.confirm": "确认"
  21719. };
  21720. const zhHant = {
  21721. "uni-datetime-picker.selectDate": "選擇日期",
  21722. "uni-datetime-picker.selectTime": "選擇時間",
  21723. "uni-datetime-picker.selectDateTime": "選擇日期時間",
  21724. "uni-datetime-picker.startDate": "開始日期",
  21725. "uni-datetime-picker.endDate": "結束日期",
  21726. "uni-datetime-picker.startTime": "開始时间",
  21727. "uni-datetime-picker.endTime": "結束时间",
  21728. "uni-datetime-picker.ok": "確定",
  21729. "uni-datetime-picker.clear": "清除",
  21730. "uni-datetime-picker.cancel": "取消",
  21731. "uni-datetime-picker.year": "年",
  21732. "uni-datetime-picker.month": "月",
  21733. "uni-calender.SUN": "日",
  21734. "uni-calender.MON": "一",
  21735. "uni-calender.TUE": "二",
  21736. "uni-calender.WED": "三",
  21737. "uni-calender.THU": "四",
  21738. "uni-calender.FRI": "五",
  21739. "uni-calender.SAT": "六",
  21740. "uni-calender.confirm": "確認"
  21741. };
  21742. const i18nMessages = {
  21743. en,
  21744. "zh-Hans": zhHans,
  21745. "zh-Hant": zhHant
  21746. };
  21747. const { t: t$1 } = initVueI18n(i18nMessages);
  21748. const _sfc_main$S = {
  21749. name: "UniDatetimePicker",
  21750. data() {
  21751. return {
  21752. indicatorStyle: `height: 50px;`,
  21753. visible: false,
  21754. fixNvueBug: {},
  21755. dateShow: true,
  21756. timeShow: true,
  21757. title: "日期和时间",
  21758. // 输入框当前时间
  21759. time: "",
  21760. // 当前的年月日时分秒
  21761. year: 1920,
  21762. month: 0,
  21763. day: 0,
  21764. hour: 0,
  21765. minute: 0,
  21766. second: 0,
  21767. // 起始时间
  21768. startYear: 1920,
  21769. startMonth: 1,
  21770. startDay: 1,
  21771. startHour: 0,
  21772. startMinute: 0,
  21773. startSecond: 0,
  21774. // 结束时间
  21775. endYear: 2120,
  21776. endMonth: 12,
  21777. endDay: 31,
  21778. endHour: 23,
  21779. endMinute: 59,
  21780. endSecond: 59
  21781. };
  21782. },
  21783. props: {
  21784. type: {
  21785. type: String,
  21786. default: "datetime"
  21787. },
  21788. value: {
  21789. type: [String, Number],
  21790. default: ""
  21791. },
  21792. modelValue: {
  21793. type: [String, Number],
  21794. default: ""
  21795. },
  21796. start: {
  21797. type: [Number, String],
  21798. default: ""
  21799. },
  21800. end: {
  21801. type: [Number, String],
  21802. default: ""
  21803. },
  21804. returnType: {
  21805. type: String,
  21806. default: "string"
  21807. },
  21808. disabled: {
  21809. type: [Boolean, String],
  21810. default: false
  21811. },
  21812. border: {
  21813. type: [Boolean, String],
  21814. default: true
  21815. },
  21816. hideSecond: {
  21817. type: [Boolean, String],
  21818. default: false
  21819. }
  21820. },
  21821. watch: {
  21822. modelValue: {
  21823. handler(newVal) {
  21824. if (newVal) {
  21825. this.parseValue(fixIosDateFormat(newVal));
  21826. this.initTime(false);
  21827. } else {
  21828. this.time = "";
  21829. this.parseValue(Date.now());
  21830. }
  21831. },
  21832. immediate: true
  21833. },
  21834. type: {
  21835. handler(newValue) {
  21836. if (newValue === "date") {
  21837. this.dateShow = true;
  21838. this.timeShow = false;
  21839. this.title = "日期";
  21840. } else if (newValue === "time") {
  21841. this.dateShow = false;
  21842. this.timeShow = true;
  21843. this.title = "时间";
  21844. } else {
  21845. this.dateShow = true;
  21846. this.timeShow = true;
  21847. this.title = "日期和时间";
  21848. }
  21849. },
  21850. immediate: true
  21851. },
  21852. start: {
  21853. handler(newVal) {
  21854. this.parseDatetimeRange(fixIosDateFormat(newVal), "start");
  21855. },
  21856. immediate: true
  21857. },
  21858. end: {
  21859. handler(newVal) {
  21860. this.parseDatetimeRange(fixIosDateFormat(newVal), "end");
  21861. },
  21862. immediate: true
  21863. },
  21864. // 月、日、时、分、秒可选范围变化后,检查当前值是否在范围内,不在则当前值重置为可选范围第一项
  21865. months(newVal) {
  21866. this.checkValue("month", this.month, newVal);
  21867. },
  21868. days(newVal) {
  21869. this.checkValue("day", this.day, newVal);
  21870. },
  21871. hours(newVal) {
  21872. this.checkValue("hour", this.hour, newVal);
  21873. },
  21874. minutes(newVal) {
  21875. this.checkValue("minute", this.minute, newVal);
  21876. },
  21877. seconds(newVal) {
  21878. this.checkValue("second", this.second, newVal);
  21879. }
  21880. },
  21881. computed: {
  21882. // 当前年、月、日、时、分、秒选择范围
  21883. years() {
  21884. return this.getCurrentRange("year");
  21885. },
  21886. months() {
  21887. return this.getCurrentRange("month");
  21888. },
  21889. days() {
  21890. return this.getCurrentRange("day");
  21891. },
  21892. hours() {
  21893. return this.getCurrentRange("hour");
  21894. },
  21895. minutes() {
  21896. return this.getCurrentRange("minute");
  21897. },
  21898. seconds() {
  21899. return this.getCurrentRange("second");
  21900. },
  21901. // picker 当前值数组
  21902. ymd() {
  21903. return [this.year - this.minYear, this.month - this.minMonth, this.day - this.minDay];
  21904. },
  21905. hms() {
  21906. return [this.hour - this.minHour, this.minute - this.minMinute, this.second - this.minSecond];
  21907. },
  21908. // 当前 date 是 start
  21909. currentDateIsStart() {
  21910. return this.year === this.startYear && this.month === this.startMonth && this.day === this.startDay;
  21911. },
  21912. // 当前 date 是 end
  21913. currentDateIsEnd() {
  21914. return this.year === this.endYear && this.month === this.endMonth && this.day === this.endDay;
  21915. },
  21916. // 当前年、月、日、时、分、秒的最小值和最大值
  21917. minYear() {
  21918. return this.startYear;
  21919. },
  21920. maxYear() {
  21921. return this.endYear;
  21922. },
  21923. minMonth() {
  21924. if (this.year === this.startYear) {
  21925. return this.startMonth;
  21926. } else {
  21927. return 1;
  21928. }
  21929. },
  21930. maxMonth() {
  21931. if (this.year === this.endYear) {
  21932. return this.endMonth;
  21933. } else {
  21934. return 12;
  21935. }
  21936. },
  21937. minDay() {
  21938. if (this.year === this.startYear && this.month === this.startMonth) {
  21939. return this.startDay;
  21940. } else {
  21941. return 1;
  21942. }
  21943. },
  21944. maxDay() {
  21945. if (this.year === this.endYear && this.month === this.endMonth) {
  21946. return this.endDay;
  21947. } else {
  21948. return this.daysInMonth(this.year, this.month);
  21949. }
  21950. },
  21951. minHour() {
  21952. if (this.type === "datetime") {
  21953. if (this.currentDateIsStart) {
  21954. return this.startHour;
  21955. } else {
  21956. return 0;
  21957. }
  21958. }
  21959. if (this.type === "time") {
  21960. return this.startHour;
  21961. }
  21962. },
  21963. maxHour() {
  21964. if (this.type === "datetime") {
  21965. if (this.currentDateIsEnd) {
  21966. return this.endHour;
  21967. } else {
  21968. return 23;
  21969. }
  21970. }
  21971. if (this.type === "time") {
  21972. return this.endHour;
  21973. }
  21974. },
  21975. minMinute() {
  21976. if (this.type === "datetime") {
  21977. if (this.currentDateIsStart && this.hour === this.startHour) {
  21978. return this.startMinute;
  21979. } else {
  21980. return 0;
  21981. }
  21982. }
  21983. if (this.type === "time") {
  21984. if (this.hour === this.startHour) {
  21985. return this.startMinute;
  21986. } else {
  21987. return 0;
  21988. }
  21989. }
  21990. },
  21991. maxMinute() {
  21992. if (this.type === "datetime") {
  21993. if (this.currentDateIsEnd && this.hour === this.endHour) {
  21994. return this.endMinute;
  21995. } else {
  21996. return 59;
  21997. }
  21998. }
  21999. if (this.type === "time") {
  22000. if (this.hour === this.endHour) {
  22001. return this.endMinute;
  22002. } else {
  22003. return 59;
  22004. }
  22005. }
  22006. },
  22007. minSecond() {
  22008. if (this.type === "datetime") {
  22009. if (this.currentDateIsStart && this.hour === this.startHour && this.minute === this.startMinute) {
  22010. return this.startSecond;
  22011. } else {
  22012. return 0;
  22013. }
  22014. }
  22015. if (this.type === "time") {
  22016. if (this.hour === this.startHour && this.minute === this.startMinute) {
  22017. return this.startSecond;
  22018. } else {
  22019. return 0;
  22020. }
  22021. }
  22022. },
  22023. maxSecond() {
  22024. if (this.type === "datetime") {
  22025. if (this.currentDateIsEnd && this.hour === this.endHour && this.minute === this.endMinute) {
  22026. return this.endSecond;
  22027. } else {
  22028. return 59;
  22029. }
  22030. }
  22031. if (this.type === "time") {
  22032. if (this.hour === this.endHour && this.minute === this.endMinute) {
  22033. return this.endSecond;
  22034. } else {
  22035. return 59;
  22036. }
  22037. }
  22038. },
  22039. /**
  22040. * for i18n
  22041. */
  22042. selectTimeText() {
  22043. return t$1("uni-datetime-picker.selectTime");
  22044. },
  22045. okText() {
  22046. return t$1("uni-datetime-picker.ok");
  22047. },
  22048. clearText() {
  22049. return t$1("uni-datetime-picker.clear");
  22050. },
  22051. cancelText() {
  22052. return t$1("uni-datetime-picker.cancel");
  22053. }
  22054. },
  22055. mounted() {
  22056. },
  22057. methods: {
  22058. /**
  22059. * @param {Object} item
  22060. * 小于 10 在前面加个 0
  22061. */
  22062. lessThanTen(item) {
  22063. return item < 10 ? "0" + item : item;
  22064. },
  22065. /**
  22066. * 解析时分秒字符串,例如:00:00:00
  22067. * @param {String} timeString
  22068. */
  22069. parseTimeType(timeString) {
  22070. if (timeString) {
  22071. let timeArr = timeString.split(":");
  22072. this.hour = Number(timeArr[0]);
  22073. this.minute = Number(timeArr[1]);
  22074. this.second = Number(timeArr[2]);
  22075. }
  22076. },
  22077. /**
  22078. * 解析选择器初始值,类型可以是字符串、时间戳,例如:2000-10-02、'08:30:00'、 1610695109000
  22079. * @param {String | Number} datetime
  22080. */
  22081. initPickerValue(datetime) {
  22082. let defaultValue = null;
  22083. if (datetime) {
  22084. defaultValue = this.compareValueWithStartAndEnd(datetime, this.start, this.end);
  22085. } else {
  22086. defaultValue = Date.now();
  22087. defaultValue = this.compareValueWithStartAndEnd(defaultValue, this.start, this.end);
  22088. }
  22089. this.parseValue(defaultValue);
  22090. },
  22091. /**
  22092. * 初始值规则:
  22093. * - 用户设置初始值 value
  22094. * - 设置了起始时间 start、终止时间 end,并 start < value < end,初始值为 value, 否则初始值为 start
  22095. * - 只设置了起始时间 start,并 start < value,初始值为 value,否则初始值为 start
  22096. * - 只设置了终止时间 end,并 value < end,初始值为 value,否则初始值为 end
  22097. * - 无起始终止时间,则初始值为 value
  22098. * - 无初始值 value,则初始值为当前本地时间 Date.now()
  22099. * @param {Object} value
  22100. * @param {Object} dateBase
  22101. */
  22102. compareValueWithStartAndEnd(value2, start, end) {
  22103. let winner = null;
  22104. value2 = this.superTimeStamp(value2);
  22105. start = this.superTimeStamp(start);
  22106. end = this.superTimeStamp(end);
  22107. if (start && end) {
  22108. if (value2 < start) {
  22109. winner = new Date(start);
  22110. } else if (value2 > end) {
  22111. winner = new Date(end);
  22112. } else {
  22113. winner = new Date(value2);
  22114. }
  22115. } else if (start && !end) {
  22116. winner = start <= value2 ? new Date(value2) : new Date(start);
  22117. } else if (!start && end) {
  22118. winner = value2 <= end ? new Date(value2) : new Date(end);
  22119. } else {
  22120. winner = new Date(value2);
  22121. }
  22122. return winner;
  22123. },
  22124. /**
  22125. * 转换为可比较的时间戳,接受日期、时分秒、时间戳
  22126. * @param {Object} value
  22127. */
  22128. superTimeStamp(value2) {
  22129. let dateBase = "";
  22130. if (this.type === "time" && value2 && typeof value2 === "string") {
  22131. const now2 = /* @__PURE__ */ new Date();
  22132. const year = now2.getFullYear();
  22133. const month = now2.getMonth() + 1;
  22134. const day = now2.getDate();
  22135. dateBase = year + "/" + month + "/" + day + " ";
  22136. }
  22137. if (Number(value2)) {
  22138. value2 = parseInt(value2);
  22139. dateBase = 0;
  22140. }
  22141. return this.createTimeStamp(dateBase + value2);
  22142. },
  22143. /**
  22144. * 解析默认值 value,字符串、时间戳
  22145. * @param {Object} defaultTime
  22146. */
  22147. parseValue(value2) {
  22148. if (!value2) {
  22149. return;
  22150. }
  22151. if (this.type === "time" && typeof value2 === "string") {
  22152. this.parseTimeType(value2);
  22153. } else {
  22154. let defaultDate = null;
  22155. defaultDate = new Date(value2);
  22156. if (this.type !== "time") {
  22157. this.year = defaultDate.getFullYear();
  22158. this.month = defaultDate.getMonth() + 1;
  22159. this.day = defaultDate.getDate();
  22160. }
  22161. if (this.type !== "date") {
  22162. this.hour = defaultDate.getHours();
  22163. this.minute = defaultDate.getMinutes();
  22164. this.second = defaultDate.getSeconds();
  22165. }
  22166. }
  22167. if (this.hideSecond) {
  22168. this.second = 0;
  22169. }
  22170. },
  22171. /**
  22172. * 解析可选择时间范围 start、end,年月日字符串、时间戳
  22173. * @param {Object} defaultTime
  22174. */
  22175. parseDatetimeRange(point, pointType) {
  22176. if (!point) {
  22177. if (pointType === "start") {
  22178. this.startYear = 1920;
  22179. this.startMonth = 1;
  22180. this.startDay = 1;
  22181. this.startHour = 0;
  22182. this.startMinute = 0;
  22183. this.startSecond = 0;
  22184. }
  22185. if (pointType === "end") {
  22186. this.endYear = 2120;
  22187. this.endMonth = 12;
  22188. this.endDay = 31;
  22189. this.endHour = 23;
  22190. this.endMinute = 59;
  22191. this.endSecond = 59;
  22192. }
  22193. return;
  22194. }
  22195. if (this.type === "time") {
  22196. const pointArr = point.split(":");
  22197. this[pointType + "Hour"] = Number(pointArr[0]);
  22198. this[pointType + "Minute"] = Number(pointArr[1]);
  22199. this[pointType + "Second"] = Number(pointArr[2]);
  22200. } else {
  22201. if (!point) {
  22202. pointType === "start" ? this.startYear = this.year - 60 : this.endYear = this.year + 60;
  22203. return;
  22204. }
  22205. if (Number(point)) {
  22206. point = parseInt(point);
  22207. }
  22208. const hasTime = /[0-9]:[0-9]/;
  22209. if (this.type === "datetime" && pointType === "end" && typeof point === "string" && !hasTime.test(
  22210. point
  22211. )) {
  22212. point = point + " 23:59:59";
  22213. }
  22214. const pointDate = new Date(point);
  22215. this[pointType + "Year"] = pointDate.getFullYear();
  22216. this[pointType + "Month"] = pointDate.getMonth() + 1;
  22217. this[pointType + "Day"] = pointDate.getDate();
  22218. if (this.type === "datetime") {
  22219. this[pointType + "Hour"] = pointDate.getHours();
  22220. this[pointType + "Minute"] = pointDate.getMinutes();
  22221. this[pointType + "Second"] = pointDate.getSeconds();
  22222. }
  22223. }
  22224. },
  22225. // 获取 年、月、日、时、分、秒 当前可选范围
  22226. getCurrentRange(value2) {
  22227. const range2 = [];
  22228. for (let i = this["min" + this.capitalize(value2)]; i <= this["max" + this.capitalize(value2)]; i++) {
  22229. range2.push(i);
  22230. }
  22231. return range2;
  22232. },
  22233. // 字符串首字母大写
  22234. capitalize(str) {
  22235. return str.charAt(0).toUpperCase() + str.slice(1);
  22236. },
  22237. // 检查当前值是否在范围内,不在则当前值重置为可选范围第一项
  22238. checkValue(name, value2, values) {
  22239. if (values.indexOf(value2) === -1) {
  22240. this[name] = values[0];
  22241. }
  22242. },
  22243. // 每个月的实际天数
  22244. daysInMonth(year, month) {
  22245. return new Date(year, month, 0).getDate();
  22246. },
  22247. //兼容 iOS、safari 日期格式
  22248. fixIosDateFormat(value2) {
  22249. if (typeof value2 === "string") {
  22250. value2 = value2.replace(/-/g, "/");
  22251. }
  22252. return value2;
  22253. },
  22254. /**
  22255. * 生成时间戳
  22256. * @param {Object} time
  22257. */
  22258. createTimeStamp(time) {
  22259. if (!time)
  22260. return;
  22261. if (typeof time === "number") {
  22262. return time;
  22263. } else {
  22264. time = time.replace(/-/g, "/");
  22265. if (this.type === "date") {
  22266. time = time + " 00:00:00";
  22267. }
  22268. return Date.parse(time);
  22269. }
  22270. },
  22271. /**
  22272. * 生成日期或时间的字符串
  22273. */
  22274. createDomSting() {
  22275. const yymmdd = this.year + "-" + this.lessThanTen(this.month) + "-" + this.lessThanTen(this.day);
  22276. let hhmmss = this.lessThanTen(this.hour) + ":" + this.lessThanTen(this.minute);
  22277. if (!this.hideSecond) {
  22278. hhmmss = hhmmss + ":" + this.lessThanTen(this.second);
  22279. }
  22280. if (this.type === "date") {
  22281. return yymmdd;
  22282. } else if (this.type === "time") {
  22283. return hhmmss;
  22284. } else {
  22285. return yymmdd + " " + hhmmss;
  22286. }
  22287. },
  22288. /**
  22289. * 初始化返回值,并抛出 change 事件
  22290. */
  22291. initTime(emit2 = true) {
  22292. this.time = this.createDomSting();
  22293. if (!emit2)
  22294. return;
  22295. if (this.returnType === "timestamp" && this.type !== "time") {
  22296. this.$emit("change", this.createTimeStamp(this.time));
  22297. this.$emit("input", this.createTimeStamp(this.time));
  22298. this.$emit("update:modelValue", this.createTimeStamp(this.time));
  22299. } else {
  22300. this.$emit("change", this.time);
  22301. this.$emit("input", this.time);
  22302. this.$emit("update:modelValue", this.time);
  22303. }
  22304. },
  22305. /**
  22306. * 用户选择日期或时间更新 data
  22307. * @param {Object} e
  22308. */
  22309. bindDateChange(e) {
  22310. const val = e.detail.value;
  22311. this.year = this.years[val[0]];
  22312. this.month = this.months[val[1]];
  22313. this.day = this.days[val[2]];
  22314. },
  22315. bindTimeChange(e) {
  22316. const val = e.detail.value;
  22317. this.hour = this.hours[val[0]];
  22318. this.minute = this.minutes[val[1]];
  22319. this.second = this.seconds[val[2]];
  22320. },
  22321. /**
  22322. * 初始化弹出层
  22323. */
  22324. initTimePicker() {
  22325. if (this.disabled)
  22326. return;
  22327. const value2 = fixIosDateFormat(this.time);
  22328. this.initPickerValue(value2);
  22329. this.visible = !this.visible;
  22330. },
  22331. /**
  22332. * 触发或关闭弹框
  22333. */
  22334. tiggerTimePicker(e) {
  22335. this.visible = !this.visible;
  22336. },
  22337. /**
  22338. * 用户点击“清空”按钮,清空当前值
  22339. */
  22340. clearTime() {
  22341. this.time = "";
  22342. this.$emit("change", this.time);
  22343. this.$emit("input", this.time);
  22344. this.$emit("update:modelValue", this.time);
  22345. this.tiggerTimePicker();
  22346. },
  22347. /**
  22348. * 用户点击“确定”按钮
  22349. */
  22350. setTime() {
  22351. this.initTime();
  22352. this.tiggerTimePicker();
  22353. }
  22354. }
  22355. };
  22356. function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
  22357. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker" }, [
  22358. vue.createElementVNode("view", {
  22359. onClick: _cache[0] || (_cache[0] = (...args) => $options.initTimePicker && $options.initTimePicker(...args))
  22360. }, [
  22361. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  22362. vue.createElementVNode(
  22363. "view",
  22364. {
  22365. class: vue.normalizeClass(["uni-datetime-picker-timebox-pointer", { "uni-datetime-picker-disabled": $props.disabled, "uni-datetime-picker-timebox": $props.border }])
  22366. },
  22367. [
  22368. vue.createElementVNode(
  22369. "text",
  22370. { class: "uni-datetime-picker-text" },
  22371. vue.toDisplayString($data.time),
  22372. 1
  22373. /* TEXT */
  22374. ),
  22375. !$data.time ? (vue.openBlock(), vue.createElementBlock("view", {
  22376. key: 0,
  22377. class: "uni-datetime-picker-time"
  22378. }, [
  22379. vue.createElementVNode(
  22380. "text",
  22381. { class: "uni-datetime-picker-text" },
  22382. vue.toDisplayString($options.selectTimeText),
  22383. 1
  22384. /* TEXT */
  22385. )
  22386. ])) : vue.createCommentVNode("v-if", true)
  22387. ],
  22388. 2
  22389. /* CLASS */
  22390. )
  22391. ], true)
  22392. ]),
  22393. $data.visible ? (vue.openBlock(), vue.createElementBlock("view", {
  22394. key: 0,
  22395. id: "mask",
  22396. class: "uni-datetime-picker-mask",
  22397. onClick: _cache[1] || (_cache[1] = (...args) => $options.tiggerTimePicker && $options.tiggerTimePicker(...args))
  22398. })) : vue.createCommentVNode("v-if", true),
  22399. $data.visible ? (vue.openBlock(), vue.createElementBlock(
  22400. "view",
  22401. {
  22402. key: 1,
  22403. class: vue.normalizeClass(["uni-datetime-picker-popup", [$data.dateShow && $data.timeShow ? "" : "fix-nvue-height"]]),
  22404. style: vue.normalizeStyle($data.fixNvueBug)
  22405. },
  22406. [
  22407. vue.createElementVNode("view", { class: "uni-title" }, [
  22408. vue.createElementVNode(
  22409. "text",
  22410. { class: "uni-datetime-picker-text" },
  22411. vue.toDisplayString($options.selectTimeText),
  22412. 1
  22413. /* TEXT */
  22414. )
  22415. ]),
  22416. $data.dateShow ? (vue.openBlock(), vue.createElementBlock("view", {
  22417. key: 0,
  22418. class: "uni-datetime-picker__container-box"
  22419. }, [
  22420. vue.createElementVNode("picker-view", {
  22421. class: "uni-datetime-picker-view",
  22422. "indicator-style": $data.indicatorStyle,
  22423. value: $options.ymd,
  22424. onChange: _cache[2] || (_cache[2] = (...args) => $options.bindDateChange && $options.bindDateChange(...args))
  22425. }, [
  22426. vue.createElementVNode("picker-view-column", null, [
  22427. (vue.openBlock(true), vue.createElementBlock(
  22428. vue.Fragment,
  22429. null,
  22430. vue.renderList($options.years, (item, index2) => {
  22431. return vue.openBlock(), vue.createElementBlock("view", {
  22432. class: "uni-datetime-picker-item",
  22433. key: index2
  22434. }, [
  22435. vue.createElementVNode(
  22436. "text",
  22437. { class: "uni-datetime-picker-item" },
  22438. vue.toDisplayString($options.lessThanTen(item)),
  22439. 1
  22440. /* TEXT */
  22441. )
  22442. ]);
  22443. }),
  22444. 128
  22445. /* KEYED_FRAGMENT */
  22446. ))
  22447. ]),
  22448. vue.createElementVNode("picker-view-column", null, [
  22449. (vue.openBlock(true), vue.createElementBlock(
  22450. vue.Fragment,
  22451. null,
  22452. vue.renderList($options.months, (item, index2) => {
  22453. return vue.openBlock(), vue.createElementBlock("view", {
  22454. class: "uni-datetime-picker-item",
  22455. key: index2
  22456. }, [
  22457. vue.createElementVNode(
  22458. "text",
  22459. { class: "uni-datetime-picker-item" },
  22460. vue.toDisplayString($options.lessThanTen(item)),
  22461. 1
  22462. /* TEXT */
  22463. )
  22464. ]);
  22465. }),
  22466. 128
  22467. /* KEYED_FRAGMENT */
  22468. ))
  22469. ]),
  22470. vue.createElementVNode("picker-view-column", null, [
  22471. (vue.openBlock(true), vue.createElementBlock(
  22472. vue.Fragment,
  22473. null,
  22474. vue.renderList($options.days, (item, index2) => {
  22475. return vue.openBlock(), vue.createElementBlock("view", {
  22476. class: "uni-datetime-picker-item",
  22477. key: index2
  22478. }, [
  22479. vue.createElementVNode(
  22480. "text",
  22481. { class: "uni-datetime-picker-item" },
  22482. vue.toDisplayString($options.lessThanTen(item)),
  22483. 1
  22484. /* TEXT */
  22485. )
  22486. ]);
  22487. }),
  22488. 128
  22489. /* KEYED_FRAGMENT */
  22490. ))
  22491. ])
  22492. ], 40, ["indicator-style", "value"]),
  22493. vue.createCommentVNode(" 兼容 nvue 不支持伪类 "),
  22494. vue.createElementVNode("text", { class: "uni-datetime-picker-sign sign-left" }, "-"),
  22495. vue.createElementVNode("text", { class: "uni-datetime-picker-sign sign-right" }, "-")
  22496. ])) : vue.createCommentVNode("v-if", true),
  22497. $data.timeShow ? (vue.openBlock(), vue.createElementBlock("view", {
  22498. key: 1,
  22499. class: "uni-datetime-picker__container-box"
  22500. }, [
  22501. vue.createElementVNode("picker-view", {
  22502. class: vue.normalizeClass(["uni-datetime-picker-view", [$props.hideSecond ? "time-hide-second" : ""]]),
  22503. "indicator-style": $data.indicatorStyle,
  22504. value: $options.hms,
  22505. onChange: _cache[3] || (_cache[3] = (...args) => $options.bindTimeChange && $options.bindTimeChange(...args))
  22506. }, [
  22507. vue.createElementVNode("picker-view-column", null, [
  22508. (vue.openBlock(true), vue.createElementBlock(
  22509. vue.Fragment,
  22510. null,
  22511. vue.renderList($options.hours, (item, index2) => {
  22512. return vue.openBlock(), vue.createElementBlock("view", {
  22513. class: "uni-datetime-picker-item",
  22514. key: index2
  22515. }, [
  22516. vue.createElementVNode(
  22517. "text",
  22518. { class: "uni-datetime-picker-item" },
  22519. vue.toDisplayString($options.lessThanTen(item)),
  22520. 1
  22521. /* TEXT */
  22522. )
  22523. ]);
  22524. }),
  22525. 128
  22526. /* KEYED_FRAGMENT */
  22527. ))
  22528. ]),
  22529. vue.createElementVNode("picker-view-column", null, [
  22530. (vue.openBlock(true), vue.createElementBlock(
  22531. vue.Fragment,
  22532. null,
  22533. vue.renderList($options.minutes, (item, index2) => {
  22534. return vue.openBlock(), vue.createElementBlock("view", {
  22535. class: "uni-datetime-picker-item",
  22536. key: index2
  22537. }, [
  22538. vue.createElementVNode(
  22539. "text",
  22540. { class: "uni-datetime-picker-item" },
  22541. vue.toDisplayString($options.lessThanTen(item)),
  22542. 1
  22543. /* TEXT */
  22544. )
  22545. ]);
  22546. }),
  22547. 128
  22548. /* KEYED_FRAGMENT */
  22549. ))
  22550. ]),
  22551. !$props.hideSecond ? (vue.openBlock(), vue.createElementBlock("picker-view-column", { key: 0 }, [
  22552. (vue.openBlock(true), vue.createElementBlock(
  22553. vue.Fragment,
  22554. null,
  22555. vue.renderList($options.seconds, (item, index2) => {
  22556. return vue.openBlock(), vue.createElementBlock("view", {
  22557. class: "uni-datetime-picker-item",
  22558. key: index2
  22559. }, [
  22560. vue.createElementVNode(
  22561. "text",
  22562. { class: "uni-datetime-picker-item" },
  22563. vue.toDisplayString($options.lessThanTen(item)),
  22564. 1
  22565. /* TEXT */
  22566. )
  22567. ]);
  22568. }),
  22569. 128
  22570. /* KEYED_FRAGMENT */
  22571. ))
  22572. ])) : vue.createCommentVNode("v-if", true)
  22573. ], 42, ["indicator-style", "value"]),
  22574. vue.createCommentVNode(" 兼容 nvue 不支持伪类 "),
  22575. vue.createElementVNode(
  22576. "text",
  22577. {
  22578. class: vue.normalizeClass(["uni-datetime-picker-sign", [$props.hideSecond ? "sign-center" : "sign-left"]])
  22579. },
  22580. ":",
  22581. 2
  22582. /* CLASS */
  22583. ),
  22584. !$props.hideSecond ? (vue.openBlock(), vue.createElementBlock("text", {
  22585. key: 0,
  22586. class: "uni-datetime-picker-sign sign-right"
  22587. }, ":")) : vue.createCommentVNode("v-if", true)
  22588. ])) : vue.createCommentVNode("v-if", true),
  22589. vue.createElementVNode("view", { class: "uni-datetime-picker-btn" }, [
  22590. vue.createElementVNode("view", {
  22591. onClick: _cache[4] || (_cache[4] = (...args) => $options.clearTime && $options.clearTime(...args))
  22592. }, [
  22593. vue.createElementVNode(
  22594. "text",
  22595. { class: "uni-datetime-picker-btn-text" },
  22596. vue.toDisplayString($options.clearText),
  22597. 1
  22598. /* TEXT */
  22599. )
  22600. ]),
  22601. vue.createElementVNode("view", { class: "uni-datetime-picker-btn-group" }, [
  22602. vue.createElementVNode("view", {
  22603. class: "uni-datetime-picker-cancel",
  22604. onClick: _cache[5] || (_cache[5] = (...args) => $options.tiggerTimePicker && $options.tiggerTimePicker(...args))
  22605. }, [
  22606. vue.createElementVNode(
  22607. "text",
  22608. { class: "uni-datetime-picker-btn-text" },
  22609. vue.toDisplayString($options.cancelText),
  22610. 1
  22611. /* TEXT */
  22612. )
  22613. ]),
  22614. vue.createElementVNode("view", {
  22615. onClick: _cache[6] || (_cache[6] = (...args) => $options.setTime && $options.setTime(...args))
  22616. }, [
  22617. vue.createElementVNode(
  22618. "text",
  22619. { class: "uni-datetime-picker-btn-text" },
  22620. vue.toDisplayString($options.okText),
  22621. 1
  22622. /* TEXT */
  22623. )
  22624. ])
  22625. ])
  22626. ])
  22627. ],
  22628. 6
  22629. /* CLASS, STYLE */
  22630. )) : vue.createCommentVNode("v-if", true)
  22631. ]);
  22632. }
  22633. const TimePicker = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$R], ["__scopeId", "data-v-1d532b70"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue"]]);
  22634. const { t } = initVueI18n(i18nMessages);
  22635. const _sfc_main$R = {
  22636. components: {
  22637. calendarItem,
  22638. timePicker: TimePicker
  22639. },
  22640. props: {
  22641. date: {
  22642. type: String,
  22643. default: ""
  22644. },
  22645. defTime: {
  22646. type: [String, Object],
  22647. default: ""
  22648. },
  22649. selectableTimes: {
  22650. type: [Object],
  22651. default() {
  22652. return {};
  22653. }
  22654. },
  22655. selected: {
  22656. type: Array,
  22657. default() {
  22658. return [];
  22659. }
  22660. },
  22661. startDate: {
  22662. type: String,
  22663. default: ""
  22664. },
  22665. endDate: {
  22666. type: String,
  22667. default: ""
  22668. },
  22669. startPlaceholder: {
  22670. type: String,
  22671. default: ""
  22672. },
  22673. endPlaceholder: {
  22674. type: String,
  22675. default: ""
  22676. },
  22677. range: {
  22678. type: Boolean,
  22679. default: false
  22680. },
  22681. hasTime: {
  22682. type: Boolean,
  22683. default: false
  22684. },
  22685. insert: {
  22686. type: Boolean,
  22687. default: true
  22688. },
  22689. showMonth: {
  22690. type: Boolean,
  22691. default: true
  22692. },
  22693. clearDate: {
  22694. type: Boolean,
  22695. default: true
  22696. },
  22697. checkHover: {
  22698. type: Boolean,
  22699. default: true
  22700. },
  22701. hideSecond: {
  22702. type: [Boolean],
  22703. default: false
  22704. },
  22705. pleStatus: {
  22706. type: Object,
  22707. default() {
  22708. return {
  22709. before: "",
  22710. after: "",
  22711. data: [],
  22712. fulldate: ""
  22713. };
  22714. }
  22715. },
  22716. defaultValue: {
  22717. type: [String, Object, Array],
  22718. default: ""
  22719. }
  22720. },
  22721. data() {
  22722. return {
  22723. show: false,
  22724. weeks: [],
  22725. calendar: {},
  22726. nowDate: {},
  22727. aniMaskShow: false,
  22728. firstEnter: true,
  22729. time: "",
  22730. timeRange: {
  22731. startTime: "",
  22732. endTime: ""
  22733. },
  22734. tempSingleDate: "",
  22735. tempRange: {
  22736. before: "",
  22737. after: ""
  22738. }
  22739. };
  22740. },
  22741. watch: {
  22742. date: {
  22743. immediate: true,
  22744. handler(newVal) {
  22745. if (!this.range) {
  22746. this.tempSingleDate = newVal;
  22747. setTimeout(() => {
  22748. this.init(newVal);
  22749. }, 100);
  22750. }
  22751. }
  22752. },
  22753. defTime: {
  22754. immediate: true,
  22755. handler(newVal) {
  22756. if (!this.range) {
  22757. this.time = newVal;
  22758. } else {
  22759. this.timeRange.startTime = newVal.start;
  22760. this.timeRange.endTime = newVal.end;
  22761. }
  22762. }
  22763. },
  22764. startDate(val) {
  22765. if (!this.cale) {
  22766. return;
  22767. }
  22768. this.cale.setStartDate(val);
  22769. this.cale.setDate(this.nowDate.fullDate);
  22770. this.weeks = this.cale.weeks;
  22771. },
  22772. endDate(val) {
  22773. if (!this.cale) {
  22774. return;
  22775. }
  22776. this.cale.setEndDate(val);
  22777. this.cale.setDate(this.nowDate.fullDate);
  22778. this.weeks = this.cale.weeks;
  22779. },
  22780. selected(newVal) {
  22781. if (!this.cale) {
  22782. return;
  22783. }
  22784. this.cale.setSelectInfo(this.nowDate.fullDate, newVal);
  22785. this.weeks = this.cale.weeks;
  22786. },
  22787. pleStatus: {
  22788. immediate: true,
  22789. handler(newVal) {
  22790. const {
  22791. before,
  22792. after,
  22793. fulldate,
  22794. which
  22795. } = newVal;
  22796. this.tempRange.before = before;
  22797. this.tempRange.after = after;
  22798. setTimeout(() => {
  22799. if (fulldate) {
  22800. this.cale.setHoverMultiple(fulldate);
  22801. if (before && after) {
  22802. this.cale.lastHover = true;
  22803. if (this.rangeWithinMonth(after, before))
  22804. return;
  22805. this.setDate(before);
  22806. } else {
  22807. this.cale.setMultiple(fulldate);
  22808. this.setDate(this.nowDate.fullDate);
  22809. this.calendar.fullDate = "";
  22810. this.cale.lastHover = false;
  22811. }
  22812. } else {
  22813. if (!this.cale) {
  22814. return;
  22815. }
  22816. this.cale.setDefaultMultiple(before, after);
  22817. if (which === "left" && before) {
  22818. this.setDate(before);
  22819. this.weeks = this.cale.weeks;
  22820. } else if (after) {
  22821. this.setDate(after);
  22822. this.weeks = this.cale.weeks;
  22823. }
  22824. this.cale.lastHover = true;
  22825. }
  22826. }, 16);
  22827. }
  22828. }
  22829. },
  22830. computed: {
  22831. timepickerStartTime() {
  22832. const activeDate = this.range ? this.tempRange.before : this.calendar.fullDate;
  22833. return activeDate === this.startDate ? this.selectableTimes.start : "";
  22834. },
  22835. timepickerEndTime() {
  22836. const activeDate = this.range ? this.tempRange.after : this.calendar.fullDate;
  22837. return activeDate === this.endDate ? this.selectableTimes.end : "";
  22838. },
  22839. /**
  22840. * for i18n
  22841. */
  22842. selectDateText() {
  22843. return t("uni-datetime-picker.selectDate");
  22844. },
  22845. startDateText() {
  22846. return this.startPlaceholder || t("uni-datetime-picker.startDate");
  22847. },
  22848. endDateText() {
  22849. return this.endPlaceholder || t("uni-datetime-picker.endDate");
  22850. },
  22851. okText() {
  22852. return t("uni-datetime-picker.ok");
  22853. },
  22854. yearText() {
  22855. return t("uni-datetime-picker.year");
  22856. },
  22857. monthText() {
  22858. return t("uni-datetime-picker.month");
  22859. },
  22860. MONText() {
  22861. return t("uni-calender.MON");
  22862. },
  22863. TUEText() {
  22864. return t("uni-calender.TUE");
  22865. },
  22866. WEDText() {
  22867. return t("uni-calender.WED");
  22868. },
  22869. THUText() {
  22870. return t("uni-calender.THU");
  22871. },
  22872. FRIText() {
  22873. return t("uni-calender.FRI");
  22874. },
  22875. SATText() {
  22876. return t("uni-calender.SAT");
  22877. },
  22878. SUNText() {
  22879. return t("uni-calender.SUN");
  22880. },
  22881. confirmText() {
  22882. return t("uni-calender.confirm");
  22883. }
  22884. },
  22885. created() {
  22886. this.cale = new Calendar$1({
  22887. selected: this.selected,
  22888. startDate: this.startDate,
  22889. endDate: this.endDate,
  22890. range: this.range
  22891. });
  22892. this.init(this.date);
  22893. },
  22894. methods: {
  22895. leaveCale() {
  22896. this.firstEnter = true;
  22897. },
  22898. handleMouse(weeks) {
  22899. if (weeks.disable)
  22900. return;
  22901. if (this.cale.lastHover)
  22902. return;
  22903. let {
  22904. before,
  22905. after
  22906. } = this.cale.multipleStatus;
  22907. if (!before)
  22908. return;
  22909. this.calendar = weeks;
  22910. this.cale.setHoverMultiple(this.calendar.fullDate);
  22911. this.weeks = this.cale.weeks;
  22912. if (this.firstEnter) {
  22913. this.$emit("firstEnterCale", this.cale.multipleStatus);
  22914. this.firstEnter = false;
  22915. }
  22916. },
  22917. rangeWithinMonth(A, B) {
  22918. const [yearA, monthA] = A.split("-");
  22919. const [yearB, monthB] = B.split("-");
  22920. return yearA === yearB && monthA === monthB;
  22921. },
  22922. // 蒙版点击事件
  22923. maskClick() {
  22924. this.close();
  22925. this.$emit("maskClose");
  22926. },
  22927. clearCalender() {
  22928. if (this.range) {
  22929. this.timeRange.startTime = "";
  22930. this.timeRange.endTime = "";
  22931. this.tempRange.before = "";
  22932. this.tempRange.after = "";
  22933. this.cale.multipleStatus.before = "";
  22934. this.cale.multipleStatus.after = "";
  22935. this.cale.multipleStatus.data = [];
  22936. this.cale.lastHover = false;
  22937. } else {
  22938. this.time = "";
  22939. this.tempSingleDate = "";
  22940. }
  22941. this.calendar.fullDate = "";
  22942. this.setDate(/* @__PURE__ */ new Date());
  22943. },
  22944. bindDateChange(e) {
  22945. const value2 = e.detail.value + "-1";
  22946. this.setDate(value2);
  22947. },
  22948. /**
  22949. * 初始化日期显示
  22950. * @param {Object} date
  22951. */
  22952. init(date3) {
  22953. if (!this.cale) {
  22954. return;
  22955. }
  22956. this.cale.setDate(date3 || /* @__PURE__ */ new Date());
  22957. this.weeks = this.cale.weeks;
  22958. this.nowDate = this.cale.getInfo(date3);
  22959. this.calendar = { ...this.nowDate };
  22960. if (!date3) {
  22961. this.calendar.fullDate = "";
  22962. if (this.defaultValue && !this.range) {
  22963. const defaultDate = new Date(this.defaultValue);
  22964. const fullDate = getDate(defaultDate);
  22965. const year = defaultDate.getFullYear();
  22966. const month = defaultDate.getMonth() + 1;
  22967. const date4 = defaultDate.getDate();
  22968. const day = defaultDate.getDay();
  22969. this.calendar = {
  22970. fullDate,
  22971. year,
  22972. month,
  22973. date: date4,
  22974. day
  22975. }, this.tempSingleDate = fullDate;
  22976. this.time = getTime(defaultDate, this.hideSecond);
  22977. }
  22978. }
  22979. },
  22980. /**
  22981. * 打开日历弹窗
  22982. */
  22983. open() {
  22984. if (this.clearDate && !this.insert) {
  22985. this.cale.cleanMultipleStatus();
  22986. this.init(this.date);
  22987. }
  22988. this.show = true;
  22989. this.$nextTick(() => {
  22990. setTimeout(() => {
  22991. this.aniMaskShow = true;
  22992. }, 50);
  22993. });
  22994. },
  22995. /**
  22996. * 关闭日历弹窗
  22997. */
  22998. close() {
  22999. this.aniMaskShow = false;
  23000. this.$nextTick(() => {
  23001. setTimeout(() => {
  23002. this.show = false;
  23003. this.$emit("close");
  23004. }, 300);
  23005. });
  23006. },
  23007. /**
  23008. * 确认按钮
  23009. */
  23010. confirm() {
  23011. this.setEmit("confirm");
  23012. this.close();
  23013. },
  23014. /**
  23015. * 变化触发
  23016. */
  23017. change() {
  23018. if (!this.insert)
  23019. return;
  23020. this.setEmit("change");
  23021. },
  23022. /**
  23023. * 选择月份触发
  23024. */
  23025. monthSwitch() {
  23026. let {
  23027. year,
  23028. month
  23029. } = this.nowDate;
  23030. this.$emit("monthSwitch", {
  23031. year,
  23032. month: Number(month)
  23033. });
  23034. },
  23035. /**
  23036. * 派发事件
  23037. * @param {Object} name
  23038. */
  23039. setEmit(name) {
  23040. if (!this.range) {
  23041. if (!this.calendar.fullDate) {
  23042. this.calendar = this.cale.getInfo(/* @__PURE__ */ new Date());
  23043. this.tempSingleDate = this.calendar.fullDate;
  23044. }
  23045. if (this.hasTime && !this.time) {
  23046. this.time = getTime(/* @__PURE__ */ new Date(), this.hideSecond);
  23047. }
  23048. }
  23049. let {
  23050. year,
  23051. month,
  23052. date: date3,
  23053. fullDate,
  23054. extraInfo
  23055. } = this.calendar;
  23056. this.$emit(name, {
  23057. range: this.cale.multipleStatus,
  23058. year,
  23059. month,
  23060. date: date3,
  23061. time: this.time,
  23062. timeRange: this.timeRange,
  23063. fulldate: fullDate,
  23064. extraInfo: extraInfo || {}
  23065. });
  23066. },
  23067. /**
  23068. * 选择天触发
  23069. * @param {Object} weeks
  23070. */
  23071. choiceDate(weeks) {
  23072. if (weeks.disable)
  23073. return;
  23074. this.calendar = weeks;
  23075. this.calendar.userChecked = true;
  23076. this.cale.setMultiple(this.calendar.fullDate, true);
  23077. this.weeks = this.cale.weeks;
  23078. this.tempSingleDate = this.calendar.fullDate;
  23079. const beforeDate = new Date(this.cale.multipleStatus.before).getTime();
  23080. const afterDate = new Date(this.cale.multipleStatus.after).getTime();
  23081. if (beforeDate > afterDate && afterDate) {
  23082. this.tempRange.before = this.cale.multipleStatus.after;
  23083. this.tempRange.after = this.cale.multipleStatus.before;
  23084. } else {
  23085. this.tempRange.before = this.cale.multipleStatus.before;
  23086. this.tempRange.after = this.cale.multipleStatus.after;
  23087. }
  23088. this.change();
  23089. },
  23090. changeMonth(type2) {
  23091. let newDate;
  23092. if (type2 === "pre") {
  23093. newDate = this.cale.getPreMonthObj(this.nowDate.fullDate).fullDate;
  23094. } else if (type2 === "next") {
  23095. newDate = this.cale.getNextMonthObj(this.nowDate.fullDate).fullDate;
  23096. }
  23097. this.setDate(newDate);
  23098. this.monthSwitch();
  23099. },
  23100. /**
  23101. * 设置日期
  23102. * @param {Object} date
  23103. */
  23104. setDate(date3) {
  23105. this.cale.setDate(date3);
  23106. this.weeks = this.cale.weeks;
  23107. this.nowDate = this.cale.getInfo(date3);
  23108. }
  23109. }
  23110. };
  23111. function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
  23112. const _component_calendar_item = vue.resolveComponent("calendar-item");
  23113. const _component_time_picker = vue.resolveComponent("time-picker");
  23114. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$3);
  23115. return vue.openBlock(), vue.createElementBlock(
  23116. "view",
  23117. {
  23118. class: "uni-calendar",
  23119. onMouseleave: _cache[9] || (_cache[9] = (...args) => $options.leaveCale && $options.leaveCale(...args))
  23120. },
  23121. [
  23122. !$props.insert && $data.show ? (vue.openBlock(), vue.createElementBlock(
  23123. "view",
  23124. {
  23125. key: 0,
  23126. class: vue.normalizeClass(["uni-calendar__mask", { "uni-calendar--mask-show": $data.aniMaskShow }]),
  23127. onClick: _cache[0] || (_cache[0] = (...args) => $options.maskClick && $options.maskClick(...args))
  23128. },
  23129. null,
  23130. 2
  23131. /* CLASS */
  23132. )) : vue.createCommentVNode("v-if", true),
  23133. $props.insert || $data.show ? (vue.openBlock(), vue.createElementBlock(
  23134. "view",
  23135. {
  23136. key: 1,
  23137. class: vue.normalizeClass(["uni-calendar__content", { "uni-calendar--fixed": !$props.insert, "uni-calendar--ani-show": $data.aniMaskShow, "uni-calendar__content-mobile": $data.aniMaskShow }])
  23138. },
  23139. [
  23140. vue.createElementVNode(
  23141. "view",
  23142. {
  23143. class: vue.normalizeClass(["uni-calendar__header", { "uni-calendar__header-mobile": !$props.insert }])
  23144. },
  23145. [
  23146. vue.createElementVNode("view", {
  23147. class: "uni-calendar__header-btn-box",
  23148. onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.changeMonth("pre"), ["stop"]))
  23149. }, [
  23150. vue.createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--left" })
  23151. ]),
  23152. vue.createElementVNode("picker", {
  23153. mode: "date",
  23154. value: $props.date,
  23155. fields: "month",
  23156. onChange: _cache[2] || (_cache[2] = (...args) => $options.bindDateChange && $options.bindDateChange(...args))
  23157. }, [
  23158. vue.createElementVNode(
  23159. "text",
  23160. { class: "uni-calendar__header-text" },
  23161. vue.toDisplayString(($data.nowDate.year || "") + $options.yearText + ($data.nowDate.month || "") + $options.monthText),
  23162. 1
  23163. /* TEXT */
  23164. )
  23165. ], 40, ["value"]),
  23166. vue.createElementVNode("view", {
  23167. class: "uni-calendar__header-btn-box",
  23168. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.changeMonth("next"), ["stop"]))
  23169. }, [
  23170. vue.createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--right" })
  23171. ]),
  23172. !$props.insert ? (vue.openBlock(), vue.createElementBlock("view", {
  23173. key: 0,
  23174. class: "dialog-close",
  23175. onClick: _cache[4] || (_cache[4] = (...args) => $options.close && $options.close(...args))
  23176. }, [
  23177. vue.createElementVNode("view", {
  23178. class: "dialog-close-plus",
  23179. "data-id": "close"
  23180. }),
  23181. vue.createElementVNode("view", {
  23182. class: "dialog-close-plus dialog-close-rotate",
  23183. "data-id": "close"
  23184. })
  23185. ])) : vue.createCommentVNode("v-if", true)
  23186. ],
  23187. 2
  23188. /* CLASS */
  23189. ),
  23190. vue.createElementVNode("view", { class: "uni-calendar__box" }, [
  23191. $props.showMonth ? (vue.openBlock(), vue.createElementBlock("view", {
  23192. key: 0,
  23193. class: "uni-calendar__box-bg"
  23194. }, [
  23195. vue.createElementVNode(
  23196. "text",
  23197. { class: "uni-calendar__box-bg-text" },
  23198. vue.toDisplayString($data.nowDate.month),
  23199. 1
  23200. /* TEXT */
  23201. )
  23202. ])) : vue.createCommentVNode("v-if", true),
  23203. vue.createElementVNode("view", {
  23204. class: "uni-calendar__weeks",
  23205. style: { "padding-bottom": "7px" }
  23206. }, [
  23207. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23208. vue.createElementVNode(
  23209. "text",
  23210. { class: "uni-calendar__weeks-day-text" },
  23211. vue.toDisplayString($options.SUNText),
  23212. 1
  23213. /* TEXT */
  23214. )
  23215. ]),
  23216. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23217. vue.createElementVNode(
  23218. "text",
  23219. { class: "uni-calendar__weeks-day-text" },
  23220. vue.toDisplayString($options.MONText),
  23221. 1
  23222. /* TEXT */
  23223. )
  23224. ]),
  23225. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23226. vue.createElementVNode(
  23227. "text",
  23228. { class: "uni-calendar__weeks-day-text" },
  23229. vue.toDisplayString($options.TUEText),
  23230. 1
  23231. /* TEXT */
  23232. )
  23233. ]),
  23234. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23235. vue.createElementVNode(
  23236. "text",
  23237. { class: "uni-calendar__weeks-day-text" },
  23238. vue.toDisplayString($options.WEDText),
  23239. 1
  23240. /* TEXT */
  23241. )
  23242. ]),
  23243. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23244. vue.createElementVNode(
  23245. "text",
  23246. { class: "uni-calendar__weeks-day-text" },
  23247. vue.toDisplayString($options.THUText),
  23248. 1
  23249. /* TEXT */
  23250. )
  23251. ]),
  23252. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23253. vue.createElementVNode(
  23254. "text",
  23255. { class: "uni-calendar__weeks-day-text" },
  23256. vue.toDisplayString($options.FRIText),
  23257. 1
  23258. /* TEXT */
  23259. )
  23260. ]),
  23261. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23262. vue.createElementVNode(
  23263. "text",
  23264. { class: "uni-calendar__weeks-day-text" },
  23265. vue.toDisplayString($options.SATText),
  23266. 1
  23267. /* TEXT */
  23268. )
  23269. ])
  23270. ]),
  23271. (vue.openBlock(true), vue.createElementBlock(
  23272. vue.Fragment,
  23273. null,
  23274. vue.renderList($data.weeks, (item, weekIndex) => {
  23275. return vue.openBlock(), vue.createElementBlock("view", {
  23276. class: "uni-calendar__weeks",
  23277. key: weekIndex
  23278. }, [
  23279. (vue.openBlock(true), vue.createElementBlock(
  23280. vue.Fragment,
  23281. null,
  23282. vue.renderList(item, (weeks, weeksIndex) => {
  23283. return vue.openBlock(), vue.createElementBlock("view", {
  23284. class: "uni-calendar__weeks-item",
  23285. key: weeksIndex
  23286. }, [
  23287. vue.createVNode(_component_calendar_item, {
  23288. class: "uni-calendar-item--hook",
  23289. weeks,
  23290. calendar: $data.calendar,
  23291. selected: $props.selected,
  23292. checkHover: $props.range,
  23293. onChange: $options.choiceDate,
  23294. onHandleMouse: $options.handleMouse
  23295. }, null, 8, ["weeks", "calendar", "selected", "checkHover", "onChange", "onHandleMouse"])
  23296. ]);
  23297. }),
  23298. 128
  23299. /* KEYED_FRAGMENT */
  23300. ))
  23301. ]);
  23302. }),
  23303. 128
  23304. /* KEYED_FRAGMENT */
  23305. ))
  23306. ]),
  23307. !$props.insert && !$props.range && $props.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  23308. key: 0,
  23309. class: "uni-date-changed uni-calendar--fixed-top",
  23310. style: { "padding": "0 80px" }
  23311. }, [
  23312. vue.createElementVNode(
  23313. "view",
  23314. { class: "uni-date-changed--time-date" },
  23315. vue.toDisplayString($data.tempSingleDate ? $data.tempSingleDate : $options.selectDateText),
  23316. 1
  23317. /* TEXT */
  23318. ),
  23319. vue.createVNode(_component_time_picker, {
  23320. type: "time",
  23321. start: $options.timepickerStartTime,
  23322. end: $options.timepickerEndTime,
  23323. modelValue: $data.time,
  23324. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.time = $event),
  23325. disabled: !$data.tempSingleDate,
  23326. border: false,
  23327. "hide-second": $props.hideSecond,
  23328. class: "time-picker-style"
  23329. }, null, 8, ["start", "end", "modelValue", "disabled", "hide-second"])
  23330. ])) : vue.createCommentVNode("v-if", true),
  23331. !$props.insert && $props.range && $props.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  23332. key: 1,
  23333. class: "uni-date-changed uni-calendar--fixed-top"
  23334. }, [
  23335. vue.createElementVNode("view", { class: "uni-date-changed--time-start" }, [
  23336. vue.createElementVNode(
  23337. "view",
  23338. { class: "uni-date-changed--time-date" },
  23339. vue.toDisplayString($data.tempRange.before ? $data.tempRange.before : $options.startDateText),
  23340. 1
  23341. /* TEXT */
  23342. ),
  23343. vue.createVNode(_component_time_picker, {
  23344. type: "time",
  23345. start: $options.timepickerStartTime,
  23346. modelValue: $data.timeRange.startTime,
  23347. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.timeRange.startTime = $event),
  23348. border: false,
  23349. "hide-second": $props.hideSecond,
  23350. disabled: !$data.tempRange.before,
  23351. class: "time-picker-style"
  23352. }, null, 8, ["start", "modelValue", "hide-second", "disabled"])
  23353. ]),
  23354. vue.createElementVNode("view", { style: { "line-height": "50px" } }, [
  23355. vue.createVNode(_component_uni_icons, {
  23356. type: "arrowthinright",
  23357. color: "#999"
  23358. })
  23359. ]),
  23360. vue.createElementVNode("view", { class: "uni-date-changed--time-end" }, [
  23361. vue.createElementVNode(
  23362. "view",
  23363. { class: "uni-date-changed--time-date" },
  23364. vue.toDisplayString($data.tempRange.after ? $data.tempRange.after : $options.endDateText),
  23365. 1
  23366. /* TEXT */
  23367. ),
  23368. vue.createVNode(_component_time_picker, {
  23369. type: "time",
  23370. end: $options.timepickerEndTime,
  23371. modelValue: $data.timeRange.endTime,
  23372. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.timeRange.endTime = $event),
  23373. border: false,
  23374. "hide-second": $props.hideSecond,
  23375. disabled: !$data.tempRange.after,
  23376. class: "time-picker-style"
  23377. }, null, 8, ["end", "modelValue", "hide-second", "disabled"])
  23378. ])
  23379. ])) : vue.createCommentVNode("v-if", true),
  23380. !$props.insert ? (vue.openBlock(), vue.createElementBlock("view", {
  23381. key: 2,
  23382. class: "uni-date-changed uni-date-btn--ok"
  23383. }, [
  23384. vue.createElementVNode(
  23385. "view",
  23386. {
  23387. class: "uni-datetime-picker--btn",
  23388. onClick: _cache[8] || (_cache[8] = (...args) => $options.confirm && $options.confirm(...args))
  23389. },
  23390. vue.toDisplayString($options.confirmText),
  23391. 1
  23392. /* TEXT */
  23393. )
  23394. ])) : vue.createCommentVNode("v-if", true)
  23395. ],
  23396. 2
  23397. /* CLASS */
  23398. )) : vue.createCommentVNode("v-if", true)
  23399. ],
  23400. 32
  23401. /* NEED_HYDRATION */
  23402. );
  23403. }
  23404. const Calendar = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$Q], ["__scopeId", "data-v-1d379219"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue"]]);
  23405. const _sfc_main$Q = {
  23406. name: "UniDatetimePicker",
  23407. options: {
  23408. virtualHost: true
  23409. },
  23410. components: {
  23411. Calendar,
  23412. TimePicker
  23413. },
  23414. data() {
  23415. return {
  23416. isRange: false,
  23417. hasTime: false,
  23418. displayValue: "",
  23419. inputDate: "",
  23420. calendarDate: "",
  23421. pickerTime: "",
  23422. calendarRange: {
  23423. startDate: "",
  23424. startTime: "",
  23425. endDate: "",
  23426. endTime: ""
  23427. },
  23428. displayRangeValue: {
  23429. startDate: "",
  23430. endDate: ""
  23431. },
  23432. tempRange: {
  23433. startDate: "",
  23434. startTime: "",
  23435. endDate: "",
  23436. endTime: ""
  23437. },
  23438. // 左右日历同步数据
  23439. startMultipleStatus: {
  23440. before: "",
  23441. after: "",
  23442. data: [],
  23443. fulldate: ""
  23444. },
  23445. endMultipleStatus: {
  23446. before: "",
  23447. after: "",
  23448. data: [],
  23449. fulldate: ""
  23450. },
  23451. pickerVisible: false,
  23452. pickerPositionStyle: null,
  23453. isEmitValue: false,
  23454. isPhone: false,
  23455. isFirstShow: true,
  23456. i18nT: () => {
  23457. }
  23458. };
  23459. },
  23460. props: {
  23461. type: {
  23462. type: String,
  23463. default: "datetime"
  23464. },
  23465. value: {
  23466. type: [String, Number, Array, Date],
  23467. default: ""
  23468. },
  23469. modelValue: {
  23470. type: [String, Number, Array, Date],
  23471. default: ""
  23472. },
  23473. start: {
  23474. type: [Number, String],
  23475. default: ""
  23476. },
  23477. end: {
  23478. type: [Number, String],
  23479. default: ""
  23480. },
  23481. returnType: {
  23482. type: String,
  23483. default: "string"
  23484. },
  23485. placeholder: {
  23486. type: String,
  23487. default: ""
  23488. },
  23489. startPlaceholder: {
  23490. type: String,
  23491. default: ""
  23492. },
  23493. endPlaceholder: {
  23494. type: String,
  23495. default: ""
  23496. },
  23497. rangeSeparator: {
  23498. type: String,
  23499. default: "-"
  23500. },
  23501. border: {
  23502. type: [Boolean],
  23503. default: true
  23504. },
  23505. disabled: {
  23506. type: [Boolean],
  23507. default: false
  23508. },
  23509. clearIcon: {
  23510. type: [Boolean],
  23511. default: true
  23512. },
  23513. hideSecond: {
  23514. type: [Boolean],
  23515. default: false
  23516. },
  23517. defaultValue: {
  23518. type: [String, Object, Array],
  23519. default: ""
  23520. }
  23521. },
  23522. watch: {
  23523. type: {
  23524. immediate: true,
  23525. handler(newVal) {
  23526. this.hasTime = newVal.indexOf("time") !== -1;
  23527. this.isRange = newVal.indexOf("range") !== -1;
  23528. }
  23529. },
  23530. modelValue: {
  23531. immediate: true,
  23532. handler(newVal) {
  23533. if (this.isEmitValue) {
  23534. this.isEmitValue = false;
  23535. return;
  23536. }
  23537. this.initPicker(newVal);
  23538. }
  23539. },
  23540. start: {
  23541. immediate: true,
  23542. handler(newVal) {
  23543. if (!newVal)
  23544. return;
  23545. this.calendarRange.startDate = getDate(newVal);
  23546. if (this.hasTime) {
  23547. this.calendarRange.startTime = getTime(newVal);
  23548. }
  23549. }
  23550. },
  23551. end: {
  23552. immediate: true,
  23553. handler(newVal) {
  23554. if (!newVal)
  23555. return;
  23556. this.calendarRange.endDate = getDate(newVal);
  23557. if (this.hasTime) {
  23558. this.calendarRange.endTime = getTime(newVal, this.hideSecond);
  23559. }
  23560. }
  23561. }
  23562. },
  23563. computed: {
  23564. timepickerStartTime() {
  23565. const activeDate = this.isRange ? this.tempRange.startDate : this.inputDate;
  23566. return activeDate === this.calendarRange.startDate ? this.calendarRange.startTime : "";
  23567. },
  23568. timepickerEndTime() {
  23569. const activeDate = this.isRange ? this.tempRange.endDate : this.inputDate;
  23570. return activeDate === this.calendarRange.endDate ? this.calendarRange.endTime : "";
  23571. },
  23572. mobileCalendarTime() {
  23573. const timeRange = {
  23574. start: this.tempRange.startTime,
  23575. end: this.tempRange.endTime
  23576. };
  23577. return this.isRange ? timeRange : this.pickerTime;
  23578. },
  23579. mobSelectableTime() {
  23580. return {
  23581. start: this.calendarRange.startTime,
  23582. end: this.calendarRange.endTime
  23583. };
  23584. },
  23585. datePopupWidth() {
  23586. return this.isRange ? 653 : 301;
  23587. },
  23588. /**
  23589. * for i18n
  23590. */
  23591. singlePlaceholderText() {
  23592. return this.placeholder || (this.type === "date" ? this.selectDateText : this.selectDateTimeText);
  23593. },
  23594. startPlaceholderText() {
  23595. return this.startPlaceholder || this.startDateText;
  23596. },
  23597. endPlaceholderText() {
  23598. return this.endPlaceholder || this.endDateText;
  23599. },
  23600. selectDateText() {
  23601. return this.i18nT("uni-datetime-picker.selectDate");
  23602. },
  23603. selectDateTimeText() {
  23604. return this.i18nT("uni-datetime-picker.selectDateTime");
  23605. },
  23606. selectTimeText() {
  23607. return this.i18nT("uni-datetime-picker.selectTime");
  23608. },
  23609. startDateText() {
  23610. return this.startPlaceholder || this.i18nT("uni-datetime-picker.startDate");
  23611. },
  23612. startTimeText() {
  23613. return this.i18nT("uni-datetime-picker.startTime");
  23614. },
  23615. endDateText() {
  23616. return this.endPlaceholder || this.i18nT("uni-datetime-picker.endDate");
  23617. },
  23618. endTimeText() {
  23619. return this.i18nT("uni-datetime-picker.endTime");
  23620. },
  23621. okText() {
  23622. return this.i18nT("uni-datetime-picker.ok");
  23623. },
  23624. clearText() {
  23625. return this.i18nT("uni-datetime-picker.clear");
  23626. },
  23627. showClearIcon() {
  23628. return this.clearIcon && !this.disabled && (this.displayValue || this.displayRangeValue.startDate && this.displayRangeValue.endDate);
  23629. }
  23630. },
  23631. created() {
  23632. this.initI18nT();
  23633. this.platform();
  23634. },
  23635. methods: {
  23636. initI18nT() {
  23637. const vueI18n = initVueI18n(i18nMessages);
  23638. this.i18nT = vueI18n.t;
  23639. },
  23640. initPicker(newVal) {
  23641. if (!newVal && !this.defaultValue || Array.isArray(newVal) && !newVal.length) {
  23642. this.$nextTick(() => {
  23643. this.clear(false);
  23644. });
  23645. return;
  23646. }
  23647. if (!Array.isArray(newVal) && !this.isRange) {
  23648. if (newVal) {
  23649. this.displayValue = this.inputDate = this.calendarDate = getDate(newVal);
  23650. if (this.hasTime) {
  23651. this.pickerTime = getTime(newVal, this.hideSecond);
  23652. this.displayValue = `${this.displayValue} ${this.pickerTime}`;
  23653. }
  23654. } else if (this.defaultValue) {
  23655. this.inputDate = this.calendarDate = getDate(this.defaultValue);
  23656. if (this.hasTime) {
  23657. this.pickerTime = getTime(this.defaultValue, this.hideSecond);
  23658. }
  23659. }
  23660. } else {
  23661. const [before, after] = newVal;
  23662. if (!before && !after)
  23663. return;
  23664. const beforeDate = getDate(before);
  23665. const beforeTime = getTime(before, this.hideSecond);
  23666. const afterDate = getDate(after);
  23667. const afterTime = getTime(after, this.hideSecond);
  23668. const startDate = beforeDate;
  23669. const endDate = afterDate;
  23670. this.displayRangeValue.startDate = this.tempRange.startDate = startDate;
  23671. this.displayRangeValue.endDate = this.tempRange.endDate = endDate;
  23672. if (this.hasTime) {
  23673. this.displayRangeValue.startDate = `${beforeDate} ${beforeTime}`;
  23674. this.displayRangeValue.endDate = `${afterDate} ${afterTime}`;
  23675. this.tempRange.startTime = beforeTime;
  23676. this.tempRange.endTime = afterTime;
  23677. }
  23678. const defaultRange = {
  23679. before: beforeDate,
  23680. after: afterDate
  23681. };
  23682. this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, defaultRange, {
  23683. which: "right"
  23684. });
  23685. this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, defaultRange, {
  23686. which: "left"
  23687. });
  23688. }
  23689. },
  23690. updateLeftCale(e) {
  23691. const left = this.$refs.left;
  23692. left.cale.setHoverMultiple(e.after);
  23693. left.setDate(this.$refs.left.nowDate.fullDate);
  23694. },
  23695. updateRightCale(e) {
  23696. const right = this.$refs.right;
  23697. right.cale.setHoverMultiple(e.after);
  23698. right.setDate(this.$refs.right.nowDate.fullDate);
  23699. },
  23700. platform() {
  23701. if (typeof navigator !== "undefined") {
  23702. this.isPhone = navigator.userAgent.toLowerCase().indexOf("mobile") !== -1;
  23703. return;
  23704. }
  23705. const { windowWidth } = uni.getSystemInfoSync();
  23706. this.isPhone = windowWidth <= 500;
  23707. this.windowWidth = windowWidth;
  23708. },
  23709. show() {
  23710. if (this.disabled) {
  23711. return;
  23712. }
  23713. this.platform();
  23714. if (this.isPhone) {
  23715. setTimeout(() => {
  23716. this.$refs.mobile.open();
  23717. }, 0);
  23718. return;
  23719. }
  23720. this.pickerPositionStyle = {
  23721. top: "10px"
  23722. };
  23723. const dateEditor = uni.createSelectorQuery().in(this).select(".uni-date-editor");
  23724. dateEditor.boundingClientRect((rect) => {
  23725. if (this.windowWidth - rect.left < this.datePopupWidth) {
  23726. this.pickerPositionStyle.right = 0;
  23727. }
  23728. }).exec();
  23729. setTimeout(() => {
  23730. this.pickerVisible = !this.pickerVisible;
  23731. if (!this.isPhone && this.isRange && this.isFirstShow) {
  23732. this.isFirstShow = false;
  23733. const {
  23734. startDate,
  23735. endDate
  23736. } = this.calendarRange;
  23737. if (startDate && endDate) {
  23738. if (this.diffDate(startDate, endDate) < 30) {
  23739. this.$refs.right.changeMonth("pre");
  23740. }
  23741. } else {
  23742. this.$refs.right.changeMonth("next");
  23743. this.$refs.right.cale.lastHover = false;
  23744. }
  23745. }
  23746. }, 50);
  23747. },
  23748. close() {
  23749. setTimeout(() => {
  23750. this.pickerVisible = false;
  23751. this.$emit("maskClick", this.value);
  23752. this.$refs.mobile && this.$refs.mobile.close();
  23753. }, 20);
  23754. },
  23755. setEmit(value2) {
  23756. if (this.returnType === "timestamp" || this.returnType === "date") {
  23757. if (!Array.isArray(value2)) {
  23758. if (!this.hasTime) {
  23759. value2 = value2 + " 00:00:00";
  23760. }
  23761. value2 = this.createTimestamp(value2);
  23762. if (this.returnType === "date") {
  23763. value2 = new Date(value2);
  23764. }
  23765. } else {
  23766. if (!this.hasTime) {
  23767. value2[0] = value2[0] + " 00:00:00";
  23768. value2[1] = value2[1] + " 00:00:00";
  23769. }
  23770. value2[0] = this.createTimestamp(value2[0]);
  23771. value2[1] = this.createTimestamp(value2[1]);
  23772. if (this.returnType === "date") {
  23773. value2[0] = new Date(value2[0]);
  23774. value2[1] = new Date(value2[1]);
  23775. }
  23776. }
  23777. }
  23778. this.$emit("update:modelValue", value2);
  23779. this.$emit("input", value2);
  23780. this.$emit("change", value2);
  23781. this.isEmitValue = true;
  23782. },
  23783. createTimestamp(date3) {
  23784. date3 = fixIosDateFormat(date3);
  23785. return Date.parse(new Date(date3));
  23786. },
  23787. singleChange(e) {
  23788. this.calendarDate = this.inputDate = e.fulldate;
  23789. if (this.hasTime)
  23790. return;
  23791. this.confirmSingleChange();
  23792. },
  23793. confirmSingleChange() {
  23794. if (!checkDate(this.inputDate)) {
  23795. const now2 = /* @__PURE__ */ new Date();
  23796. this.calendarDate = this.inputDate = getDate(now2);
  23797. this.pickerTime = getTime(now2, this.hideSecond);
  23798. }
  23799. let startLaterInputDate = false;
  23800. let startDate, startTime;
  23801. if (this.start) {
  23802. let startString = this.start;
  23803. if (typeof this.start === "number") {
  23804. startString = getDateTime(this.start, this.hideSecond);
  23805. }
  23806. [startDate, startTime] = startString.split(" ");
  23807. if (this.start && !dateCompare(startDate, this.inputDate)) {
  23808. startLaterInputDate = true;
  23809. this.inputDate = startDate;
  23810. }
  23811. }
  23812. let endEarlierInputDate = false;
  23813. let endDate, endTime;
  23814. if (this.end) {
  23815. let endString = this.end;
  23816. if (typeof this.end === "number") {
  23817. endString = getDateTime(this.end, this.hideSecond);
  23818. }
  23819. [endDate, endTime] = endString.split(" ");
  23820. if (this.end && !dateCompare(this.inputDate, endDate)) {
  23821. endEarlierInputDate = true;
  23822. this.inputDate = endDate;
  23823. }
  23824. }
  23825. if (this.hasTime) {
  23826. if (startLaterInputDate) {
  23827. this.pickerTime = startTime || getDefaultSecond(this.hideSecond);
  23828. }
  23829. if (endEarlierInputDate) {
  23830. this.pickerTime = endTime || getDefaultSecond(this.hideSecond);
  23831. }
  23832. if (!this.pickerTime) {
  23833. this.pickerTime = getTime(Date.now(), this.hideSecond);
  23834. }
  23835. this.displayValue = `${this.inputDate} ${this.pickerTime}`;
  23836. } else {
  23837. this.displayValue = this.inputDate;
  23838. }
  23839. this.setEmit(this.displayValue);
  23840. this.pickerVisible = false;
  23841. },
  23842. leftChange(e) {
  23843. const {
  23844. before,
  23845. after
  23846. } = e.range;
  23847. this.rangeChange(before, after);
  23848. const obj = {
  23849. before: e.range.before,
  23850. after: e.range.after,
  23851. data: e.range.data,
  23852. fulldate: e.fulldate
  23853. };
  23854. this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, obj);
  23855. },
  23856. rightChange(e) {
  23857. const {
  23858. before,
  23859. after
  23860. } = e.range;
  23861. this.rangeChange(before, after);
  23862. const obj = {
  23863. before: e.range.before,
  23864. after: e.range.after,
  23865. data: e.range.data,
  23866. fulldate: e.fulldate
  23867. };
  23868. this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, obj);
  23869. },
  23870. mobileChange(e) {
  23871. if (this.isRange) {
  23872. const { before, after } = e.range;
  23873. if (!before || !after) {
  23874. return;
  23875. }
  23876. this.handleStartAndEnd(before, after, true);
  23877. if (this.hasTime) {
  23878. const {
  23879. startTime,
  23880. endTime
  23881. } = e.timeRange;
  23882. this.tempRange.startTime = startTime;
  23883. this.tempRange.endTime = endTime;
  23884. }
  23885. this.confirmRangeChange();
  23886. } else {
  23887. if (this.hasTime) {
  23888. this.displayValue = e.fulldate + " " + e.time;
  23889. } else {
  23890. this.displayValue = e.fulldate;
  23891. }
  23892. this.setEmit(this.displayValue);
  23893. }
  23894. this.$refs.mobile.close();
  23895. },
  23896. rangeChange(before, after) {
  23897. if (!(before && after))
  23898. return;
  23899. this.handleStartAndEnd(before, after, true);
  23900. if (this.hasTime)
  23901. return;
  23902. this.confirmRangeChange();
  23903. },
  23904. confirmRangeChange() {
  23905. if (!this.tempRange.startDate || !this.tempRange.endDate) {
  23906. this.pickerVisible = false;
  23907. return;
  23908. }
  23909. if (!checkDate(this.tempRange.startDate)) {
  23910. this.tempRange.startDate = getDate(Date.now());
  23911. }
  23912. if (!checkDate(this.tempRange.endDate)) {
  23913. this.tempRange.endDate = getDate(Date.now());
  23914. }
  23915. let start, end;
  23916. let startDateLaterRangeStartDate = false;
  23917. let startDateLaterRangeEndDate = false;
  23918. let startDate, startTime;
  23919. if (this.start) {
  23920. let startString = this.start;
  23921. if (typeof this.start === "number") {
  23922. startString = getDateTime(this.start, this.hideSecond);
  23923. }
  23924. [startDate, startTime] = startString.split(" ");
  23925. if (this.start && !dateCompare(this.start, this.tempRange.startDate)) {
  23926. startDateLaterRangeStartDate = true;
  23927. this.tempRange.startDate = startDate;
  23928. }
  23929. if (this.start && !dateCompare(this.start, this.tempRange.endDate)) {
  23930. startDateLaterRangeEndDate = true;
  23931. this.tempRange.endDate = startDate;
  23932. }
  23933. }
  23934. let endDateEarlierRangeStartDate = false;
  23935. let endDateEarlierRangeEndDate = false;
  23936. let endDate, endTime;
  23937. if (this.end) {
  23938. let endString = this.end;
  23939. if (typeof this.end === "number") {
  23940. endString = getDateTime(this.end, this.hideSecond);
  23941. }
  23942. [endDate, endTime] = endString.split(" ");
  23943. if (this.end && !dateCompare(this.tempRange.startDate, this.end)) {
  23944. endDateEarlierRangeStartDate = true;
  23945. this.tempRange.startDate = endDate;
  23946. }
  23947. if (this.end && !dateCompare(this.tempRange.endDate, this.end)) {
  23948. endDateEarlierRangeEndDate = true;
  23949. this.tempRange.endDate = endDate;
  23950. }
  23951. }
  23952. if (!this.hasTime) {
  23953. start = this.displayRangeValue.startDate = this.tempRange.startDate;
  23954. end = this.displayRangeValue.endDate = this.tempRange.endDate;
  23955. } else {
  23956. if (startDateLaterRangeStartDate) {
  23957. this.tempRange.startTime = startTime || getDefaultSecond(this.hideSecond);
  23958. } else if (endDateEarlierRangeStartDate) {
  23959. this.tempRange.startTime = endTime || getDefaultSecond(this.hideSecond);
  23960. }
  23961. if (!this.tempRange.startTime) {
  23962. this.tempRange.startTime = getTime(Date.now(), this.hideSecond);
  23963. }
  23964. if (startDateLaterRangeEndDate) {
  23965. this.tempRange.endTime = startTime || getDefaultSecond(this.hideSecond);
  23966. } else if (endDateEarlierRangeEndDate) {
  23967. this.tempRange.endTime = endTime || getDefaultSecond(this.hideSecond);
  23968. }
  23969. if (!this.tempRange.endTime) {
  23970. this.tempRange.endTime = getTime(Date.now(), this.hideSecond);
  23971. }
  23972. start = this.displayRangeValue.startDate = `${this.tempRange.startDate} ${this.tempRange.startTime}`;
  23973. end = this.displayRangeValue.endDate = `${this.tempRange.endDate} ${this.tempRange.endTime}`;
  23974. }
  23975. if (!dateCompare(start, end)) {
  23976. [start, end] = [end, start];
  23977. }
  23978. this.displayRangeValue.startDate = start;
  23979. this.displayRangeValue.endDate = end;
  23980. const displayRange = [start, end];
  23981. this.setEmit(displayRange);
  23982. this.pickerVisible = false;
  23983. },
  23984. handleStartAndEnd(before, after, temp = false) {
  23985. if (!(before && after))
  23986. return;
  23987. const type2 = temp ? "tempRange" : "range";
  23988. const isStartEarlierEnd = dateCompare(before, after);
  23989. this[type2].startDate = isStartEarlierEnd ? before : after;
  23990. this[type2].endDate = isStartEarlierEnd ? after : before;
  23991. },
  23992. /**
  23993. * 比较时间大小
  23994. */
  23995. dateCompare(startDate, endDate) {
  23996. startDate = new Date(startDate.replace("-", "/").replace("-", "/"));
  23997. endDate = new Date(endDate.replace("-", "/").replace("-", "/"));
  23998. return startDate <= endDate;
  23999. },
  24000. /**
  24001. * 比较时间差
  24002. */
  24003. diffDate(startDate, endDate) {
  24004. startDate = new Date(startDate.replace("-", "/").replace("-", "/"));
  24005. endDate = new Date(endDate.replace("-", "/").replace("-", "/"));
  24006. const diff = (endDate - startDate) / (24 * 60 * 60 * 1e3);
  24007. return Math.abs(diff);
  24008. },
  24009. clear(needEmit = true) {
  24010. if (!this.isRange) {
  24011. this.displayValue = "";
  24012. this.inputDate = "";
  24013. this.pickerTime = "";
  24014. if (this.isPhone) {
  24015. this.$refs.mobile && this.$refs.mobile.clearCalender();
  24016. } else {
  24017. this.$refs.pcSingle && this.$refs.pcSingle.clearCalender();
  24018. }
  24019. if (needEmit) {
  24020. this.$emit("change", "");
  24021. this.$emit("input", "");
  24022. this.$emit("update:modelValue", "");
  24023. }
  24024. } else {
  24025. this.displayRangeValue.startDate = "";
  24026. this.displayRangeValue.endDate = "";
  24027. this.tempRange.startDate = "";
  24028. this.tempRange.startTime = "";
  24029. this.tempRange.endDate = "";
  24030. this.tempRange.endTime = "";
  24031. if (this.isPhone) {
  24032. this.$refs.mobile && this.$refs.mobile.clearCalender();
  24033. } else {
  24034. this.$refs.left && this.$refs.left.clearCalender();
  24035. this.$refs.right && this.$refs.right.clearCalender();
  24036. this.$refs.right && this.$refs.right.changeMonth("next");
  24037. }
  24038. if (needEmit) {
  24039. this.$emit("change", []);
  24040. this.$emit("input", []);
  24041. this.$emit("update:modelValue", []);
  24042. }
  24043. }
  24044. }
  24045. }
  24046. };
  24047. function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
  24048. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$3);
  24049. const _component_time_picker = vue.resolveComponent("time-picker");
  24050. const _component_Calendar = vue.resolveComponent("Calendar");
  24051. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-date" }, [
  24052. vue.createElementVNode("view", {
  24053. class: "uni-date-editor",
  24054. onClick: _cache[1] || (_cache[1] = (...args) => $options.show && $options.show(...args))
  24055. }, [
  24056. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  24057. vue.createElementVNode(
  24058. "view",
  24059. {
  24060. class: vue.normalizeClass(["uni-date-editor--x", { "uni-date-editor--x__disabled": $props.disabled, "uni-date-x--border": $props.border }])
  24061. },
  24062. [
  24063. !$data.isRange ? (vue.openBlock(), vue.createElementBlock("view", {
  24064. key: 0,
  24065. class: "uni-date-x uni-date-single"
  24066. }, [
  24067. vue.createVNode(_component_uni_icons, {
  24068. class: "icon-calendar",
  24069. type: "calendar",
  24070. color: "#c0c4cc",
  24071. size: "22"
  24072. }),
  24073. vue.createElementVNode(
  24074. "view",
  24075. { class: "uni-date__x-input" },
  24076. vue.toDisplayString($data.displayValue || $options.singlePlaceholderText),
  24077. 1
  24078. /* TEXT */
  24079. )
  24080. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  24081. key: 1,
  24082. class: "uni-date-x uni-date-range"
  24083. }, [
  24084. vue.createVNode(_component_uni_icons, {
  24085. class: "icon-calendar",
  24086. type: "calendar",
  24087. color: "#c0c4cc",
  24088. size: "22"
  24089. }),
  24090. vue.createElementVNode(
  24091. "view",
  24092. { class: "uni-date__x-input text-center" },
  24093. vue.toDisplayString($data.displayRangeValue.startDate || $options.startPlaceholderText),
  24094. 1
  24095. /* TEXT */
  24096. ),
  24097. vue.createElementVNode(
  24098. "view",
  24099. { class: "range-separator" },
  24100. vue.toDisplayString($props.rangeSeparator),
  24101. 1
  24102. /* TEXT */
  24103. ),
  24104. vue.createElementVNode(
  24105. "view",
  24106. { class: "uni-date__x-input text-center" },
  24107. vue.toDisplayString($data.displayRangeValue.endDate || $options.endPlaceholderText),
  24108. 1
  24109. /* TEXT */
  24110. )
  24111. ])),
  24112. $options.showClearIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  24113. key: 2,
  24114. class: "uni-date__icon-clear",
  24115. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clear && $options.clear(...args), ["stop"]))
  24116. }, [
  24117. vue.createVNode(_component_uni_icons, {
  24118. type: "clear",
  24119. color: "#c0c4cc",
  24120. size: "22"
  24121. })
  24122. ])) : vue.createCommentVNode("v-if", true)
  24123. ],
  24124. 2
  24125. /* CLASS */
  24126. )
  24127. ], true)
  24128. ]),
  24129. vue.withDirectives(vue.createElementVNode(
  24130. "view",
  24131. {
  24132. class: "uni-date-mask--pc",
  24133. onClick: _cache[2] || (_cache[2] = (...args) => $options.close && $options.close(...args))
  24134. },
  24135. null,
  24136. 512
  24137. /* NEED_PATCH */
  24138. ), [
  24139. [vue.vShow, $data.pickerVisible]
  24140. ]),
  24141. !$data.isPhone ? vue.withDirectives((vue.openBlock(), vue.createElementBlock(
  24142. "view",
  24143. {
  24144. key: 0,
  24145. ref: "datePicker",
  24146. class: "uni-date-picker__container"
  24147. },
  24148. [
  24149. !$data.isRange ? (vue.openBlock(), vue.createElementBlock(
  24150. "view",
  24151. {
  24152. key: 0,
  24153. class: "uni-date-single--x",
  24154. style: vue.normalizeStyle($data.pickerPositionStyle)
  24155. },
  24156. [
  24157. vue.createElementVNode("view", { class: "uni-popper__arrow" }),
  24158. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24159. key: 0,
  24160. class: "uni-date-changed popup-x-header"
  24161. }, [
  24162. vue.withDirectives(vue.createElementVNode("input", {
  24163. class: "uni-date__input text-center",
  24164. type: "text",
  24165. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.inputDate = $event),
  24166. placeholder: $options.selectDateText
  24167. }, null, 8, ["placeholder"]), [
  24168. [vue.vModelText, $data.inputDate]
  24169. ]),
  24170. vue.createVNode(_component_time_picker, {
  24171. type: "time",
  24172. modelValue: $data.pickerTime,
  24173. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.pickerTime = $event),
  24174. border: false,
  24175. disabled: !$data.inputDate,
  24176. start: $options.timepickerStartTime,
  24177. end: $options.timepickerEndTime,
  24178. hideSecond: $props.hideSecond,
  24179. style: { "width": "100%" }
  24180. }, {
  24181. default: vue.withCtx(() => [
  24182. vue.withDirectives(vue.createElementVNode("input", {
  24183. class: "uni-date__input text-center",
  24184. type: "text",
  24185. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.pickerTime = $event),
  24186. placeholder: $options.selectTimeText,
  24187. disabled: !$data.inputDate
  24188. }, null, 8, ["placeholder", "disabled"]), [
  24189. [vue.vModelText, $data.pickerTime]
  24190. ])
  24191. ]),
  24192. _: 1
  24193. /* STABLE */
  24194. }, 8, ["modelValue", "disabled", "start", "end", "hideSecond"])
  24195. ])) : vue.createCommentVNode("v-if", true),
  24196. vue.createVNode(_component_Calendar, {
  24197. ref: "pcSingle",
  24198. showMonth: false,
  24199. "start-date": $data.calendarRange.startDate,
  24200. "end-date": $data.calendarRange.endDate,
  24201. date: $data.calendarDate,
  24202. onChange: $options.singleChange,
  24203. "default-value": $props.defaultValue,
  24204. style: { "padding": "0 8px" }
  24205. }, null, 8, ["start-date", "end-date", "date", "onChange", "default-value"]),
  24206. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24207. key: 1,
  24208. class: "popup-x-footer"
  24209. }, [
  24210. vue.createElementVNode(
  24211. "text",
  24212. {
  24213. class: "confirm-text",
  24214. onClick: _cache[6] || (_cache[6] = (...args) => $options.confirmSingleChange && $options.confirmSingleChange(...args))
  24215. },
  24216. vue.toDisplayString($options.okText),
  24217. 1
  24218. /* TEXT */
  24219. )
  24220. ])) : vue.createCommentVNode("v-if", true)
  24221. ],
  24222. 4
  24223. /* STYLE */
  24224. )) : (vue.openBlock(), vue.createElementBlock(
  24225. "view",
  24226. {
  24227. key: 1,
  24228. class: "uni-date-range--x",
  24229. style: vue.normalizeStyle($data.pickerPositionStyle)
  24230. },
  24231. [
  24232. vue.createElementVNode("view", { class: "uni-popper__arrow" }),
  24233. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24234. key: 0,
  24235. class: "popup-x-header uni-date-changed"
  24236. }, [
  24237. vue.createElementVNode("view", { class: "popup-x-header--datetime" }, [
  24238. vue.withDirectives(vue.createElementVNode("input", {
  24239. class: "uni-date__input uni-date-range__input",
  24240. type: "text",
  24241. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.tempRange.startDate = $event),
  24242. placeholder: $options.startDateText
  24243. }, null, 8, ["placeholder"]), [
  24244. [vue.vModelText, $data.tempRange.startDate]
  24245. ]),
  24246. vue.createVNode(_component_time_picker, {
  24247. type: "time",
  24248. modelValue: $data.tempRange.startTime,
  24249. "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $data.tempRange.startTime = $event),
  24250. start: $options.timepickerStartTime,
  24251. border: false,
  24252. disabled: !$data.tempRange.startDate,
  24253. hideSecond: $props.hideSecond
  24254. }, {
  24255. default: vue.withCtx(() => [
  24256. vue.withDirectives(vue.createElementVNode("input", {
  24257. class: "uni-date__input uni-date-range__input",
  24258. type: "text",
  24259. "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.tempRange.startTime = $event),
  24260. placeholder: $options.startTimeText,
  24261. disabled: !$data.tempRange.startDate
  24262. }, null, 8, ["placeholder", "disabled"]), [
  24263. [vue.vModelText, $data.tempRange.startTime]
  24264. ])
  24265. ]),
  24266. _: 1
  24267. /* STABLE */
  24268. }, 8, ["modelValue", "start", "disabled", "hideSecond"])
  24269. ]),
  24270. vue.createVNode(_component_uni_icons, {
  24271. type: "arrowthinright",
  24272. color: "#999",
  24273. style: { "line-height": "40px" }
  24274. }),
  24275. vue.createElementVNode("view", { class: "popup-x-header--datetime" }, [
  24276. vue.withDirectives(vue.createElementVNode("input", {
  24277. class: "uni-date__input uni-date-range__input",
  24278. type: "text",
  24279. "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $data.tempRange.endDate = $event),
  24280. placeholder: $options.endDateText
  24281. }, null, 8, ["placeholder"]), [
  24282. [vue.vModelText, $data.tempRange.endDate]
  24283. ]),
  24284. vue.createVNode(_component_time_picker, {
  24285. type: "time",
  24286. modelValue: $data.tempRange.endTime,
  24287. "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $data.tempRange.endTime = $event),
  24288. end: $options.timepickerEndTime,
  24289. border: false,
  24290. disabled: !$data.tempRange.endDate,
  24291. hideSecond: $props.hideSecond
  24292. }, {
  24293. default: vue.withCtx(() => [
  24294. vue.withDirectives(vue.createElementVNode("input", {
  24295. class: "uni-date__input uni-date-range__input",
  24296. type: "text",
  24297. "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.tempRange.endTime = $event),
  24298. placeholder: $options.endTimeText,
  24299. disabled: !$data.tempRange.endDate
  24300. }, null, 8, ["placeholder", "disabled"]), [
  24301. [vue.vModelText, $data.tempRange.endTime]
  24302. ])
  24303. ]),
  24304. _: 1
  24305. /* STABLE */
  24306. }, 8, ["modelValue", "end", "disabled", "hideSecond"])
  24307. ])
  24308. ])) : vue.createCommentVNode("v-if", true),
  24309. vue.createElementVNode("view", { class: "popup-x-body" }, [
  24310. vue.createVNode(_component_Calendar, {
  24311. ref: "left",
  24312. showMonth: false,
  24313. "start-date": $data.calendarRange.startDate,
  24314. "end-date": $data.calendarRange.endDate,
  24315. range: true,
  24316. pleStatus: $data.endMultipleStatus,
  24317. onChange: $options.leftChange,
  24318. onFirstEnterCale: $options.updateRightCale,
  24319. style: { "padding": "0 8px" }
  24320. }, null, 8, ["start-date", "end-date", "pleStatus", "onChange", "onFirstEnterCale"]),
  24321. vue.createVNode(_component_Calendar, {
  24322. ref: "right",
  24323. showMonth: false,
  24324. "start-date": $data.calendarRange.startDate,
  24325. "end-date": $data.calendarRange.endDate,
  24326. range: true,
  24327. onChange: $options.rightChange,
  24328. pleStatus: $data.startMultipleStatus,
  24329. onFirstEnterCale: $options.updateLeftCale,
  24330. style: { "padding": "0 8px", "border-left": "1px solid #F1F1F1" }
  24331. }, null, 8, ["start-date", "end-date", "onChange", "pleStatus", "onFirstEnterCale"])
  24332. ]),
  24333. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24334. key: 1,
  24335. class: "popup-x-footer"
  24336. }, [
  24337. vue.createElementVNode(
  24338. "text",
  24339. {
  24340. onClick: _cache[13] || (_cache[13] = (...args) => $options.clear && $options.clear(...args))
  24341. },
  24342. vue.toDisplayString($options.clearText),
  24343. 1
  24344. /* TEXT */
  24345. ),
  24346. vue.createElementVNode(
  24347. "text",
  24348. {
  24349. class: "confirm-text",
  24350. onClick: _cache[14] || (_cache[14] = (...args) => $options.confirmRangeChange && $options.confirmRangeChange(...args))
  24351. },
  24352. vue.toDisplayString($options.okText),
  24353. 1
  24354. /* TEXT */
  24355. )
  24356. ])) : vue.createCommentVNode("v-if", true)
  24357. ],
  24358. 4
  24359. /* STYLE */
  24360. ))
  24361. ],
  24362. 512
  24363. /* NEED_PATCH */
  24364. )), [
  24365. [vue.vShow, $data.pickerVisible]
  24366. ]) : vue.createCommentVNode("v-if", true),
  24367. $data.isPhone ? (vue.openBlock(), vue.createBlock(_component_Calendar, {
  24368. key: 1,
  24369. ref: "mobile",
  24370. clearDate: false,
  24371. date: $data.calendarDate,
  24372. defTime: $options.mobileCalendarTime,
  24373. "start-date": $data.calendarRange.startDate,
  24374. "end-date": $data.calendarRange.endDate,
  24375. selectableTimes: $options.mobSelectableTime,
  24376. startPlaceholder: $props.startPlaceholder,
  24377. endPlaceholder: $props.endPlaceholder,
  24378. "default-value": $props.defaultValue,
  24379. pleStatus: $data.endMultipleStatus,
  24380. showMonth: false,
  24381. range: $data.isRange,
  24382. hasTime: $data.hasTime,
  24383. insert: false,
  24384. hideSecond: $props.hideSecond,
  24385. onConfirm: $options.mobileChange,
  24386. onMaskClose: $options.close
  24387. }, null, 8, ["date", "defTime", "start-date", "end-date", "selectableTimes", "startPlaceholder", "endPlaceholder", "default-value", "pleStatus", "range", "hasTime", "hideSecond", "onConfirm", "onMaskClose"])) : vue.createCommentVNode("v-if", true)
  24388. ]);
  24389. }
  24390. const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$P], ["__scopeId", "data-v-9802168a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue"]]);
  24391. const _sfc_main$P = {
  24392. __name: "after-sale",
  24393. setup(__props, { expose: __expose }) {
  24394. __expose();
  24395. const otherParams = vue.ref({
  24396. sender: ""
  24397. });
  24398. const scrollRef = vue.ref(null);
  24399. const refreshList = () => {
  24400. var _a;
  24401. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  24402. };
  24403. let dataList = vue.ref([{
  24404. date: "2024-10-24",
  24405. orderNum: 423,
  24406. auditNum: 293,
  24407. trueNum: 323
  24408. }, {
  24409. date: "2024-10-24",
  24410. orderNum: 423,
  24411. auditNum: 293,
  24412. trueNum: 323
  24413. }, {
  24414. date: "2024-10-24",
  24415. orderNum: 423,
  24416. auditNum: 293,
  24417. trueNum: 323
  24418. }]);
  24419. const updateList = (data) => {
  24420. dataList.value = data;
  24421. };
  24422. const form = vue.reactive({
  24423. startTime: "",
  24424. endTime: ""
  24425. });
  24426. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  24427. return dataList;
  24428. }, set dataList(v) {
  24429. dataList = v;
  24430. }, updateList, form, reactive: vue.reactive, PageScroll, ref: vue.ref, get onLoad() {
  24431. return onLoad;
  24432. } };
  24433. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  24434. return __returned__;
  24435. }
  24436. };
  24437. function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
  24438. const _component_uni_datetime_picker = resolveEasycom(vue.resolveDynamicComponent("uni-datetime-picker"), __easycom_0$2);
  24439. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  24440. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$3);
  24441. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$3);
  24442. return vue.openBlock(), vue.createElementBlock("view", {
  24443. class: "common-page",
  24444. style: { "padding": "0" }
  24445. }, [
  24446. vue.createVNode($setup["PageScroll"], {
  24447. requestStr: "/team/token/shop/invite/page",
  24448. onUpdateList: $setup.updateList,
  24449. ref: "scrollRef",
  24450. otherParams: $setup.otherParams
  24451. }, {
  24452. default: vue.withCtx(() => [
  24453. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  24454. default: vue.withCtx(() => [
  24455. vue.createElementVNode("view", { class: "search-area flex-d" }, [
  24456. vue.createElementVNode("view", { class: "flex-a mb-12" }, [
  24457. vue.createElementVNode("text", { class: "font-13 mr-10" }, "开始时间:"),
  24458. vue.createVNode(_component_uni_datetime_picker, {
  24459. type: "datetime",
  24460. modelValue: $setup.form.startTime,
  24461. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.startTime = $event)
  24462. }, null, 8, ["modelValue"])
  24463. ]),
  24464. vue.createElementVNode("view", { class: "flex-a" }, [
  24465. vue.createElementVNode("text", { class: "font-13 mr-10" }, "结束时间:"),
  24466. vue.createVNode(_component_uni_datetime_picker, {
  24467. type: "datetime",
  24468. modelValue: $setup.form.endTime,
  24469. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.endTime = $event)
  24470. }, null, 8, ["modelValue"]),
  24471. vue.createVNode(_component_u_button, {
  24472. type: "primary",
  24473. "custom-style": "width:160rpx;height:72rpx;margin-left:10px"
  24474. }, {
  24475. default: vue.withCtx(() => [
  24476. vue.createTextVNode("查询")
  24477. ]),
  24478. _: 1
  24479. /* STABLE */
  24480. })
  24481. ]),
  24482. vue.createVNode(_component_u_divider),
  24483. vue.createElementVNode("view", { class: "flex-a" }, [
  24484. vue.createElementVNode("view", { class: "text-item flex-1" }, "审核日期"),
  24485. vue.createElementVNode("view", { class: "text-item flex-1" }, "订单数量"),
  24486. vue.createElementVNode("view", { class: "text-item flex-1" }, "审书数量"),
  24487. vue.createElementVNode("view", { class: "text-item flex-1" }, "实际回收")
  24488. ])
  24489. ])
  24490. ]),
  24491. _: 1
  24492. /* STABLE */
  24493. }),
  24494. vue.createElementVNode("view", { class: "list-con" }, [
  24495. (vue.openBlock(true), vue.createElementBlock(
  24496. vue.Fragment,
  24497. null,
  24498. vue.renderList($setup.dataList, (item, index2) => {
  24499. return vue.openBlock(), vue.createElementBlock("view", {
  24500. key: index2,
  24501. class: "flex-a"
  24502. }, [
  24503. vue.createElementVNode(
  24504. "view",
  24505. { class: "text-item flex-1" },
  24506. vue.toDisplayString(item.date),
  24507. 1
  24508. /* TEXT */
  24509. ),
  24510. vue.createElementVNode(
  24511. "view",
  24512. { class: "text-item flex-1" },
  24513. vue.toDisplayString(item.orderNum),
  24514. 1
  24515. /* TEXT */
  24516. ),
  24517. vue.createElementVNode(
  24518. "view",
  24519. { class: "text-item flex-1" },
  24520. vue.toDisplayString(item.auditNum),
  24521. 1
  24522. /* TEXT */
  24523. ),
  24524. vue.createElementVNode(
  24525. "view",
  24526. { class: "text-item flex-1" },
  24527. vue.toDisplayString(item.trueNum),
  24528. 1
  24529. /* TEXT */
  24530. )
  24531. ]);
  24532. }),
  24533. 128
  24534. /* KEYED_FRAGMENT */
  24535. ))
  24536. ])
  24537. ]),
  24538. _: 1
  24539. /* STABLE */
  24540. }, 8, ["otherParams"])
  24541. ]);
  24542. }
  24543. const PagesIndexStatisticAfterSale = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$O], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/after-sale.vue"]]);
  24544. const _sfc_main$O = {
  24545. __name: "package",
  24546. setup(__props, { expose: __expose }) {
  24547. __expose();
  24548. const otherParams = vue.ref({
  24549. sender: ""
  24550. });
  24551. const scrollRef = vue.ref(null);
  24552. const refreshList = () => {
  24553. var _a;
  24554. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  24555. };
  24556. let dataList = vue.ref([{
  24557. date: "2024-10-24",
  24558. orderNum: 423
  24559. }, {
  24560. date: "2024-10-24",
  24561. orderNum: 423
  24562. }, {
  24563. date: "2024-10-24",
  24564. orderNum: 423
  24565. }]);
  24566. const updateList = (data) => {
  24567. dataList.value = data;
  24568. };
  24569. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  24570. return dataList;
  24571. }, set dataList(v) {
  24572. dataList = v;
  24573. }, updateList, reactive: vue.reactive, PageScroll, ref: vue.ref, get onLoad() {
  24574. return onLoad;
  24575. } };
  24576. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  24577. return __returned__;
  24578. }
  24579. };
  24580. function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
  24581. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$3);
  24582. return vue.openBlock(), vue.createElementBlock("view", {
  24583. class: "common-page",
  24584. style: { "padding": "0" }
  24585. }, [
  24586. vue.createVNode($setup["PageScroll"], {
  24587. requestStr: "/team/token/shop/invite/page",
  24588. onUpdateList: $setup.updateList,
  24589. ref: "scrollRef",
  24590. otherParams: $setup.otherParams
  24591. }, {
  24592. default: vue.withCtx(() => [
  24593. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  24594. default: vue.withCtx(() => [
  24595. vue.createElementVNode("view", { class: "search-area flex-a" }, [
  24596. vue.createElementVNode("view", { class: "text-item flex-1" }, "审核日期"),
  24597. vue.createElementVNode("view", { class: "text-item flex-1" }, "数量")
  24598. ])
  24599. ]),
  24600. _: 1
  24601. /* STABLE */
  24602. }),
  24603. vue.createElementVNode("view", { class: "list-con" }, [
  24604. (vue.openBlock(true), vue.createElementBlock(
  24605. vue.Fragment,
  24606. null,
  24607. vue.renderList($setup.dataList, (item, index2) => {
  24608. return vue.openBlock(), vue.createElementBlock("view", {
  24609. key: index2,
  24610. class: "flex-a"
  24611. }, [
  24612. vue.createElementVNode(
  24613. "view",
  24614. { class: "text-item flex-1" },
  24615. vue.toDisplayString(item.date),
  24616. 1
  24617. /* TEXT */
  24618. ),
  24619. vue.createElementVNode(
  24620. "view",
  24621. { class: "text-item flex-1" },
  24622. vue.toDisplayString(item.orderNum),
  24623. 1
  24624. /* TEXT */
  24625. )
  24626. ]);
  24627. }),
  24628. 128
  24629. /* KEYED_FRAGMENT */
  24630. ))
  24631. ])
  24632. ]),
  24633. _: 1
  24634. /* STABLE */
  24635. }, 8, ["otherParams"])
  24636. ]);
  24637. }
  24638. const PagesIndexStatisticPackage = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$N], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/package.vue"]]);
  24639. const _sfc_main$N = {
  24640. name: "GoodIn"
  24641. };
  24642. function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
  24643. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  24644. vue.createCommentVNode(" 开发中提示 "),
  24645. vue.createElementVNode("view", { class: "developing" }, [
  24646. vue.createElementVNode("text", null, "开发中")
  24647. ])
  24648. ]);
  24649. }
  24650. const PagesIndexWmsMediumIn = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$M], ["__scopeId", "data-v-04e21b6f"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/medium-in.vue"]]);
  24651. const _sfc_main$M = {
  24652. name: "GoodIn"
  24653. };
  24654. function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
  24655. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  24656. vue.createCommentVNode(" 开发中提示 "),
  24657. vue.createElementVNode("view", { class: "developing" }, [
  24658. vue.createElementVNode("text", null, "开发中")
  24659. ])
  24660. ]);
  24661. }
  24662. const PagesIndexWmsGoodIn = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$L], ["__scopeId", "data-v-701c6544"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/good-in.vue"]]);
  24663. const _sfc_main$L = {
  24664. name: "GoodIn"
  24665. };
  24666. function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
  24667. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  24668. vue.createCommentVNode(" 开发中提示 "),
  24669. vue.createElementVNode("view", { class: "developing" }, [
  24670. vue.createElementVNode("text", null, "开发中")
  24671. ])
  24672. ]);
  24673. }
  24674. const PagesIndexWmsSecondaryIn = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$K], ["__scopeId", "data-v-52deef37"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/secondary-in.vue"]]);
  24675. const MIN_DISTANCE = 10;
  24676. function getDirection(x, y) {
  24677. if (x > y && x > MIN_DISTANCE) {
  24678. return "horizontal";
  24679. }
  24680. if (y > x && y > MIN_DISTANCE) {
  24681. return "vertical";
  24682. }
  24683. return "";
  24684. }
  24685. const touch = {
  24686. methods: {
  24687. getTouchPoint(e) {
  24688. if (!e) {
  24689. return {
  24690. x: 0,
  24691. y: 0
  24692. };
  24693. }
  24694. if (e.touches && e.touches[0]) {
  24695. return {
  24696. x: e.touches[0].pageX,
  24697. y: e.touches[0].pageY
  24698. };
  24699. }
  24700. if (e.changedTouches && e.changedTouches[0]) {
  24701. return {
  24702. x: e.changedTouches[0].pageX,
  24703. y: e.changedTouches[0].pageY
  24704. };
  24705. }
  24706. return {
  24707. x: e.clientX || 0,
  24708. y: e.clientY || 0
  24709. };
  24710. },
  24711. resetTouchStatus() {
  24712. this.direction = "";
  24713. this.deltaX = 0;
  24714. this.deltaY = 0;
  24715. this.offsetX = 0;
  24716. this.offsetY = 0;
  24717. },
  24718. touchStart(event) {
  24719. this.resetTouchStatus();
  24720. const touch2 = this.getTouchPoint(event);
  24721. this.startX = touch2.x;
  24722. this.startY = touch2.y;
  24723. },
  24724. touchMove(event) {
  24725. const touch2 = this.getTouchPoint(event);
  24726. this.deltaX = touch2.x - this.startX;
  24727. this.deltaY = touch2.y - this.startY;
  24728. this.offsetX = Math.abs(this.deltaX);
  24729. this.offsetY = Math.abs(this.deltaY);
  24730. this.direction = this.direction || getDirection(this.offsetX, this.offsetY);
  24731. }
  24732. }
  24733. };
  24734. const props$7 = {
  24735. props: {
  24736. // 控制打开或者关闭
  24737. show: {
  24738. type: Boolean,
  24739. default: props$E.swipeActionItem.show
  24740. },
  24741. // 标识符,如果是v-for,可用index索引值
  24742. name: {
  24743. type: [String, Number],
  24744. default: props$E.swipeActionItem.name
  24745. },
  24746. // 是否禁用
  24747. disabled: {
  24748. type: Boolean,
  24749. default: props$E.swipeActionItem.disabled
  24750. },
  24751. // 是否自动关闭其他swipe按钮组
  24752. autoClose: {
  24753. type: Boolean,
  24754. default: props$E.swipeActionItem.autoClose
  24755. },
  24756. // 滑动距离阈值,只有大于此值,才被认为是要打开菜单
  24757. threshold: {
  24758. type: Number,
  24759. default: props$E.swipeActionItem.threshold
  24760. },
  24761. // 右侧按钮内容
  24762. options: {
  24763. type: Array,
  24764. default() {
  24765. return uni.$u.props.swipeActionItem.rightOptions;
  24766. }
  24767. },
  24768. // 动画过渡时间,单位ms
  24769. duration: {
  24770. type: [String, Number],
  24771. default: props$E.swipeActionItem.duration
  24772. }
  24773. }
  24774. };
  24775. const wxs = {
  24776. methods: {
  24777. // 关闭时执行
  24778. closeHandler() {
  24779. this.status = "close";
  24780. },
  24781. setState(status) {
  24782. this.status = status;
  24783. },
  24784. closeOther() {
  24785. this.parent && this.parent.closeOther(this);
  24786. }
  24787. }
  24788. };
  24789. const block0 = (Comp) => {
  24790. (Comp.$wxs || (Comp.$wxs = [])).push("wxs");
  24791. (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxs"] = "f1d6d7d8";
  24792. };
  24793. const _sfc_main$K = {
  24794. name: "u-swipe-action-item",
  24795. emits: ["click"],
  24796. mixins: [mpMixin, mixin, props$7, touch],
  24797. mixins: [mpMixin, mixin, props$7, touch, wxs],
  24798. data() {
  24799. return {
  24800. // 按钮的尺寸信息
  24801. size: {},
  24802. // 父组件u-swipe-action的参数
  24803. parentData: {
  24804. autoClose: true
  24805. },
  24806. // 当前状态,open-打开,close-关闭
  24807. status: "close"
  24808. };
  24809. },
  24810. watch: {
  24811. // 由于wxs无法直接读取外部的值,需要在外部值变化时,重新执行赋值逻辑
  24812. wxsInit(newValue, oldValue) {
  24813. this.queryRect();
  24814. }
  24815. },
  24816. computed: {
  24817. wxsInit() {
  24818. return [this.disabled, this.autoClose, this.threshold, this.options, this.duration];
  24819. }
  24820. },
  24821. mounted() {
  24822. this.init();
  24823. },
  24824. methods: {
  24825. init() {
  24826. this.updateParentData();
  24827. uni.$u.sleep().then(() => {
  24828. this.queryRect();
  24829. });
  24830. },
  24831. updateParentData() {
  24832. this.getParentData("u-swipe-action");
  24833. },
  24834. // 查询节点
  24835. queryRect() {
  24836. this.$uGetRect(".u-swipe-action-item__right__button", true).then((buttons) => {
  24837. this.size = {
  24838. buttons,
  24839. show: this.show,
  24840. disabled: this.disabled,
  24841. threshold: this.threshold,
  24842. duration: this.duration
  24843. };
  24844. });
  24845. },
  24846. // 按钮被点击
  24847. buttonClickHandler(item, index2) {
  24848. this.$emit("click", {
  24849. index: index2,
  24850. name: this.name
  24851. });
  24852. }
  24853. }
  24854. };
  24855. function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
  24856. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  24857. return vue.openBlock(), vue.createElementBlock(
  24858. "view",
  24859. {
  24860. class: "u-swipe-action-item",
  24861. ref: "u-swipe-action-item"
  24862. },
  24863. [
  24864. vue.createElementVNode("view", { class: "u-swipe-action-item__right" }, [
  24865. vue.renderSlot(_ctx.$slots, "button", {}, () => [
  24866. (vue.openBlock(true), vue.createElementBlock(
  24867. vue.Fragment,
  24868. null,
  24869. vue.renderList(_ctx.options, (item, index2) => {
  24870. return vue.openBlock(), vue.createElementBlock("view", {
  24871. key: index2,
  24872. class: "u-swipe-action-item__right__button",
  24873. ref_for: true,
  24874. ref: `u-swipe-action-item__right__button-${index2}`,
  24875. style: vue.normalizeStyle([{
  24876. alignItems: item.style && item.style.borderRadius ? "center" : "stretch"
  24877. }]),
  24878. onClick: ($event) => $options.buttonClickHandler(item, index2)
  24879. }, [
  24880. vue.createElementVNode(
  24881. "view",
  24882. {
  24883. class: "u-swipe-action-item__right__button__wrapper",
  24884. style: vue.normalizeStyle([{
  24885. backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : "#C7C6CD",
  24886. borderRadius: item.style && item.style.borderRadius ? item.style.borderRadius : "0",
  24887. padding: item.style && item.style.borderRadius ? "0" : "0 15px"
  24888. }, item.style])
  24889. },
  24890. [
  24891. item.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  24892. key: 0,
  24893. name: item.icon,
  24894. color: item.style && item.style.color ? item.style.color : "#ffffff",
  24895. size: item.iconSize ? _ctx.$u.addUnit(item.iconSize) : item.style && item.style.fontSize ? _ctx.$u.getPx(item.style.fontSize) * 1.2 : 17,
  24896. customStyle: {
  24897. marginRight: item.text ? "2px" : 0
  24898. }
  24899. }, null, 8, ["name", "color", "size", "customStyle"])) : vue.createCommentVNode("v-if", true),
  24900. item.text ? (vue.openBlock(), vue.createElementBlock(
  24901. "text",
  24902. {
  24903. key: 1,
  24904. class: "u-swipe-action-item__right__button__wrapper__text u-line-1",
  24905. style: vue.normalizeStyle([{
  24906. color: item.style && item.style.color ? item.style.color : "#ffffff",
  24907. fontSize: item.style && item.style.fontSize ? item.style.fontSize : "16px",
  24908. lineHeight: item.style && item.style.fontSize ? item.style.fontSize : "16px"
  24909. }])
  24910. },
  24911. vue.toDisplayString(item.text),
  24912. 5
  24913. /* TEXT, STYLE */
  24914. )) : vue.createCommentVNode("v-if", true)
  24915. ],
  24916. 4
  24917. /* STYLE */
  24918. )
  24919. ], 12, ["onClick"]);
  24920. }),
  24921. 128
  24922. /* KEYED_FRAGMENT */
  24923. ))
  24924. ], true)
  24925. ]),
  24926. vue.createElementVNode("view", {
  24927. class: "u-swipe-action-item__content",
  24928. onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.wxs.touchstart && _ctx.wxs.touchstart(...args)),
  24929. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.wxs.touchmove && _ctx.wxs.touchmove(...args)),
  24930. onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.wxs.touchend && _ctx.wxs.touchend(...args)),
  24931. status: vue.wp($data.status),
  24932. "change:status": _ctx.wxs.statusChange,
  24933. size: vue.wp($data.size),
  24934. "change:size": _ctx.wxs.sizeChange
  24935. }, [
  24936. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  24937. ], 40, ["status", "change:status", "size", "change:size"])
  24938. ],
  24939. 512
  24940. /* NEED_PATCH */
  24941. );
  24942. }
  24943. if (typeof block0 === "function")
  24944. block0(_sfc_main$K);
  24945. const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$J], ["__scopeId", "data-v-ed3ce04a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-swipe-action-item/u-swipe-action-item.vue"]]);
  24946. const props$6 = {
  24947. props: {
  24948. // 是否自动关闭其他swipe按钮组
  24949. autoClose: {
  24950. type: Boolean,
  24951. default: props$E.swipeAction.autoClose
  24952. }
  24953. }
  24954. };
  24955. const _sfc_main$J = {
  24956. name: "u-swipe-action",
  24957. mixins: [mpMixin, mixin, props$6],
  24958. data() {
  24959. return {};
  24960. },
  24961. provide() {
  24962. return {
  24963. swipeAction: this
  24964. };
  24965. },
  24966. computed: {
  24967. // 这里computed的变量,都是子组件u-swipe-action-item需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
  24968. // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-swipe-action-item)
  24969. // 拉取父组件新的变化后的参数
  24970. parentData() {
  24971. return [this.autoClose];
  24972. }
  24973. },
  24974. watch: {
  24975. // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
  24976. parentData() {
  24977. if (this.children.length) {
  24978. this.children.map((child) => {
  24979. typeof child.updateParentData === "function" && child.updateParentData();
  24980. });
  24981. }
  24982. }
  24983. },
  24984. created() {
  24985. this.children = [];
  24986. },
  24987. methods: {
  24988. closeOther(child) {
  24989. if (this.autoClose) {
  24990. this.children.map((item, index2) => {
  24991. if (child !== item) {
  24992. item.closeHandler();
  24993. }
  24994. });
  24995. }
  24996. }
  24997. }
  24998. };
  24999. function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
  25000. return vue.openBlock(), vue.createElementBlock("view", { class: "u-swipe-action" }, [
  25001. vue.renderSlot(_ctx.$slots, "default")
  25002. ]);
  25003. }
  25004. const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$I], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-swipe-action/u-swipe-action.vue"]]);
  25005. const _sfc_main$I = {
  25006. __name: "BadItem",
  25007. props: {
  25008. data: {
  25009. type: Object,
  25010. required: true,
  25011. default: () => ({
  25012. orderNo: "",
  25013. badCount: "",
  25014. logisticsNo: "",
  25015. checkDate: "",
  25016. operator: ""
  25017. })
  25018. }
  25019. },
  25020. emits: ["delete", "edit"],
  25021. setup(__props, { expose: __expose, emit: __emit }) {
  25022. __expose();
  25023. const props2 = __props;
  25024. const emit2 = __emit;
  25025. const options = vue.ref([
  25026. {
  25027. text: "删除",
  25028. style: {
  25029. backgroundColor: "#ff4444"
  25030. }
  25031. }
  25032. ]);
  25033. const handleAction = (e) => {
  25034. if (e.index === 0) {
  25035. uni.showModal({
  25036. title: "提示",
  25037. content: "确定要删除该订单吗?",
  25038. success: (res2) => {
  25039. if (res2.confirm) {
  25040. emit2("delete");
  25041. }
  25042. }
  25043. });
  25044. }
  25045. };
  25046. const __returned__ = { props: props2, emit: emit2, options, handleAction, ref: vue.ref };
  25047. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25048. return __returned__;
  25049. }
  25050. };
  25051. function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
  25052. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  25053. const _component_u_swipe_action_item = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action-item"), __easycom_1);
  25054. const _component_u_swipe_action = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action"), __easycom_2);
  25055. return vue.openBlock(), vue.createElementBlock("view", { class: "bad-item" }, [
  25056. vue.createVNode(_component_u_swipe_action, null, {
  25057. default: vue.withCtx(() => [
  25058. vue.createVNode(_component_u_swipe_action_item, {
  25059. options: $setup.options,
  25060. onClick: $setup.handleAction
  25061. }, {
  25062. default: vue.withCtx(() => [
  25063. vue.createElementVNode("view", { class: "item-content" }, [
  25064. vue.createElementVNode("view", { class: "item-row" }, [
  25065. vue.createElementVNode("text", { class: "label" }, "订单编号:"),
  25066. vue.createElementVNode(
  25067. "text",
  25068. { class: "value" },
  25069. vue.toDisplayString($props.data.orderId),
  25070. 1
  25071. /* TEXT */
  25072. ),
  25073. vue.createVNode(_component_u_icon, {
  25074. name: "edit-pen",
  25075. color: "#4CAF50",
  25076. size: "20",
  25077. class: "edit-icon",
  25078. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("edit"))
  25079. })
  25080. ]),
  25081. vue.createElementVNode("view", { class: "item-row" }, [
  25082. vue.createElementVNode("text", { class: "label" }, "不良数量:"),
  25083. vue.createElementVNode(
  25084. "text",
  25085. { class: "value" },
  25086. vue.toDisplayString($props.data.badNum),
  25087. 1
  25088. /* TEXT */
  25089. )
  25090. ]),
  25091. vue.createElementVNode("view", { class: "item-row" }, [
  25092. vue.createElementVNode("text", { class: "label" }, "物流单号:"),
  25093. vue.createElementVNode(
  25094. "text",
  25095. { class: "value" },
  25096. vue.toDisplayString($props.data.waybillCode),
  25097. 1
  25098. /* TEXT */
  25099. )
  25100. ]),
  25101. vue.createElementVNode("view", { class: "item-row" }, [
  25102. vue.createElementVNode("text", { class: "label" }, "验货完成日期:"),
  25103. vue.createElementVNode(
  25104. "text",
  25105. { class: "value" },
  25106. vue.toDisplayString($props.data.auditFinishTime),
  25107. 1
  25108. /* TEXT */
  25109. )
  25110. ]),
  25111. vue.createElementVNode("view", { class: "item-row" }, [
  25112. vue.createElementVNode("text", { class: "label" }, "录入人:"),
  25113. vue.createElementVNode(
  25114. "text",
  25115. { class: "value" },
  25116. vue.toDisplayString($props.data.auditUserName),
  25117. 1
  25118. /* TEXT */
  25119. )
  25120. ])
  25121. ])
  25122. ]),
  25123. _: 1
  25124. /* STABLE */
  25125. }, 8, ["options"])
  25126. ]),
  25127. _: 1
  25128. /* STABLE */
  25129. })
  25130. ]);
  25131. }
  25132. const BadItem = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$H], ["__scopeId", "data-v-93494456"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/components/BadItem.vue"]]);
  25133. class VolumeTTS {
  25134. constructor(opts) {
  25135. __publicField(this, "ttsParams", {
  25136. lang: "zh-CN",
  25137. speed: 1,
  25138. // 将 0-10 转换为 0-1
  25139. pitch: 1,
  25140. // 将 0-10 转换为 0-1
  25141. volume: 1
  25142. });
  25143. __publicField(this, "TTSModule");
  25144. __publicField(this, "platform", uni.getSystemInfoSync().platform);
  25145. if (opts)
  25146. this.ttsParams = opts;
  25147. this.init();
  25148. }
  25149. init() {
  25150. this.TTSModule = requireNativePlugin("nrb-tts-plugin");
  25151. this.TTSModule && this.TTSModule.init({
  25152. "lang": "ZH",
  25153. "country": "CN"
  25154. }, (res2) => {
  25155. if (res2.success == 0) {
  25156. formatAppLog("log", "at utils/VolumeTTS.js:27", "TTS初始化成功");
  25157. }
  25158. });
  25159. }
  25160. speak(text) {
  25161. formatAppLog("log", "at utils/VolumeTTS.js:45", this.platform, "dsad");
  25162. let opts = this.platform == "ios" ? {
  25163. "rate": this.ttsParams.speed,
  25164. "lang": "zh-CN",
  25165. "volume": 1
  25166. } : {
  25167. "pitch": this.ttsParams.pitch,
  25168. "speechRate": this.ttsParams.speed,
  25169. "queueMode": 1
  25170. };
  25171. formatAppLog("log", "at utils/VolumeTTS.js:57", this.TTSModule, "this.TTSModule");
  25172. this.TTSModule.speak(text, opts, (e) => {
  25173. formatAppLog("log", "at utils/VolumeTTS.js:59", e, "读取成功");
  25174. });
  25175. }
  25176. stop() {
  25177. if (this.TTSModule) {
  25178. this.TTSModule.stop();
  25179. }
  25180. }
  25181. }
  25182. const _sfc_main$H = {
  25183. __name: "RemarkDialog",
  25184. props: {
  25185. visible: {
  25186. type: Boolean,
  25187. default: false
  25188. },
  25189. initialValue: {
  25190. type: String,
  25191. default: ""
  25192. }
  25193. },
  25194. emits: ["update:visible", "confirm"],
  25195. setup(__props, { expose: __expose, emit: __emit }) {
  25196. __expose();
  25197. const props2 = __props;
  25198. const emit2 = __emit;
  25199. const remarkText = vue.ref("");
  25200. const quickTags = vue.ref(["少书", "多书", "子母件", "书单不符"]);
  25201. vue.watch(() => props2.visible, (newVal) => {
  25202. if (newVal) {
  25203. remarkText.value = props2.initialValue;
  25204. }
  25205. });
  25206. const appendTag = (tag) => {
  25207. remarkText.value += remarkText.value ? " " + tag : tag;
  25208. };
  25209. const onClose = () => {
  25210. emit2("update:visible", false);
  25211. };
  25212. const onConfirm = () => {
  25213. emit2("confirm", remarkText.value);
  25214. onClose();
  25215. };
  25216. const __returned__ = { props: props2, emit: emit2, remarkText, quickTags, appendTag, onClose, onConfirm, ref: vue.ref, watch: vue.watch };
  25217. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25218. return __returned__;
  25219. }
  25220. };
  25221. function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
  25222. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$2);
  25223. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$4);
  25224. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  25225. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_3$4);
  25226. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  25227. show: $props.visible,
  25228. onClose: $setup.onClose,
  25229. mode: "center",
  25230. round: "10",
  25231. closeOnClickOverlay: false
  25232. }, {
  25233. default: vue.withCtx(() => [
  25234. vue.createElementVNode("view", { class: "remark-dialog" }, [
  25235. vue.createElementVNode("view", { class: "dialog-title" }, "编辑备注"),
  25236. vue.createCommentVNode(" 备注输入框 "),
  25237. vue.createElementVNode("view", { class: "dialog-content mb-30" }, [
  25238. vue.createVNode(_component_u_textarea, {
  25239. modelValue: $setup.remarkText,
  25240. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.remarkText = $event),
  25241. placeholder: "请输入",
  25242. maxlength: 200,
  25243. height: "100",
  25244. count: ""
  25245. }, null, 8, ["modelValue"]),
  25246. vue.createCommentVNode(" 快速输入标签 "),
  25247. vue.createElementVNode("view", { class: "quick-tags mt-10" }, [
  25248. vue.createElementVNode("text", { class: "common-title" }, "快速填入"),
  25249. vue.createElementVNode("view", { class: "tags-container flex-w mt-20" }, [
  25250. (vue.openBlock(true), vue.createElementBlock(
  25251. vue.Fragment,
  25252. null,
  25253. vue.renderList($setup.quickTags, (tag, index2) => {
  25254. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  25255. key: index2,
  25256. text: tag,
  25257. plain: "",
  25258. size: "mini",
  25259. type: "primary",
  25260. onClick: ($event) => $setup.appendTag(tag),
  25261. class: "tag-item"
  25262. }, null, 8, ["text", "onClick"]);
  25263. }),
  25264. 128
  25265. /* KEYED_FRAGMENT */
  25266. ))
  25267. ])
  25268. ])
  25269. ]),
  25270. vue.createCommentVNode(" 底部按钮 "),
  25271. vue.createElementVNode("view", { class: "dialog-footer" }, [
  25272. vue.createVNode(_component_u_button, {
  25273. plain: "",
  25274. onClick: $setup.onClose,
  25275. class: "footer-btn"
  25276. }, {
  25277. default: vue.withCtx(() => [
  25278. vue.createTextVNode("取消")
  25279. ]),
  25280. _: 1
  25281. /* STABLE */
  25282. }),
  25283. vue.createVNode(_component_u_button, {
  25284. type: "primary",
  25285. onClick: $setup.onConfirm,
  25286. class: "footer-btn"
  25287. }, {
  25288. default: vue.withCtx(() => [
  25289. vue.createTextVNode("确定")
  25290. ]),
  25291. _: 1
  25292. /* STABLE */
  25293. })
  25294. ])
  25295. ])
  25296. ]),
  25297. _: 1
  25298. /* STABLE */
  25299. }, 8, ["show"]);
  25300. }
  25301. const RemarkDialog = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$G], ["__scopeId", "data-v-73050f50"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/components/RemarkDialog.vue"]]);
  25302. const _sfc_main$G = {
  25303. __name: "bad-in",
  25304. setup(__props, { expose: __expose }) {
  25305. __expose();
  25306. const waybillCode = vue.ref();
  25307. const formData = vue.reactive({
  25308. godownName: "",
  25309. godownId: "",
  25310. positionCode: ""
  25311. });
  25312. const ordersMap = vue.ref([]);
  25313. const codeMap = vue.ref([]);
  25314. function getDetailByCode2(code2) {
  25315. if (codeMap.value.includes(code2)) {
  25316. uni.$u.ttsModule.speak("重复扫描");
  25317. return;
  25318. }
  25319. uni.$u.http.get("/app/stock/searchOrder?waybillCode=" + code2).then((res2) => {
  25320. if (res2.code == 200) {
  25321. ordersMap.value.unshift(res2.data);
  25322. codeMap.value.push(code2);
  25323. } else if (res2.code == 601) {
  25324. uni.$u.ttsModule.speak(res2.msg);
  25325. uni.showModal({
  25326. title: "提示",
  25327. content: res2.msg,
  25328. showCancel: false
  25329. });
  25330. } else {
  25331. uni.$u.toast(res2.msg);
  25332. }
  25333. });
  25334. }
  25335. const remarkVisible = vue.ref(false);
  25336. const currentRemark = vue.ref("");
  25337. const currentEditIndex = vue.ref(-1);
  25338. const goBack = () => {
  25339. if (ordersMap.value.length > 0) {
  25340. uni.showModal({
  25341. title: "退出确认",
  25342. content: "是否确认放弃本次入库?",
  25343. success: (res2) => {
  25344. if (res2.confirm) {
  25345. uni.navigateBack();
  25346. }
  25347. }
  25348. });
  25349. } else {
  25350. uni.navigateBack();
  25351. }
  25352. };
  25353. const onSubmit = () => {
  25354. if (!formData.godownId || !formData.positionCode) {
  25355. uni.$u.toast("请先选择仓库和库位");
  25356. uni.$u.ttsModule.speak("请先选择仓库和库位");
  25357. return;
  25358. }
  25359. uni.showModal({
  25360. title: "提交确认",
  25361. content: "是否确认提交本次入库?",
  25362. success: (res2) => {
  25363. if (res2.confirm) {
  25364. handleSubmitConfirm();
  25365. }
  25366. }
  25367. });
  25368. };
  25369. const handleSubmitConfirm = async () => {
  25370. uni.showLoading({
  25371. title: "提交中..."
  25372. });
  25373. let orderInfo = ordersMap.value.map((item) => {
  25374. return {
  25375. orderId: item.orderId,
  25376. waybillCode: item.waybillCode,
  25377. bookNum: item.badNum,
  25378. remark: item.remark
  25379. };
  25380. });
  25381. if (orderInfo.length == 0) {
  25382. uni.hideLoading();
  25383. uni.$u.ttsModule.speak("请添加订单数据");
  25384. return;
  25385. }
  25386. uni.$u.http.post("/app/stock/addBatch", {
  25387. godownId: formData.godownId,
  25388. positionCode: formData.positionCode,
  25389. orderInfo
  25390. }).then((res2) => {
  25391. if (res2.code == 200) {
  25392. uni.$u.toast("入库成功");
  25393. uni.$u.ttsModule.speak("入库成功");
  25394. clearData();
  25395. } else {
  25396. uni.$u.toast(res2.msg);
  25397. }
  25398. }).finally(() => {
  25399. uni.hideLoading();
  25400. });
  25401. };
  25402. const clearData = () => {
  25403. ordersMap.value.length = 0;
  25404. waybillCode.value = "";
  25405. formData.godownName = "";
  25406. formData.positionCode = "";
  25407. formData.godownId = "";
  25408. };
  25409. const editOrder = (index2) => {
  25410. openRemarkDialog(index2);
  25411. };
  25412. const openScan = () => {
  25413. uni.scanCode({
  25414. scanType: ["barCode"],
  25415. success: (res2) => {
  25416. getDetailByCode2(res2.result);
  25417. },
  25418. fail: (err) => {
  25419. uni.showToast({
  25420. title: "扫码失败",
  25421. icon: "error"
  25422. });
  25423. }
  25424. });
  25425. };
  25426. function selectLocation() {
  25427. if (!formData.godownId) {
  25428. uni.$u.toast("请先选择仓库");
  25429. uni.$u.ttsModule.speak("请先选择仓库");
  25430. return;
  25431. }
  25432. uni.navigateTo({
  25433. url: "/pages/index/wms/location-select?godownId=" + formData.godownId + "&positionCode=" + formData.positionCode
  25434. });
  25435. }
  25436. const deleteOrder = (index2) => {
  25437. ordersMap.value.splice(index2, 1);
  25438. };
  25439. vue.onMounted(() => {
  25440. uni.$u.useGlobalEvent((e) => {
  25441. if (e.barcode) {
  25442. getDetailByCode2(e.barcode);
  25443. }
  25444. });
  25445. uni.$on("updateLocation", (locationCode) => {
  25446. formData.positionCode = locationCode;
  25447. });
  25448. uni.$on("updateWarehouse", (data) => {
  25449. formData.godownName = data.godownName;
  25450. formData.godownId = data.id;
  25451. });
  25452. });
  25453. vue.onUnmounted(() => {
  25454. uni.$off("updateLocation");
  25455. uni.$off("updateWarehouse");
  25456. });
  25457. const openRemarkDialog = (index2, remark = "") => {
  25458. currentEditIndex.value = index2;
  25459. currentRemark.value = remark;
  25460. remarkVisible.value = true;
  25461. };
  25462. const handleRemarkConfirm = (remark) => {
  25463. if (currentEditIndex.value >= 0) {
  25464. ordersMap.value[currentEditIndex.value].remark = remark;
  25465. }
  25466. currentEditIndex.value = -1;
  25467. currentRemark.value = "";
  25468. };
  25469. const selectWarehouse = () => {
  25470. uni.navigateTo({
  25471. url: "/pages/index/wms/warehouse-select?godownId=" + formData.godownId
  25472. });
  25473. };
  25474. const __returned__ = { waybillCode, formData, 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, BadItem, get VolumeTTS() {
  25475. return VolumeTTS;
  25476. }, RemarkDialog };
  25477. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25478. return __returned__;
  25479. }
  25480. };
  25481. function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
  25482. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  25483. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$8);
  25484. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_2$2);
  25485. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$a);
  25486. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  25487. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$7);
  25488. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  25489. return vue.openBlock(), vue.createElementBlock("view", {
  25490. class: "common-page",
  25491. style: { "padding": "0" }
  25492. }, [
  25493. vue.createCommentVNode(" 顶部导航栏 "),
  25494. vue.createElementVNode("view", { class: "header" }, [
  25495. vue.createVNode(_component_u_navbar, {
  25496. title: "不良入库",
  25497. border: false,
  25498. fixed: "",
  25499. "safe-area-inset-top": ""
  25500. }, {
  25501. left: vue.withCtx(() => [
  25502. vue.createVNode(_component_u_icon, {
  25503. name: "arrow-left",
  25504. color: "#333333",
  25505. size: "20",
  25506. onClick: $setup.goBack
  25507. })
  25508. ]),
  25509. right: vue.withCtx(() => [
  25510. vue.createVNode(_component_u_text, {
  25511. type: "primary",
  25512. text: "提交",
  25513. onClick: $setup.onSubmit
  25514. })
  25515. ]),
  25516. _: 1
  25517. /* STABLE */
  25518. })
  25519. ]),
  25520. vue.createCommentVNode(" 主要内容区域 "),
  25521. vue.createElementVNode("view", { class: "content" }, [
  25522. vue.createCommentVNode(" 订单基本信息 "),
  25523. vue.createElementVNode("view", { class: "info-section" }, [
  25524. vue.createVNode(_component_u_form, {
  25525. model: $setup.formData,
  25526. ref: "formRef",
  25527. "label-width": "80px",
  25528. "label-position": "left"
  25529. }, {
  25530. default: vue.withCtx(() => [
  25531. vue.createVNode(_component_u_form_item, {
  25532. label: "订单总数",
  25533. required: ""
  25534. }, {
  25535. default: vue.withCtx(() => [
  25536. vue.createElementVNode(
  25537. "span",
  25538. null,
  25539. vue.toDisplayString($setup.ordersMap.length),
  25540. 1
  25541. /* TEXT */
  25542. )
  25543. ]),
  25544. _: 1
  25545. /* STABLE */
  25546. }),
  25547. vue.createVNode(_component_u_form_item, {
  25548. label: "仓库",
  25549. required: ""
  25550. }, {
  25551. default: vue.withCtx(() => [
  25552. vue.createElementVNode("view", {
  25553. onClick: $setup.selectWarehouse,
  25554. style: { "width": "100%" }
  25555. }, [
  25556. vue.createVNode(_component_u_input, {
  25557. modelValue: $setup.formData.godownName,
  25558. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.godownName = $event),
  25559. readonly: "",
  25560. "custom-style": "font-size:32rpx",
  25561. placeholder: "请选择仓库",
  25562. suffixIcon: "arrow-right"
  25563. }, null, 8, ["modelValue"])
  25564. ])
  25565. ]),
  25566. _: 1
  25567. /* STABLE */
  25568. }),
  25569. vue.createVNode(_component_u_form_item, {
  25570. label: "库位",
  25571. required: ""
  25572. }, {
  25573. default: vue.withCtx(() => [
  25574. vue.createElementVNode("view", {
  25575. onClick: $setup.selectLocation,
  25576. style: { "width": "100%" }
  25577. }, [
  25578. vue.createVNode(_component_u_input, {
  25579. modelValue: $setup.formData.positionCode,
  25580. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.positionCode = $event),
  25581. readonly: "",
  25582. "custom-style": "font-size:32rpx",
  25583. placeholder: "请选择库位",
  25584. suffixIcon: "arrow-right"
  25585. }, null, 8, ["modelValue"])
  25586. ])
  25587. ]),
  25588. _: 1
  25589. /* STABLE */
  25590. })
  25591. ]),
  25592. _: 1
  25593. /* STABLE */
  25594. }, 8, ["model"])
  25595. ]),
  25596. vue.createCommentVNode(" 订单列表 "),
  25597. vue.createElementVNode("view", { class: "order-list" }, [
  25598. (vue.openBlock(true), vue.createElementBlock(
  25599. vue.Fragment,
  25600. null,
  25601. vue.renderList($setup.ordersMap, (order, index2) => {
  25602. return vue.openBlock(), vue.createBlock($setup["BadItem"], {
  25603. key: index2,
  25604. data: order,
  25605. onDelete: ($event) => $setup.deleteOrder(index2),
  25606. onEdit: ($event) => $setup.editOrder(index2)
  25607. }, null, 8, ["data", "onDelete", "onEdit"]);
  25608. }),
  25609. 128
  25610. /* KEYED_FRAGMENT */
  25611. ))
  25612. ]),
  25613. vue.createCommentVNode(" 底部扫码输入框 "),
  25614. vue.createElementVNode("view", {
  25615. class: "fixed-bottom pad-20",
  25616. style: { "background": "#ffffff" }
  25617. }, [
  25618. vue.createVNode(_component_u_search, {
  25619. placeholder: "请输入物流单号",
  25620. searchIconSize: 24,
  25621. bgColor: "#f6f7f6",
  25622. onSearch: _cache[2] || (_cache[2] = ($event) => $setup.getDetailByCode($setup.waybillCode)),
  25623. modelValue: $setup.waybillCode,
  25624. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.waybillCode = $event),
  25625. "custom-style": "font-size:32rpx",
  25626. "placeholder-style": "font-size:32rpx",
  25627. clearabled: true,
  25628. focus: false,
  25629. showAction: false,
  25630. height: 42
  25631. }, null, 8, ["modelValue"]),
  25632. vue.createVNode(_component_u_icon, {
  25633. name: "scan",
  25634. size: "32",
  25635. color: "#19be6b",
  25636. onClick: $setup.openScan
  25637. })
  25638. ])
  25639. ]),
  25640. vue.createCommentVNode(" 备注弹窗 "),
  25641. vue.createVNode($setup["RemarkDialog"], {
  25642. visible: $setup.remarkVisible,
  25643. "onUpdate:visible": _cache[4] || (_cache[4] = ($event) => $setup.remarkVisible = $event),
  25644. "initial-value": $setup.currentRemark,
  25645. onConfirm: $setup.handleRemarkConfirm
  25646. }, null, 8, ["visible", "initial-value"])
  25647. ]);
  25648. }
  25649. const PagesIndexWmsBadIn = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$F], ["__scopeId", "data-v-04095d32"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-in.vue"]]);
  25650. const _sfc_main$F = {
  25651. __name: "bad-out",
  25652. setup(__props, { expose: __expose }) {
  25653. __expose();
  25654. const searchText = vue.ref("");
  25655. const onSearch = () => {
  25656. uni.navigateTo({
  25657. url: `/pages/index/wms/bad-out-order?searchText=${searchText.value}`
  25658. });
  25659. };
  25660. const openScan = () => {
  25661. uni.scanCode({
  25662. success: (res2) => {
  25663. searchText.value = res2.result;
  25664. onSearch();
  25665. },
  25666. fail: (err) => {
  25667. uni.showToast({
  25668. title: "扫码失败",
  25669. icon: "error"
  25670. });
  25671. }
  25672. });
  25673. };
  25674. const __returned__ = { searchText, onSearch, openScan, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted };
  25675. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25676. return __returned__;
  25677. }
  25678. };
  25679. function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
  25680. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  25681. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  25682. return vue.openBlock(), vue.createElementBlock("view", { class: "container flex-d h100" }, [
  25683. vue.createCommentVNode(" 库位列表 "),
  25684. vue.createElementVNode("view", { class: "location-list flex-1" }, [
  25685. vue.createElementVNode("view", { class: "no-data flex-c mt-60" }, "请输入快递单号/订单编号")
  25686. ]),
  25687. vue.createCommentVNode(" 底部搜索框 "),
  25688. vue.createElementVNode("view", {
  25689. class: "pad-20 flex-a",
  25690. style: { "background": "#ffffff" }
  25691. }, [
  25692. vue.createVNode(_component_u_search, {
  25693. modelValue: $setup.searchText,
  25694. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  25695. placeholder: "请输入库位条码",
  25696. "show-action": false,
  25697. clearabled: true,
  25698. onChange: $setup.onSearch,
  25699. height: "40",
  25700. onClick: _cache[1] || (_cache[1] = ($event) => $setup.searchText = "")
  25701. }, null, 8, ["modelValue"]),
  25702. vue.createVNode(_component_u_icon, {
  25703. name: "scan",
  25704. size: "28",
  25705. color: "#19be6b",
  25706. onClick: $setup.openScan
  25707. })
  25708. ])
  25709. ]);
  25710. }
  25711. const PagesIndexWmsBadOut = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$E], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-out.vue"]]);
  25712. const _sfc_main$E = {
  25713. __name: "BadOutCard",
  25714. props: {
  25715. item: Object
  25716. },
  25717. setup(__props, { expose: __expose }) {
  25718. __expose();
  25719. const props2 = __props;
  25720. const __returned__ = { props: props2 };
  25721. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25722. return __returned__;
  25723. }
  25724. };
  25725. function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
  25726. return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [
  25727. vue.createElementVNode("view", { class: "flex w100" }, [
  25728. vue.createElementVNode("view", { class: "flex-d" }, [
  25729. vue.createElementVNode("image", {
  25730. style: { "width": "80px", "height": "100px" },
  25731. src: $props.item.image,
  25732. mode: "aspectFill"
  25733. }, null, 8, ["src"]),
  25734. vue.createElementVNode(
  25735. "view",
  25736. { class: "quantity mt-20" },
  25737. "数量: " + vue.toDisplayString($props.item.quantity),
  25738. 1
  25739. /* TEXT */
  25740. )
  25741. ]),
  25742. vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
  25743. vue.createElementVNode(
  25744. "view",
  25745. { class: "common-title mb-20" },
  25746. vue.toDisplayString($props.item.title),
  25747. 1
  25748. /* TEXT */
  25749. ),
  25750. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  25751. vue.createElementVNode(
  25752. "view",
  25753. { class: "isbn" },
  25754. "ISBN: " + vue.toDisplayString($props.item.isbn),
  25755. 1
  25756. /* TEXT */
  25757. ),
  25758. vue.createElementVNode(
  25759. "view",
  25760. { class: "set" },
  25761. "套装: " + vue.toDisplayString($props.item.set),
  25762. 1
  25763. /* TEXT */
  25764. )
  25765. ]),
  25766. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  25767. vue.createElementVNode(
  25768. "view",
  25769. { class: "discount" },
  25770. "回收折扣: " + vue.toDisplayString($props.item.discount),
  25771. 1
  25772. /* TEXT */
  25773. ),
  25774. vue.createElementVNode(
  25775. "view",
  25776. { class: "review" },
  25777. "审核金额: " + vue.toDisplayString($props.item.review),
  25778. 1
  25779. /* TEXT */
  25780. )
  25781. ]),
  25782. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  25783. vue.createElementVNode(
  25784. "view",
  25785. { class: "price" },
  25786. "定价: " + vue.toDisplayString($props.item.price),
  25787. 1
  25788. /* TEXT */
  25789. ),
  25790. vue.createElementVNode(
  25791. "view",
  25792. { class: "estimate" },
  25793. "预估单价: " + vue.toDisplayString($props.item.estimate),
  25794. 1
  25795. /* TEXT */
  25796. )
  25797. ]),
  25798. vue.createElementVNode(
  25799. "view",
  25800. { class: "quality mb-10" },
  25801. " 品相: 良好(" + vue.toDisplayString($props.item.good) + ") 、 一般(" + vue.toDisplayString($props.item.average) + ") 、 极差(" + vue.toDisplayString($props.item.bad) + ") ",
  25802. 1
  25803. /* TEXT */
  25804. ),
  25805. vue.createElementVNode(
  25806. "view",
  25807. { class: "reason color-red" },
  25808. "原因: " + vue.toDisplayString($props.item.reason),
  25809. 1
  25810. /* TEXT */
  25811. )
  25812. ])
  25813. ])
  25814. ]);
  25815. }
  25816. const BadOutCard = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$D], ["__scopeId", "data-v-e52c1f77"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/components/BadOutCard.vue"]]);
  25817. const _sfc_main$D = {
  25818. __name: "bad-out-order",
  25819. setup(__props, { expose: __expose }) {
  25820. __expose();
  25821. const ttsModule2 = vue.ref(null);
  25822. const searchText = vue.ref("");
  25823. const locationInfo = vue.ref({
  25824. location: "",
  25825. logisticsNo: "",
  25826. orderNo: "",
  25827. goodsCount: "",
  25828. remark: ""
  25829. });
  25830. const badList = vue.ref([]);
  25831. onLoad((options) => {
  25832. if (options.searchText) {
  25833. searchText.value = options.searchText;
  25834. onSearch();
  25835. }
  25836. ttsModule2.value = new VolumeTTS();
  25837. });
  25838. const getSearchType = (text) => {
  25839. return /^[0-9]+$/.test(text) ? 1 : 2;
  25840. };
  25841. const onSearch = async () => {
  25842. if (!searchText.value)
  25843. return;
  25844. try {
  25845. const searchType = getSearchType(searchText.value);
  25846. const { data } = await uni.$u.http.post("/app/stock/findOrderOutStock", {
  25847. search: searchText.value,
  25848. searchType
  25849. });
  25850. if (data) {
  25851. locationInfo.value = {
  25852. location: data.location || "",
  25853. logisticsNo: data.logisticsNo || "",
  25854. orderNo: data.orderNo || "",
  25855. goodsCount: data.goodsCount || "",
  25856. remark: data.remark || ""
  25857. };
  25858. badList.value = data.badList || [];
  25859. }
  25860. } catch (error2) {
  25861. uni.showToast({
  25862. title: "获取数据失败",
  25863. icon: "none"
  25864. });
  25865. }
  25866. };
  25867. const openScan = () => {
  25868. uni.scanCode({
  25869. success: (res2) => {
  25870. searchText.value = res2.result;
  25871. onSearch();
  25872. },
  25873. fail: (err) => {
  25874. uni.showToast({
  25875. title: "扫码失败",
  25876. icon: "error"
  25877. });
  25878. }
  25879. });
  25880. };
  25881. const onConfirm = () => {
  25882. uni.showModal({
  25883. title: "确认提示",
  25884. content: "是否确认出库?",
  25885. success: async (res2) => {
  25886. if (res2.confirm) {
  25887. try {
  25888. await uni.$u.http.post("/app/stock/outStock", {
  25889. orderId: locationInfo.value.orderNo,
  25890. positionCode: locationInfo.value.location,
  25891. outputRemark: locationInfo.value.remark
  25892. });
  25893. uni.showToast({
  25894. title: "出库成功",
  25895. icon: "success"
  25896. });
  25897. ttsModule2.value.speak("出库成功");
  25898. searchText.value = "";
  25899. locationInfo.value = {
  25900. location: "",
  25901. logisticsNo: "",
  25902. orderNo: "",
  25903. goodsCount: "",
  25904. remark: ""
  25905. };
  25906. badList.value = [];
  25907. } catch (error2) {
  25908. uni.showToast({
  25909. title: "出库失败",
  25910. icon: "none"
  25911. });
  25912. }
  25913. }
  25914. }
  25915. });
  25916. };
  25917. const remarkVisible = vue.ref(false);
  25918. const currentRemark = vue.ref("");
  25919. const currentEditIndex = vue.ref(-1);
  25920. const openRemarkDialog = (index2, remark = "") => {
  25921. currentEditIndex.value = index2;
  25922. currentRemark.value = remark;
  25923. remarkVisible.value = true;
  25924. };
  25925. const handleRemarkConfirm = (remark) => {
  25926. if (currentEditIndex.value >= 0) {
  25927. orders.value[currentEditIndex.value].remark = remark;
  25928. }
  25929. currentEditIndex.value = -1;
  25930. currentRemark.value = "";
  25931. };
  25932. const __returned__ = { ttsModule: ttsModule2, searchText, locationInfo, badList, getSearchType, onSearch, openScan, onConfirm, remarkVisible, currentRemark, currentEditIndex, openRemarkDialog, handleRemarkConfirm, ref: vue.ref, onMounted: vue.onMounted, BadOutCard, RemarkDialog, get VolumeTTS() {
  25933. return VolumeTTS;
  25934. }, get onLoad() {
  25935. return onLoad;
  25936. } };
  25937. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25938. return __returned__;
  25939. }
  25940. };
  25941. function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
  25942. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  25943. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  25944. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$3);
  25945. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  25946. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  25947. vue.createCommentVNode(" 搜索框 "),
  25948. vue.createVNode(_component_u_sticky, null, {
  25949. default: vue.withCtx(() => [
  25950. vue.createElementVNode("view", { class: "search-area flex-c mb-20" }, [
  25951. vue.createVNode(_component_u_search, {
  25952. modelValue: $setup.searchText,
  25953. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  25954. placeholder: "请输入运单号/订单编号",
  25955. "show-action": false,
  25956. clearabled: true,
  25957. onChange: $setup.onSearch,
  25958. height: "40"
  25959. }, null, 8, ["modelValue"]),
  25960. vue.createVNode(_component_u_icon, {
  25961. name: "scan",
  25962. size: "28",
  25963. color: "#19be6b",
  25964. onClick: $setup.openScan
  25965. })
  25966. ])
  25967. ]),
  25968. _: 1
  25969. /* STABLE */
  25970. }),
  25971. vue.createElementVNode("view", { class: "content" }, [
  25972. vue.createCommentVNode(" 基本信息 "),
  25973. vue.createElementVNode("view", { class: "info-section" }, [
  25974. vue.createElementVNode(
  25975. "view",
  25976. { class: "info-item" },
  25977. "库位:" + vue.toDisplayString($setup.locationInfo.location),
  25978. 1
  25979. /* TEXT */
  25980. ),
  25981. vue.createElementVNode(
  25982. "view",
  25983. { class: "info-item" },
  25984. "物流单号:" + vue.toDisplayString($setup.locationInfo.logisticsNo),
  25985. 1
  25986. /* TEXT */
  25987. ),
  25988. vue.createElementVNode(
  25989. "view",
  25990. { class: "info-item" },
  25991. "订单编号:" + vue.toDisplayString($setup.locationInfo.orderNo),
  25992. 1
  25993. /* TEXT */
  25994. ),
  25995. vue.createElementVNode(
  25996. "view",
  25997. { class: "info-item" },
  25998. "订单商品:" + vue.toDisplayString($setup.locationInfo.goodsCount),
  25999. 1
  26000. /* TEXT */
  26001. ),
  26002. vue.createElementVNode(
  26003. "view",
  26004. { class: "info-item" },
  26005. "备注信息:" + vue.toDisplayString($setup.locationInfo.remark),
  26006. 1
  26007. /* TEXT */
  26008. )
  26009. ]),
  26010. vue.createCommentVNode(" 极差商品列表 "),
  26011. vue.createElementVNode("view", { class: "bad-list" }, [
  26012. vue.createElementVNode("view", { class: "list-title mb-6" }, "极差"),
  26013. (vue.openBlock(true), vue.createElementBlock(
  26014. vue.Fragment,
  26015. null,
  26016. vue.renderList($setup.badList, (item, index2) => {
  26017. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  26018. vue.createVNode($setup["BadOutCard"], { item }, null, 8, ["item"])
  26019. ]);
  26020. }),
  26021. 128
  26022. /* KEYED_FRAGMENT */
  26023. ))
  26024. ])
  26025. ]),
  26026. vue.createCommentVNode(" 底部按钮 "),
  26027. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  26028. vue.createVNode(_component_u_button, {
  26029. size: "large",
  26030. type: "warning",
  26031. text: "反馈",
  26032. onClick: $setup.openRemarkDialog
  26033. }),
  26034. vue.createVNode(_component_u_button, {
  26035. size: "large",
  26036. type: "primary",
  26037. text: "确定出库",
  26038. onClick: $setup.onConfirm
  26039. })
  26040. ]),
  26041. vue.createCommentVNode(" 备注弹窗 "),
  26042. vue.createVNode($setup["RemarkDialog"], {
  26043. visible: $setup.remarkVisible,
  26044. "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => $setup.remarkVisible = $event),
  26045. "initial-value": $setup.currentRemark,
  26046. onConfirm: $setup.handleRemarkConfirm
  26047. }, null, 8, ["visible", "initial-value"])
  26048. ]);
  26049. }
  26050. const PagesIndexWmsBadOutOrder = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__scopeId", "data-v-43bc1c65"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-out-order.vue"]]);
  26051. const _sfc_main$C = {
  26052. __name: "bad-off",
  26053. setup(__props, { expose: __expose }) {
  26054. __expose();
  26055. const searchText = vue.ref("");
  26056. const taskList = vue.ref([
  26057. {
  26058. taskNo: "XJ20245451421",
  26059. warehouse: "河南仓",
  26060. quantity: 40,
  26061. status: "待作业"
  26062. },
  26063. {
  26064. taskNo: "XJ20245451421",
  26065. warehouse: "河南仓",
  26066. quantity: 40,
  26067. status: "待作业"
  26068. }
  26069. ]);
  26070. const onSearch = () => {
  26071. };
  26072. const openScan = () => {
  26073. uni.scanCode({
  26074. success: (res2) => {
  26075. searchText.value = res2.result;
  26076. },
  26077. fail: (err) => {
  26078. uni.showToast({
  26079. title: "扫码失败",
  26080. icon: "error"
  26081. });
  26082. }
  26083. });
  26084. };
  26085. const handleTaskClick = (task) => {
  26086. uni.navigateTo({
  26087. url: `/pages/index/wms/task-detail?taskNo=${task.taskNo}`
  26088. });
  26089. };
  26090. const __returned__ = { searchText, taskList, onSearch, openScan, handleTaskClick, ref: vue.ref };
  26091. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26092. return __returned__;
  26093. }
  26094. };
  26095. function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
  26096. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  26097. vue.createCommentVNode(" 任务列表 "),
  26098. vue.createElementVNode("view", { class: "task-list" }, [
  26099. (vue.openBlock(true), vue.createElementBlock(
  26100. vue.Fragment,
  26101. null,
  26102. vue.renderList($setup.taskList, (item, index2) => {
  26103. return vue.openBlock(), vue.createElementBlock("view", {
  26104. key: index2,
  26105. class: "task-card",
  26106. onClick: ($event) => $setup.handleTaskClick(item)
  26107. }, [
  26108. vue.createElementVNode("view", { class: "task-header" }, [
  26109. vue.createElementVNode(
  26110. "text",
  26111. { class: "task-no" },
  26112. "作业单号:" + vue.toDisplayString(item.taskNo),
  26113. 1
  26114. /* TEXT */
  26115. )
  26116. ]),
  26117. vue.createElementVNode("view", { class: "task-content" }, [
  26118. vue.createElementVNode("view", { class: "flex-a mb-10" }, [
  26119. vue.createElementVNode("text", { class: "label" }, "仓库:"),
  26120. vue.createElementVNode(
  26121. "text",
  26122. { class: "value" },
  26123. vue.toDisplayString(item.warehouse),
  26124. 1
  26125. /* TEXT */
  26126. )
  26127. ]),
  26128. vue.createElementVNode("view", { class: "flex-a mb-10" }, [
  26129. vue.createElementVNode("text", { class: "label" }, "任务数量:"),
  26130. vue.createElementVNode(
  26131. "text",
  26132. { class: "value" },
  26133. vue.toDisplayString(item.quantity),
  26134. 1
  26135. /* TEXT */
  26136. )
  26137. ]),
  26138. vue.createElementVNode("view", { class: "flex-a" }, [
  26139. vue.createElementVNode("text", { class: "label" }, "作业状态:"),
  26140. vue.createElementVNode(
  26141. "text",
  26142. { class: "value" },
  26143. vue.toDisplayString(item.status),
  26144. 1
  26145. /* TEXT */
  26146. )
  26147. ])
  26148. ])
  26149. ], 8, ["onClick"]);
  26150. }),
  26151. 128
  26152. /* KEYED_FRAGMENT */
  26153. ))
  26154. ])
  26155. ]);
  26156. }
  26157. const PagesIndexWmsBadOff = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__scopeId", "data-v-58677b56"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-off.vue"]]);
  26158. const _sfc_main$B = {
  26159. __name: "order-query",
  26160. setup(__props, { expose: __expose }) {
  26161. __expose();
  26162. const query = vue.reactive({
  26163. searchType: 2,
  26164. search: ""
  26165. });
  26166. const orderQuery = () => {
  26167. if (!query.search) {
  26168. uni.$u.toast("请输入快递单号/订单编号");
  26169. return;
  26170. }
  26171. uni.navigateTo({
  26172. url: `/pages/index/wms/order-query-list?id=${query.search}`
  26173. });
  26174. };
  26175. function openScan() {
  26176. uni.scanCode({
  26177. success: (res2) => {
  26178. query.search = res2.result;
  26179. orderQuery();
  26180. }
  26181. });
  26182. }
  26183. onLoad(() => {
  26184. uni.$u.useGlobalEvent((e) => {
  26185. if (e.barcode) {
  26186. query.search = e.barcode;
  26187. orderQuery();
  26188. }
  26189. });
  26190. });
  26191. const __returned__ = { query, orderQuery, openScan, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  26192. return onLoad;
  26193. } };
  26194. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26195. return __returned__;
  26196. }
  26197. };
  26198. function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
  26199. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  26200. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  26201. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  26202. vue.createCommentVNode(" 底部扫码输入框 "),
  26203. vue.createElementVNode("view", {
  26204. class: "fixed-bottom pad-20",
  26205. style: { "background": "#ffffff" }
  26206. }, [
  26207. vue.createVNode(_component_u_search, {
  26208. placeholder: "请输入快递单号/订单编号",
  26209. searchIconSize: 24,
  26210. bgColor: "#f6f7f6",
  26211. onSearch: $setup.orderQuery,
  26212. modelValue: $setup.query.search,
  26213. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.query.search = $event),
  26214. "custom-style": "font-size:32rpx",
  26215. "placeholder-style": "font-size:32rpx",
  26216. clearabled: true,
  26217. focus: false,
  26218. showAction: false,
  26219. height: 42
  26220. }, null, 8, ["modelValue"]),
  26221. vue.createVNode(_component_u_icon, {
  26222. name: "scan",
  26223. size: "34",
  26224. color: "#19be6b",
  26225. onClick: $setup.openScan
  26226. })
  26227. ])
  26228. ]);
  26229. }
  26230. const PagesIndexWmsOrderQuery = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__scopeId", "data-v-c65e1cc0"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/order-query.vue"]]);
  26231. const props$5 = {
  26232. props: {
  26233. // 是否显示圆点
  26234. isDot: {
  26235. type: Boolean,
  26236. default: props$E.badge.isDot
  26237. },
  26238. // 显示的内容
  26239. value: {
  26240. type: [Number, String],
  26241. default: props$E.badge.value
  26242. },
  26243. // 显示的内容
  26244. modelValue: {
  26245. type: [Number, String],
  26246. default: props$E.badge.modelValue
  26247. },
  26248. // 是否显示
  26249. show: {
  26250. type: Boolean,
  26251. default: props$E.badge.show
  26252. },
  26253. // 最大值,超过最大值会显示 '{max}+'
  26254. max: {
  26255. type: [Number, String],
  26256. default: props$E.badge.max
  26257. },
  26258. // 主题类型,error|warning|success|primary
  26259. type: {
  26260. type: String,
  26261. default: props$E.badge.type
  26262. },
  26263. // 当数值为 0 时,是否展示 Badge
  26264. showZero: {
  26265. type: Boolean,
  26266. default: props$E.badge.showZero
  26267. },
  26268. // 背景颜色,优先级比type高,如设置,type参数会失效
  26269. bgColor: {
  26270. type: [String, null],
  26271. default: props$E.badge.bgColor
  26272. },
  26273. // 字体颜色
  26274. color: {
  26275. type: [String, null],
  26276. default: props$E.badge.color
  26277. },
  26278. // 徽标形状,circle-四角均为圆角,horn-左下角为直角
  26279. shape: {
  26280. type: String,
  26281. default: props$E.badge.shape
  26282. },
  26283. // 设置数字的显示方式,overflow|ellipsis|limit
  26284. // overflow会根据max字段判断,超出显示`${max}+`
  26285. // ellipsis会根据max判断,超出显示`${max}...`
  26286. // limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数
  26287. numberType: {
  26288. type: String,
  26289. default: props$E.badge.numberType
  26290. },
  26291. // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
  26292. offset: {
  26293. type: Array,
  26294. default: props$E.badge.offset
  26295. },
  26296. // 是否反转背景和字体颜色
  26297. inverted: {
  26298. type: Boolean,
  26299. default: props$E.badge.inverted
  26300. },
  26301. // 是否绝对定位
  26302. absolute: {
  26303. type: Boolean,
  26304. default: props$E.badge.absolute
  26305. }
  26306. }
  26307. };
  26308. const _sfc_main$A = {
  26309. name: "u-badge",
  26310. mixins: [mpMixin, props$5, mixin],
  26311. computed: {
  26312. // 是否将badge中心与父组件右上角重合
  26313. boxStyle() {
  26314. let style = {};
  26315. return style;
  26316. },
  26317. // 整个组件的样式
  26318. badgeStyle() {
  26319. const style = {};
  26320. if (this.color) {
  26321. style.color = this.color;
  26322. }
  26323. if (this.bgColor && !this.inverted) {
  26324. style.backgroundColor = this.bgColor;
  26325. }
  26326. if (this.absolute) {
  26327. style.position = "absolute";
  26328. if (this.offset.length) {
  26329. const top = this.offset[0];
  26330. const right = this.offset[1] || top;
  26331. style.top = uni.$u.addUnit(top);
  26332. style.right = uni.$u.addUnit(right);
  26333. }
  26334. }
  26335. return style;
  26336. },
  26337. showValue() {
  26338. switch (this.numberType) {
  26339. case "overflow":
  26340. return Number(this.value) > Number(this.max) ? this.max + "+" : this.value;
  26341. case "ellipsis":
  26342. return Number(this.value) > Number(this.max) ? "..." : this.value;
  26343. case "limit":
  26344. 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;
  26345. default:
  26346. return Number(this.value);
  26347. }
  26348. }
  26349. }
  26350. };
  26351. function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
  26352. return _ctx.show && ((Number(_ctx.value) === 0 ? _ctx.showZero : true) || _ctx.isDot) ? (vue.openBlock(), vue.createElementBlock(
  26353. "text",
  26354. {
  26355. key: 0,
  26356. 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"]),
  26357. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), $options.badgeStyle])
  26358. },
  26359. vue.toDisplayString(_ctx.isDot ? "" : $options.showValue),
  26360. 7
  26361. /* TEXT, CLASS, STYLE */
  26362. )) : vue.createCommentVNode("v-if", true);
  26363. }
  26364. const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__scopeId", "data-v-06cca9b7"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-badge/u-badge.vue"]]);
  26365. const props$4 = {
  26366. props: {
  26367. // 滑块的移动过渡时间,单位ms
  26368. duration: {
  26369. type: Number,
  26370. default: props$E.tabs.duration
  26371. },
  26372. // tabs标签数组
  26373. list: {
  26374. type: Array,
  26375. default: props$E.tabs.list
  26376. },
  26377. // 滑块颜色
  26378. lineColor: {
  26379. type: String,
  26380. default: props$E.tabs.lineColor
  26381. },
  26382. // 菜单选择中时的样式
  26383. activeStyle: {
  26384. type: [String, Object],
  26385. default: props$E.tabs.activeStyle
  26386. },
  26387. // 菜单非选中时的样式
  26388. inactiveStyle: {
  26389. type: [String, Object],
  26390. default: props$E.tabs.inactiveStyle
  26391. },
  26392. // 滑块长度
  26393. lineWidth: {
  26394. type: [String, Number],
  26395. default: props$E.tabs.lineWidth
  26396. },
  26397. // 滑块高度
  26398. lineHeight: {
  26399. type: [String, Number],
  26400. default: props$E.tabs.lineHeight
  26401. },
  26402. // 滑块背景显示大小,当滑块背景设置为图片时使用
  26403. lineBgSize: {
  26404. type: String,
  26405. default: props$E.tabs.lineBgSize
  26406. },
  26407. // 菜单item的样式
  26408. itemStyle: {
  26409. type: [String, Object],
  26410. default: props$E.tabs.itemStyle
  26411. },
  26412. // 菜单是否可滚动
  26413. scrollable: {
  26414. type: Boolean,
  26415. default: props$E.tabs.scrollable
  26416. },
  26417. // 当前选中标签的索引
  26418. current: {
  26419. type: [Number, String],
  26420. default: props$E.tabs.current
  26421. },
  26422. // 默认读取的键名
  26423. keyName: {
  26424. type: String,
  26425. default: props$E.tabs.keyName
  26426. }
  26427. }
  26428. };
  26429. const _sfc_main$z = {
  26430. name: "u-tabs",
  26431. mixins: [mpMixin, mixin, props$4],
  26432. data() {
  26433. return {
  26434. firstTime: true,
  26435. scrollLeft: 0,
  26436. scrollViewWidth: 0,
  26437. lineOffsetLeft: 0,
  26438. tabsRect: {
  26439. left: 0
  26440. },
  26441. innerCurrent: 0,
  26442. moving: false
  26443. };
  26444. },
  26445. watch: {
  26446. current: {
  26447. immediate: true,
  26448. handler(newValue, oldValue) {
  26449. if (newValue !== this.innerCurrent) {
  26450. this.innerCurrent = newValue;
  26451. this.$nextTick(() => {
  26452. this.resize();
  26453. });
  26454. }
  26455. }
  26456. },
  26457. // list变化时,重新渲染list各项信息
  26458. list() {
  26459. this.$nextTick(() => {
  26460. this.resize();
  26461. });
  26462. }
  26463. },
  26464. computed: {
  26465. textStyle() {
  26466. return (index2) => {
  26467. const style = {};
  26468. const customeStyle = index2 === this.innerCurrent ? uni.$u.addStyle(this.activeStyle) : uni.$u.addStyle(
  26469. this.inactiveStyle
  26470. );
  26471. if (this.list[index2].disabled) {
  26472. style.color = "#c8c9cc";
  26473. }
  26474. return uni.$u.deepMerge(customeStyle, style);
  26475. };
  26476. },
  26477. propsBadge() {
  26478. return uni.$u.props.badge;
  26479. }
  26480. },
  26481. async mounted() {
  26482. this.init();
  26483. },
  26484. emits: ["click", "change"],
  26485. methods: {
  26486. setLineLeft() {
  26487. const tabItem = this.list[this.innerCurrent];
  26488. if (!tabItem) {
  26489. return;
  26490. }
  26491. let lineOffsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => total + curr.rect.width, 0);
  26492. const lineWidth = uni.$u.getPx(this.lineWidth);
  26493. this.lineOffsetLeft = lineOffsetLeft + (tabItem.rect.width - lineWidth) / 2;
  26494. if (this.firstTime) {
  26495. setTimeout(() => {
  26496. this.firstTime = false;
  26497. }, 10);
  26498. }
  26499. },
  26500. // nvue下设置滑块的位置
  26501. animation(x, duration = 0) {
  26502. },
  26503. // 点击某一个标签
  26504. clickHandler(item, index2) {
  26505. this.$emit("click", {
  26506. ...item,
  26507. index: index2
  26508. });
  26509. if (item.disabled)
  26510. return;
  26511. this.innerCurrent = index2;
  26512. this.resize();
  26513. this.$emit("change", {
  26514. ...item,
  26515. index: index2
  26516. });
  26517. },
  26518. init() {
  26519. uni.$u.sleep().then(() => {
  26520. this.resize();
  26521. });
  26522. },
  26523. setScrollLeft() {
  26524. const tabRect = this.list[this.innerCurrent];
  26525. const offsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => {
  26526. return total + curr.rect.width;
  26527. }, 0);
  26528. const windowWidth = uni.$u.sys().windowWidth;
  26529. let scrollLeft = offsetLeft - (this.tabsRect.width - tabRect.rect.width) / 2 - (windowWidth - this.tabsRect.right) / 2 + this.tabsRect.left / 2;
  26530. scrollLeft = Math.min(scrollLeft, this.scrollViewWidth - this.tabsRect.width);
  26531. this.scrollLeft = Math.max(0, scrollLeft);
  26532. },
  26533. // 获取所有标签的尺寸
  26534. resize() {
  26535. if (this.list.length === 0) {
  26536. return;
  26537. }
  26538. Promise.all([this.getTabsRect(), this.getAllItemRect()]).then(([tabsRect, itemRect = []]) => {
  26539. this.tabsRect = tabsRect;
  26540. this.scrollViewWidth = 0;
  26541. itemRect.map((item, index2) => {
  26542. this.scrollViewWidth += item.width;
  26543. this.list[index2].rect = item;
  26544. });
  26545. this.setLineLeft();
  26546. this.setScrollLeft();
  26547. });
  26548. },
  26549. // 获取导航菜单的尺寸
  26550. getTabsRect() {
  26551. return new Promise((resolve) => {
  26552. this.queryRect("u-tabs__wrapper__scroll-view").then((size) => resolve(size));
  26553. });
  26554. },
  26555. // 获取所有标签的尺寸
  26556. getAllItemRect() {
  26557. return new Promise((resolve) => {
  26558. const promiseAllArr = this.list.map((item, index2) => this.queryRect(
  26559. `u-tabs__wrapper__nav__item-${index2}`,
  26560. true
  26561. ));
  26562. Promise.all(promiseAllArr).then((sizes) => resolve(sizes));
  26563. });
  26564. },
  26565. // 获取各个标签的尺寸
  26566. queryRect(el, item) {
  26567. return new Promise((resolve) => {
  26568. this.$uGetRect(`.${el}`).then((size) => {
  26569. resolve(size);
  26570. });
  26571. });
  26572. }
  26573. }
  26574. };
  26575. function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
  26576. const _component_u_badge = resolveEasycom(vue.resolveDynamicComponent("u-badge"), __easycom_0$1);
  26577. return vue.openBlock(), vue.createElementBlock("view", { class: "u-tabs" }, [
  26578. vue.createElementVNode("view", { class: "u-tabs__wrapper" }, [
  26579. vue.renderSlot(_ctx.$slots, "left", {}, void 0, true),
  26580. vue.createElementVNode("view", { class: "u-tabs__wrapper__scroll-view-wrapper" }, [
  26581. vue.createElementVNode("scroll-view", {
  26582. "scroll-x": _ctx.scrollable,
  26583. "scroll-left": $data.scrollLeft,
  26584. "scroll-with-animation": "",
  26585. class: "u-tabs__wrapper__scroll-view",
  26586. "show-scrollbar": false,
  26587. ref: "u-tabs__wrapper__scroll-view"
  26588. }, [
  26589. vue.createElementVNode(
  26590. "view",
  26591. {
  26592. class: "u-tabs__wrapper__nav",
  26593. ref: "u-tabs__wrapper__nav"
  26594. },
  26595. [
  26596. (vue.openBlock(true), vue.createElementBlock(
  26597. vue.Fragment,
  26598. null,
  26599. vue.renderList(_ctx.list, (item, index2) => {
  26600. return vue.openBlock(), vue.createElementBlock("view", {
  26601. class: vue.normalizeClass(["u-tabs__wrapper__nav__item", [`u-tabs__wrapper__nav__item-${index2}`, item.disabled && "u-tabs__wrapper__nav__item--disabled"]]),
  26602. key: index2,
  26603. onClick: ($event) => $options.clickHandler(item, index2),
  26604. ref_for: true,
  26605. ref: `u-tabs__wrapper__nav__item-${index2}`,
  26606. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.itemStyle), { flex: _ctx.scrollable ? "" : 1 }])
  26607. }, [
  26608. vue.createElementVNode(
  26609. "text",
  26610. {
  26611. class: vue.normalizeClass([[item.disabled && "u-tabs__wrapper__nav__item__text--disabled"], "u-tabs__wrapper__nav__item__text"]),
  26612. style: vue.normalizeStyle([$options.textStyle(index2)])
  26613. },
  26614. vue.toDisplayString(item[_ctx.keyName]),
  26615. 7
  26616. /* TEXT, CLASS, STYLE */
  26617. ),
  26618. vue.createVNode(_component_u_badge, {
  26619. show: !!(item.badge && (item.badge.show || item.badge.isDot || item.badge.value)),
  26620. isDot: item.badge && item.badge.isDot || $options.propsBadge.isDot,
  26621. value: item.badge && item.badge.value || $options.propsBadge.value,
  26622. max: item.badge && item.badge.max || $options.propsBadge.max,
  26623. type: item.badge && item.badge.type || $options.propsBadge.type,
  26624. showZero: item.badge && item.badge.showZero || $options.propsBadge.showZero,
  26625. bgColor: item.badge && item.badge.bgColor || $options.propsBadge.bgColor,
  26626. color: item.badge && item.badge.color || $options.propsBadge.color,
  26627. shape: item.badge && item.badge.shape || $options.propsBadge.shape,
  26628. numberType: item.badge && item.badge.numberType || $options.propsBadge.numberType,
  26629. inverted: item.badge && item.badge.inverted || $options.propsBadge.inverted,
  26630. customStyle: "margin-left: 4px;"
  26631. }, null, 8, ["show", "isDot", "value", "max", "type", "showZero", "bgColor", "color", "shape", "numberType", "inverted"])
  26632. ], 14, ["onClick"]);
  26633. }),
  26634. 128
  26635. /* KEYED_FRAGMENT */
  26636. )),
  26637. vue.createElementVNode(
  26638. "view",
  26639. {
  26640. class: "u-tabs__wrapper__nav__line",
  26641. ref: "u-tabs__wrapper__nav__line",
  26642. style: vue.normalizeStyle([{
  26643. width: _ctx.$u.addUnit(_ctx.lineWidth),
  26644. transform: `translate(${$data.lineOffsetLeft}px)`,
  26645. transitionDuration: `${$data.firstTime ? 0 : _ctx.duration}ms`,
  26646. height: _ctx.$u.addUnit(_ctx.lineHeight),
  26647. background: _ctx.lineColor,
  26648. backgroundSize: _ctx.lineBgSize
  26649. }])
  26650. },
  26651. null,
  26652. 4
  26653. /* STYLE */
  26654. )
  26655. ],
  26656. 512
  26657. /* NEED_PATCH */
  26658. )
  26659. ], 8, ["scroll-x", "scroll-left"])
  26660. ]),
  26661. vue.renderSlot(_ctx.$slots, "right", {}, void 0, true)
  26662. ])
  26663. ]);
  26664. }
  26665. const __easycom_4$1 = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__scopeId", "data-v-02b0c54f"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-tabs/u-tabs.vue"]]);
  26666. const _sfc_main$y = {
  26667. __name: "order-query-list",
  26668. setup(__props, { expose: __expose }) {
  26669. __expose();
  26670. const list1 = vue.reactive([{
  26671. name: "商品明细"
  26672. }, {
  26673. name: "操作记录"
  26674. }]);
  26675. const activeTab = vue.ref(0);
  26676. const query = vue.reactive({
  26677. searchType: 2,
  26678. search: ""
  26679. });
  26680. const determineSearchType = (search) => {
  26681. const isNumberString = /^\d+$/.test(search.toString());
  26682. return isNumberString ? 1 : 2;
  26683. };
  26684. const detail = vue.ref({});
  26685. const orderQuery = () => {
  26686. if (!query.search) {
  26687. uni.$u.toast("请输入快递单号/订单编号");
  26688. uni.$u.ttsModule.speak("请输入快递单号/订单编号");
  26689. return;
  26690. }
  26691. query.searchType = determineSearchType(query.search);
  26692. uni.$u.http.get("/app/stock/findOrder", { params: query }).then((res2) => {
  26693. if (res2.code == 200) {
  26694. detail.value = res2.data;
  26695. uni.$u.ttsModule.speak("查询成功");
  26696. getOperationLogs(res2.data.orderId);
  26697. } else {
  26698. uni.$u.toast(res2.msg);
  26699. uni.$u.ttsModule.speak(res2.msg);
  26700. }
  26701. });
  26702. };
  26703. const operationLogs = vue.ref([]);
  26704. const getOperationLogs = (orderId) => {
  26705. uni.$u.http.get("/app/stock/getGodownStocklog", { params: { orderId } }).then((res2) => {
  26706. if (res2.code == 200) {
  26707. operationLogs.value = res2.data;
  26708. }
  26709. });
  26710. };
  26711. function handleTabChange(tab) {
  26712. activeTab.value = tab.index;
  26713. }
  26714. function openScan() {
  26715. uni.scanCode({
  26716. success: (res2) => {
  26717. query.search = res2.result;
  26718. orderQuery();
  26719. }
  26720. });
  26721. }
  26722. onLoad((options) => {
  26723. if (options.id) {
  26724. query.search = options.id;
  26725. orderQuery();
  26726. }
  26727. uni.$u.useGlobalEvent((e) => {
  26728. if (e.barcode) {
  26729. getDetailByCode(e.barcode);
  26730. }
  26731. });
  26732. });
  26733. const __returned__ = { list1, activeTab, query, determineSearchType, detail, orderQuery, operationLogs, getOperationLogs, handleTabChange, openScan, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  26734. return onLoad;
  26735. }, BookInfo };
  26736. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26737. return __returned__;
  26738. }
  26739. };
  26740. function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
  26741. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_4$1);
  26742. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  26743. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  26744. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  26745. $setup.detail.orderId ? (vue.openBlock(), vue.createElementBlock("view", {
  26746. key: 0,
  26747. class: "header"
  26748. }, [
  26749. vue.createElementVNode("view", { class: "flex-d" }, [
  26750. vue.createElementVNode(
  26751. "text",
  26752. null,
  26753. "订单编号: " + vue.toDisplayString($setup.detail.orderId),
  26754. 1
  26755. /* TEXT */
  26756. ),
  26757. vue.createElementVNode(
  26758. "text",
  26759. { class: "mt-16" },
  26760. "库位: " + vue.toDisplayString($setup.detail.positionCode),
  26761. 1
  26762. /* TEXT */
  26763. )
  26764. ]),
  26765. vue.createElementVNode("view", { class: "status" }, [
  26766. vue.createElementVNode(
  26767. "text",
  26768. null,
  26769. vue.toDisplayString($setup.detail.stockStatus == 1 ? "已入库" : "已出库"),
  26770. 1
  26771. /* TEXT */
  26772. )
  26773. ])
  26774. ])) : vue.createCommentVNode("v-if", true),
  26775. $setup.detail.orderId ? (vue.openBlock(), vue.createElementBlock("view", {
  26776. key: 1,
  26777. style: { "background-color": "#ffffff" },
  26778. class: "pad-5 mt-20"
  26779. }, [
  26780. vue.createVNode(_component_u_tabs, {
  26781. list: $setup.list1,
  26782. modelValue: $setup.activeTab,
  26783. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.activeTab = $event),
  26784. itemStyle: { height: "44px", width: "48%" },
  26785. onChange: $setup.handleTabChange
  26786. }, null, 8, ["list", "modelValue"]),
  26787. $setup.activeTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  26788. key: 0,
  26789. class: "product-details"
  26790. }, [
  26791. vue.createVNode($setup["BookInfo"], {
  26792. bookList: $setup.detail.detailVoList,
  26793. detail: $setup.detail,
  26794. isShow: false
  26795. }, null, 8, ["bookList", "detail"])
  26796. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  26797. key: 1,
  26798. class: "operation-logs mt-20"
  26799. }, [
  26800. (vue.openBlock(true), vue.createElementBlock(
  26801. vue.Fragment,
  26802. null,
  26803. vue.renderList($setup.operationLogs, (log, index2) => {
  26804. return vue.openBlock(), vue.createElementBlock("view", {
  26805. key: index2,
  26806. class: "log-item"
  26807. }, [
  26808. vue.createElementVNode(
  26809. "text",
  26810. null,
  26811. vue.toDisplayString(log.createTime),
  26812. 1
  26813. /* TEXT */
  26814. ),
  26815. vue.createElementVNode(
  26816. "text",
  26817. null,
  26818. vue.toDisplayString(log.createName),
  26819. 1
  26820. /* TEXT */
  26821. ),
  26822. vue.createElementVNode(
  26823. "text",
  26824. null,
  26825. vue.toDisplayString(log.content),
  26826. 1
  26827. /* TEXT */
  26828. )
  26829. ]);
  26830. }),
  26831. 128
  26832. /* KEYED_FRAGMENT */
  26833. ))
  26834. ]))
  26835. ])) : vue.createCommentVNode("v-if", true),
  26836. vue.createCommentVNode(" 底部扫码输入框 "),
  26837. vue.createElementVNode("view", {
  26838. class: "fixed-bottom pad-20",
  26839. style: { "background": "#ffffff" }
  26840. }, [
  26841. vue.createVNode(_component_u_search, {
  26842. placeholder: "请输入快递单号/订单编号",
  26843. searchIconSize: 24,
  26844. bgColor: "#f6f7f6",
  26845. onSearch: $setup.orderQuery,
  26846. modelValue: $setup.query.search,
  26847. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.query.search = $event),
  26848. "custom-style": "font-size:32rpx",
  26849. "placeholder-style": "font-size:32rpx",
  26850. clearabled: true,
  26851. focus: false,
  26852. showAction: false,
  26853. height: 42
  26854. }, null, 8, ["modelValue"]),
  26855. vue.createVNode(_component_u_icon, {
  26856. name: "scan",
  26857. size: "34",
  26858. color: "#19be6b",
  26859. onClick: $setup.openScan
  26860. })
  26861. ])
  26862. ]);
  26863. }
  26864. const PagesIndexWmsOrderQueryList = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__scopeId", "data-v-13461b03"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/order-query-list.vue"]]);
  26865. const _sfc_main$x = {
  26866. __name: "location-order",
  26867. setup(__props, { expose: __expose }) {
  26868. __expose();
  26869. const positionCode = vue.ref("");
  26870. const onSearch = () => {
  26871. if (positionCode.value) {
  26872. uni.navigateTo({
  26873. url: "/pages/index/wms/location-order-list?positionCode=" + positionCode.value
  26874. });
  26875. } else {
  26876. uni.$u.toast("请输入库位编号");
  26877. }
  26878. };
  26879. function openScan() {
  26880. uni.scanCode({
  26881. success: (res2) => {
  26882. positionCode.value = res2.result;
  26883. onSearch();
  26884. }
  26885. });
  26886. }
  26887. onLoad(() => {
  26888. uni.$u.useGlobalEvent((e) => {
  26889. if (e.barcode) {
  26890. positionCode.value = e.barcode;
  26891. onSearch();
  26892. }
  26893. });
  26894. });
  26895. const __returned__ = { positionCode, onSearch, openScan, ref: vue.ref, get onLoad() {
  26896. return onLoad;
  26897. } };
  26898. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26899. return __returned__;
  26900. }
  26901. };
  26902. function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
  26903. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  26904. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  26905. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  26906. vue.createCommentVNode(" 底部扫码输入框 "),
  26907. vue.createElementVNode("view", {
  26908. class: "fixed-bottom pad-20",
  26909. style: { "background": "#ffffff" }
  26910. }, [
  26911. vue.createVNode(_component_u_search, {
  26912. placeholder: "请输入库位编号",
  26913. searchIconSize: 24,
  26914. bgColor: "#f6f7f6",
  26915. onSearch: $setup.onSearch,
  26916. modelValue: $setup.positionCode,
  26917. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.positionCode = $event),
  26918. clearabled: true,
  26919. focus: false,
  26920. showAction: false,
  26921. height: 42
  26922. }, null, 8, ["modelValue"]),
  26923. vue.createVNode(_component_u_icon, {
  26924. name: "scan",
  26925. size: "32",
  26926. color: "#19be6b",
  26927. onClick: $setup.openScan
  26928. })
  26929. ])
  26930. ]);
  26931. }
  26932. const PagesIndexWmsLocationOrder = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__scopeId", "data-v-38a6ed3a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/location-order.vue"]]);
  26933. const _imports_0 = "/static/img/share.png";
  26934. const _sfc_main$w = {
  26935. __name: "LocationOrderItem",
  26936. props: {
  26937. item: {
  26938. type: Object,
  26939. required: true
  26940. },
  26941. isCheck: {
  26942. type: Boolean,
  26943. default: false
  26944. }
  26945. },
  26946. emits: ["select"],
  26947. setup(__props, { expose: __expose, emit: __emit }) {
  26948. __expose();
  26949. const props2 = __props;
  26950. const emit2 = __emit;
  26951. const toggleSelect = () => {
  26952. emit2("select", props2.item);
  26953. };
  26954. const handleQuickJump = () => {
  26955. uni.navigateTo({
  26956. url: `/pages/index/wms/order-query-list?id=${props2.item.orderId}`
  26957. });
  26958. };
  26959. const __returned__ = { props: props2, emit: emit2, toggleSelect, handleQuickJump };
  26960. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26961. return __returned__;
  26962. }
  26963. };
  26964. function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
  26965. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  26966. return vue.openBlock(), vue.createElementBlock("view", { class: "order-item" }, [
  26967. vue.createElementVNode("view", { class: "order-header" }, [
  26968. vue.createElementVNode("view", { class: "order-info" }, [
  26969. vue.createElementVNode("view", { class: "info-row" }, [
  26970. vue.createElementVNode("text", { class: "label" }, "订单编号:"),
  26971. vue.createElementVNode(
  26972. "text",
  26973. { class: "value" },
  26974. vue.toDisplayString($props.item.orderId),
  26975. 1
  26976. /* TEXT */
  26977. )
  26978. ]),
  26979. vue.createElementVNode("view", { class: "info-row" }, [
  26980. vue.createElementVNode("text", { class: "label" }, "不良数量:"),
  26981. vue.createElementVNode(
  26982. "text",
  26983. { class: "value" },
  26984. vue.toDisplayString($props.item.badNum),
  26985. 1
  26986. /* TEXT */
  26987. )
  26988. ]),
  26989. vue.createElementVNode("view", { class: "info-row" }, [
  26990. vue.createElementVNode("text", { class: "label" }, "物流单号:"),
  26991. vue.createElementVNode(
  26992. "text",
  26993. { class: "value" },
  26994. vue.toDisplayString($props.item.waybillCode),
  26995. 1
  26996. /* TEXT */
  26997. )
  26998. ]),
  26999. vue.createElementVNode("view", { class: "info-row" }, [
  27000. vue.createElementVNode("text", { class: "label" }, "验货完成日期:"),
  27001. vue.createElementVNode(
  27002. "text",
  27003. { class: "value" },
  27004. vue.toDisplayString($props.item.auditFinishTime),
  27005. 1
  27006. /* TEXT */
  27007. )
  27008. ]),
  27009. vue.createElementVNode("view", { class: "info-row" }, [
  27010. vue.createElementVNode("text", { class: "label" }, "录入人:"),
  27011. vue.createElementVNode(
  27012. "text",
  27013. { class: "value" },
  27014. vue.toDisplayString($props.item.auditUserName),
  27015. 1
  27016. /* TEXT */
  27017. )
  27018. ])
  27019. ]),
  27020. $props.isCheck ? (vue.openBlock(), vue.createElementBlock("view", {
  27021. key: 0,
  27022. class: "check-icon"
  27023. }, [
  27024. vue.createVNode(_component_u_icon, {
  27025. name: $props.item.checked ? "checkmark-circle-fill" : "checkmark-circle",
  27026. color: $props.item.checked ? "#19be6b" : "#c8c9cc",
  27027. size: "28",
  27028. onClick: $setup.toggleSelect
  27029. }, null, 8, ["name", "color"])
  27030. ])) : vue.createCommentVNode("v-if", true),
  27031. vue.createElementVNode("view", {
  27032. class: "flex flex-d flex-a-c flex-j-c quick-jump",
  27033. onClick: $setup.handleQuickJump
  27034. }, [
  27035. vue.createElementVNode("image", {
  27036. src: _imports_0,
  27037. mode: "widthFix",
  27038. style: { "width": "30px" }
  27039. }),
  27040. vue.createElementVNode("text", { style: { "font-size": "28rpx", "color": "#19be6b" } }, "快速跳转")
  27041. ])
  27042. ])
  27043. ]);
  27044. }
  27045. const LocationOrderItem = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$v], ["__scopeId", "data-v-b4edd1b0"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/components/LocationOrderItem.vue"]]);
  27046. const _sfc_main$v = {
  27047. __name: "location-order-list",
  27048. setup(__props, { expose: __expose }) {
  27049. __expose();
  27050. const orderCode = vue.ref("");
  27051. const originList = vue.ref([]);
  27052. const orderList = vue.ref([]);
  27053. const detail = vue.ref({});
  27054. const getOrderListByPositionCode = (positionCode) => {
  27055. uni.$u.http.get("/app/stock/getOrderByPositionCode?positionCode=" + positionCode).then((res2) => {
  27056. if (res2.code == 200) {
  27057. detail.value = res2.data;
  27058. orderList.value = res2.data.godownStockLogResults;
  27059. originList.value = res2.data.godownStockLogResults;
  27060. if (originList.value.length > 0) {
  27061. uni.$u.ttsModule.speak("查询到" + originList.value.length + "条订单");
  27062. } else {
  27063. uni.$u.toast("暂无订单");
  27064. uni.$u.ttsModule.speak("暂无订单");
  27065. }
  27066. } else {
  27067. uni.$u.toast(res2.msg);
  27068. uni.$u.ttsModule.speak(res2.msg);
  27069. }
  27070. });
  27071. };
  27072. const onSearch = () => {
  27073. if (!orderCode.value) {
  27074. orderList.value = originList.value;
  27075. uni.$u.toast("请输入订单号或物流单号");
  27076. return;
  27077. }
  27078. const searchValue = String(orderCode.value).trim();
  27079. const isNumeric = /^[0-9]+$/.test(searchValue);
  27080. const result = originList.value.filter((item) => {
  27081. if (isNumeric) {
  27082. return item.orderId === orderCode.value;
  27083. } else {
  27084. return item.waybillCode === orderCode.value;
  27085. }
  27086. });
  27087. orderList.value = result;
  27088. };
  27089. function openScan() {
  27090. uni.scanCode({
  27091. success: (res2) => {
  27092. orderCode.value = res2.result;
  27093. onSearch();
  27094. }
  27095. });
  27096. }
  27097. onLoad((options) => {
  27098. if (options.positionCode) {
  27099. getOrderListByPositionCode(options.positionCode);
  27100. }
  27101. uni.$u.useGlobalEvent((e) => {
  27102. if (e.barcode) {
  27103. orderCode.value = res.result;
  27104. onSearch();
  27105. }
  27106. });
  27107. });
  27108. const __returned__ = { orderCode, originList, orderList, detail, getOrderListByPositionCode, onSearch, openScan, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  27109. return onLoad;
  27110. }, LocationOrderItem };
  27111. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27112. return __returned__;
  27113. }
  27114. };
  27115. function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
  27116. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27117. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27118. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27119. vue.createElementVNode("view", { class: "header" }, [
  27120. vue.createElementVNode("view", { class: "flex-d" }, [
  27121. vue.createElementVNode(
  27122. "text",
  27123. null,
  27124. "仓库: " + vue.toDisplayString($setup.detail.godownName),
  27125. 1
  27126. /* TEXT */
  27127. ),
  27128. vue.createElementVNode(
  27129. "text",
  27130. { class: "mt-16" },
  27131. "库位编号: " + vue.toDisplayString($setup.detail.positionCode),
  27132. 1
  27133. /* TEXT */
  27134. ),
  27135. vue.createElementVNode(
  27136. "text",
  27137. { class: "mt-16" },
  27138. "订单数量: " + vue.toDisplayString($setup.originList.length),
  27139. 1
  27140. /* TEXT */
  27141. )
  27142. ])
  27143. ]),
  27144. vue.createElementVNode("view", { class: "product-details" }, [
  27145. (vue.openBlock(true), vue.createElementBlock(
  27146. vue.Fragment,
  27147. null,
  27148. vue.renderList($setup.orderList, (item, index2) => {
  27149. return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
  27150. key: index2,
  27151. item
  27152. }, null, 8, ["item"]);
  27153. }),
  27154. 128
  27155. /* KEYED_FRAGMENT */
  27156. ))
  27157. ]),
  27158. vue.createCommentVNode(" 底部扫码输入框 "),
  27159. vue.createElementVNode("view", {
  27160. class: "fixed-bottom pad-20",
  27161. style: { "background": "#ffffff" }
  27162. }, [
  27163. vue.createVNode(_component_u_search, {
  27164. placeholder: "请输入快递单号/订单编号",
  27165. searchIconSize: 24,
  27166. bgColor: "#f6f7f6",
  27167. onSearch: $setup.onSearch,
  27168. modelValue: $setup.orderCode,
  27169. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.orderCode = $event),
  27170. clearabled: true,
  27171. focus: false,
  27172. showAction: false,
  27173. height: 42
  27174. }, null, 8, ["modelValue"]),
  27175. vue.createVNode(_component_u_icon, {
  27176. name: "scan",
  27177. size: "36",
  27178. color: "#19be6b",
  27179. onClick: $setup.openScan
  27180. })
  27181. ])
  27182. ]);
  27183. }
  27184. const PagesIndexWmsLocationOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$u], ["__scopeId", "data-v-3e424560"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/location-order-list.vue"]]);
  27185. const _sfc_main$u = {
  27186. __name: "location-select",
  27187. setup(__props, { expose: __expose }) {
  27188. __expose();
  27189. const searchText = vue.ref("");
  27190. const locations = vue.ref([]);
  27191. function getLocationListByGodownId(godownId2, code2 = "") {
  27192. uni.$u.http.get("/app/stock/getGodownPosition?godownId=" + godownId2 + "&code=" + code2).then((res2) => {
  27193. if (res2.code == 200) {
  27194. locations.value = res2.data;
  27195. }
  27196. });
  27197. }
  27198. const scrollHeight = vue.ref(0);
  27199. const onSearch = () => {
  27200. getLocationListByGodownId(godownId.value, searchText.value);
  27201. };
  27202. const openScan = () => {
  27203. uni.scanCode({
  27204. success: (res2) => {
  27205. searchText.value = res2.result;
  27206. onSearch();
  27207. },
  27208. fail: (err) => {
  27209. uni.showToast({
  27210. title: "扫码失败",
  27211. icon: "error"
  27212. });
  27213. }
  27214. });
  27215. };
  27216. const selectLocation = (item) => {
  27217. uni.$emit("updateLocation", item);
  27218. uni.navigateBack();
  27219. };
  27220. const godownId = vue.ref("");
  27221. const positionCode = vue.ref("");
  27222. onLoad((opts) => {
  27223. godownId.value = opts.godownId;
  27224. positionCode.value = opts.positionCode;
  27225. getLocationListByGodownId(godownId.value);
  27226. scrollHeight.value = uni.getSystemInfoSync().windowHeight - 44 - 60;
  27227. uni.$u.useGlobalEvent((e) => {
  27228. if (e.barcode) {
  27229. searchText.value = e.barcode;
  27230. getLocationListByGodownId(godownId.value, e.barcode);
  27231. }
  27232. });
  27233. });
  27234. const __returned__ = { searchText, locations, getLocationListByGodownId, scrollHeight, onSearch, openScan, selectLocation, godownId, positionCode, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, get onLoad() {
  27235. return onLoad;
  27236. } };
  27237. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27238. return __returned__;
  27239. }
  27240. };
  27241. function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
  27242. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27243. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27244. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27245. vue.createCommentVNode(" 库位列表 "),
  27246. vue.createElementVNode(
  27247. "scroll-view",
  27248. {
  27249. "scroll-y": "",
  27250. class: "location-list",
  27251. style: vue.normalizeStyle({ height: $setup.scrollHeight + "px" })
  27252. },
  27253. [
  27254. (vue.openBlock(true), vue.createElementBlock(
  27255. vue.Fragment,
  27256. null,
  27257. vue.renderList($setup.locations, (item, index2) => {
  27258. return vue.openBlock(), vue.createElementBlock("view", {
  27259. key: index2,
  27260. class: vue.normalizeClass(["location-item", item === $setup.positionCode ? "location-item-selected" : ""]),
  27261. "hover-class": "location-item-hover",
  27262. onClick: ($event) => $setup.selectLocation(item)
  27263. }, [
  27264. vue.createElementVNode(
  27265. "text",
  27266. null,
  27267. vue.toDisplayString(item),
  27268. 1
  27269. /* TEXT */
  27270. )
  27271. ], 10, ["onClick"]);
  27272. }),
  27273. 128
  27274. /* KEYED_FRAGMENT */
  27275. ))
  27276. ],
  27277. 4
  27278. /* STYLE */
  27279. ),
  27280. vue.createCommentVNode(" 底部搜索框 "),
  27281. vue.createElementVNode("view", {
  27282. class: "fixed-bottom pad-20",
  27283. style: { "background": "#ffffff" }
  27284. }, [
  27285. vue.createVNode(_component_u_search, {
  27286. modelValue: $setup.searchText,
  27287. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  27288. placeholder: "请输入库位条码",
  27289. "show-action": false,
  27290. clearabled: true,
  27291. onChange: $setup.onSearch,
  27292. height: "40",
  27293. disabled: true,
  27294. onClick: _cache[1] || (_cache[1] = ($event) => $setup.searchText = "")
  27295. }, null, 8, ["modelValue"]),
  27296. vue.createVNode(_component_u_icon, {
  27297. name: "scan",
  27298. size: "28",
  27299. color: "#19be6b",
  27300. onClick: $setup.openScan
  27301. })
  27302. ])
  27303. ]);
  27304. }
  27305. const PagesIndexWmsLocationSelect = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$t], ["__scopeId", "data-v-b26ec186"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/location-select.vue"]]);
  27306. const _sfc_main$t = {
  27307. __name: "warehouse-select",
  27308. setup(__props, { expose: __expose }) {
  27309. __expose();
  27310. const searchText = vue.ref("");
  27311. const warehouses = vue.ref([]);
  27312. function getGodownListByName(name = "") {
  27313. uni.$u.http.post("/app/appUser/searchGodown?name=" + name).then((res2) => {
  27314. if (res2.code == 200) {
  27315. warehouses.value = res2.data;
  27316. }
  27317. });
  27318. }
  27319. getGodownListByName();
  27320. const onSearch = () => {
  27321. getGodownListByName(searchText.value);
  27322. };
  27323. const selectWarehouse = (item) => {
  27324. uni.$emit("updateWarehouse", item);
  27325. uni.navigateBack();
  27326. };
  27327. const selectedId = vue.ref();
  27328. onLoad((options) => {
  27329. if (options.godownId) {
  27330. selectedId.value = options.godownId;
  27331. }
  27332. });
  27333. const __returned__ = { searchText, warehouses, getGodownListByName, onSearch, selectWarehouse, selectedId, ref: vue.ref, computed: vue.computed, get onLoad() {
  27334. return onLoad;
  27335. } };
  27336. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27337. return __returned__;
  27338. }
  27339. };
  27340. function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
  27341. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27342. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27343. vue.createCommentVNode(" 搜索框 "),
  27344. vue.createElementVNode("view", { class: "search-area" }, [
  27345. vue.createVNode(_component_u_search, {
  27346. modelValue: $setup.searchText,
  27347. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  27348. placeholder: "请输入仓库名称",
  27349. "show-action": false,
  27350. clearabled: true,
  27351. onChange: $setup.onSearch,
  27352. height: "40",
  27353. "placeholder-style": "font-size:16px"
  27354. }, null, 8, ["modelValue"])
  27355. ]),
  27356. vue.createCommentVNode(" 仓库列表 "),
  27357. vue.createElementVNode("view", { class: "warehouse-list" }, [
  27358. (vue.openBlock(true), vue.createElementBlock(
  27359. vue.Fragment,
  27360. null,
  27361. vue.renderList($setup.warehouses, (item, index2) => {
  27362. return vue.openBlock(), vue.createElementBlock("view", {
  27363. key: index2,
  27364. class: vue.normalizeClass(["warehouse-item", { "warehouse-item-active": item.id == $setup.selectedId }]),
  27365. "hover-class": "warehouse-item-hover",
  27366. onClick: ($event) => $setup.selectWarehouse(item)
  27367. }, [
  27368. vue.createElementVNode(
  27369. "text",
  27370. null,
  27371. vue.toDisplayString(index2 + 1) + "." + vue.toDisplayString(item.godownName),
  27372. 1
  27373. /* TEXT */
  27374. )
  27375. ], 10, ["onClick"]);
  27376. }),
  27377. 128
  27378. /* KEYED_FRAGMENT */
  27379. ))
  27380. ])
  27381. ]);
  27382. }
  27383. const PagesIndexWmsWarehouseSelect = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__scopeId", "data-v-c3e02812"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/warehouse-select.vue"]]);
  27384. const _sfc_main$s = {
  27385. __name: "speedy-check",
  27386. setup(__props, { expose: __expose }) {
  27387. __expose();
  27388. const showCheckMethodPicker = vue.ref(false);
  27389. const checkMethod = vue.ref("实际数量");
  27390. const checkMethodOptions = ["实际数量", "增加数量", "减少数量"];
  27391. const location2 = vue.ref("k01-01-4A");
  27392. const searchValue = vue.ref("");
  27393. const products = vue.ref([
  27394. {
  27395. orderNo: "4846464",
  27396. logisticsNo: "DPK2023497491611",
  27397. inspectionDate: "2024-11-14",
  27398. badCount: 5,
  27399. operator: "李程雪"
  27400. },
  27401. {
  27402. orderNo: "4846464",
  27403. logisticsNo: "DPK2023497491611",
  27404. inspectionDate: "2024-11-14",
  27405. badCount: 5,
  27406. operator: "李程雪"
  27407. }
  27408. ]);
  27409. const onCheckMethodConfirm = (e) => {
  27410. checkMethod.value = e.value[0];
  27411. showCheckMethodPicker.value = false;
  27412. };
  27413. const handleLocationSelect = () => {
  27414. uni.navigateTo({
  27415. url: "/pages/location-select/index"
  27416. });
  27417. };
  27418. const onSearch = () => {
  27419. };
  27420. const openScan = () => {
  27421. };
  27422. function handleAdd() {
  27423. uni.navigateTo({
  27424. url: "/pages/index/wms/speedy-check-add"
  27425. });
  27426. }
  27427. const __returned__ = { showCheckMethodPicker, checkMethod, checkMethodOptions, location: location2, searchValue, products, onCheckMethodConfirm, handleLocationSelect, onSearch, openScan, handleAdd, reactive: vue.reactive, ref: vue.ref, LocationOrderItem };
  27428. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27429. return __returned__;
  27430. }
  27431. };
  27432. function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
  27433. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27434. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$8);
  27435. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_2$2);
  27436. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$6);
  27437. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$5);
  27438. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$1);
  27439. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27440. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27441. vue.createVNode(_component_u_navbar, {
  27442. title: "快速盘点",
  27443. border: false,
  27444. fixed: "",
  27445. "safe-area-inset-top": ""
  27446. }, {
  27447. left: vue.withCtx(() => [
  27448. vue.createVNode(_component_u_icon, {
  27449. name: "arrow-left",
  27450. color: "#333333",
  27451. size: "20",
  27452. onClick: _ctx.goBack
  27453. }, null, 8, ["onClick"])
  27454. ]),
  27455. right: vue.withCtx(() => [
  27456. vue.createVNode(_component_u_text, {
  27457. type: "primary",
  27458. text: "提交",
  27459. onClick: _ctx.onSubmit
  27460. }, null, 8, ["onClick"])
  27461. ]),
  27462. _: 1
  27463. /* STABLE */
  27464. }),
  27465. vue.createCommentVNode(" 盘点信息选择区域 "),
  27466. vue.createElementVNode("view", {
  27467. class: "select-area",
  27468. style: { "margin-top": "44px" }
  27469. }, [
  27470. vue.createVNode(_component_u_cell_group, null, {
  27471. default: vue.withCtx(() => [
  27472. vue.createVNode(_component_u_cell, {
  27473. title: "盘点方式",
  27474. value: $setup.checkMethod,
  27475. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showCheckMethodPicker = true),
  27476. isLink: ""
  27477. }, null, 8, ["value"]),
  27478. vue.createVNode(_component_u_cell, {
  27479. title: "目标库位",
  27480. value: $setup.location,
  27481. onClick: $setup.handleLocationSelect,
  27482. isLink: ""
  27483. }, null, 8, ["value"])
  27484. ]),
  27485. _: 1
  27486. /* STABLE */
  27487. })
  27488. ]),
  27489. vue.createCommentVNode(" 盘点方式选择器 "),
  27490. vue.createVNode(_component_u_picker, {
  27491. show: $setup.showCheckMethodPicker,
  27492. columns: [$setup.checkMethodOptions],
  27493. onConfirm: $setup.onCheckMethodConfirm,
  27494. onCancel: _cache[1] || (_cache[1] = ($event) => $setup.showCheckMethodPicker = false)
  27495. }, null, 8, ["show", "columns"]),
  27496. vue.createCommentVNode(" 订单列表 "),
  27497. vue.createElementVNode("view", { class: "product-details" }, [
  27498. (vue.openBlock(true), vue.createElementBlock(
  27499. vue.Fragment,
  27500. null,
  27501. vue.renderList($setup.products, (item, index2) => {
  27502. return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
  27503. key: index2,
  27504. item
  27505. }, null, 8, ["item"]);
  27506. }),
  27507. 128
  27508. /* KEYED_FRAGMENT */
  27509. ))
  27510. ]),
  27511. vue.createElementVNode("view", {
  27512. class: "add-btn",
  27513. onClick: $setup.handleAdd
  27514. }, [
  27515. vue.createVNode(_component_u_icon, {
  27516. name: "plus-circle",
  27517. size: "40",
  27518. color: "#19be6b",
  27519. onClick: $setup.openScan
  27520. })
  27521. ]),
  27522. vue.createCommentVNode(" 底部扫码输入框 "),
  27523. vue.createElementVNode("view", {
  27524. class: "fixed-bottom pad-20",
  27525. style: { "background": "#ffffff" }
  27526. }, [
  27527. vue.createVNode(_component_u_search, {
  27528. placeholder: "请输入快递单号/订单编号",
  27529. modelValue: $setup.searchValue,
  27530. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.searchValue = $event),
  27531. onConfirm: $setup.onSearch,
  27532. "show-action": false,
  27533. "custom-style": "margin-right:10px"
  27534. }, null, 8, ["modelValue"]),
  27535. vue.createVNode(_component_u_icon, {
  27536. name: "scan",
  27537. size: "28",
  27538. color: "#19be6b",
  27539. onClick: $setup.openScan
  27540. })
  27541. ])
  27542. ]);
  27543. }
  27544. const PagesIndexWmsSpeedyCheck = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$r], ["__scopeId", "data-v-283ebe02"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/speedy-check.vue"]]);
  27545. const _sfc_main$r = {
  27546. __name: "BookItemOrder",
  27547. props: {
  27548. book: Object,
  27549. index: Number
  27550. },
  27551. emits: ["remove"],
  27552. setup(__props, { expose: __expose, emit: __emit }) {
  27553. __expose();
  27554. const props2 = __props;
  27555. const emit2 = __emit;
  27556. const removeBook = () => {
  27557. emit2("remove", { book: props2.book, index: props2.index });
  27558. };
  27559. const __returned__ = { props: props2, emit: emit2, removeBook };
  27560. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27561. return __returned__;
  27562. }
  27563. };
  27564. function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
  27565. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27566. return vue.openBlock(), vue.createElementBlock("view", { class: "book-item" }, [
  27567. vue.createElementVNode("image", {
  27568. class: "book-image",
  27569. src: $props.book.cover,
  27570. mode: "aspectFill"
  27571. }, null, 8, ["src"]),
  27572. vue.createElementVNode("view", { class: "book-info" }, [
  27573. vue.createElementVNode("view", { class: "book-title" }, [
  27574. vue.createElementVNode(
  27575. "text",
  27576. null,
  27577. vue.toDisplayString($props.book.bookName),
  27578. 1
  27579. /* TEXT */
  27580. ),
  27581. vue.createVNode(_component_u_icon, {
  27582. name: "close",
  27583. size: "18",
  27584. onClick: $setup.removeBook
  27585. })
  27586. ]),
  27587. vue.createElementVNode("view", { class: "flex-a flex-1" }, [
  27588. vue.createElementVNode("view", { class: "book-details flex-d" }, [
  27589. vue.createElementVNode(
  27590. "text",
  27591. null,
  27592. "ISBN: " + vue.toDisplayString($props.book.isbn),
  27593. 1
  27594. /* TEXT */
  27595. ),
  27596. vue.createElementVNode(
  27597. "text",
  27598. null,
  27599. "定价: " + vue.toDisplayString($props.book.price),
  27600. 1
  27601. /* TEXT */
  27602. ),
  27603. vue.createElementVNode(
  27604. "text",
  27605. null,
  27606. "折扣: " + vue.toDisplayString($props.book.recycleDiscount),
  27607. 1
  27608. /* TEXT */
  27609. )
  27610. ]),
  27611. vue.createElementVNode("view", { class: "book-stats flex-d ml-20" }, [
  27612. vue.createElementVNode(
  27613. "text",
  27614. null,
  27615. "数量: " + vue.toDisplayString($props.book.quantity),
  27616. 1
  27617. /* TEXT */
  27618. ),
  27619. vue.createElementVNode(
  27620. "text",
  27621. null,
  27622. "预估单价: " + vue.toDisplayString($props.book.expectPrice),
  27623. 1
  27624. /* TEXT */
  27625. ),
  27626. vue.createElementVNode(
  27627. "text",
  27628. { style: { "color": "#ff0000" } },
  27629. "审核金额: " + vue.toDisplayString($props.book.auditPrice),
  27630. 1
  27631. /* TEXT */
  27632. )
  27633. ])
  27634. ])
  27635. ])
  27636. ]);
  27637. }
  27638. const BookItem = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__scopeId", "data-v-97928f7a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/components/BookItemOrder.vue"]]);
  27639. const _sfc_main$q = {
  27640. __name: "check-order",
  27641. setup(__props, { expose: __expose }) {
  27642. __expose();
  27643. const bookList = vue.ref([]);
  27644. const totalBooks = vue.computed(() => bookList.value.length);
  27645. const totalPrice = vue.computed(() => bookList.value.reduce((sum, book) => sum + parseFloat(book.auditPrice), 0).toFixed(2));
  27646. const removeBook = ({ book, index: index2 }) => {
  27647. bookList.value.splice(index2, 1);
  27648. };
  27649. const handleSubmit = () => {
  27650. if (bookList.value.length === 0) {
  27651. uni.$u.toast("请先添加书籍");
  27652. return;
  27653. }
  27654. uni.$u.http.post("/app/offlineorder/submitOfflineOrder", bookList.value).then((res2) => {
  27655. if (res2.code == 200) {
  27656. uni.$u.toast("提交成功");
  27657. bookList.value.length = 0;
  27658. }
  27659. });
  27660. };
  27661. const handleScan = () => {
  27662. uni.scanCode({
  27663. success: (res2) => {
  27664. handleBarcode(res2.result);
  27665. formatAppLog("log", "at pages/index/offline/check-order.vue:51", "扫码结果:", res2.result);
  27666. },
  27667. fail: (res2) => {
  27668. formatAppLog("log", "at pages/index/offline/check-order.vue:55", "扫码失败:", res2);
  27669. uni.$u.toast("扫码失败");
  27670. }
  27671. });
  27672. };
  27673. const handleBarcode = (barcode) => {
  27674. formatAppLog("log", "at pages/index/offline/check-order.vue:62", "扫码结果:", barcode);
  27675. uni.$u.http.get(`/app/offlineorder/getBookInfo/${barcode}`).then((res2) => {
  27676. if (res2.code == 200) {
  27677. res2.data.quantity = 1;
  27678. let item = bookList.value.find((item2) => item2.isbn === res2.data.isbn);
  27679. if (item) {
  27680. item.quantity += 1;
  27681. item.auditPrice = (item.expectPrice * item.quantity).toFixed(2);
  27682. return;
  27683. } else {
  27684. res2.data.auditPrice = (res2.data.expectPrice * res2.data.quantity).toFixed(2);
  27685. bookList.value.push(res2.data);
  27686. }
  27687. }
  27688. });
  27689. };
  27690. onLoad(() => {
  27691. uni.$u.useGlobalEvent((e) => {
  27692. handleBarcode(e.barcode);
  27693. });
  27694. });
  27695. const __returned__ = { bookList, totalBooks, totalPrice, removeBook, handleSubmit, handleScan, handleBarcode, ref: vue.ref, computed: vue.computed, get onLoad() {
  27696. return onLoad;
  27697. }, BookItem };
  27698. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27699. return __returned__;
  27700. }
  27701. };
  27702. function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
  27703. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  27704. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27705. vue.createElementVNode("view", { class: "book-list" }, [
  27706. (vue.openBlock(true), vue.createElementBlock(
  27707. vue.Fragment,
  27708. null,
  27709. vue.renderList($setup.bookList, (book, index2) => {
  27710. return vue.openBlock(), vue.createBlock($setup["BookItem"], {
  27711. key: index2,
  27712. book,
  27713. onRemove: $setup.removeBook
  27714. }, null, 8, ["book"]);
  27715. }),
  27716. 128
  27717. /* KEYED_FRAGMENT */
  27718. ))
  27719. ]),
  27720. vue.createCommentVNode(" 底部信息和按钮 "),
  27721. vue.createElementVNode("view", {
  27722. class: "footer fixed-bottom flex-d",
  27723. style: { "padding-top": "10rpx" }
  27724. }, [
  27725. $setup.bookList.length > 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  27726. key: 0,
  27727. class: "pad-10"
  27728. }, [
  27729. vue.createTextVNode("共 "),
  27730. vue.createElementVNode(
  27731. "text",
  27732. { style: { "color": "#ff0000" } },
  27733. vue.toDisplayString($setup.totalBooks),
  27734. 1
  27735. /* TEXT */
  27736. ),
  27737. vue.createTextVNode(" 本,预估回收价 "),
  27738. vue.createElementVNode(
  27739. "text",
  27740. { style: { "color": "#ff0000" } },
  27741. "¥" + vue.toDisplayString($setup.totalPrice),
  27742. 1
  27743. /* TEXT */
  27744. )
  27745. ])) : vue.createCommentVNode("v-if", true),
  27746. vue.createElementVNode("view", { class: "flex-a mt-12" }, [
  27747. vue.createVNode(_component_u_button, {
  27748. size: "large",
  27749. type: "primary",
  27750. text: "提交",
  27751. onClick: $setup.handleSubmit
  27752. }),
  27753. vue.createVNode(_component_u_button, {
  27754. size: "large",
  27755. type: "warning",
  27756. text: "扫码",
  27757. onClick: $setup.handleScan
  27758. })
  27759. ])
  27760. ])
  27761. ]);
  27762. }
  27763. const PagesIndexOfflineCheckOrder = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__scopeId", "data-v-8fea8cdb"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/offline/check-order.vue"]]);
  27764. const _sfc_main$p = {
  27765. __name: "check-record",
  27766. setup(__props, { expose: __expose }) {
  27767. __expose();
  27768. const scrollRef = vue.ref(null);
  27769. const refreshList = () => {
  27770. var _a;
  27771. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  27772. };
  27773. let dataList = vue.ref([]);
  27774. const updateList = (data) => {
  27775. dataList.value = data;
  27776. };
  27777. const __returned__ = { scrollRef, refreshList, get dataList() {
  27778. return dataList;
  27779. }, set dataList(v) {
  27780. dataList = v;
  27781. }, updateList, PageScroll, ref: vue.ref };
  27782. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27783. return __returned__;
  27784. }
  27785. };
  27786. function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
  27787. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$3);
  27788. return vue.openBlock(), vue.createElementBlock("view", {
  27789. class: "common-page",
  27790. style: { "padding": "0" }
  27791. }, [
  27792. vue.createVNode(
  27793. $setup["PageScroll"],
  27794. {
  27795. requestStr: "/app/offlineorder/getUserStat",
  27796. onUpdateList: $setup.updateList,
  27797. ref: "scrollRef"
  27798. },
  27799. {
  27800. default: vue.withCtx(() => [
  27801. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  27802. default: vue.withCtx(() => [
  27803. vue.createElementVNode("view", { class: "search-area flex-a" }, [
  27804. vue.createElementVNode("view", { class: "text-item flex-1" }, "核单时间"),
  27805. vue.createElementVNode("view", { class: "text-item flex-1" }, "核单数量"),
  27806. vue.createElementVNode("view", { class: "text-item flex-1" }, "核单本数"),
  27807. vue.createElementVNode("view", { class: "text-item flex-1" }, "预估金额")
  27808. ])
  27809. ]),
  27810. _: 1
  27811. /* STABLE */
  27812. }),
  27813. vue.createElementVNode("view", { class: "list-con" }, [
  27814. (vue.openBlock(true), vue.createElementBlock(
  27815. vue.Fragment,
  27816. null,
  27817. vue.renderList($setup.dataList, (item, index2) => {
  27818. return vue.openBlock(), vue.createElementBlock("view", {
  27819. key: index2,
  27820. class: "flex-a"
  27821. }, [
  27822. vue.createElementVNode(
  27823. "view",
  27824. { class: "text-item flex-1" },
  27825. vue.toDisplayString(item.statDate),
  27826. 1
  27827. /* TEXT */
  27828. ),
  27829. vue.createElementVNode(
  27830. "view",
  27831. { class: "text-item flex-1" },
  27832. vue.toDisplayString(item.totalNum),
  27833. 1
  27834. /* TEXT */
  27835. ),
  27836. vue.createElementVNode(
  27837. "view",
  27838. { class: "text-item flex-1" },
  27839. vue.toDisplayString(item.bookNum),
  27840. 1
  27841. /* TEXT */
  27842. ),
  27843. vue.createElementVNode(
  27844. "view",
  27845. { class: "text-item flex-1" },
  27846. vue.toDisplayString(item.expectAmount),
  27847. 1
  27848. /* TEXT */
  27849. )
  27850. ]);
  27851. }),
  27852. 128
  27853. /* KEYED_FRAGMENT */
  27854. ))
  27855. ])
  27856. ]),
  27857. _: 1
  27858. /* STABLE */
  27859. },
  27860. 512
  27861. /* NEED_PATCH */
  27862. )
  27863. ]);
  27864. }
  27865. const PagesIndexOfflineCheckRecord = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/offline/check-record.vue"]]);
  27866. const props$3 = {
  27867. props: {
  27868. // 内置图标名称,或图片路径,建议绝对路径
  27869. icon: {
  27870. type: String,
  27871. default: props$E.empty.icon
  27872. },
  27873. // 提示文字
  27874. text: {
  27875. type: String,
  27876. default: props$E.empty.text
  27877. },
  27878. // 文字颜色
  27879. textColor: {
  27880. type: String,
  27881. default: props$E.empty.textColor
  27882. },
  27883. // 文字大小
  27884. textSize: {
  27885. type: [String, Number],
  27886. default: props$E.empty.textSize
  27887. },
  27888. // 图标的颜色
  27889. iconColor: {
  27890. type: String,
  27891. default: props$E.empty.iconColor
  27892. },
  27893. // 图标的大小
  27894. iconSize: {
  27895. type: [String, Number],
  27896. default: props$E.empty.iconSize
  27897. },
  27898. // 选择预置的图标类型
  27899. mode: {
  27900. type: String,
  27901. default: props$E.empty.mode
  27902. },
  27903. // 图标宽度,单位px
  27904. width: {
  27905. type: [String, Number],
  27906. default: props$E.empty.width
  27907. },
  27908. // 图标高度,单位px
  27909. height: {
  27910. type: [String, Number],
  27911. default: props$E.empty.height
  27912. },
  27913. // 是否显示组件
  27914. show: {
  27915. type: Boolean,
  27916. default: props$E.empty.show
  27917. },
  27918. // 组件距离上一个元素之间的距离,默认px单位
  27919. marginTop: {
  27920. type: [String, Number],
  27921. default: props$E.empty.marginTop
  27922. }
  27923. }
  27924. };
  27925. const _sfc_main$o = {
  27926. name: "u-empty",
  27927. mixins: [mpMixin, mixin, props$3],
  27928. data() {
  27929. return {
  27930. icons: {
  27931. car: "购物车为空",
  27932. page: "页面不存在",
  27933. search: "没有搜索结果",
  27934. address: "没有收货地址",
  27935. wifi: "没有WiFi",
  27936. order: "订单为空",
  27937. coupon: "没有优惠券",
  27938. favor: "暂无收藏",
  27939. permission: "无权限",
  27940. history: "无历史记录",
  27941. news: "无新闻列表",
  27942. message: "消息列表为空",
  27943. list: "列表为空",
  27944. data: "数据为空",
  27945. comment: "暂无评论"
  27946. }
  27947. };
  27948. },
  27949. computed: {
  27950. // 组件样式
  27951. emptyStyle() {
  27952. const style = {};
  27953. style.marginTop = uni.$u.addUnit(this.marginTop);
  27954. return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style);
  27955. },
  27956. // 文本样式
  27957. textStyle() {
  27958. const style = {};
  27959. style.color = this.textColor;
  27960. style.fontSize = uni.$u.addUnit(this.textSize);
  27961. return style;
  27962. },
  27963. // 判断icon是否图片路径
  27964. isSrc() {
  27965. return this.icon.indexOf("/") >= 0;
  27966. }
  27967. }
  27968. };
  27969. function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
  27970. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27971. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  27972. "view",
  27973. {
  27974. key: 0,
  27975. class: "u-empty",
  27976. style: vue.normalizeStyle([$options.emptyStyle])
  27977. },
  27978. [
  27979. !$options.isSrc ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  27980. key: 0,
  27981. name: _ctx.mode === "message" ? "chat" : `empty-${_ctx.mode}`,
  27982. size: _ctx.iconSize,
  27983. color: _ctx.iconColor,
  27984. "margin-top": "14"
  27985. }, null, 8, ["name", "size", "color"])) : (vue.openBlock(), vue.createElementBlock("image", {
  27986. key: 1,
  27987. style: vue.normalizeStyle({
  27988. width: _ctx.$u.addUnit(_ctx.width),
  27989. height: _ctx.$u.addUnit(_ctx.height)
  27990. }),
  27991. src: _ctx.icon,
  27992. mode: "widthFix"
  27993. }, null, 12, ["src"])),
  27994. vue.createElementVNode(
  27995. "text",
  27996. {
  27997. class: "u-empty__text",
  27998. style: vue.normalizeStyle([$options.textStyle])
  27999. },
  28000. vue.toDisplayString(_ctx.text ? _ctx.text : $data.icons[_ctx.mode]),
  28001. 5
  28002. /* TEXT, STYLE */
  28003. ),
  28004. _ctx.$slots.default || _ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock("view", {
  28005. key: 2,
  28006. class: "u-empty__wrap"
  28007. }, [
  28008. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  28009. ])) : vue.createCommentVNode("v-if", true)
  28010. ],
  28011. 4
  28012. /* STYLE */
  28013. )) : vue.createCommentVNode("v-if", true);
  28014. }
  28015. const __easycom_3$1 = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$n], ["__scopeId", "data-v-8dd5928e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-empty/u-empty.vue"]]);
  28016. const _sfc_main$n = {
  28017. __name: "scan-book",
  28018. setup(__props, { expose: __expose }) {
  28019. __expose();
  28020. const searchValue = vue.ref("");
  28021. const scannedISBN = vue.ref("");
  28022. const currentTab = vue.ref(0);
  28023. const tabsList = [
  28024. {
  28025. name: "简介"
  28026. },
  28027. {
  28028. name: "轨迹"
  28029. }
  28030. ];
  28031. const bookInfo = vue.ref(null);
  28032. const handleSearch = () => {
  28033. if (!searchValue.value)
  28034. return;
  28035. loadBookInfo(searchValue.value);
  28036. };
  28037. const handleScan = () => {
  28038. uni.scanCode({
  28039. success: (res2) => {
  28040. searchValue.value = res2.result;
  28041. scannedISBN.value = res2.result;
  28042. loadBookInfo(res2.result);
  28043. }
  28044. });
  28045. };
  28046. const loadBookInfo = (isbn) => {
  28047. uni.$u.http.get(`/app/book/getBookByIsbn/${isbn}`).then((res2) => {
  28048. if (res2.code == 200) {
  28049. bookInfo.value = res2.data;
  28050. }
  28051. });
  28052. };
  28053. const __returned__ = { searchValue, scannedISBN, currentTab, tabsList, bookInfo, handleSearch, handleScan, loadBookInfo, ref: vue.ref };
  28054. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28055. return __returned__;
  28056. }
  28057. };
  28058. function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
  28059. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28060. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  28061. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$3);
  28062. const _component_u_empty = resolveEasycom(vue.resolveDynamicComponent("u-empty"), __easycom_3$1);
  28063. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_4$1);
  28064. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  28065. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  28066. vue.createCommentVNode(" 顶部搜索框 "),
  28067. vue.createVNode(_component_u_sticky, null, {
  28068. default: vue.withCtx(() => [
  28069. vue.createElementVNode("view", { class: "search-area" }, [
  28070. vue.createVNode(_component_u_search, {
  28071. modelValue: $setup.searchValue,
  28072. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.searchValue = $event),
  28073. placeholder: "扫描/输入ISBN或SH码",
  28074. "show-action": true,
  28075. actionText: "查询",
  28076. onSearch: $setup.handleSearch,
  28077. onCustom: $setup.handleSearch
  28078. }, {
  28079. suffixIcon: vue.withCtx(() => [
  28080. $setup.searchValue ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  28081. key: 0,
  28082. name: "close",
  28083. size: "20",
  28084. onClick: _cache[0] || (_cache[0] = ($event) => $setup.searchValue = "")
  28085. })) : vue.createCommentVNode("v-if", true)
  28086. ]),
  28087. _: 1
  28088. /* STABLE */
  28089. }, 8, ["modelValue"])
  28090. ])
  28091. ]),
  28092. _: 1
  28093. /* STABLE */
  28094. }),
  28095. vue.createCommentVNode(" 已扫描ISBN显示 "),
  28096. $setup.scannedISBN ? (vue.openBlock(), vue.createElementBlock("view", {
  28097. key: 0,
  28098. class: "isbn-display"
  28099. }, [
  28100. vue.createElementVNode(
  28101. "text",
  28102. null,
  28103. "已查询ISBN:" + vue.toDisplayString($setup.scannedISBN),
  28104. 1
  28105. /* TEXT */
  28106. )
  28107. ])) : vue.createCommentVNode("v-if", true),
  28108. vue.createCommentVNode(" 内容区域 "),
  28109. vue.createElementVNode("view", { class: "content" }, [
  28110. vue.createCommentVNode(" 空状态 "),
  28111. !$setup.bookInfo ? (vue.openBlock(), vue.createElementBlock("view", {
  28112. key: 0,
  28113. class: "empty-state"
  28114. }, [
  28115. vue.createVNode(_component_u_empty, {
  28116. mode: "data",
  28117. text: "暂无扫描数据",
  28118. "margin-top": "100"
  28119. })
  28120. ])) : (vue.openBlock(), vue.createElementBlock(
  28121. vue.Fragment,
  28122. { key: 1 },
  28123. [
  28124. vue.createCommentVNode(" 书籍详情 "),
  28125. vue.createElementVNode("view", { class: "book-detail" }, [
  28126. vue.createElementVNode("view", { class: "common-card mb-20" }, [
  28127. vue.createElementVNode("view", { class: "flex flex-d flex-a-c" }, [
  28128. vue.createElementVNode("image", {
  28129. class: "book-image",
  28130. src: $setup.bookInfo.cover,
  28131. mode: "heightFix"
  28132. }, null, 8, ["src"]),
  28133. vue.createElementVNode(
  28134. "text",
  28135. { class: "ml-20 font-15" },
  28136. vue.toDisplayString($setup.bookInfo.bookName),
  28137. 1
  28138. /* TEXT */
  28139. )
  28140. ]),
  28141. vue.createElementVNode("view", { class: "book-status" }, [
  28142. vue.createElementVNode(
  28143. "text",
  28144. { class: "status-text" },
  28145. "状态:" + vue.toDisplayString($setup.bookInfo.recycleStatus ? "已加入回收书单" : "未加入回收书单"),
  28146. 1
  28147. /* TEXT */
  28148. ),
  28149. $setup.bookInfo.recycleTime ? (vue.openBlock(), vue.createElementBlock(
  28150. "text",
  28151. {
  28152. key: 0,
  28153. class: "time-text"
  28154. },
  28155. "加入时间:" + vue.toDisplayString($setup.bookInfo.recycleTime),
  28156. 1
  28157. /* TEXT */
  28158. )) : vue.createCommentVNode("v-if", true)
  28159. ])
  28160. ]),
  28161. vue.createCommentVNode(" 基本信息 "),
  28162. vue.createElementVNode("view", { class: "common-card info-section mb-20" }, [
  28163. vue.createElementVNode("view", { class: "price-info" }, [
  28164. vue.createElementVNode("text", { class: "label" }, "定价:"),
  28165. vue.createElementVNode(
  28166. "text",
  28167. { class: "price" },
  28168. "¥" + vue.toDisplayString($setup.bookInfo.price),
  28169. 1
  28170. /* TEXT */
  28171. ),
  28172. vue.createElementVNode(
  28173. "text",
  28174. { class: "recycle-price" },
  28175. "回收价:¥" + vue.toDisplayString($setup.bookInfo.expectPrice),
  28176. 1
  28177. /* TEXT */
  28178. )
  28179. ]),
  28180. vue.createElementVNode("view", { class: "book-info" }, [
  28181. vue.createElementVNode("view", { class: "info-item" }, [
  28182. vue.createElementVNode("text", { class: "label" }, "ISBN:"),
  28183. vue.createElementVNode(
  28184. "text",
  28185. null,
  28186. vue.toDisplayString($setup.bookInfo.isbn),
  28187. 1
  28188. /* TEXT */
  28189. )
  28190. ]),
  28191. vue.createElementVNode("view", { class: "info-item" }, [
  28192. vue.createElementVNode("text", { class: "label" }, "语言:"),
  28193. vue.createElementVNode(
  28194. "text",
  28195. null,
  28196. vue.toDisplayString($setup.bookInfo.lang || "-"),
  28197. 1
  28198. /* TEXT */
  28199. )
  28200. ]),
  28201. vue.createElementVNode("view", { class: "info-item" }, [
  28202. vue.createElementVNode("text", { class: "label" }, "作者:"),
  28203. vue.createElementVNode(
  28204. "text",
  28205. null,
  28206. vue.toDisplayString($setup.bookInfo.author),
  28207. 1
  28208. /* TEXT */
  28209. )
  28210. ]),
  28211. vue.createElementVNode("view", { class: "info-item" }, [
  28212. vue.createElementVNode("text", { class: "label" }, "出版社:"),
  28213. vue.createElementVNode(
  28214. "text",
  28215. null,
  28216. vue.toDisplayString($setup.bookInfo.publish),
  28217. 1
  28218. /* TEXT */
  28219. )
  28220. ]),
  28221. vue.createElementVNode("view", { class: "info-item" }, [
  28222. vue.createElementVNode("text", { class: "label" }, "出版时间:"),
  28223. vue.createElementVNode(
  28224. "text",
  28225. null,
  28226. vue.toDisplayString($setup.bookInfo.pubDate),
  28227. 1
  28228. /* TEXT */
  28229. )
  28230. ])
  28231. ])
  28232. ]),
  28233. vue.createCommentVNode(" 简介和轨迹 "),
  28234. vue.createElementVNode("view", {
  28235. class: "common-card tabs-section",
  28236. style: { "padding": "0" }
  28237. }, [
  28238. vue.createVNode(_component_u_tabs, {
  28239. list: $setup.tabsList,
  28240. modelValue: $setup.currentTab,
  28241. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.currentTab = $event),
  28242. lineColor: "#19be6b"
  28243. }, null, 8, ["modelValue"]),
  28244. vue.createElementVNode("view", { class: "tab-content" }, [
  28245. $setup.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  28246. key: 0,
  28247. class: "intro-content"
  28248. }, [
  28249. vue.createElementVNode("text", { class: "section-title" }, "内容简介:"),
  28250. vue.createElementVNode(
  28251. "text",
  28252. { class: "content-text" },
  28253. vue.toDisplayString($setup.bookInfo.contentBlurb),
  28254. 1
  28255. /* TEXT */
  28256. ),
  28257. vue.createElementVNode("text", { class: "section-title" }, "作者简介:"),
  28258. vue.createElementVNode(
  28259. "text",
  28260. { class: "content-text" },
  28261. vue.toDisplayString($setup.bookInfo.anthorBlurb),
  28262. 1
  28263. /* TEXT */
  28264. ),
  28265. vue.createElementVNode(
  28266. "text",
  28267. { class: "content-text" },
  28268. vue.toDisplayString($setup.bookInfo.catalog),
  28269. 1
  28270. /* TEXT */
  28271. )
  28272. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  28273. key: 1,
  28274. class: "track-content"
  28275. }, [
  28276. vue.createElementVNode(
  28277. "text",
  28278. null,
  28279. vue.toDisplayString($setup.bookInfo.track),
  28280. 1
  28281. /* TEXT */
  28282. )
  28283. ]))
  28284. ])
  28285. ])
  28286. ])
  28287. ],
  28288. 2112
  28289. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  28290. ))
  28291. ]),
  28292. vue.createCommentVNode(" 底部扫描按钮 "),
  28293. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  28294. vue.createVNode(_component_u_button, {
  28295. size: "large",
  28296. type: "primary",
  28297. text: "扫码(ISBN或SH码)",
  28298. onClick: $setup.handleScan
  28299. })
  28300. ])
  28301. ]);
  28302. }
  28303. const PagesIndexEntryScanBook = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__scopeId", "data-v-04d3117d"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/entry/scan-book.vue"]]);
  28304. const _sfc_main$m = {
  28305. __name: "book-weight",
  28306. setup(__props, { expose: __expose }) {
  28307. __expose();
  28308. const customStyle = {
  28309. height: "100rpx",
  28310. fontSize: "32rpx"
  28311. };
  28312. const labelStyle = {
  28313. fontSize: "32rpx"
  28314. };
  28315. const placeholderStyle2 = vue.ref("fontSize: 32rpx");
  28316. const form = vue.ref({
  28317. weight: "",
  28318. isbn: ""
  28319. });
  28320. const rules2 = {
  28321. weight: [
  28322. {
  28323. required: true,
  28324. message: "请输入重量",
  28325. trigger: "blur"
  28326. },
  28327. {
  28328. type: "number",
  28329. message: "重量必须是数字",
  28330. trigger: "blur"
  28331. }
  28332. ],
  28333. isbn: [{
  28334. required: true,
  28335. message: "请输入ISBN",
  28336. trigger: "blur"
  28337. }]
  28338. };
  28339. function handleScan() {
  28340. uni.scanCode({
  28341. success: (res2) => {
  28342. form.value.isbn = res2.result;
  28343. }
  28344. });
  28345. }
  28346. const formRef = vue.ref(null);
  28347. const submitForm = () => {
  28348. formRef.value.validate().then((valid) => {
  28349. if (valid) {
  28350. uni.$u.http.post("/app/weighChangeLog/add", form.value).then((res2) => {
  28351. if (res2.code == 200) {
  28352. uni.$u.toast("修改成功");
  28353. form.value.isbn = "";
  28354. form.value.weight = "";
  28355. } else {
  28356. uni.$u.toast(res2.msg);
  28357. }
  28358. });
  28359. }
  28360. });
  28361. };
  28362. onLoad(() => {
  28363. uni.$u.useGlobalEvent((e) => {
  28364. form.value.isbn = e.barcode;
  28365. });
  28366. });
  28367. const __returned__ = { customStyle, labelStyle, placeholderStyle: placeholderStyle2, form, rules: rules2, handleScan, formRef, submitForm, ref: vue.ref, get onLoad() {
  28368. return onLoad;
  28369. } };
  28370. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28371. return __returned__;
  28372. }
  28373. };
  28374. function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
  28375. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  28376. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$a);
  28377. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$7);
  28378. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  28379. return vue.openBlock(), vue.createElementBlock("view", { class: "common-page" }, [
  28380. vue.createVNode(_component_u_form, {
  28381. model: $setup.form,
  28382. rules: $setup.rules,
  28383. ref: "formRef",
  28384. labelWidth: "90px",
  28385. errorType: "toast",
  28386. labelStyle: $setup.labelStyle
  28387. }, {
  28388. default: vue.withCtx(() => [
  28389. vue.createVNode(_component_u_form_item, {
  28390. label: "重量(克)",
  28391. prop: "weight",
  28392. required: ""
  28393. }, {
  28394. default: vue.withCtx(() => [
  28395. vue.createVNode(_component_u_input, {
  28396. placeholderStyle: $setup.placeholderStyle,
  28397. customStyle: $setup.customStyle,
  28398. modelValue: $setup.form.weight,
  28399. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.weight = $event),
  28400. placeholder: "请输入数值",
  28401. clearable: ""
  28402. }, null, 8, ["placeholderStyle", "modelValue"])
  28403. ]),
  28404. _: 1
  28405. /* STABLE */
  28406. }),
  28407. vue.createVNode(_component_u_form_item, {
  28408. label: "ISBN",
  28409. prop: "isbn",
  28410. required: ""
  28411. }, {
  28412. default: vue.withCtx(() => [
  28413. vue.createVNode(_component_u_input, {
  28414. placeholderStyle: $setup.placeholderStyle,
  28415. customStyle: $setup.customStyle,
  28416. modelValue: $setup.form.isbn,
  28417. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.isbn = $event),
  28418. placeholder: "请输入编码",
  28419. clearable: ""
  28420. }, null, 8, ["placeholderStyle", "modelValue"])
  28421. ]),
  28422. _: 1
  28423. /* STABLE */
  28424. })
  28425. ]),
  28426. _: 1
  28427. /* STABLE */
  28428. }, 8, ["model"]),
  28429. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  28430. vue.createVNode(_component_u_button, {
  28431. size: "large",
  28432. type: "warning",
  28433. text: "扫码",
  28434. onClick: $setup.handleScan
  28435. }),
  28436. vue.createVNode(_component_u_button, {
  28437. size: "large",
  28438. type: "success",
  28439. text: "提交",
  28440. onClick: $setup.submitForm
  28441. })
  28442. ])
  28443. ]);
  28444. }
  28445. const PagesIndexEntryBookWeight = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/entry/book-weight.vue"]]);
  28446. const props$2 = {
  28447. props: {
  28448. // 显示文字
  28449. title: {
  28450. type: String,
  28451. default: props$E.alert.title
  28452. },
  28453. // 主题,success/warning/info/error
  28454. type: {
  28455. type: String,
  28456. default: props$E.alert.type
  28457. },
  28458. // 辅助性文字
  28459. description: {
  28460. type: String,
  28461. default: props$E.alert.description
  28462. },
  28463. // 是否可关闭
  28464. closable: {
  28465. type: Boolean,
  28466. default: props$E.alert.closable
  28467. },
  28468. // 是否显示图标
  28469. showIcon: {
  28470. type: Boolean,
  28471. default: props$E.alert.showIcon
  28472. },
  28473. // 浅或深色调,light-浅色,dark-深色
  28474. effect: {
  28475. type: String,
  28476. default: props$E.alert.effect
  28477. },
  28478. // 文字是否居中
  28479. center: {
  28480. type: Boolean,
  28481. default: props$E.alert.center
  28482. },
  28483. // 字体大小
  28484. fontSize: {
  28485. type: [String, Number],
  28486. default: props$E.alert.fontSize
  28487. }
  28488. }
  28489. };
  28490. const _sfc_main$l = {
  28491. name: "u-alert",
  28492. mixins: [mpMixin, mixin, props$2],
  28493. data() {
  28494. return {
  28495. show: true
  28496. };
  28497. },
  28498. computed: {
  28499. iconColor() {
  28500. return this.effect === "light" ? this.type : "#fff";
  28501. },
  28502. // 不同主题对应不同的图标
  28503. iconName() {
  28504. switch (this.type) {
  28505. case "success":
  28506. return "checkmark-circle-fill";
  28507. case "error":
  28508. return "close-circle-fill";
  28509. case "warning":
  28510. return "error-circle-fill";
  28511. case "info":
  28512. return "info-circle-fill";
  28513. case "primary":
  28514. return "more-circle-fill";
  28515. default:
  28516. return "error-circle-fill";
  28517. }
  28518. }
  28519. },
  28520. methods: {
  28521. // 点击内容
  28522. clickHandler() {
  28523. this.$emit("click");
  28524. },
  28525. // 点击关闭按钮
  28526. closeHandler() {
  28527. this.show = false;
  28528. }
  28529. }
  28530. };
  28531. function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
  28532. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28533. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
  28534. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  28535. mode: "fade",
  28536. show: $data.show
  28537. }, {
  28538. default: vue.withCtx(() => [
  28539. vue.createElementVNode(
  28540. "view",
  28541. {
  28542. class: vue.normalizeClass(["u-alert", [`u-alert--${_ctx.type}--${_ctx.effect}`]]),
  28543. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
  28544. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  28545. },
  28546. [
  28547. _ctx.showIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  28548. key: 0,
  28549. class: "u-alert__icon"
  28550. }, [
  28551. vue.createVNode(_component_u_icon, {
  28552. name: $options.iconName,
  28553. size: "18",
  28554. color: $options.iconColor
  28555. }, null, 8, ["name", "color"])
  28556. ])) : vue.createCommentVNode("v-if", true),
  28557. vue.createElementVNode(
  28558. "view",
  28559. {
  28560. class: "u-alert__content",
  28561. style: vue.normalizeStyle([{
  28562. paddingRight: _ctx.closable ? "20px" : 0
  28563. }])
  28564. },
  28565. [
  28566. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  28567. "text",
  28568. {
  28569. key: 0,
  28570. class: vue.normalizeClass(["u-alert__content__title", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
  28571. style: vue.normalizeStyle([{
  28572. fontSize: _ctx.$u.addUnit(_ctx.fontSize),
  28573. textAlign: _ctx.center ? "center" : "left"
  28574. }])
  28575. },
  28576. vue.toDisplayString(_ctx.title),
  28577. 7
  28578. /* TEXT, CLASS, STYLE */
  28579. )) : vue.createCommentVNode("v-if", true),
  28580. _ctx.description ? (vue.openBlock(), vue.createElementBlock(
  28581. "text",
  28582. {
  28583. key: 1,
  28584. class: vue.normalizeClass(["u-alert__content__desc", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
  28585. style: vue.normalizeStyle([{
  28586. fontSize: _ctx.$u.addUnit(_ctx.fontSize),
  28587. textAlign: _ctx.center ? "center" : "left"
  28588. }])
  28589. },
  28590. vue.toDisplayString(_ctx.description),
  28591. 7
  28592. /* TEXT, CLASS, STYLE */
  28593. )) : vue.createCommentVNode("v-if", true)
  28594. ],
  28595. 4
  28596. /* STYLE */
  28597. ),
  28598. _ctx.closable ? (vue.openBlock(), vue.createElementBlock("view", {
  28599. key: 1,
  28600. class: "u-alert__close",
  28601. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"]))
  28602. }, [
  28603. vue.createVNode(_component_u_icon, {
  28604. name: "close",
  28605. color: $options.iconColor,
  28606. size: "15"
  28607. }, null, 8, ["color"])
  28608. ])) : vue.createCommentVNode("v-if", true)
  28609. ],
  28610. 6
  28611. /* CLASS, STYLE */
  28612. )
  28613. ]),
  28614. _: 1
  28615. /* STABLE */
  28616. }, 8, ["show"]);
  28617. }
  28618. 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"]]);
  28619. const _sfc_main$k = {
  28620. __name: "logistics-detail",
  28621. setup(__props, { expose: __expose }) {
  28622. __expose();
  28623. const logisticsInfo = vue.ref([]);
  28624. function getLogisticsDetail(orderId) {
  28625. uni.$u.http.get(`/app/orderinfo/getOrderExpressList?orderId=${orderId}`).then((res2) => {
  28626. if (res2.code == 200) {
  28627. logisticsInfo.value = res2.data;
  28628. }
  28629. });
  28630. }
  28631. function handleButtonClick(status, reason) {
  28632. uni.$u.http.post("/app/orderexception/update", {
  28633. id: id.value,
  28634. checkStatus: status,
  28635. refusalReason: reason
  28636. }).then((res2) => {
  28637. if (res2.code == 200) {
  28638. checkStatus.value = status;
  28639. uni.$u.toast("操作成功");
  28640. emit("refresh");
  28641. } else {
  28642. uni.$u.toast(res2.msg);
  28643. }
  28644. });
  28645. }
  28646. const checkStatus = vue.ref(0);
  28647. const id = vue.ref(0);
  28648. onLoad((e) => {
  28649. checkStatus.value = e.status;
  28650. id.value = e.id;
  28651. getLogisticsDetail(e.orderId);
  28652. });
  28653. const __returned__ = { logisticsInfo, getLogisticsDetail, handleButtonClick, checkStatus, id, ref: vue.ref, get onLoad() {
  28654. return onLoad;
  28655. }, ApproveButton, RejectButton };
  28656. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28657. return __returned__;
  28658. }
  28659. };
  28660. function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
  28661. const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_3);
  28662. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$3);
  28663. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28664. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  28665. vue.createCommentVNode(" 物流公司信息 "),
  28666. vue.createVNode(_component_u_sticky, null, {
  28667. default: vue.withCtx(() => [
  28668. vue.createVNode(_component_u_alert, {
  28669. title: `物流公司:京东快递`,
  28670. type: "warning"
  28671. })
  28672. ]),
  28673. _: 1
  28674. /* STABLE */
  28675. }),
  28676. vue.createCommentVNode(" 自定义物流轨迹时间轴 "),
  28677. vue.createElementVNode("scroll-view", {
  28678. "scroll-y": "",
  28679. class: "timeline-container"
  28680. }, [
  28681. (vue.openBlock(true), vue.createElementBlock(
  28682. vue.Fragment,
  28683. null,
  28684. vue.renderList($setup.logisticsInfo, (item, index2) => {
  28685. return vue.openBlock(), vue.createElementBlock("view", {
  28686. key: index2,
  28687. class: "timeline-item"
  28688. }, [
  28689. vue.createElementVNode("view", { class: "timeline-icon" }, [
  28690. vue.createVNode(_component_u_icon, {
  28691. name: "map-fill",
  28692. color: "#19be6b",
  28693. size: "16"
  28694. })
  28695. ]),
  28696. vue.createElementVNode("view", { class: "timeline-content" }, [
  28697. vue.createElementVNode(
  28698. "text",
  28699. { class: "title" },
  28700. vue.toDisplayString(item.title),
  28701. 1
  28702. /* TEXT */
  28703. ),
  28704. vue.createElementVNode(
  28705. "text",
  28706. { class: "desc" },
  28707. vue.toDisplayString(item.description),
  28708. 1
  28709. /* TEXT */
  28710. ),
  28711. vue.createElementVNode(
  28712. "text",
  28713. { class: "time" },
  28714. vue.toDisplayString(item.time),
  28715. 1
  28716. /* TEXT */
  28717. )
  28718. ]),
  28719. index2 < $setup.logisticsInfo.length - 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  28720. key: 0,
  28721. class: "timeline-line"
  28722. })) : vue.createCommentVNode("v-if", true)
  28723. ]);
  28724. }),
  28725. 128
  28726. /* KEYED_FRAGMENT */
  28727. ))
  28728. ]),
  28729. vue.createCommentVNode(" 底部操作按钮 "),
  28730. $setup.checkStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  28731. key: 0,
  28732. class: "fixed-bottom"
  28733. }, [
  28734. vue.createVNode($setup["RejectButton"], {
  28735. size: "large",
  28736. onReject: _cache[0] || (_cache[0] = (reason) => $setup.handleButtonClick(3, reason))
  28737. }),
  28738. vue.createVNode($setup["ApproveButton"], {
  28739. size: "large",
  28740. onApprove: _cache[1] || (_cache[1] = ($event) => $setup.handleButtonClick(2))
  28741. })
  28742. ])) : vue.createCommentVNode("v-if", true)
  28743. ]);
  28744. }
  28745. 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"]]);
  28746. const _sfc_main$j = {
  28747. __name: "task-detail",
  28748. setup(__props, { expose: __expose }) {
  28749. __expose();
  28750. const currentTask = vue.ref(0);
  28751. const totalTasks = vue.ref(77);
  28752. const currentIndex = vue.ref(1);
  28753. const nextLocation = vue.ref("K01-02-4A");
  28754. const orderInfo = vue.ref({
  28755. orderNo: "4571211",
  28756. logisticsNo: "DPK203156442584",
  28757. badCount: 10
  28758. });
  28759. const ttsModule2 = vue.ref(null);
  28760. vue.onMounted(() => {
  28761. ttsModule2.value = new VolumeTTS();
  28762. });
  28763. const searchText = vue.ref("");
  28764. const badList = vue.ref([{
  28765. image: "https://img20.360buyimg.com/da/jfs/t1/141592/25/8861/261559/5f68d8c1E33ed78ab/698ad655bfcfbaed.png",
  28766. title: "公文写作教程",
  28767. isbn: "978704051555",
  28768. price: 49.5,
  28769. discount: 0.85,
  28770. quantity: 5,
  28771. set: "不是",
  28772. good: 0,
  28773. average: 0,
  28774. bad: 1,
  28775. reason: "明显泛黄水印/发霉/明显异味"
  28776. }]);
  28777. const handleNextTask = () => {
  28778. if (currentTask.value < totalTasks.value) {
  28779. currentTask.value++;
  28780. VolumeTTS.speak(nextLocation.value);
  28781. }
  28782. };
  28783. const onSearch = () => {
  28784. };
  28785. const onSubmit = () => {
  28786. uni.showModal({
  28787. title: "确认提示",
  28788. content: "是否确认提交本次下架?",
  28789. success: (res2) => {
  28790. if (res2.confirm) {
  28791. uni.showToast({
  28792. title: "提交成功",
  28793. icon: "success"
  28794. });
  28795. ttsModule2.value.speak("任务已提交");
  28796. }
  28797. }
  28798. });
  28799. };
  28800. function goBack() {
  28801. uni.showModal({
  28802. title: "确认提示",
  28803. content: "是否确认放弃本次下架?",
  28804. success: (res2) => {
  28805. if (res2.confirm) {
  28806. uni.navigateBack();
  28807. ttsModule2.value.speak("任务已放弃");
  28808. }
  28809. }
  28810. });
  28811. }
  28812. const openScan = () => {
  28813. uni.scanCode({
  28814. success: (res2) => {
  28815. searchText.value = res2.result;
  28816. },
  28817. fail: (err) => {
  28818. uni.showToast({
  28819. title: "扫码失败",
  28820. icon: "error"
  28821. });
  28822. }
  28823. });
  28824. };
  28825. const __returned__ = { currentTask, totalTasks, currentIndex, nextLocation, orderInfo, ttsModule: ttsModule2, searchText, badList, handleNextTask, onSearch, onSubmit, goBack, openScan, ref: vue.ref, onMounted: vue.onMounted, BadOutCard, get VolumeTTS() {
  28826. return VolumeTTS;
  28827. } };
  28828. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28829. return __returned__;
  28830. }
  28831. };
  28832. function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
  28833. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28834. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$8);
  28835. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_2$2);
  28836. const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_3);
  28837. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  28838. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  28839. vue.createCommentVNode(" 顶部导航栏 "),
  28840. vue.createVNode(_component_u_navbar, {
  28841. title: "下架任务",
  28842. border: false,
  28843. fixed: "",
  28844. "safe-area-inset-top": ""
  28845. }, {
  28846. left: vue.withCtx(() => [
  28847. vue.createVNode(_component_u_icon, {
  28848. name: "arrow-left",
  28849. color: "#333333",
  28850. size: "20",
  28851. onClick: $setup.goBack
  28852. })
  28853. ]),
  28854. right: vue.withCtx(() => [
  28855. vue.createVNode(_component_u_text, {
  28856. type: "primary",
  28857. text: "提交",
  28858. onClick: $setup.onSubmit
  28859. })
  28860. ]),
  28861. _: 1
  28862. /* STABLE */
  28863. }),
  28864. vue.createCommentVNode(" 任务进度 "),
  28865. vue.createElementVNode("view", { class: "progress-section" }, [
  28866. vue.createVNode(_component_u_alert, {
  28867. title: "当前任务",
  28868. type: "info",
  28869. center: ""
  28870. }),
  28871. vue.createElementVNode("view", {
  28872. class: "flex flex-j-b pad-10",
  28873. style: { "padding-right": "40rpx" }
  28874. }, [
  28875. vue.createElementVNode("view", {
  28876. class: "next-task",
  28877. onClick: $setup.handleNextTask
  28878. }, [
  28879. vue.createElementVNode("text", null, "上一个")
  28880. ]),
  28881. vue.createElementVNode("view", { class: "flex-c" }, [
  28882. vue.createElementVNode("text", null, [
  28883. vue.createTextVNode(
  28884. vue.toDisplayString($setup.currentTask),
  28885. 1
  28886. /* TEXT */
  28887. ),
  28888. vue.createElementVNode(
  28889. "text",
  28890. { class: "progress-text font-18 color-green" },
  28891. "/" + vue.toDisplayString($setup.totalTasks),
  28892. 1
  28893. /* TEXT */
  28894. )
  28895. ])
  28896. ]),
  28897. vue.createElementVNode("view", {
  28898. class: "color-green",
  28899. onClick: $setup.handleNextTask
  28900. }, [
  28901. vue.createElementVNode("text", null, "下一个")
  28902. ])
  28903. ])
  28904. ]),
  28905. vue.createCommentVNode(" 库位信息 "),
  28906. vue.createElementVNode("view", {
  28907. class: "flex flex-j-b pad-10 next-location",
  28908. style: { "padding-right": "40rpx", "align-items": "center" }
  28909. }, [
  28910. vue.createElementVNode(
  28911. "view",
  28912. { class: "font-14 mb-20" },
  28913. vue.toDisplayString($setup.currentIndex) + "/" + vue.toDisplayString($setup.totalTasks),
  28914. 1
  28915. /* TEXT */
  28916. ),
  28917. vue.createElementVNode("view", { class: "flex-d" }, [
  28918. vue.createElementVNode(
  28919. "view",
  28920. { class: "font-20 text-center" },
  28921. vue.toDisplayString($setup.nextLocation),
  28922. 1
  28923. /* TEXT */
  28924. ),
  28925. vue.createElementVNode(
  28926. "view",
  28927. { class: "location-detail font-13 mt-10" },
  28928. "下一库位 " + vue.toDisplayString($setup.nextLocation),
  28929. 1
  28930. /* TEXT */
  28931. )
  28932. ]),
  28933. vue.createVNode(_component_u_icon, {
  28934. name: "attach",
  28935. size: "28"
  28936. })
  28937. ]),
  28938. vue.createCommentVNode(" 订单信息 "),
  28939. vue.createElementVNode("view", { class: "order-info" }, [
  28940. vue.createElementVNode(
  28941. "view",
  28942. { class: "info-item" },
  28943. "订单编号:" + vue.toDisplayString($setup.orderInfo.orderNo),
  28944. 1
  28945. /* TEXT */
  28946. ),
  28947. vue.createElementVNode(
  28948. "view",
  28949. { class: "info-item" },
  28950. "物流单号:" + vue.toDisplayString($setup.orderInfo.logisticsNo),
  28951. 1
  28952. /* TEXT */
  28953. ),
  28954. vue.createElementVNode(
  28955. "view",
  28956. { class: "info-item" },
  28957. "不良数量:" + vue.toDisplayString($setup.orderInfo.badCount),
  28958. 1
  28959. /* TEXT */
  28960. )
  28961. ]),
  28962. vue.createCommentVNode(" 极差商品列表 "),
  28963. vue.createElementVNode("view", { class: "bad-list" }, [
  28964. vue.createElementVNode("view", { class: "list-title mb-6 mt-20" }, "极差"),
  28965. (vue.openBlock(true), vue.createElementBlock(
  28966. vue.Fragment,
  28967. null,
  28968. vue.renderList($setup.badList, (item, index2) => {
  28969. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  28970. vue.createVNode($setup["BadOutCard"], { item }, null, 8, ["item"])
  28971. ]);
  28972. }),
  28973. 128
  28974. /* KEYED_FRAGMENT */
  28975. ))
  28976. ]),
  28977. vue.createCommentVNode(" 底部搜索框 "),
  28978. vue.createElementVNode("view", {
  28979. class: "fixed-bottom pad-20",
  28980. style: { "background": "#ffffff" }
  28981. }, [
  28982. vue.createVNode(_component_u_search, {
  28983. modelValue: $setup.searchText,
  28984. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  28985. placeholder: "请输入订单编号",
  28986. "show-action": false,
  28987. clearabled: true,
  28988. onChange: $setup.onSearch,
  28989. height: "40"
  28990. }, null, 8, ["modelValue"]),
  28991. vue.createVNode(_component_u_icon, {
  28992. name: "scan",
  28993. size: "28",
  28994. color: "#19be6b",
  28995. onClick: $setup.openScan
  28996. })
  28997. ])
  28998. ]);
  28999. }
  29000. 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"]]);
  29001. const _sfc_main$i = {
  29002. __name: "speedy-check-add",
  29003. setup(__props, { expose: __expose }) {
  29004. __expose();
  29005. const location2 = vue.ref("k01-01-4A");
  29006. const searchValue = vue.ref("");
  29007. const products = vue.ref([
  29008. {
  29009. orderNo: "4846464",
  29010. logisticsNo: "DPK2023497491611",
  29011. inspectionDate: "2024-11-14",
  29012. badCount: 5,
  29013. operator: "李程雪",
  29014. checked: false
  29015. },
  29016. {
  29017. orderNo: "4846464",
  29018. logisticsNo: "DPK2023497491611",
  29019. inspectionDate: "2024-11-14",
  29020. badCount: 5,
  29021. operator: "李程雪",
  29022. checked: false
  29023. }
  29024. ]);
  29025. const isAllSelected = vue.computed(() => {
  29026. return products.value.length > 0 && products.value.every((item) => item.checked);
  29027. });
  29028. const toggleItemSelect = (item) => {
  29029. item.checked = !item.checked;
  29030. };
  29031. const toggleSelectAll = () => {
  29032. const newState = !isAllSelected.value;
  29033. products.value.forEach((item) => {
  29034. item.checked = newState;
  29035. });
  29036. };
  29037. const onSubmit = () => {
  29038. const selectedItems = products.value.filter((item) => item.checked);
  29039. uni.$emit("selectedProducts", selectedItems);
  29040. uni.navigateBack();
  29041. };
  29042. const goBack = () => {
  29043. uni.navigateBack();
  29044. };
  29045. const __returned__ = { location: location2, searchValue, products, isAllSelected, toggleItemSelect, toggleSelectAll, onSubmit, goBack, ref: vue.ref, computed: vue.computed, LocationOrderItem };
  29046. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29047. return __returned__;
  29048. }
  29049. };
  29050. function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
  29051. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  29052. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$8);
  29053. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_2$2);
  29054. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  29055. vue.createVNode(_component_u_navbar, {
  29056. title: "选择商品",
  29057. border: false,
  29058. fixed: "",
  29059. "safe-area-inset-top": ""
  29060. }, {
  29061. left: vue.withCtx(() => [
  29062. vue.createVNode(_component_u_icon, {
  29063. name: "arrow-left",
  29064. color: "#333333",
  29065. size: "20",
  29066. onClick: $setup.goBack
  29067. })
  29068. ]),
  29069. right: vue.withCtx(() => [
  29070. vue.createVNode(_component_u_text, {
  29071. type: "primary",
  29072. text: "确定",
  29073. onClick: $setup.onSubmit
  29074. })
  29075. ]),
  29076. _: 1
  29077. /* STABLE */
  29078. }),
  29079. vue.createCommentVNode(" 库位显示 "),
  29080. vue.createElementVNode("view", { class: "location-info" }, [
  29081. vue.createElementVNode(
  29082. "text",
  29083. null,
  29084. vue.toDisplayString($setup.location),
  29085. 1
  29086. /* TEXT */
  29087. )
  29088. ]),
  29089. vue.createCommentVNode(" 订单列表 "),
  29090. vue.createElementVNode("view", { class: "product-details" }, [
  29091. (vue.openBlock(true), vue.createElementBlock(
  29092. vue.Fragment,
  29093. null,
  29094. vue.renderList($setup.products, (item, index2) => {
  29095. return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
  29096. isCheck: "",
  29097. key: index2,
  29098. item,
  29099. onSelect: $setup.toggleItemSelect
  29100. }, null, 8, ["item"]);
  29101. }),
  29102. 128
  29103. /* KEYED_FRAGMENT */
  29104. ))
  29105. ]),
  29106. vue.createCommentVNode(" 底部全选栏 "),
  29107. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  29108. vue.createElementVNode("view", {
  29109. class: "select-all",
  29110. onClick: $setup.toggleSelectAll
  29111. }, [
  29112. vue.createVNode(_component_u_icon, {
  29113. name: $setup.isAllSelected ? "checkmark-circle-fill" : "checkmark-circle",
  29114. color: $setup.isAllSelected ? "#19be6b" : "#c8c9cc",
  29115. size: "28"
  29116. }, null, 8, ["name", "color"]),
  29117. vue.createElementVNode("text", { class: "select-text" }, "全选")
  29118. ]),
  29119. vue.createElementVNode(
  29120. "text",
  29121. { class: "order-count" },
  29122. "订单总数: " + vue.toDisplayString($setup.products.length),
  29123. 1
  29124. /* TEXT */
  29125. )
  29126. ])
  29127. ]);
  29128. }
  29129. 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"]]);
  29130. const _sfc_main$h = {
  29131. __name: "user-info",
  29132. setup(__props, { expose: __expose }) {
  29133. __expose();
  29134. const userInfo = vue.ref({
  29135. avatar: "/static/images/avatar.jpg",
  29136. name: "无",
  29137. gender: "无",
  29138. birthday: "无",
  29139. education: "无",
  29140. school: "无",
  29141. username: "用户账号",
  29142. account: "fxt",
  29143. createTime: "2024-06-12 12:00:00",
  29144. lastLogin: "",
  29145. company: "无",
  29146. employeeId: "无",
  29147. position: "无",
  29148. phone: "18888888888",
  29149. email: "无",
  29150. address: "无"
  29151. });
  29152. function getUserInfo() {
  29153. uni.$u.http.get("/app/appUser/getUserInfoById").then((res2) => {
  29154. if (res2.code == 200) {
  29155. userInfo.value = res2.data;
  29156. }
  29157. });
  29158. }
  29159. getUserInfo();
  29160. function setAvatar(avatarfile) {
  29161. uni.$u.http.post("/app/appUser/setAvatar", { avatarfile }).then((res2) => {
  29162. if (res2.code == 200) {
  29163. userInfo.value.avatar = avatarfile;
  29164. uni.showToast({
  29165. title: "头像设置成功",
  29166. icon: "success"
  29167. });
  29168. }
  29169. });
  29170. }
  29171. const handleEditAvatar = () => {
  29172. const token = uni.getStorageSync("token");
  29173. uni.chooseImage({
  29174. count: 1,
  29175. success: (res2) => {
  29176. const filePath = res2.tempFilePaths[0];
  29177. uni.uploadFile({
  29178. url: `${baseUrl}/common/upload`,
  29179. filePath,
  29180. name: "file",
  29181. header: {
  29182. "Authorization": token
  29183. },
  29184. success: (uploadRes) => {
  29185. formatAppLog("log", "at pages/my/page/user-info.vue:126", uploadRes, "uploadRes");
  29186. const data = JSON.parse(uploadRes.data);
  29187. if (data.code === 200) {
  29188. setAvatar(data.data);
  29189. } else {
  29190. uni.showToast({
  29191. title: "上传失败",
  29192. icon: "none"
  29193. });
  29194. }
  29195. },
  29196. fail: () => {
  29197. uni.showToast({
  29198. title: "上传失败",
  29199. icon: "none"
  29200. });
  29201. }
  29202. });
  29203. }
  29204. });
  29205. };
  29206. const __returned__ = { userInfo, getUserInfo, setAvatar, handleEditAvatar, ref: vue.ref, get baseUrl() {
  29207. return baseUrl;
  29208. } };
  29209. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29210. return __returned__;
  29211. }
  29212. };
  29213. function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  29214. const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$c);
  29215. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  29216. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$6);
  29217. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$5);
  29218. return vue.openBlock(), vue.createElementBlock("view", { class: "user-info-page" }, [
  29219. vue.createCommentVNode(" 头像区域 "),
  29220. vue.createElementVNode("view", { class: "avatar-section" }, [
  29221. vue.createElementVNode("view", { class: "avatar-wrap" }, [
  29222. vue.createElementVNode("text", null, "头像:"),
  29223. vue.createVNode(_component_u_avatar, {
  29224. size: 50,
  29225. src: $setup.userInfo.avatar
  29226. }, null, 8, ["src"]),
  29227. vue.createVNode(_component_u_button, {
  29228. type: "success",
  29229. style: { "width": "200rpx" },
  29230. size: "small",
  29231. onClick: $setup.handleEditAvatar
  29232. }, {
  29233. default: vue.withCtx(() => [
  29234. vue.createTextVNode("去修改")
  29235. ]),
  29236. _: 1
  29237. /* STABLE */
  29238. })
  29239. ])
  29240. ]),
  29241. vue.createCommentVNode(" 基本信息区域 "),
  29242. vue.createElementVNode("view", { class: "info-section" }, [
  29243. vue.createElementVNode("view", { class: "section-title" }, "基本信息"),
  29244. vue.createElementVNode("view", { class: "info-card" }, [
  29245. vue.createVNode(_component_u_cell_group, { border: false }, {
  29246. default: vue.withCtx(() => [
  29247. vue.createVNode(_component_u_cell, {
  29248. title: "姓名",
  29249. value: $setup.userInfo.nickName || "无"
  29250. }, null, 8, ["value"]),
  29251. vue.createVNode(_component_u_cell, {
  29252. title: "性别",
  29253. value: $setup.userInfo.sex == 0 ? "男" : $setup.userInfo.sex == 1 ? "女" : "未知"
  29254. }, null, 8, ["value"]),
  29255. vue.createVNode(_component_u_cell, {
  29256. title: "生日",
  29257. value: $setup.userInfo.birthday || "无"
  29258. }, null, 8, ["value"]),
  29259. vue.createVNode(_component_u_cell, {
  29260. title: "学历",
  29261. value: $setup.userInfo.education || "无"
  29262. }, null, 8, ["value"]),
  29263. vue.createVNode(_component_u_cell, {
  29264. title: "毕业学校",
  29265. value: $setup.userInfo.school || "无",
  29266. border: false
  29267. }, null, 8, ["value"])
  29268. ]),
  29269. _: 1
  29270. /* STABLE */
  29271. })
  29272. ])
  29273. ]),
  29274. vue.createCommentVNode(" 账号信息区域 "),
  29275. vue.createElementVNode("view", { class: "info-section" }, [
  29276. vue.createElementVNode("view", { class: "section-title" }, "用户账号"),
  29277. vue.createElementVNode("view", { class: "info-card" }, [
  29278. vue.createVNode(_component_u_cell_group, { border: false }, {
  29279. default: vue.withCtx(() => [
  29280. vue.createVNode(_component_u_cell, {
  29281. title: "账号",
  29282. value: $setup.userInfo.userName
  29283. }, null, 8, ["value"]),
  29284. vue.createVNode(_component_u_cell, {
  29285. title: "创建日期",
  29286. value: $setup.userInfo.createTime
  29287. }, null, 8, ["value"]),
  29288. vue.createVNode(_component_u_cell, {
  29289. title: "最近登录",
  29290. value: $setup.userInfo.loginDate || "--",
  29291. border: false
  29292. }, null, 8, ["value"])
  29293. ]),
  29294. _: 1
  29295. /* STABLE */
  29296. })
  29297. ])
  29298. ]),
  29299. vue.createCommentVNode(" 员工资料区域 "),
  29300. vue.createElementVNode("view", { class: "info-section" }, [
  29301. vue.createElementVNode("view", { class: "section-title" }, "员工资料"),
  29302. vue.createElementVNode("view", { class: "info-card" }, [
  29303. vue.createVNode(_component_u_cell_group, { border: false }, {
  29304. default: vue.withCtx(() => [
  29305. vue.createVNode(_component_u_cell, {
  29306. title: "公司",
  29307. value: $setup.userInfo.company || "无"
  29308. }, null, 8, ["value"]),
  29309. vue.createVNode(_component_u_cell, {
  29310. title: "员工编号",
  29311. value: $setup.userInfo.employeeId || "无"
  29312. }, null, 8, ["value"]),
  29313. vue.createVNode(_component_u_cell, {
  29314. title: "职位",
  29315. value: $setup.userInfo.position || "无",
  29316. border: false
  29317. }, null, 8, ["value"])
  29318. ]),
  29319. _: 1
  29320. /* STABLE */
  29321. })
  29322. ])
  29323. ]),
  29324. vue.createCommentVNode(" 联系方式区域 "),
  29325. vue.createElementVNode("view", { class: "info-section" }, [
  29326. vue.createElementVNode("view", { class: "section-title" }, "联系方式"),
  29327. vue.createElementVNode("view", { class: "info-card" }, [
  29328. vue.createVNode(_component_u_cell_group, { border: false }, {
  29329. default: vue.withCtx(() => [
  29330. vue.createVNode(_component_u_cell, {
  29331. title: "电话",
  29332. value: $setup.userInfo.phonenumber
  29333. }, null, 8, ["value"]),
  29334. vue.createVNode(_component_u_cell, {
  29335. title: "邮箱",
  29336. value: $setup.userInfo.email || "无"
  29337. }, null, 8, ["value"]),
  29338. vue.createVNode(_component_u_cell, {
  29339. title: "住址",
  29340. value: $setup.userInfo.address || "无",
  29341. border: false
  29342. }, null, 8, ["value"])
  29343. ]),
  29344. _: 1
  29345. /* STABLE */
  29346. })
  29347. ])
  29348. ])
  29349. ]);
  29350. }
  29351. 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"]]);
  29352. const _sfc_main$g = {
  29353. __name: "warehouse",
  29354. setup(__props, { expose: __expose }) {
  29355. __expose();
  29356. const showPicker = vue.ref(false);
  29357. const selectedWarehouse = vue.ref("");
  29358. const warehouseList = vue.ref([]);
  29359. const getWarehouseList = () => {
  29360. uni.$u.http.post("/app/appUser/searchGodown?name=").then((res2) => {
  29361. if (res2.code == 200) {
  29362. warehouseList.value = res2.data.filter((v) => v.useStatus == 1).map((v) => ({
  29363. text: v.godownName,
  29364. value: v.id
  29365. }));
  29366. }
  29367. });
  29368. };
  29369. getWarehouseList();
  29370. const getWarehouse = () => {
  29371. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
  29372. var _a;
  29373. if (res2.code == 200) {
  29374. selectedWarehouse.value = (_a = res2.data) == null ? void 0 : _a.godownName;
  29375. }
  29376. });
  29377. };
  29378. getWarehouse();
  29379. const saveWarehouse = (godownId) => {
  29380. uni.$u.http.post("/app/appUser/bingowGodown?godownId=" + godownId).then((res2) => {
  29381. if (res2.code == 200) {
  29382. uni.showToast({
  29383. title: "设置默认仓库成功",
  29384. icon: "success"
  29385. });
  29386. }
  29387. });
  29388. };
  29389. const onConfirm = (e) => {
  29390. const [{
  29391. value: value2,
  29392. text
  29393. }] = e.value;
  29394. selectedWarehouse.value = text;
  29395. showPicker.value = false;
  29396. formatAppLog("log", "at pages/my/page/warehouse.vue:75", e, "xxxxxx");
  29397. saveWarehouse(value2);
  29398. };
  29399. const __returned__ = { showPicker, selectedWarehouse, warehouseList, getWarehouseList, getWarehouse, saveWarehouse, onConfirm, ref: vue.ref };
  29400. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29401. return __returned__;
  29402. }
  29403. };
  29404. function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  29405. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  29406. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$1);
  29407. return vue.openBlock(), vue.createElementBlock("view", { class: "warehouse-select" }, [
  29408. vue.createElementVNode("view", {
  29409. class: "select-wrap",
  29410. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showPicker = true)
  29411. }, [
  29412. vue.createElementVNode("text", { class: "required-label" }, "*"),
  29413. vue.createElementVNode("text", { class: "label" }, "默认仓库"),
  29414. vue.createElementVNode("view", { class: "picker-value" }, [
  29415. vue.createElementVNode(
  29416. "text",
  29417. {
  29418. class: vue.normalizeClass(["value-text", !$setup.selectedWarehouse && "placeholder"])
  29419. },
  29420. vue.toDisplayString($setup.selectedWarehouse || "请选择仓库"),
  29421. 3
  29422. /* TEXT, CLASS */
  29423. ),
  29424. vue.createVNode(_component_u_icon, {
  29425. name: "arrow-right",
  29426. color: "#999",
  29427. size: "16"
  29428. })
  29429. ])
  29430. ]),
  29431. vue.createCommentVNode(" 仓库选择器 "),
  29432. vue.createVNode(_component_u_picker, {
  29433. show: $setup.showPicker,
  29434. columns: [$setup.warehouseList],
  29435. onConfirm: $setup.onConfirm,
  29436. onCancel: _cache[1] || (_cache[1] = ($event) => $setup.showPicker = false),
  29437. onClose: _cache[2] || (_cache[2] = ($event) => $setup.showPicker = false),
  29438. title: "选择仓库",
  29439. confirmText: "确定",
  29440. cancelText: "取消"
  29441. }, null, 8, ["show", "columns"])
  29442. ]);
  29443. }
  29444. 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"]]);
  29445. const _sfc_main$f = {
  29446. __name: "school",
  29447. setup(__props, { expose: __expose }) {
  29448. __expose();
  29449. const schoolName = vue.ref("");
  29450. const schoolList = vue.ref([]);
  29451. const getSchoolList = () => {
  29452. uni.$u.http.get("/app/appConf/getPadSchoolBroadcast").then((res2) => {
  29453. if (res2.code == 200) {
  29454. schoolList.value = res2.data;
  29455. }
  29456. });
  29457. };
  29458. getSchoolList();
  29459. const handleSubmit = () => {
  29460. if (schoolList.value.length === 0) {
  29461. uni.$u.toast("请至少添加一所学校");
  29462. return;
  29463. }
  29464. uni.$u.http.post("/app/appConf/setPadSchoolBroadcast", schoolList.value).then((res2) => {
  29465. if (res2.code == 200) {
  29466. uni.showToast({
  29467. title: "设置成功",
  29468. icon: "success"
  29469. });
  29470. }
  29471. });
  29472. };
  29473. const handleAddSchool = () => {
  29474. if (!schoolName.value.trim()) {
  29475. uni.$u.toast("请输入学校名称");
  29476. return;
  29477. }
  29478. schoolList.value.push({
  29479. schoolName: schoolName.value,
  29480. id: ""
  29481. });
  29482. schoolName.value = "";
  29483. };
  29484. const handleRemoveSchool = (index2) => {
  29485. schoolList.value.splice(index2, 1);
  29486. };
  29487. const __returned__ = { schoolName, schoolList, getSchoolList, handleSubmit, handleAddSchool, handleRemoveSchool, ref: vue.ref };
  29488. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29489. return __returned__;
  29490. }
  29491. };
  29492. function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  29493. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  29494. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  29495. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$4);
  29496. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  29497. return vue.openBlock(), vue.createElementBlock("view", { class: "school-add" }, [
  29498. vue.createCommentVNode(" 输入区域 "),
  29499. vue.createElementVNode("view", { class: "input-section" }, [
  29500. vue.createElementVNode("view", { class: "input-header" }, [
  29501. vue.createElementVNode("text", { class: "required" }, "*"),
  29502. vue.createElementVNode("text", { class: "label" }, "学校名称:"),
  29503. vue.createVNode(_component_u_input, {
  29504. modelValue: $setup.schoolName,
  29505. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.schoolName = $event),
  29506. placeholder: "请输入一个学校名称",
  29507. border: "false",
  29508. class: "input"
  29509. }, {
  29510. suffix: vue.withCtx(() => [
  29511. vue.createVNode(_component_u_icon, {
  29512. name: "plus",
  29513. size: "24",
  29514. color: "#666",
  29515. onClick: $setup.handleAddSchool
  29516. })
  29517. ]),
  29518. _: 1
  29519. /* STABLE */
  29520. }, 8, ["modelValue"])
  29521. ])
  29522. ]),
  29523. vue.createCommentVNode(" 学校列表 "),
  29524. vue.createElementVNode("view", { class: "school-list" }, [
  29525. (vue.openBlock(true), vue.createElementBlock(
  29526. vue.Fragment,
  29527. null,
  29528. vue.renderList($setup.schoolList, (item, index2) => {
  29529. return vue.openBlock(), vue.createElementBlock("view", {
  29530. class: "school-item",
  29531. key: index2
  29532. }, [
  29533. vue.createVNode(_component_u_tag, {
  29534. text: item.schoolName,
  29535. closable: "",
  29536. size: "large"
  29537. }, null, 8, ["text"])
  29538. ]);
  29539. }),
  29540. 128
  29541. /* KEYED_FRAGMENT */
  29542. ))
  29543. ]),
  29544. vue.createCommentVNode(" 底部提交按钮 "),
  29545. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  29546. vue.createVNode(_component_u_button, {
  29547. size: "large",
  29548. type: "success",
  29549. block: "",
  29550. onClick: $setup.handleSubmit
  29551. }, {
  29552. default: vue.withCtx(() => [
  29553. vue.createTextVNode("提交")
  29554. ]),
  29555. _: 1
  29556. /* STABLE */
  29557. })
  29558. ])
  29559. ]);
  29560. }
  29561. 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"]]);
  29562. const _sfc_main$e = {
  29563. __name: "audit-unfinished",
  29564. setup(__props, { expose: __expose }) {
  29565. __expose();
  29566. const __returned__ = { orderItem };
  29567. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29568. return __returned__;
  29569. }
  29570. };
  29571. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  29572. return vue.openBlock(), vue.createElementBlock("view", { class: "audit-list" }, [
  29573. vue.createVNode($setup["orderItem"]),
  29574. vue.createVNode($setup["orderItem"]),
  29575. vue.createVNode($setup["orderItem"])
  29576. ]);
  29577. }
  29578. const PagesMyPageAuditUnfinished = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/audit-unfinished.vue"]]);
  29579. const _sfc_main$d = {
  29580. __name: "version",
  29581. setup(__props, { expose: __expose }) {
  29582. __expose();
  29583. const userInfo = vue.reactive({
  29584. version: "v_2024050400_1",
  29585. // Example version number
  29586. updateStatus: "已经是新版本"
  29587. // Example update status
  29588. });
  29589. function checkForUpdates() {
  29590. setTimeout(() => {
  29591. {
  29592. userInfo.updateStatus = "发现新版本,正在下载...";
  29593. downloadNewVersion();
  29594. }
  29595. }, 1e3);
  29596. }
  29597. function downloadNewVersion() {
  29598. setTimeout(() => {
  29599. userInfo.updateStatus = "下载完成,准备安装";
  29600. }, 2e3);
  29601. }
  29602. const __returned__ = { userInfo, checkForUpdates, downloadNewVersion, reactive: vue.reactive };
  29603. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29604. return __returned__;
  29605. }
  29606. };
  29607. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  29608. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$6);
  29609. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$5);
  29610. return vue.openBlock(), vue.createElementBlock("view", { class: "version-info-page" }, [
  29611. vue.createVNode(_component_u_cell_group, {
  29612. border: false,
  29613. customStyle: "background:#ffffff"
  29614. }, {
  29615. default: vue.withCtx(() => [
  29616. vue.createVNode(_component_u_cell, {
  29617. title: "当前版本号(正式版)",
  29618. value: $setup.userInfo.version || "无"
  29619. }, null, 8, ["value"]),
  29620. vue.createVNode(_component_u_cell, {
  29621. title: "检测更新",
  29622. value: $setup.userInfo.updateStatus || "无",
  29623. border: false,
  29624. onClick: $setup.checkForUpdates
  29625. }, null, 8, ["value"])
  29626. ]),
  29627. _: 1
  29628. /* STABLE */
  29629. })
  29630. ]);
  29631. }
  29632. const PagesMyPageVersion = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/version.vue"]]);
  29633. const props$1 = {
  29634. props: {
  29635. // 是否为加载中状态
  29636. loading: {
  29637. type: Boolean,
  29638. default: props$E.switch.loading
  29639. },
  29640. // 是否为禁用装填
  29641. disabled: {
  29642. type: Boolean,
  29643. default: props$E.switch.disabled
  29644. },
  29645. // 开关尺寸,单位px
  29646. size: {
  29647. type: [String, Number],
  29648. default: props$E.switch.size
  29649. },
  29650. // 打开时的背景颜色
  29651. activeColor: {
  29652. type: String,
  29653. default: props$E.switch.activeColor
  29654. },
  29655. // 关闭时的背景颜色
  29656. inactiveColor: {
  29657. type: String,
  29658. default: props$E.switch.inactiveColor
  29659. },
  29660. // 通过v-model双向绑定的值
  29661. modelValue: {
  29662. type: [Boolean, String, Number],
  29663. default: props$E.switch.value
  29664. },
  29665. // switch打开时的值
  29666. activeValue: {
  29667. type: [String, Number, Boolean],
  29668. default: props$E.switch.activeValue
  29669. },
  29670. // switch关闭时的值
  29671. inactiveValue: {
  29672. type: [String, Number, Boolean],
  29673. default: props$E.switch.inactiveValue
  29674. },
  29675. // 是否开启异步变更,开启后需要手动控制输入值
  29676. asyncChange: {
  29677. type: Boolean,
  29678. default: props$E.switch.asyncChange
  29679. },
  29680. // 圆点与外边框的距离
  29681. space: {
  29682. type: [String, Number],
  29683. default: props$E.switch.space
  29684. }
  29685. }
  29686. };
  29687. const _sfc_main$c = {
  29688. name: "u-switch",
  29689. mixins: [mpMixin, mixin, props$1],
  29690. watch: {
  29691. modelValue: {
  29692. immediate: true,
  29693. handler(n) {
  29694. if (n !== this.inactiveValue && n !== this.activeValue) {
  29695. uni.$u.error("v-model绑定的值必须为inactiveValue、activeValue二者之一");
  29696. }
  29697. }
  29698. }
  29699. },
  29700. data() {
  29701. return {
  29702. bgColor: "#ffffff"
  29703. };
  29704. },
  29705. computed: {
  29706. isActive() {
  29707. return this.modelValue === this.activeValue;
  29708. },
  29709. switchStyle() {
  29710. let style = {};
  29711. style.width = uni.$u.addUnit(this.size * 2 + 2);
  29712. style.height = uni.$u.addUnit(Number(this.size) + 2);
  29713. if (this.customInactiveColor) {
  29714. style.borderColor = "rgba(0, 0, 0, 0)";
  29715. }
  29716. style.backgroundColor = this.isActive ? this.activeColor : this.inactiveColor;
  29717. return style;
  29718. },
  29719. nodeStyle() {
  29720. let style = {};
  29721. style.width = uni.$u.addUnit(this.size - this.space);
  29722. style.height = uni.$u.addUnit(this.size - this.space);
  29723. const translateX = this.isActive ? uni.$u.addUnit(this.space) : uni.$u.addUnit(this.size);
  29724. style.transform = `translateX(-${translateX})`;
  29725. return style;
  29726. },
  29727. bgStyle() {
  29728. let style = {};
  29729. style.width = uni.$u.addUnit(Number(this.size) * 2 - this.size / 2);
  29730. style.height = uni.$u.addUnit(this.size);
  29731. style.backgroundColor = this.inactiveColor;
  29732. style.transform = `scale(${this.isActive ? 0 : 1})`;
  29733. return style;
  29734. },
  29735. customInactiveColor() {
  29736. return this.inactiveColor !== "#fff" && this.inactiveColor !== "#ffffff";
  29737. }
  29738. },
  29739. emits: ["update:modelValue", "change"],
  29740. methods: {
  29741. clickHandler() {
  29742. if (!this.disabled && !this.loading) {
  29743. const oldValue = this.isActive ? this.inactiveValue : this.activeValue;
  29744. if (!this.asyncChange) {
  29745. this.$emit("update:modelValue", oldValue);
  29746. }
  29747. this.$nextTick(() => {
  29748. this.$emit("change", oldValue);
  29749. });
  29750. }
  29751. }
  29752. }
  29753. };
  29754. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  29755. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  29756. return vue.openBlock(), vue.createElementBlock(
  29757. "view",
  29758. {
  29759. class: vue.normalizeClass(["u-switch", [_ctx.disabled && "u-switch--disabled"]]),
  29760. style: vue.normalizeStyle([$options.switchStyle, _ctx.$u.addStyle(_ctx.customStyle)]),
  29761. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  29762. },
  29763. [
  29764. vue.createElementVNode(
  29765. "view",
  29766. {
  29767. class: "u-switch__bg",
  29768. style: vue.normalizeStyle([$options.bgStyle])
  29769. },
  29770. null,
  29771. 4
  29772. /* STYLE */
  29773. ),
  29774. vue.createElementVNode(
  29775. "view",
  29776. {
  29777. class: vue.normalizeClass(["u-switch__node", [_ctx.modelValue && "u-switch__node--on"]]),
  29778. style: vue.normalizeStyle([$options.nodeStyle]),
  29779. ref: "u-switch__node"
  29780. },
  29781. [
  29782. vue.createVNode(_component_u_loading_icon, {
  29783. show: _ctx.loading,
  29784. mode: "circle",
  29785. timingFunction: "linear",
  29786. color: _ctx.modelValue ? _ctx.activeColor : "#AAABAD",
  29787. size: _ctx.size * 0.6
  29788. }, null, 8, ["show", "color", "size"])
  29789. ],
  29790. 6
  29791. /* CLASS, STYLE */
  29792. )
  29793. ],
  29794. 6
  29795. /* CLASS, STYLE */
  29796. );
  29797. }
  29798. 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"]]);
  29799. const props = {
  29800. props: {
  29801. // 最小可选值
  29802. min: {
  29803. type: [Number, String],
  29804. default: props$E.slider.min
  29805. },
  29806. // 最大可选值
  29807. max: {
  29808. type: [Number, String],
  29809. default: props$E.slider.max
  29810. },
  29811. // 步长,取值必须大于 0,并且可被(max - min)整除
  29812. step: {
  29813. type: [Number, String],
  29814. default: props$E.slider.step
  29815. },
  29816. // 当前取值
  29817. value: {
  29818. type: [Number, String],
  29819. default: props$E.slider.value
  29820. },
  29821. // 滑块右侧已选择部分的背景色
  29822. activeColor: {
  29823. type: String,
  29824. default: props$E.slider.activeColor
  29825. },
  29826. // 滑块左侧未选择部分的背景色
  29827. inactiveColor: {
  29828. type: String,
  29829. default: props$E.slider.inactiveColor
  29830. },
  29831. // 滑块的大小,取值范围为 12 - 28
  29832. blockSize: {
  29833. type: [Number, String],
  29834. default: props$E.slider.blockSize
  29835. },
  29836. // 滑块的颜色
  29837. blockColor: {
  29838. type: String,
  29839. default: props$E.slider.blockColor
  29840. },
  29841. // 禁用状态
  29842. disabled: {
  29843. type: Boolean,
  29844. default: props$E.slider.disabled
  29845. },
  29846. // 是否显示当前的选择值
  29847. showValue: {
  29848. type: Boolean,
  29849. default: props$E.slider.showValue
  29850. }
  29851. }
  29852. };
  29853. const _sfc_main$b = {
  29854. name: "u--slider",
  29855. mixins: [mpMixin, mixin, props],
  29856. methods: {
  29857. // 拖动过程中触发
  29858. changingHandler(e) {
  29859. const {
  29860. value: value2
  29861. } = e.detail;
  29862. this.$emit("input", value2);
  29863. this.$emit("changing", value2);
  29864. },
  29865. // 滑动结束时触发
  29866. changeHandler(e) {
  29867. const {
  29868. value: value2
  29869. } = e.detail;
  29870. this.$emit("input", value2);
  29871. this.$emit("change", value2);
  29872. }
  29873. }
  29874. };
  29875. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  29876. return vue.openBlock(), vue.createElementBlock(
  29877. "view",
  29878. {
  29879. class: "u-slider",
  29880. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  29881. },
  29882. [
  29883. vue.createElementVNode("slider", {
  29884. min: _ctx.min,
  29885. max: _ctx.max,
  29886. step: _ctx.step,
  29887. value: _ctx.value,
  29888. activeColor: _ctx.activeColor,
  29889. inactiveColor: _ctx.inactiveColor,
  29890. blockSize: _ctx.$u.getPx(_ctx.blockSize),
  29891. blockColor: _ctx.blockColor,
  29892. showValue: _ctx.showValue,
  29893. disabled: _ctx.disabled,
  29894. onChanging: _cache[0] || (_cache[0] = (...args) => $options.changingHandler && $options.changingHandler(...args)),
  29895. onChange: _cache[1] || (_cache[1] = (...args) => $options.changeHandler && $options.changeHandler(...args))
  29896. }, null, 40, ["min", "max", "step", "value", "activeColor", "inactiveColor", "blockSize", "blockColor", "showValue", "disabled"])
  29897. ],
  29898. 4
  29899. /* STYLE */
  29900. );
  29901. }
  29902. 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"]]);
  29903. const _sfc_main$a = {
  29904. __name: "volume",
  29905. setup(__props, { expose: __expose }) {
  29906. __expose();
  29907. const settings = vue.ref({
  29908. audioStartSwitch: true,
  29909. audioStart: "书嗨,不辜负每一个爱书的人",
  29910. audioSpeed: 10,
  29911. audioVolume: 5,
  29912. "audioPlay": false,
  29913. "audioClick": false
  29914. });
  29915. function changeSpeed(value2) {
  29916. settings.value.audioSpeed = value2;
  29917. }
  29918. function changeVolume(value2) {
  29919. settings.value.audioVolume = value2;
  29920. }
  29921. const getVoiceBroadcast = () => {
  29922. uni.$u.http.get("/app/appConf/getAudioConfig").then((res2) => {
  29923. if (res2.code == 200) {
  29924. settings.value = res2.data;
  29925. }
  29926. });
  29927. };
  29928. getVoiceBroadcast();
  29929. const saveVoiceBroadcast = () => {
  29930. uni.$u.http.post("/app/appConf/setAudioConfig", settings.value).then((res2) => {
  29931. if (res2.code == 200) {
  29932. uni.showToast({
  29933. title: "设置成功",
  29934. icon: "success"
  29935. });
  29936. initTTS();
  29937. }
  29938. });
  29939. };
  29940. const tts = vue.ref(null);
  29941. const initTTS = () => {
  29942. let params = {
  29943. speed: settings.value.audioSpeed / 10,
  29944. // 将 0-10 转换为 0-1
  29945. pitch: settings.value.audioVolume,
  29946. // 将 0-10 转换为 0-1
  29947. volume: 1
  29948. };
  29949. tts.value = new VolumeTTS(params);
  29950. settings.value.audioStartSwitch && tts.value.speak(settings.value.audioStart);
  29951. };
  29952. function stopPlayback() {
  29953. tts.value && tts.value.stop();
  29954. uni.showToast({
  29955. title: "已停止播放",
  29956. icon: "none"
  29957. });
  29958. }
  29959. function restartApp() {
  29960. uni.showModal({
  29961. title: "提示",
  29962. content: "确定要重启应用吗?",
  29963. success: function(res2) {
  29964. if (res2.confirm) {
  29965. plus.runtime.restart();
  29966. }
  29967. }
  29968. });
  29969. }
  29970. function loadSettings() {
  29971. try {
  29972. const savedSettings = uni.getStorageSync("tts_settings");
  29973. if (savedSettings) {
  29974. Object.assign(settings, savedSettings);
  29975. }
  29976. } catch (error2) {
  29977. formatAppLog("error", "at pages/my/page/volume.vue:161", "加载设置失败:", error2);
  29978. }
  29979. }
  29980. function playClickSound() {
  29981. if (!settings.audioClick)
  29982. return;
  29983. const audio = uni.createInnerAudioContext();
  29984. audio.src = "/static/audio/click.mp3";
  29985. audio.play();
  29986. }
  29987. vue.onMounted(async () => {
  29988. loadSettings();
  29989. });
  29990. const __returned__ = { settings, changeSpeed, changeVolume, getVoiceBroadcast, saveVoiceBroadcast, tts, initTTS, stopPlayback, restartApp, loadSettings, playClickSound, ref: vue.ref, reactive: vue.reactive, onMounted: vue.onMounted, get VolumeTTS() {
  29991. return VolumeTTS;
  29992. } };
  29993. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29994. return __returned__;
  29995. }
  29996. };
  29997. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  29998. const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0);
  29999. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$6);
  30000. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$5);
  30001. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$2);
  30002. const _component_u_slider = resolveEasycom(vue.resolveDynamicComponent("u-slider"), __easycom_4);
  30003. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  30004. return vue.openBlock(), vue.createElementBlock("view", { class: "settings-container" }, [
  30005. vue.createCommentVNode(" 设置选项组 "),
  30006. vue.createElementVNode("view", { class: "settings-section" }, [
  30007. vue.createVNode(_component_u_cell_group, { border: false }, {
  30008. default: vue.withCtx(() => [
  30009. vue.createCommentVNode(" 语音播报设置 "),
  30010. vue.createVNode(_component_u_cell, {
  30011. title: "语音播报",
  30012. label: "控制除app启动提示外所有语音播报的开关",
  30013. "border-bottom": true
  30014. }, {
  30015. "right-icon": vue.withCtx(() => [
  30016. vue.createVNode(_component_u_switch, {
  30017. modelValue: $setup.settings.audioPlay,
  30018. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.settings.audioPlay = $event),
  30019. activeColor: "#4cd964"
  30020. }, null, 8, ["modelValue"])
  30021. ]),
  30022. _: 1
  30023. /* STABLE */
  30024. }),
  30025. vue.createCommentVNode(" 点击音效设置 "),
  30026. vue.createVNode(_component_u_cell, {
  30027. title: "点击音效",
  30028. "border-bottom": true
  30029. }, {
  30030. "right-icon": vue.withCtx(() => [
  30031. vue.createVNode(_component_u_switch, {
  30032. modelValue: $setup.settings.audioClick,
  30033. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.settings.audioClick = $event),
  30034. activeColor: "#4cd964"
  30035. }, null, 8, ["modelValue"])
  30036. ]),
  30037. _: 1
  30038. /* STABLE */
  30039. }),
  30040. vue.createCommentVNode(" 启动提示语设置 "),
  30041. vue.createVNode(_component_u_cell, {
  30042. title: "启动提示语",
  30043. "border-bottom": true
  30044. }, {
  30045. "right-icon": vue.withCtx(() => [
  30046. vue.createVNode(_component_u_switch, {
  30047. modelValue: $setup.settings.audioStartSwitch,
  30048. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.settings.audioStartSwitch = $event),
  30049. activeColor: "#4cd964"
  30050. }, null, 8, ["modelValue"])
  30051. ]),
  30052. _: 1
  30053. /* STABLE */
  30054. })
  30055. ]),
  30056. _: 1
  30057. /* STABLE */
  30058. }),
  30059. vue.createCommentVNode(" 启动提示语输入框 "),
  30060. vue.createElementVNode("view", { class: "input-section" }, [
  30061. vue.createVNode(_component_u_textarea, {
  30062. modelValue: $setup.settings.audioStart,
  30063. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.settings.audioStart = $event),
  30064. placeholder: "输入启动时要说的内容,比如:欢迎使用书嗨/很开心又见到你啦",
  30065. height: "100"
  30066. }, null, 8, ["modelValue"])
  30067. ]),
  30068. vue.createCommentVNode(" 语速设置 "),
  30069. vue.createElementVNode("view", { class: "slider-section" }, [
  30070. vue.createElementVNode("view", { class: "slider-title" }, [
  30071. vue.createElementVNode("text", null, "设置语速"),
  30072. vue.createElementVNode("text", { class: "subtitle" }, "(部分机型不支持)")
  30073. ]),
  30074. vue.createVNode(_component_u_slider, {
  30075. value: $setup.settings.audioSpeed,
  30076. max: 20,
  30077. min: 5,
  30078. step: 1,
  30079. showValue: "",
  30080. onChange: $setup.changeSpeed
  30081. }, null, 8, ["value"])
  30082. ]),
  30083. vue.createCommentVNode(" 音调设置 "),
  30084. vue.createElementVNode("view", { class: "slider-section" }, [
  30085. vue.createElementVNode("view", { class: "slider-title" }, [
  30086. vue.createElementVNode("text", null, "设置音调"),
  30087. vue.createElementVNode("text", { class: "subtitle" }, "(部分机型不支持)")
  30088. ]),
  30089. vue.createVNode(_component_u_slider, {
  30090. value: $setup.settings.audioVolume,
  30091. max: 10,
  30092. min: 1,
  30093. step: 1,
  30094. showValue: "",
  30095. onChange: $setup.changeVolume
  30096. }, null, 8, ["value"])
  30097. ]),
  30098. vue.createCommentVNode(" 操作按钮 "),
  30099. vue.createElementVNode("view", { class: "button-group" }, [
  30100. vue.createVNode(_component_u_button, {
  30101. type: "primary",
  30102. text: "保存设置并试听",
  30103. onClick: $setup.saveVoiceBroadcast
  30104. }),
  30105. vue.createVNode(_component_u_button, {
  30106. type: "warning",
  30107. text: "停止播放",
  30108. onClick: $setup.stopPlayback,
  30109. plain: true
  30110. }),
  30111. vue.createVNode(_component_u_button, {
  30112. type: "error",
  30113. text: "重启app",
  30114. onClick: $setup.restartApp,
  30115. plain: true
  30116. })
  30117. ])
  30118. ])
  30119. ]);
  30120. }
  30121. 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"]]);
  30122. const _sfc_main$9 = {
  30123. __name: "book-display",
  30124. setup(__props, { expose: __expose }) {
  30125. __expose();
  30126. const settings = vue.reactive({
  30127. showRecyclePrice: false,
  30128. showRecycleStatus: false,
  30129. showStock: false,
  30130. showDetail: false
  30131. });
  30132. function loadSettings() {
  30133. uni.$u.http.get("/app/appConf/getBookShowConfig").then((res2) => {
  30134. if (res2.code == 200) {
  30135. Object.assign(settings, res2.data);
  30136. }
  30137. });
  30138. }
  30139. function saveSettings() {
  30140. uni.$u.http.post("/app/appConf/setBookShowConfig", settings).then((res2) => {
  30141. if (res2.code == 200) {
  30142. uni.showToast({
  30143. title: "设置已保存",
  30144. icon: "success"
  30145. });
  30146. } else {
  30147. uni.showToast({
  30148. title: "保存设置失败",
  30149. icon: "error"
  30150. });
  30151. }
  30152. });
  30153. }
  30154. vue.onMounted(() => {
  30155. loadSettings();
  30156. });
  30157. const __returned__ = { settings, loadSettings, saveSettings, reactive: vue.reactive, onMounted: vue.onMounted };
  30158. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30159. return __returned__;
  30160. }
  30161. };
  30162. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  30163. const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0);
  30164. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$6);
  30165. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$5);
  30166. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  30167. return vue.openBlock(), vue.createElementBlock("view", { class: "settings-container" }, [
  30168. vue.createCommentVNode(" 设置列表 "),
  30169. vue.createVNode(_component_u_cell_group, {
  30170. border: false,
  30171. class: "settings-group"
  30172. }, {
  30173. default: vue.withCtx(() => [
  30174. vue.createVNode(_component_u_cell, {
  30175. title: "是否展示回收价",
  30176. "border-bottom": true
  30177. }, {
  30178. "right-icon": vue.withCtx(() => [
  30179. vue.createVNode(_component_u_switch, {
  30180. modelValue: $setup.settings.showRecyclePrice,
  30181. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.settings.showRecyclePrice = $event),
  30182. activeColor: "#4cd964"
  30183. }, null, 8, ["modelValue"])
  30184. ]),
  30185. _: 1
  30186. /* STABLE */
  30187. }),
  30188. vue.createVNode(_component_u_cell, {
  30189. title: "是否展示回收状态",
  30190. "border-bottom": true
  30191. }, {
  30192. "right-icon": vue.withCtx(() => [
  30193. vue.createVNode(_component_u_switch, {
  30194. modelValue: $setup.settings.showRecycleStatus,
  30195. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.settings.showRecycleStatus = $event),
  30196. activeColor: "#4cd964"
  30197. }, null, 8, ["modelValue"])
  30198. ]),
  30199. _: 1
  30200. /* STABLE */
  30201. }),
  30202. vue.createVNode(_component_u_cell, {
  30203. title: "是否展示库存信息",
  30204. "border-bottom": true
  30205. }, {
  30206. "right-icon": vue.withCtx(() => [
  30207. vue.createVNode(_component_u_switch, {
  30208. modelValue: $setup.settings.showStock,
  30209. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.settings.showStock = $event),
  30210. activeColor: "#4cd964"
  30211. }, null, 8, ["modelValue"])
  30212. ]),
  30213. _: 1
  30214. /* STABLE */
  30215. }),
  30216. vue.createVNode(_component_u_cell, {
  30217. title: "是否默认展开商品详情",
  30218. "border-bottom": false
  30219. }, {
  30220. "right-icon": vue.withCtx(() => [
  30221. vue.createVNode(_component_u_switch, {
  30222. modelValue: $setup.settings.showDetail,
  30223. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.settings.showDetail = $event),
  30224. activeColor: "#4cd964"
  30225. }, null, 8, ["modelValue"])
  30226. ]),
  30227. _: 1
  30228. /* STABLE */
  30229. })
  30230. ]),
  30231. _: 1
  30232. /* STABLE */
  30233. }),
  30234. vue.createVNode(_component_u_button, {
  30235. class: "mt-40",
  30236. type: "primary",
  30237. onClick: $setup.saveSettings
  30238. }, {
  30239. default: vue.withCtx(() => [
  30240. vue.createTextVNode("保存")
  30241. ]),
  30242. _: 1
  30243. /* STABLE */
  30244. })
  30245. ]);
  30246. }
  30247. 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"]]);
  30248. const _sfc_main$8 = {
  30249. __name: "password",
  30250. setup(__props, { expose: __expose }) {
  30251. __expose();
  30252. const formRef = vue.ref(null);
  30253. const loading = vue.ref(false);
  30254. const showPassword = vue.reactive({
  30255. old: false,
  30256. new: false,
  30257. confirm: false
  30258. });
  30259. const formData = vue.reactive({
  30260. oldPassword: "",
  30261. newPassword: "",
  30262. confirmPassword: ""
  30263. });
  30264. const rules2 = {
  30265. oldPassword: [{
  30266. required: true,
  30267. message: "请输入原密码",
  30268. trigger: ["blur", "change"]
  30269. }, {
  30270. min: 6,
  30271. message: "密码长度不能小于6位",
  30272. trigger: ["blur", "change"]
  30273. }],
  30274. newPassword: [{
  30275. required: true,
  30276. message: "请输入新密码",
  30277. trigger: ["blur", "change"]
  30278. }, {
  30279. min: 6,
  30280. message: "密码长度不能小于6位",
  30281. trigger: ["blur", "change"]
  30282. }, {
  30283. validator: (rule, value2, callback) => {
  30284. if (value2 === formData.oldPassword) {
  30285. callback(new Error("新密码不能与原密码相同"));
  30286. } else {
  30287. callback();
  30288. }
  30289. },
  30290. trigger: ["blur", "change"]
  30291. }],
  30292. confirmPassword: [{
  30293. required: true,
  30294. message: "请再次输入新密码",
  30295. trigger: ["blur", "change"]
  30296. }, {
  30297. validator: (rule, value2, callback) => {
  30298. if (value2 !== formData.newPassword) {
  30299. callback(new Error("两次输入的密码不一致"));
  30300. } else {
  30301. callback();
  30302. }
  30303. },
  30304. trigger: ["blur", "change"]
  30305. }]
  30306. };
  30307. function submitForm() {
  30308. if (!formRef.value)
  30309. return;
  30310. formRef.value.validate().then((valid) => {
  30311. if (valid) {
  30312. loading.value = true;
  30313. uni.$u.http.post("/app/appUser/updatePwd", formData).then((res2) => {
  30314. if (res2.code == 200) {
  30315. uni.showModal({
  30316. title: "提示",
  30317. content: "密码修改成功,是否确定要退出重新登录?",
  30318. success: (res3) => {
  30319. if (res3.confirm) {
  30320. uni.clearStorageSync();
  30321. uni.reLaunch({
  30322. url: "/pages/login/login"
  30323. });
  30324. } else {
  30325. uni.navigateBack({
  30326. delta: 1
  30327. });
  30328. }
  30329. }
  30330. });
  30331. }
  30332. }).finally(() => {
  30333. loading.value = false;
  30334. });
  30335. }
  30336. });
  30337. }
  30338. function resetForm() {
  30339. if (!formRef.value)
  30340. return;
  30341. formRef.value.resetFields();
  30342. }
  30343. const __returned__ = { formRef, loading, showPassword, formData, rules: rules2, submitForm, resetForm, ref: vue.ref, reactive: vue.reactive };
  30344. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30345. return __returned__;
  30346. }
  30347. };
  30348. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  30349. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  30350. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$a);
  30351. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$7);
  30352. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  30353. return vue.openBlock(), vue.createElementBlock("view", { class: "password-container" }, [
  30354. vue.createVNode(_component_u_form, {
  30355. model: $setup.formData,
  30356. rules: $setup.rules,
  30357. ref: "formRef",
  30358. labelPosition: "top",
  30359. borderBottom: true,
  30360. labelWidth: "300px",
  30361. "error-type": "toast"
  30362. }, {
  30363. default: vue.withCtx(() => [
  30364. vue.createVNode(_component_u_form_item, {
  30365. label: "原密码",
  30366. prop: "oldPassword",
  30367. borderBottom: ""
  30368. }, {
  30369. default: vue.withCtx(() => [
  30370. vue.createVNode(_component_u_input, {
  30371. modelValue: $setup.formData.oldPassword,
  30372. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.oldPassword = $event),
  30373. type: "password",
  30374. placeholder: "请输入原密码",
  30375. border: false
  30376. }, null, 8, ["modelValue"])
  30377. ]),
  30378. _: 1
  30379. /* STABLE */
  30380. }),
  30381. vue.createVNode(_component_u_form_item, {
  30382. label: "新密码",
  30383. prop: "newPassword",
  30384. borderBottom: ""
  30385. }, {
  30386. default: vue.withCtx(() => [
  30387. vue.createVNode(_component_u_input, {
  30388. modelValue: $setup.formData.newPassword,
  30389. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.newPassword = $event),
  30390. type: "password",
  30391. placeholder: "请输入新密码",
  30392. border: false
  30393. }, null, 8, ["modelValue"])
  30394. ]),
  30395. _: 1
  30396. /* STABLE */
  30397. }),
  30398. vue.createVNode(_component_u_form_item, {
  30399. label: "确认新密码",
  30400. prop: "confirmPassword",
  30401. borderBottom: ""
  30402. }, {
  30403. default: vue.withCtx(() => [
  30404. vue.createVNode(_component_u_input, {
  30405. modelValue: $setup.formData.confirmPassword,
  30406. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.confirmPassword = $event),
  30407. type: "password",
  30408. placeholder: "请再次输入新密码",
  30409. border: false
  30410. }, null, 8, ["modelValue"])
  30411. ]),
  30412. _: 1
  30413. /* STABLE */
  30414. })
  30415. ]),
  30416. _: 1
  30417. /* STABLE */
  30418. }, 8, ["model"]),
  30419. vue.createElementVNode("view", { class: "submit-btn" }, [
  30420. vue.createVNode(_component_u_button, {
  30421. type: "primary",
  30422. text: "修改密码",
  30423. onClick: $setup.submitForm,
  30424. loading: $setup.loading
  30425. }, null, 8, ["loading"])
  30426. ])
  30427. ]);
  30428. }
  30429. 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"]]);
  30430. const _sfc_main$7 = {};
  30431. function _sfc_render$6(_ctx, _cache) {
  30432. return vue.openBlock(), vue.createElementBlock("view");
  30433. }
  30434. const PagesOrderStatPendingReview = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-review.vue"]]);
  30435. const _sfc_main$6 = {};
  30436. function _sfc_render$5(_ctx, _cache) {
  30437. return vue.openBlock(), vue.createElementBlock("view");
  30438. }
  30439. const PagesOrderStatPendingPick = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-pick.vue"]]);
  30440. const _sfc_main$5 = {};
  30441. function _sfc_render$4(_ctx, _cache) {
  30442. return vue.openBlock(), vue.createElementBlock("view");
  30443. }
  30444. const PagesOrderStatPendingSign = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-sign.vue"]]);
  30445. const _sfc_main$4 = {};
  30446. function _sfc_render$3(_ctx, _cache) {
  30447. return vue.openBlock(), vue.createElementBlock("view");
  30448. }
  30449. const PagesOrderStatPendingConfirm = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-confirm.vue"]]);
  30450. const _sfc_main$3 = {};
  30451. function _sfc_render$2(_ctx, _cache) {
  30452. return vue.openBlock(), vue.createElementBlock("view");
  30453. }
  30454. const PagesOrderStatPendingAudit = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-audit.vue"]]);
  30455. const _sfc_main$2 = {};
  30456. function _sfc_render$1(_ctx, _cache) {
  30457. return vue.openBlock(), vue.createElementBlock("view");
  30458. }
  30459. const PagesOrderStatPendingPayment = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-payment.vue"]]);
  30460. const _sfc_main$1 = {};
  30461. function _sfc_render(_ctx, _cache) {
  30462. return vue.openBlock(), vue.createElementBlock("view");
  30463. }
  30464. const PagesOrderStatReceiveStat = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/receive-stat.vue"]]);
  30465. __definePage("pages/login/login", PagesLoginLogin);
  30466. __definePage("pages/index/index", PagesIndexIndex);
  30467. __definePage("pages/my/my", PagesMyMy);
  30468. __definePage("pages/order/index", PagesOrderIndex);
  30469. __definePage("pages/book/index", PagesBookIndex);
  30470. __definePage("pages/index/express/transfer-sign", PagesIndexExpressTransferSign);
  30471. __definePage("pages/index/express/scan", PagesIndexExpressScan);
  30472. __definePage("pages/index/express/quick-check", PagesIndexExpressQuickCheck);
  30473. __definePage("pages/index/express/quick-unpack", PagesIndexExpressQuickUnpack);
  30474. __definePage("pages/index/express/route-exception", PagesIndexExpressRouteException);
  30475. __definePage("pages/index/express/warehouse-sign", PagesIndexExpressWarehouseSign);
  30476. __definePage("pages/index/express/weight-modify", PagesIndexExpressWeightModify);
  30477. __definePage("pages/index/audit/confirm-receipt", PagesIndexAuditConfirmReceipt);
  30478. __definePage("pages/index/audit/scan-order", PagesIndexAuditScanOrder);
  30479. __definePage("pages/index/audit/isbn-order", PagesIndexAuditIsbnOrder);
  30480. __definePage("pages/index/audit/express-order", PagesIndexAuditExpressOrder);
  30481. __definePage("pages/index/detail/index", PagesIndexDetailIndex);
  30482. __definePage("pages/index/detail/book-audit", PagesIndexDetailBookAudit);
  30483. __definePage("pages/index/detail/batch-audit", PagesIndexDetailBatchAudit);
  30484. __definePage("pages/index/audit/sender", PagesIndexAuditSender);
  30485. __definePage("pages/index/statistic/audit", PagesIndexStatisticAudit);
  30486. __definePage("pages/index/statistic/after-sale", PagesIndexStatisticAfterSale);
  30487. __definePage("pages/index/statistic/package", PagesIndexStatisticPackage);
  30488. __definePage("pages/index/wms/medium-in", PagesIndexWmsMediumIn);
  30489. __definePage("pages/index/wms/good-in", PagesIndexWmsGoodIn);
  30490. __definePage("pages/index/wms/secondary-in", PagesIndexWmsSecondaryIn);
  30491. __definePage("pages/index/wms/bad-in", PagesIndexWmsBadIn);
  30492. __definePage("pages/index/wms/bad-out", PagesIndexWmsBadOut);
  30493. __definePage("pages/index/wms/bad-out-order", PagesIndexWmsBadOutOrder);
  30494. __definePage("pages/index/wms/bad-off", PagesIndexWmsBadOff);
  30495. __definePage("pages/index/wms/order-query", PagesIndexWmsOrderQuery);
  30496. __definePage("pages/index/wms/order-query-list", PagesIndexWmsOrderQueryList);
  30497. __definePage("pages/index/wms/location-order", PagesIndexWmsLocationOrder);
  30498. __definePage("pages/index/wms/location-order-list", PagesIndexWmsLocationOrderList);
  30499. __definePage("pages/index/wms/location-select", PagesIndexWmsLocationSelect);
  30500. __definePage("pages/index/wms/warehouse-select", PagesIndexWmsWarehouseSelect);
  30501. __definePage("pages/index/wms/speedy-check", PagesIndexWmsSpeedyCheck);
  30502. __definePage("pages/index/offline/check-order", PagesIndexOfflineCheckOrder);
  30503. __definePage("pages/index/offline/check-record", PagesIndexOfflineCheckRecord);
  30504. __definePage("pages/index/entry/scan-book", PagesIndexEntryScanBook);
  30505. __definePage("pages/index/entry/book-weight", PagesIndexEntryBookWeight);
  30506. __definePage("pages/index/express/logistics-detail", PagesIndexExpressLogisticsDetail);
  30507. __definePage("pages/index/wms/task-detail", PagesIndexWmsTaskDetail);
  30508. __definePage("pages/index/wms/speedy-check-add", PagesIndexWmsSpeedyCheckAdd);
  30509. __definePage("pages/my/page/user-info", PagesMyPageUserInfo);
  30510. __definePage("pages/my/page/warehouse", PagesMyPageWarehouse);
  30511. __definePage("pages/my/page/school", PagesMyPageSchool);
  30512. __definePage("pages/my/page/audit-unfinished", PagesMyPageAuditUnfinished);
  30513. __definePage("pages/my/page/version", PagesMyPageVersion);
  30514. __definePage("pages/my/page/volume", PagesMyPageVolume);
  30515. __definePage("pages/my/page/book-display", PagesMyPageBookDisplay);
  30516. __definePage("pages/my/page/password", PagesMyPagePassword);
  30517. __definePage("pages/order/stat/pending-review", PagesOrderStatPendingReview);
  30518. __definePage("pages/order/stat/pending-pick", PagesOrderStatPendingPick);
  30519. __definePage("pages/order/stat/pending-sign", PagesOrderStatPendingSign);
  30520. __definePage("pages/order/stat/pending-confirm", PagesOrderStatPendingConfirm);
  30521. __definePage("pages/order/stat/pending-audit", PagesOrderStatPendingAudit);
  30522. __definePage("pages/order/stat/pending-payment", PagesOrderStatPendingPayment);
  30523. __definePage("pages/order/stat/receive-stat", PagesOrderStatReceiveStat);
  30524. function useInit() {
  30525. var barcodeModel = requireNativePlugin("iData-BarcodePlugin-BarcodeModule");
  30526. barcodeModel.initScan((ret) => {
  30527. formatAppLog("log", "at utils/useBarcodeModule.js:9", "初始化扫描", ret);
  30528. });
  30529. }
  30530. function useGlobalEvent(onChange) {
  30531. var globalEvent = requireNativePlugin("globalEvent");
  30532. globalEvent.addEventListener("iDataBarcodeEvent", function(e) {
  30533. onChange && onChange(e);
  30534. });
  30535. }
  30536. function useGlobalEventRemove() {
  30537. var globalEvent = requireNativePlugin("globalEvent");
  30538. globalEvent.removeEventListener("iDataBarcodeEvent");
  30539. }
  30540. function useRouteMonitor(onChange) {
  30541. uni.addInterceptor("navigateTo", {
  30542. invoke(e) {
  30543. var _a;
  30544. const pages2 = getCurrentPages();
  30545. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  30546. onChange && onChange(e.url, from);
  30547. formatAppLog("log", "at utils/useRouteMonitor.js:18", "navigateTo", e.url, from);
  30548. return e;
  30549. }
  30550. });
  30551. uni.addInterceptor("redirectTo", {
  30552. invoke(e) {
  30553. var _a;
  30554. const pages2 = getCurrentPages();
  30555. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  30556. onChange && onChange(e.url, from);
  30557. formatAppLog("log", "at utils/useRouteMonitor.js:28", "redirectTo", e.url, from);
  30558. return e;
  30559. }
  30560. });
  30561. uni.addInterceptor("reLaunch", {
  30562. invoke(e) {
  30563. var _a;
  30564. const pages2 = getCurrentPages();
  30565. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  30566. onChange && onChange(e.url, from);
  30567. formatAppLog("log", "at utils/useRouteMonitor.js:38", "reLaunch", e.url, from);
  30568. return e;
  30569. }
  30570. });
  30571. uni.addInterceptor("switchTab", {
  30572. invoke(e) {
  30573. var _a;
  30574. const pages2 = getCurrentPages();
  30575. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  30576. onChange && onChange(e.url, from);
  30577. formatAppLog("log", "at utils/useRouteMonitor.js:48", "switchTab", e.url, from);
  30578. return e;
  30579. }
  30580. });
  30581. }
  30582. const _sfc_main = {
  30583. __name: "App",
  30584. setup(__props, { expose: __expose }) {
  30585. __expose();
  30586. onLaunch(() => {
  30587. formatAppLog("log", "at App.vue:10", "App Launch");
  30588. if (!store.token) {
  30589. let token = uni.getStorageSync("token");
  30590. if (token) {
  30591. store.setToken(token);
  30592. let userInfo = uni.getStorageSync("userInfo");
  30593. if (userInfo) {
  30594. if (userInfo.userId) {
  30595. store.setUserInfo(userInfo);
  30596. }
  30597. }
  30598. }
  30599. }
  30600. useInit();
  30601. });
  30602. onShow(() => {
  30603. formatAppLog("log", "at App.vue:30", "App Show");
  30604. useRouteMonitor((url2, from) => {
  30605. formatAppLog("log", "at App.vue:34", "onShow", url2, from);
  30606. useGlobalEventRemove();
  30607. });
  30608. });
  30609. onHide(() => {
  30610. formatAppLog("log", "at App.vue:43", "App Hide");
  30611. });
  30612. const __returned__ = { get onLaunch() {
  30613. return onLaunch;
  30614. }, get onShow() {
  30615. return onShow;
  30616. }, get onHide() {
  30617. return onHide;
  30618. }, get store() {
  30619. return store;
  30620. }, get useGlobalEventRemove() {
  30621. return useGlobalEventRemove;
  30622. }, get useInit() {
  30623. return useInit;
  30624. }, get useRouteMonitor() {
  30625. return useRouteMonitor;
  30626. } };
  30627. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30628. return __returned__;
  30629. }
  30630. };
  30631. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/书嗨项目/shuhi-app-fornt/App.vue"]]);
  30632. const { toString } = Object.prototype;
  30633. function isArray(val) {
  30634. return toString.call(val) === "[object Array]";
  30635. }
  30636. function isObject(val) {
  30637. return val !== null && typeof val === "object";
  30638. }
  30639. function isDate(val) {
  30640. return toString.call(val) === "[object Date]";
  30641. }
  30642. function isURLSearchParams(val) {
  30643. return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
  30644. }
  30645. function forEach(obj, fn) {
  30646. if (obj === null || typeof obj === "undefined") {
  30647. return;
  30648. }
  30649. if (typeof obj !== "object") {
  30650. obj = [obj];
  30651. }
  30652. if (isArray(obj)) {
  30653. for (let i = 0, l = obj.length; i < l; i++) {
  30654. fn.call(null, obj[i], i, obj);
  30655. }
  30656. } else {
  30657. for (const key in obj) {
  30658. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  30659. fn.call(null, obj[key], key, obj);
  30660. }
  30661. }
  30662. }
  30663. }
  30664. function isPlainObject(obj) {
  30665. return Object.prototype.toString.call(obj) === "[object Object]";
  30666. }
  30667. function deepMerge$1() {
  30668. const result = {};
  30669. function assignValue(val, key) {
  30670. if (typeof result[key] === "object" && typeof val === "object") {
  30671. result[key] = deepMerge$1(result[key], val);
  30672. } else if (typeof val === "object") {
  30673. result[key] = deepMerge$1({}, val);
  30674. } else {
  30675. result[key] = val;
  30676. }
  30677. }
  30678. for (let i = 0, l = arguments.length; i < l; i++) {
  30679. forEach(arguments[i], assignValue);
  30680. }
  30681. return result;
  30682. }
  30683. function isUndefined(val) {
  30684. return typeof val === "undefined";
  30685. }
  30686. function encode(val) {
  30687. return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
  30688. }
  30689. function buildURL(url2, params) {
  30690. if (!params) {
  30691. return url2;
  30692. }
  30693. let serializedParams;
  30694. if (isURLSearchParams(params)) {
  30695. serializedParams = params.toString();
  30696. } else {
  30697. const parts = [];
  30698. forEach(params, (val, key) => {
  30699. if (val === null || typeof val === "undefined") {
  30700. return;
  30701. }
  30702. if (isArray(val)) {
  30703. key = `${key}[]`;
  30704. } else {
  30705. val = [val];
  30706. }
  30707. forEach(val, (v) => {
  30708. if (isDate(v)) {
  30709. v = v.toISOString();
  30710. } else if (isObject(v)) {
  30711. v = JSON.stringify(v);
  30712. }
  30713. parts.push(`${encode(key)}=${encode(v)}`);
  30714. });
  30715. });
  30716. serializedParams = parts.join("&");
  30717. }
  30718. if (serializedParams) {
  30719. const hashmarkIndex = url2.indexOf("#");
  30720. if (hashmarkIndex !== -1) {
  30721. url2 = url2.slice(0, hashmarkIndex);
  30722. }
  30723. url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
  30724. }
  30725. return url2;
  30726. }
  30727. function isAbsoluteURL(url2) {
  30728. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
  30729. }
  30730. function combineURLs(baseURL, relativeURL) {
  30731. return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL;
  30732. }
  30733. function buildFullPath(baseURL, requestedURL) {
  30734. if (baseURL && !isAbsoluteURL(requestedURL)) {
  30735. return combineURLs(baseURL, requestedURL);
  30736. }
  30737. return requestedURL;
  30738. }
  30739. function settle(resolve, reject, response) {
  30740. const { validateStatus } = response.config;
  30741. const status = response.statusCode;
  30742. if (status && (!validateStatus || validateStatus(status))) {
  30743. resolve(response);
  30744. } else {
  30745. reject(response);
  30746. }
  30747. }
  30748. const mergeKeys$1 = (keys, config2) => {
  30749. const config3 = {};
  30750. keys.forEach((prop) => {
  30751. if (!isUndefined(config2[prop])) {
  30752. config3[prop] = config2[prop];
  30753. }
  30754. });
  30755. return config3;
  30756. };
  30757. const adapter = (config2) => new Promise((resolve, reject) => {
  30758. const fullPath = buildURL(buildFullPath(config2.baseURL, config2.url), config2.params);
  30759. const _config = {
  30760. url: fullPath,
  30761. header: config2.header,
  30762. complete: (response) => {
  30763. config2.fullPath = fullPath;
  30764. response.config = config2;
  30765. try {
  30766. if (typeof response.data === "string") {
  30767. response.data = JSON.parse(response.data);
  30768. }
  30769. } catch (e) {
  30770. }
  30771. settle(resolve, reject, response);
  30772. }
  30773. };
  30774. let requestTask;
  30775. if (config2.method === "UPLOAD") {
  30776. delete _config.header["content-type"];
  30777. delete _config.header["Content-Type"];
  30778. const otherConfig = {
  30779. filePath: config2.filePath,
  30780. name: config2.name
  30781. };
  30782. const optionalKeys = [
  30783. "files",
  30784. "timeout",
  30785. "formData"
  30786. ];
  30787. requestTask = uni.uploadFile({ ..._config, ...otherConfig, ...mergeKeys$1(optionalKeys, config2) });
  30788. } else if (config2.method === "DOWNLOAD") {
  30789. if (!isUndefined(config2.timeout)) {
  30790. _config.timeout = config2.timeout;
  30791. }
  30792. requestTask = uni.downloadFile(_config);
  30793. } else {
  30794. const optionalKeys = [
  30795. "data",
  30796. "method",
  30797. "timeout",
  30798. "dataType",
  30799. "responseType",
  30800. "sslVerify",
  30801. "firstIpv4"
  30802. ];
  30803. requestTask = uni.request({ ..._config, ...mergeKeys$1(optionalKeys, config2) });
  30804. }
  30805. if (config2.getTask) {
  30806. config2.getTask(requestTask, config2);
  30807. }
  30808. });
  30809. const dispatchRequest = (config2) => adapter(config2);
  30810. function InterceptorManager() {
  30811. this.handlers = [];
  30812. }
  30813. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  30814. this.handlers.push({
  30815. fulfilled,
  30816. rejected
  30817. });
  30818. return this.handlers.length - 1;
  30819. };
  30820. InterceptorManager.prototype.eject = function eject(id) {
  30821. if (this.handlers[id]) {
  30822. this.handlers[id] = null;
  30823. }
  30824. };
  30825. InterceptorManager.prototype.forEach = function forEach2(fn) {
  30826. this.handlers.forEach((h) => {
  30827. if (h !== null) {
  30828. fn(h);
  30829. }
  30830. });
  30831. };
  30832. const mergeKeys = (keys, globalsConfig, config2) => {
  30833. const config3 = {};
  30834. keys.forEach((prop) => {
  30835. if (!isUndefined(config2[prop])) {
  30836. config3[prop] = config2[prop];
  30837. } else if (!isUndefined(globalsConfig[prop])) {
  30838. config3[prop] = globalsConfig[prop];
  30839. }
  30840. });
  30841. return config3;
  30842. };
  30843. const mergeConfig = (globalsConfig, config2 = {}) => {
  30844. const method = config2.method || globalsConfig.method || "GET";
  30845. let config3 = {
  30846. baseURL: globalsConfig.baseURL || "",
  30847. method,
  30848. url: config2.url || "",
  30849. params: config2.params || {},
  30850. custom: { ...globalsConfig.custom || {}, ...config2.custom || {} },
  30851. header: deepMerge$1(globalsConfig.header || {}, config2.header || {})
  30852. };
  30853. const defaultToConfig2Keys = ["getTask", "validateStatus"];
  30854. config3 = { ...config3, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) };
  30855. if (method === "DOWNLOAD") {
  30856. if (!isUndefined(config2.timeout)) {
  30857. config3.timeout = config2.timeout;
  30858. } else if (!isUndefined(globalsConfig.timeout)) {
  30859. config3.timeout = globalsConfig.timeout;
  30860. }
  30861. } else if (method === "UPLOAD") {
  30862. delete config3.header["content-type"];
  30863. delete config3.header["Content-Type"];
  30864. const uploadKeys = [
  30865. "files",
  30866. "filePath",
  30867. "name",
  30868. "timeout",
  30869. "formData"
  30870. ];
  30871. uploadKeys.forEach((prop) => {
  30872. if (!isUndefined(config2[prop])) {
  30873. config3[prop] = config2[prop];
  30874. }
  30875. });
  30876. if (isUndefined(config3.timeout) && !isUndefined(globalsConfig.timeout)) {
  30877. config3.timeout = globalsConfig.timeout;
  30878. }
  30879. } else {
  30880. const defaultsKeys = [
  30881. "data",
  30882. "timeout",
  30883. "dataType",
  30884. "responseType",
  30885. "sslVerify",
  30886. "firstIpv4"
  30887. ];
  30888. config3 = { ...config3, ...mergeKeys(defaultsKeys, globalsConfig, config2) };
  30889. }
  30890. return config3;
  30891. };
  30892. const defaults = {
  30893. baseURL: "",
  30894. header: {},
  30895. method: "GET",
  30896. dataType: "json",
  30897. responseType: "text",
  30898. custom: {},
  30899. timeout: 6e4,
  30900. sslVerify: true,
  30901. firstIpv4: false,
  30902. validateStatus: function validateStatus(status) {
  30903. return status >= 200 && status < 300;
  30904. }
  30905. };
  30906. var clone = function() {
  30907. function _instanceof(obj, type2) {
  30908. return type2 != null && obj instanceof type2;
  30909. }
  30910. var nativeMap;
  30911. try {
  30912. nativeMap = Map;
  30913. } catch (_) {
  30914. nativeMap = function() {
  30915. };
  30916. }
  30917. var nativeSet;
  30918. try {
  30919. nativeSet = Set;
  30920. } catch (_) {
  30921. nativeSet = function() {
  30922. };
  30923. }
  30924. var nativePromise;
  30925. try {
  30926. nativePromise = Promise;
  30927. } catch (_) {
  30928. nativePromise = function() {
  30929. };
  30930. }
  30931. function clone2(parent, circular, depth, prototype, includeNonEnumerable) {
  30932. if (typeof circular === "object") {
  30933. depth = circular.depth;
  30934. prototype = circular.prototype;
  30935. includeNonEnumerable = circular.includeNonEnumerable;
  30936. circular = circular.circular;
  30937. }
  30938. var allParents = [];
  30939. var allChildren = [];
  30940. var useBuffer = typeof Buffer != "undefined";
  30941. if (typeof circular == "undefined")
  30942. circular = true;
  30943. if (typeof depth == "undefined")
  30944. depth = Infinity;
  30945. function _clone(parent2, depth2) {
  30946. if (parent2 === null)
  30947. return null;
  30948. if (depth2 === 0)
  30949. return parent2;
  30950. var child;
  30951. var proto;
  30952. if (typeof parent2 != "object") {
  30953. return parent2;
  30954. }
  30955. if (_instanceof(parent2, nativeMap)) {
  30956. child = new nativeMap();
  30957. } else if (_instanceof(parent2, nativeSet)) {
  30958. child = new nativeSet();
  30959. } else if (_instanceof(parent2, nativePromise)) {
  30960. child = new nativePromise(function(resolve, reject) {
  30961. parent2.then(function(value2) {
  30962. resolve(_clone(value2, depth2 - 1));
  30963. }, function(err) {
  30964. reject(_clone(err, depth2 - 1));
  30965. });
  30966. });
  30967. } else if (clone2.__isArray(parent2)) {
  30968. child = [];
  30969. } else if (clone2.__isRegExp(parent2)) {
  30970. child = new RegExp(parent2.source, __getRegExpFlags(parent2));
  30971. if (parent2.lastIndex)
  30972. child.lastIndex = parent2.lastIndex;
  30973. } else if (clone2.__isDate(parent2)) {
  30974. child = new Date(parent2.getTime());
  30975. } else if (useBuffer && Buffer.isBuffer(parent2)) {
  30976. if (Buffer.from) {
  30977. child = Buffer.from(parent2);
  30978. } else {
  30979. child = new Buffer(parent2.length);
  30980. parent2.copy(child);
  30981. }
  30982. return child;
  30983. } else if (_instanceof(parent2, Error)) {
  30984. child = Object.create(parent2);
  30985. } else {
  30986. if (typeof prototype == "undefined") {
  30987. proto = Object.getPrototypeOf(parent2);
  30988. child = Object.create(proto);
  30989. } else {
  30990. child = Object.create(prototype);
  30991. proto = prototype;
  30992. }
  30993. }
  30994. if (circular) {
  30995. var index2 = allParents.indexOf(parent2);
  30996. if (index2 != -1) {
  30997. return allChildren[index2];
  30998. }
  30999. allParents.push(parent2);
  31000. allChildren.push(child);
  31001. }
  31002. if (_instanceof(parent2, nativeMap)) {
  31003. parent2.forEach(function(value2, key) {
  31004. var keyChild = _clone(key, depth2 - 1);
  31005. var valueChild = _clone(value2, depth2 - 1);
  31006. child.set(keyChild, valueChild);
  31007. });
  31008. }
  31009. if (_instanceof(parent2, nativeSet)) {
  31010. parent2.forEach(function(value2) {
  31011. var entryChild = _clone(value2, depth2 - 1);
  31012. child.add(entryChild);
  31013. });
  31014. }
  31015. for (var i in parent2) {
  31016. var attrs = Object.getOwnPropertyDescriptor(parent2, i);
  31017. if (attrs) {
  31018. child[i] = _clone(parent2[i], depth2 - 1);
  31019. }
  31020. try {
  31021. var objProperty = Object.getOwnPropertyDescriptor(parent2, i);
  31022. if (objProperty.set === "undefined") {
  31023. continue;
  31024. }
  31025. child[i] = _clone(parent2[i], depth2 - 1);
  31026. } catch (e) {
  31027. if (e instanceof TypeError) {
  31028. continue;
  31029. } else if (e instanceof ReferenceError) {
  31030. continue;
  31031. }
  31032. }
  31033. }
  31034. if (Object.getOwnPropertySymbols) {
  31035. var symbols = Object.getOwnPropertySymbols(parent2);
  31036. for (var i = 0; i < symbols.length; i++) {
  31037. var symbol = symbols[i];
  31038. var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol);
  31039. if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
  31040. continue;
  31041. }
  31042. child[symbol] = _clone(parent2[symbol], depth2 - 1);
  31043. Object.defineProperty(child, symbol, descriptor);
  31044. }
  31045. }
  31046. if (includeNonEnumerable) {
  31047. var allPropertyNames = Object.getOwnPropertyNames(parent2);
  31048. for (var i = 0; i < allPropertyNames.length; i++) {
  31049. var propertyName = allPropertyNames[i];
  31050. var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName);
  31051. if (descriptor && descriptor.enumerable) {
  31052. continue;
  31053. }
  31054. child[propertyName] = _clone(parent2[propertyName], depth2 - 1);
  31055. Object.defineProperty(child, propertyName, descriptor);
  31056. }
  31057. }
  31058. return child;
  31059. }
  31060. return _clone(parent, depth);
  31061. }
  31062. clone2.clonePrototype = function clonePrototype(parent) {
  31063. if (parent === null)
  31064. return null;
  31065. var c = function() {
  31066. };
  31067. c.prototype = parent;
  31068. return new c();
  31069. };
  31070. function __objToStr(o) {
  31071. return Object.prototype.toString.call(o);
  31072. }
  31073. clone2.__objToStr = __objToStr;
  31074. function __isDate(o) {
  31075. return typeof o === "object" && __objToStr(o) === "[object Date]";
  31076. }
  31077. clone2.__isDate = __isDate;
  31078. function __isArray(o) {
  31079. return typeof o === "object" && __objToStr(o) === "[object Array]";
  31080. }
  31081. clone2.__isArray = __isArray;
  31082. function __isRegExp(o) {
  31083. return typeof o === "object" && __objToStr(o) === "[object RegExp]";
  31084. }
  31085. clone2.__isRegExp = __isRegExp;
  31086. function __getRegExpFlags(re) {
  31087. var flags = "";
  31088. if (re.global)
  31089. flags += "g";
  31090. if (re.ignoreCase)
  31091. flags += "i";
  31092. if (re.multiline)
  31093. flags += "m";
  31094. return flags;
  31095. }
  31096. clone2.__getRegExpFlags = __getRegExpFlags;
  31097. return clone2;
  31098. }();
  31099. class Request {
  31100. /**
  31101. * @param {Object} arg - 全局配置
  31102. * @param {String} arg.baseURL - 全局根路径
  31103. * @param {Object} arg.header - 全局header
  31104. * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
  31105. * @param {String} arg.dataType = [json] - 全局默认的dataType
  31106. * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持
  31107. * @param {Object} arg.custom - 全局默认的自定义参数
  31108. * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序
  31109. * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
  31110. * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
  31111. * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
  31112. * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
  31113. */
  31114. constructor(arg = {}) {
  31115. if (!isPlainObject(arg)) {
  31116. arg = {};
  31117. formatAppLog("warn", "at uni_modules/uview-plus/libs/luch-request/core/Request.js:39", "设置全局参数必须接收一个Object");
  31118. }
  31119. this.config = clone({ ...defaults, ...arg });
  31120. this.interceptors = {
  31121. request: new InterceptorManager(),
  31122. response: new InterceptorManager()
  31123. };
  31124. }
  31125. /**
  31126. * @Function
  31127. * @param {Request~setConfigCallback} f - 设置全局默认配置
  31128. */
  31129. setConfig(f) {
  31130. this.config = f(this.config);
  31131. }
  31132. middleware(config2) {
  31133. config2 = mergeConfig(this.config, config2);
  31134. const chain = [dispatchRequest, void 0];
  31135. let promise2 = Promise.resolve(config2);
  31136. this.interceptors.request.forEach((interceptor) => {
  31137. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  31138. });
  31139. this.interceptors.response.forEach((interceptor) => {
  31140. chain.push(interceptor.fulfilled, interceptor.rejected);
  31141. });
  31142. while (chain.length) {
  31143. promise2 = promise2.then(chain.shift(), chain.shift());
  31144. }
  31145. return promise2;
  31146. }
  31147. /**
  31148. * @Function
  31149. * @param {Object} config - 请求配置项
  31150. * @prop {String} options.url - 请求路径
  31151. * @prop {Object} options.data - 请求参数
  31152. * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
  31153. * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
  31154. * @prop {Object} [options.header = config.header] - 请求header
  31155. * @prop {Object} [options.method = config.method] - 请求方法
  31156. * @returns {Promise<unknown>}
  31157. */
  31158. request(config2 = {}) {
  31159. return this.middleware(config2);
  31160. }
  31161. get(url2, options = {}) {
  31162. return this.middleware({
  31163. url: url2,
  31164. method: "GET",
  31165. ...options
  31166. });
  31167. }
  31168. post(url2, data, options = {}) {
  31169. return this.middleware({
  31170. url: url2,
  31171. data,
  31172. method: "POST",
  31173. ...options
  31174. });
  31175. }
  31176. put(url2, data, options = {}) {
  31177. return this.middleware({
  31178. url: url2,
  31179. data,
  31180. method: "PUT",
  31181. ...options
  31182. });
  31183. }
  31184. delete(url2, data, options = {}) {
  31185. return this.middleware({
  31186. url: url2,
  31187. data,
  31188. method: "DELETE",
  31189. ...options
  31190. });
  31191. }
  31192. options(url2, data, options = {}) {
  31193. return this.middleware({
  31194. url: url2,
  31195. data,
  31196. method: "OPTIONS",
  31197. ...options
  31198. });
  31199. }
  31200. upload(url2, config2 = {}) {
  31201. config2.url = url2;
  31202. config2.method = "UPLOAD";
  31203. return this.middleware(config2);
  31204. }
  31205. download(url2, config2 = {}) {
  31206. config2.url = url2;
  31207. config2.method = "DOWNLOAD";
  31208. return this.middleware(config2);
  31209. }
  31210. }
  31211. class Router {
  31212. constructor() {
  31213. this.config = {
  31214. type: "navigateTo",
  31215. url: "",
  31216. delta: 1,
  31217. // navigateBack页面后退时,回退的层数
  31218. params: {},
  31219. // 传递的参数
  31220. animationType: "pop-in",
  31221. // 窗口动画,只在APP有效
  31222. animationDuration: 300,
  31223. // 窗口动画持续时间,单位毫秒,只在APP有效
  31224. intercept: false
  31225. // 是否需要拦截
  31226. };
  31227. this.route = this.route.bind(this);
  31228. }
  31229. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  31230. addRootPath(url2) {
  31231. return url2[0] === "/" ? url2 : `/${url2}`;
  31232. }
  31233. // 整合路由参数
  31234. mixinParam(url2, params) {
  31235. url2 = url2 && this.addRootPath(url2);
  31236. let query = "";
  31237. if (/.*\/.*\?.*=.*/.test(url2)) {
  31238. query = uni.$u.queryParams(params, false);
  31239. return url2 += `&${query}`;
  31240. }
  31241. query = uni.$u.queryParams(params);
  31242. return url2 += query;
  31243. }
  31244. // 对外的方法名称
  31245. async route(options = {}, params = {}) {
  31246. let mergeConfig2 = {};
  31247. if (typeof options === "string") {
  31248. mergeConfig2.url = this.mixinParam(options, params);
  31249. mergeConfig2.type = "navigateTo";
  31250. } else {
  31251. mergeConfig2 = uni.$u.deepMerge(this.config, options);
  31252. mergeConfig2.url = this.mixinParam(options.url, options.params);
  31253. }
  31254. if (mergeConfig2.url === uni.$u.page())
  31255. return;
  31256. if (params.intercept) {
  31257. this.config.intercept = params.intercept;
  31258. }
  31259. mergeConfig2.params = params;
  31260. mergeConfig2 = uni.$u.deepMerge(this.config, mergeConfig2);
  31261. if (typeof uni.$u.routeIntercept === "function") {
  31262. const isNext = await new Promise((resolve, reject) => {
  31263. uni.$u.routeIntercept(mergeConfig2, resolve);
  31264. });
  31265. isNext && this.openPage(mergeConfig2);
  31266. } else {
  31267. this.openPage(mergeConfig2);
  31268. }
  31269. }
  31270. // 执行路由跳转
  31271. openPage(config2) {
  31272. const {
  31273. url: url2,
  31274. type: type2,
  31275. delta,
  31276. animationType,
  31277. animationDuration
  31278. } = config2;
  31279. if (config2.type == "navigateTo" || config2.type == "to") {
  31280. uni.navigateTo({
  31281. url: url2,
  31282. animationType,
  31283. animationDuration
  31284. });
  31285. }
  31286. if (config2.type == "redirectTo" || config2.type == "redirect") {
  31287. uni.redirectTo({
  31288. url: url2
  31289. });
  31290. }
  31291. if (config2.type == "switchTab" || config2.type == "tab") {
  31292. uni.switchTab({
  31293. url: url2
  31294. });
  31295. }
  31296. if (config2.type == "reLaunch" || config2.type == "launch") {
  31297. uni.reLaunch({
  31298. url: url2
  31299. });
  31300. }
  31301. if (config2.type == "navigateBack" || config2.type == "back") {
  31302. uni.navigateBack({
  31303. delta
  31304. });
  31305. }
  31306. }
  31307. }
  31308. const route = new Router().route;
  31309. function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
  31310. const startRGB = hexToRgb(startColor, false);
  31311. const startR = startRGB[0];
  31312. const startG = startRGB[1];
  31313. const startB = startRGB[2];
  31314. const endRGB = hexToRgb(endColor, false);
  31315. const endR = endRGB[0];
  31316. const endG = endRGB[1];
  31317. const endB = endRGB[2];
  31318. const sR = (endR - startR) / step;
  31319. const sG = (endG - startG) / step;
  31320. const sB = (endB - startB) / step;
  31321. const colorArr = [];
  31322. for (let i = 0; i < step; i++) {
  31323. let hex = rgbToHex(`rgb(${Math.round(sR * i + startR)},${Math.round(sG * i + startG)},${Math.round(sB * i + startB)})`);
  31324. if (i === 0)
  31325. hex = rgbToHex(startColor);
  31326. if (i === step - 1)
  31327. hex = rgbToHex(endColor);
  31328. colorArr.push(hex);
  31329. }
  31330. return colorArr;
  31331. }
  31332. function hexToRgb(sColor, str = true) {
  31333. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  31334. sColor = String(sColor).toLowerCase();
  31335. if (sColor && reg.test(sColor)) {
  31336. if (sColor.length === 4) {
  31337. let sColorNew = "#";
  31338. for (let i = 1; i < 4; i += 1) {
  31339. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  31340. }
  31341. sColor = sColorNew;
  31342. }
  31343. const sColorChange = [];
  31344. for (let i = 1; i < 7; i += 2) {
  31345. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  31346. }
  31347. if (!str) {
  31348. return sColorChange;
  31349. }
  31350. return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`;
  31351. }
  31352. if (/^(rgb|RGB)/.test(sColor)) {
  31353. const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  31354. return arr.map((val) => Number(val));
  31355. }
  31356. return sColor;
  31357. }
  31358. function rgbToHex(rgb) {
  31359. const _this = rgb;
  31360. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  31361. if (/^(rgb|RGB)/.test(_this)) {
  31362. const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  31363. let strHex = "#";
  31364. for (let i = 0; i < aColor.length; i++) {
  31365. let hex = Number(aColor[i]).toString(16);
  31366. hex = String(hex).length == 1 ? `${0}${hex}` : hex;
  31367. if (hex === "0") {
  31368. hex += hex;
  31369. }
  31370. strHex += hex;
  31371. }
  31372. if (strHex.length !== 7) {
  31373. strHex = _this;
  31374. }
  31375. return strHex;
  31376. }
  31377. if (reg.test(_this)) {
  31378. const aNum = _this.replace(/#/, "").split("");
  31379. if (aNum.length === 6) {
  31380. return _this;
  31381. }
  31382. if (aNum.length === 3) {
  31383. let numHex = "#";
  31384. for (let i = 0; i < aNum.length; i += 1) {
  31385. numHex += aNum[i] + aNum[i];
  31386. }
  31387. return numHex;
  31388. }
  31389. } else {
  31390. return _this;
  31391. }
  31392. }
  31393. function colorToRgba(color2, alpha) {
  31394. color2 = rgbToHex(color2);
  31395. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  31396. let sColor = String(color2).toLowerCase();
  31397. if (sColor && reg.test(sColor)) {
  31398. if (sColor.length === 4) {
  31399. let sColorNew = "#";
  31400. for (let i = 1; i < 4; i += 1) {
  31401. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  31402. }
  31403. sColor = sColorNew;
  31404. }
  31405. const sColorChange = [];
  31406. for (let i = 1; i < 7; i += 2) {
  31407. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  31408. }
  31409. return `rgba(${sColorChange.join(",")},${alpha})`;
  31410. }
  31411. return sColor;
  31412. }
  31413. const colorGradient$1 = {
  31414. colorGradient,
  31415. hexToRgb,
  31416. rgbToHex,
  31417. colorToRgba
  31418. };
  31419. function email(value2) {
  31420. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value2);
  31421. }
  31422. function mobile(value2) {
  31423. return /^1[23456789]\d{9}$/.test(value2);
  31424. }
  31425. function url(value2) {
  31426. 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);
  31427. }
  31428. function date(value2) {
  31429. if (!value2)
  31430. return false;
  31431. if (number(value2))
  31432. value2 = +value2;
  31433. return !/Invalid|NaN/.test(new Date(value2).toString());
  31434. }
  31435. function dateISO(value2) {
  31436. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value2);
  31437. }
  31438. function number(value2) {
  31439. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value2);
  31440. }
  31441. function string(value2) {
  31442. return typeof value2 === "string";
  31443. }
  31444. function digits(value2) {
  31445. return /^\d+$/.test(value2);
  31446. }
  31447. function idCard(value2) {
  31448. 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(
  31449. value2
  31450. );
  31451. }
  31452. function carNo(value2) {
  31453. const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  31454. const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  31455. if (value2.length === 7) {
  31456. return creg.test(value2);
  31457. }
  31458. if (value2.length === 8) {
  31459. return xreg.test(value2);
  31460. }
  31461. return false;
  31462. }
  31463. function amount(value2) {
  31464. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value2);
  31465. }
  31466. function chinese(value2) {
  31467. const reg = /^[\u4e00-\u9fa5]+$/gi;
  31468. return reg.test(value2);
  31469. }
  31470. function letter(value2) {
  31471. return /^[a-zA-Z]*$/.test(value2);
  31472. }
  31473. function enOrNum(value2) {
  31474. const reg = /^[0-9a-zA-Z]*$/g;
  31475. return reg.test(value2);
  31476. }
  31477. function contains(value2, param) {
  31478. return value2.indexOf(param) >= 0;
  31479. }
  31480. function range$1(value2, param) {
  31481. return value2 >= param[0] && value2 <= param[1];
  31482. }
  31483. function rangeLength(value2, param) {
  31484. return value2.length >= param[0] && value2.length <= param[1];
  31485. }
  31486. function landline(value2) {
  31487. const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  31488. return reg.test(value2);
  31489. }
  31490. function empty(value2) {
  31491. switch (typeof value2) {
  31492. case "undefined":
  31493. return true;
  31494. case "string":
  31495. if (value2.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0)
  31496. return true;
  31497. break;
  31498. case "boolean":
  31499. if (!value2)
  31500. return true;
  31501. break;
  31502. case "number":
  31503. if (value2 === 0 || isNaN(value2))
  31504. return true;
  31505. break;
  31506. case "object":
  31507. if (value2 === null || value2.length === 0)
  31508. return true;
  31509. for (const i in value2) {
  31510. return false;
  31511. }
  31512. return true;
  31513. }
  31514. return false;
  31515. }
  31516. function jsonString(value2) {
  31517. if (typeof value2 === "string") {
  31518. try {
  31519. const obj = JSON.parse(value2);
  31520. if (typeof obj === "object" && obj) {
  31521. return true;
  31522. }
  31523. return false;
  31524. } catch (e) {
  31525. return false;
  31526. }
  31527. }
  31528. return false;
  31529. }
  31530. function array(value2) {
  31531. if (typeof Array.isArray === "function") {
  31532. return Array.isArray(value2);
  31533. }
  31534. return Object.prototype.toString.call(value2) === "[object Array]";
  31535. }
  31536. function object(value2) {
  31537. return Object.prototype.toString.call(value2) === "[object Object]";
  31538. }
  31539. function code$1(value2, len = 6) {
  31540. return new RegExp(`^\\d{${len}}$`).test(value2);
  31541. }
  31542. function func(value2) {
  31543. return typeof value2 === "function";
  31544. }
  31545. function promise(value2) {
  31546. return object(value2) && func(value2.then) && func(value2.catch);
  31547. }
  31548. function image(value2) {
  31549. const newValue = value2.split("?")[0];
  31550. const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
  31551. return IMAGE_REGEXP.test(newValue);
  31552. }
  31553. function video(value2) {
  31554. const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;
  31555. return VIDEO_REGEXP.test(value2);
  31556. }
  31557. function regExp(o) {
  31558. return o && Object.prototype.toString.call(o) === "[object RegExp]";
  31559. }
  31560. const test = {
  31561. email,
  31562. mobile,
  31563. url,
  31564. date,
  31565. dateISO,
  31566. number,
  31567. digits,
  31568. idCard,
  31569. carNo,
  31570. amount,
  31571. chinese,
  31572. letter,
  31573. enOrNum,
  31574. contains,
  31575. range: range$1,
  31576. rangeLength,
  31577. empty,
  31578. isEmpty: empty,
  31579. jsonString,
  31580. landline,
  31581. object,
  31582. array,
  31583. code: code$1,
  31584. func,
  31585. promise,
  31586. video,
  31587. image,
  31588. regExp,
  31589. string
  31590. };
  31591. let timeout = null;
  31592. function debounce(func2, wait = 500, immediate = false) {
  31593. if (timeout !== null)
  31594. clearTimeout(timeout);
  31595. if (immediate) {
  31596. const callNow = !timeout;
  31597. timeout = setTimeout(() => {
  31598. timeout = null;
  31599. }, wait);
  31600. if (callNow)
  31601. typeof func2 === "function" && func2();
  31602. } else {
  31603. timeout = setTimeout(() => {
  31604. typeof func2 === "function" && func2();
  31605. }, wait);
  31606. }
  31607. }
  31608. let flag;
  31609. function throttle(func2, wait = 500, immediate = true) {
  31610. if (immediate) {
  31611. if (!flag) {
  31612. flag = true;
  31613. typeof func2 === "function" && func2();
  31614. setTimeout(() => {
  31615. flag = false;
  31616. }, wait);
  31617. }
  31618. } else if (!flag) {
  31619. flag = true;
  31620. setTimeout(() => {
  31621. flag = false;
  31622. typeof func2 === "function" && func2();
  31623. }, wait);
  31624. }
  31625. }
  31626. function strip(num, precision = 15) {
  31627. return +parseFloat(Number(num).toPrecision(precision));
  31628. }
  31629. function digitLength(num) {
  31630. const eSplit = num.toString().split(/[eE]/);
  31631. const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0);
  31632. return len > 0 ? len : 0;
  31633. }
  31634. function float2Fixed(num) {
  31635. if (num.toString().indexOf("e") === -1) {
  31636. return Number(num.toString().replace(".", ""));
  31637. }
  31638. const dLen = digitLength(num);
  31639. return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
  31640. }
  31641. function checkBoundary(num) {
  31642. {
  31643. if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
  31644. formatAppLog("warn", "at uni_modules/uview-plus/libs/function/digit.js:45", `${num} 超出了精度限制,结果可能不正确`);
  31645. }
  31646. }
  31647. }
  31648. function iteratorOperation(arr, operation) {
  31649. const [num1, num2, ...others] = arr;
  31650. let res2 = operation(num1, num2);
  31651. others.forEach((num) => {
  31652. res2 = operation(res2, num);
  31653. });
  31654. return res2;
  31655. }
  31656. function times(...nums) {
  31657. if (nums.length > 2) {
  31658. return iteratorOperation(nums, times);
  31659. }
  31660. const [num1, num2] = nums;
  31661. const num1Changed = float2Fixed(num1);
  31662. const num2Changed = float2Fixed(num2);
  31663. const baseNum = digitLength(num1) + digitLength(num2);
  31664. const leftValue = num1Changed * num2Changed;
  31665. checkBoundary(leftValue);
  31666. return leftValue / Math.pow(10, baseNum);
  31667. }
  31668. function divide(...nums) {
  31669. if (nums.length > 2) {
  31670. return iteratorOperation(nums, divide);
  31671. }
  31672. const [num1, num2] = nums;
  31673. const num1Changed = float2Fixed(num1);
  31674. const num2Changed = float2Fixed(num2);
  31675. checkBoundary(num1Changed);
  31676. checkBoundary(num2Changed);
  31677. return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
  31678. }
  31679. function round(num, ratio) {
  31680. const base = Math.pow(10, ratio);
  31681. let result = divide(Math.round(Math.abs(times(num, base))), base);
  31682. if (num < 0 && result !== 0) {
  31683. result = times(result, -1);
  31684. }
  31685. return result;
  31686. }
  31687. function range(min = 0, max = 0, value2 = 0) {
  31688. return Math.max(min, Math.min(max, Number(value2)));
  31689. }
  31690. function getPx(value2, unit = false) {
  31691. if (test.number(value2)) {
  31692. return unit ? `${value2}px` : Number(value2);
  31693. }
  31694. if (/(rpx|upx)$/.test(value2)) {
  31695. return unit ? `${uni.upx2px(parseInt(value2))}px` : Number(uni.upx2px(parseInt(value2)));
  31696. }
  31697. return unit ? `${parseInt(value2)}px` : parseInt(value2);
  31698. }
  31699. function sleep(value2 = 30) {
  31700. return new Promise((resolve) => {
  31701. setTimeout(() => {
  31702. resolve();
  31703. }, value2);
  31704. });
  31705. }
  31706. function os() {
  31707. return uni.getSystemInfoSync().platform.toLowerCase();
  31708. }
  31709. function sys() {
  31710. return uni.getSystemInfoSync();
  31711. }
  31712. function random(min, max) {
  31713. if (min >= 0 && max > 0 && max >= min) {
  31714. const gab = max - min + 1;
  31715. return Math.floor(Math.random() * gab + min);
  31716. }
  31717. return 0;
  31718. }
  31719. function guid(len = 32, firstU = true, radix = null) {
  31720. const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
  31721. const uuid = [];
  31722. radix = radix || chars.length;
  31723. if (len) {
  31724. for (let i = 0; i < len; i++)
  31725. uuid[i] = chars[0 | Math.random() * radix];
  31726. } else {
  31727. let r;
  31728. uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
  31729. uuid[14] = "4";
  31730. for (let i = 0; i < 36; i++) {
  31731. if (!uuid[i]) {
  31732. r = 0 | Math.random() * 16;
  31733. uuid[i] = chars[i == 19 ? r & 3 | 8 : r];
  31734. }
  31735. }
  31736. }
  31737. if (firstU) {
  31738. uuid.shift();
  31739. return `u${uuid.join("")}`;
  31740. }
  31741. return uuid.join("");
  31742. }
  31743. function $parent(name = void 0) {
  31744. let parent = this.$parent;
  31745. while (parent) {
  31746. if (parent.$options && parent.$options.name !== name) {
  31747. parent = parent.$parent;
  31748. } else {
  31749. return parent;
  31750. }
  31751. }
  31752. return false;
  31753. }
  31754. function addStyle(customStyle, target = "object") {
  31755. if (test.empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") {
  31756. return customStyle;
  31757. }
  31758. if (target === "object") {
  31759. customStyle = trim(customStyle);
  31760. const styleArray = customStyle.split(";");
  31761. const style = {};
  31762. for (let i = 0; i < styleArray.length; i++) {
  31763. if (styleArray[i]) {
  31764. const item = styleArray[i].split(":");
  31765. style[trim(item[0])] = trim(item[1]);
  31766. }
  31767. }
  31768. return style;
  31769. }
  31770. let string2 = "";
  31771. for (const i in customStyle) {
  31772. const key = i.replace(/([A-Z])/g, "-$1").toLowerCase();
  31773. string2 += `${key}:${customStyle[i]};`;
  31774. }
  31775. return trim(string2);
  31776. }
  31777. function addUnit(value2 = "auto", unit = "") {
  31778. if (!unit) {
  31779. unit = uni.$u.config.unit || "px";
  31780. }
  31781. value2 = String(value2);
  31782. return test.number(value2) ? `${value2}${unit}` : value2;
  31783. }
  31784. function deepClone(obj) {
  31785. if ([null, void 0, NaN, false].includes(obj))
  31786. return obj;
  31787. if (typeof obj !== "object" && typeof obj !== "function") {
  31788. return obj;
  31789. }
  31790. const o = test.array(obj) ? [] : {};
  31791. for (const i in obj) {
  31792. if (obj.hasOwnProperty(i)) {
  31793. o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
  31794. }
  31795. }
  31796. return o;
  31797. }
  31798. function deepMerge(target = {}, source = {}) {
  31799. target = deepClone(target);
  31800. if (typeof target !== "object" || typeof source !== "object")
  31801. return false;
  31802. for (const prop in source) {
  31803. if (!source.hasOwnProperty(prop))
  31804. continue;
  31805. if (prop in target) {
  31806. if (typeof target[prop] !== "object") {
  31807. target[prop] = source[prop];
  31808. } else if (typeof source[prop] !== "object") {
  31809. target[prop] = source[prop];
  31810. } else if (target[prop].concat && source[prop].concat) {
  31811. target[prop] = target[prop].concat(source[prop]);
  31812. } else {
  31813. target[prop] = deepMerge(target[prop], source[prop]);
  31814. }
  31815. } else {
  31816. target[prop] = source[prop];
  31817. }
  31818. }
  31819. return target;
  31820. }
  31821. function error(err) {
  31822. {
  31823. formatAppLog("error", "at uni_modules/uview-plus/libs/function/index.js:238", `uView提示:${err}`);
  31824. }
  31825. }
  31826. function randomArray(array3 = []) {
  31827. return array3.sort(() => Math.random() - 0.5);
  31828. }
  31829. if (!String.prototype.padStart) {
  31830. String.prototype.padStart = function(maxLength, fillString = " ") {
  31831. if (Object.prototype.toString.call(fillString) !== "[object String]") {
  31832. throw new TypeError(
  31833. "fillString must be String"
  31834. );
  31835. }
  31836. const str = this;
  31837. if (str.length >= maxLength)
  31838. return String(str);
  31839. const fillLength = maxLength - str.length;
  31840. let times2 = Math.ceil(fillLength / fillString.length);
  31841. while (times2 >>= 1) {
  31842. fillString += fillString;
  31843. if (times2 === 1) {
  31844. fillString += fillString;
  31845. }
  31846. }
  31847. return fillString.slice(0, fillLength) + str;
  31848. };
  31849. }
  31850. function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") {
  31851. let date3;
  31852. if (!dateTime) {
  31853. date3 = /* @__PURE__ */ new Date();
  31854. } else if (/^\d{10}$/.test(dateTime.toString().trim())) {
  31855. date3 = new Date(dateTime * 1e3);
  31856. } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
  31857. date3 = new Date(Number(dateTime));
  31858. } else {
  31859. date3 = new Date(
  31860. typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime
  31861. );
  31862. }
  31863. const timeSource = {
  31864. "y": date3.getFullYear().toString(),
  31865. // 年
  31866. "m": (date3.getMonth() + 1).toString().padStart(2, "0"),
  31867. // 月
  31868. "d": date3.getDate().toString().padStart(2, "0"),
  31869. // 日
  31870. "h": date3.getHours().toString().padStart(2, "0"),
  31871. // 时
  31872. "M": date3.getMinutes().toString().padStart(2, "0"),
  31873. // 分
  31874. "s": date3.getSeconds().toString().padStart(2, "0")
  31875. // 秒
  31876. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  31877. };
  31878. for (const key in timeSource) {
  31879. const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
  31880. if (ret) {
  31881. const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
  31882. formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
  31883. }
  31884. }
  31885. return formatStr;
  31886. }
  31887. function timeFrom(timestamp = null, format2 = "yyyy-mm-dd") {
  31888. if (timestamp == null)
  31889. timestamp = Number(/* @__PURE__ */ new Date());
  31890. timestamp = parseInt(timestamp);
  31891. if (timestamp.toString().length == 10)
  31892. timestamp *= 1e3;
  31893. let timer = (/* @__PURE__ */ new Date()).getTime() - timestamp;
  31894. timer = parseInt(timer / 1e3);
  31895. let tips = "";
  31896. switch (true) {
  31897. case timer < 300:
  31898. tips = "刚刚";
  31899. break;
  31900. case (timer >= 300 && timer < 3600):
  31901. tips = `${parseInt(timer / 60)}分钟前`;
  31902. break;
  31903. case (timer >= 3600 && timer < 86400):
  31904. tips = `${parseInt(timer / 3600)}小时前`;
  31905. break;
  31906. case (timer >= 86400 && timer < 2592e3):
  31907. tips = `${parseInt(timer / 86400)}天前`;
  31908. break;
  31909. default:
  31910. if (format2 === false) {
  31911. if (timer >= 2592e3 && timer < 365 * 86400) {
  31912. tips = `${parseInt(timer / (86400 * 30))}个月前`;
  31913. } else {
  31914. tips = `${parseInt(timer / (86400 * 365))}年前`;
  31915. }
  31916. } else {
  31917. tips = timeFormat(timestamp, format2);
  31918. }
  31919. }
  31920. return tips;
  31921. }
  31922. function trim(str, pos = "both") {
  31923. str = String(str);
  31924. if (pos == "both") {
  31925. return str.replace(/^\s+|\s+$/g, "");
  31926. }
  31927. if (pos == "left") {
  31928. return str.replace(/^\s*/, "");
  31929. }
  31930. if (pos == "right") {
  31931. return str.replace(/(\s*$)/g, "");
  31932. }
  31933. if (pos == "all") {
  31934. return str.replace(/\s+/g, "");
  31935. }
  31936. return str;
  31937. }
  31938. function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
  31939. const prefix = isPrefix ? "?" : "";
  31940. const _result = [];
  31941. if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1)
  31942. arrayFormat = "brackets";
  31943. for (const key in data) {
  31944. const value2 = data[key];
  31945. if (["", void 0, null].indexOf(value2) >= 0) {
  31946. continue;
  31947. }
  31948. if (value2.constructor === Array) {
  31949. switch (arrayFormat) {
  31950. case "indices":
  31951. for (let i = 0; i < value2.length; i++) {
  31952. _result.push(`${key}[${i}]=${value2[i]}`);
  31953. }
  31954. break;
  31955. case "brackets":
  31956. value2.forEach((_value) => {
  31957. _result.push(`${key}[]=${_value}`);
  31958. });
  31959. break;
  31960. case "repeat":
  31961. value2.forEach((_value) => {
  31962. _result.push(`${key}=${_value}`);
  31963. });
  31964. break;
  31965. case "comma":
  31966. let commaStr = "";
  31967. value2.forEach((_value) => {
  31968. commaStr += (commaStr ? "," : "") + _value;
  31969. });
  31970. _result.push(`${key}=${commaStr}`);
  31971. break;
  31972. default:
  31973. value2.forEach((_value) => {
  31974. _result.push(`${key}[]=${_value}`);
  31975. });
  31976. }
  31977. } else {
  31978. _result.push(`${key}=${value2}`);
  31979. }
  31980. }
  31981. return _result.length ? prefix + _result.join("&") : "";
  31982. }
  31983. function toast(title, duration = 2e3) {
  31984. uni.showToast({
  31985. title: String(title),
  31986. icon: "none",
  31987. duration
  31988. });
  31989. }
  31990. function type2icon(type2 = "success", fill = false) {
  31991. if (["primary", "info", "error", "warning", "success"].indexOf(type2) == -1)
  31992. type2 = "success";
  31993. let iconName = "";
  31994. switch (type2) {
  31995. case "primary":
  31996. iconName = "info-circle";
  31997. break;
  31998. case "info":
  31999. iconName = "info-circle";
  32000. break;
  32001. case "error":
  32002. iconName = "close-circle";
  32003. break;
  32004. case "warning":
  32005. iconName = "error-circle";
  32006. break;
  32007. case "success":
  32008. iconName = "checkmark-circle";
  32009. break;
  32010. default:
  32011. iconName = "checkmark-circle";
  32012. }
  32013. if (fill)
  32014. iconName += "-fill";
  32015. return iconName;
  32016. }
  32017. function priceFormat(number3, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") {
  32018. number3 = `${number3}`.replace(/[^0-9+-Ee.]/g, "");
  32019. const n = !isFinite(+number3) ? 0 : +number3;
  32020. const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
  32021. const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator;
  32022. const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint;
  32023. let s = "";
  32024. s = (prec ? round(n, prec) + "" : `${Math.round(n)}`).split(".");
  32025. const re = /(-?\d+)(\d{3})/;
  32026. while (re.test(s[0])) {
  32027. s[0] = s[0].replace(re, `$1${sep}$2`);
  32028. }
  32029. if ((s[1] || "").length < prec) {
  32030. s[1] = s[1] || "";
  32031. s[1] += new Array(prec - s[1].length + 1).join("0");
  32032. }
  32033. return s.join(dec);
  32034. }
  32035. function getDuration(value2, unit = true) {
  32036. const valueNum = parseInt(value2);
  32037. if (unit) {
  32038. if (/s$/.test(value2))
  32039. return value2;
  32040. return value2 > 30 ? `${value2}ms` : `${value2}s`;
  32041. }
  32042. if (/ms$/.test(value2))
  32043. return valueNum;
  32044. if (/s$/.test(value2))
  32045. return valueNum > 30 ? valueNum : valueNum * 1e3;
  32046. return valueNum;
  32047. }
  32048. function padZero(value2) {
  32049. return `00${value2}`.slice(-2);
  32050. }
  32051. function formValidate(instance, event) {
  32052. const formItem = uni.$u.$parent.call(instance, "u-form-item");
  32053. const form = uni.$u.$parent.call(instance, "u-form");
  32054. if (formItem && form) {
  32055. form.validateField(formItem.prop, () => {
  32056. }, event);
  32057. }
  32058. }
  32059. function getProperty(obj, key) {
  32060. if (!obj) {
  32061. return;
  32062. }
  32063. if (typeof key !== "string" || key === "") {
  32064. return "";
  32065. }
  32066. if (key.indexOf(".") !== -1) {
  32067. const keys = key.split(".");
  32068. let firstObj = obj[keys[0]] || {};
  32069. for (let i = 1; i < keys.length; i++) {
  32070. if (firstObj) {
  32071. firstObj = firstObj[keys[i]];
  32072. }
  32073. }
  32074. return firstObj;
  32075. }
  32076. return obj[key];
  32077. }
  32078. function setProperty(obj, key, value2) {
  32079. if (!obj) {
  32080. return;
  32081. }
  32082. const inFn = function(_obj, keys, v) {
  32083. if (keys.length === 1) {
  32084. _obj[keys[0]] = v;
  32085. return;
  32086. }
  32087. while (keys.length > 1) {
  32088. const k = keys[0];
  32089. if (!_obj[k] || typeof _obj[k] !== "object") {
  32090. _obj[k] = {};
  32091. }
  32092. keys.shift();
  32093. inFn(_obj[k], keys, v);
  32094. }
  32095. };
  32096. if (typeof key !== "string" || key === "")
  32097. ;
  32098. else if (key.indexOf(".") !== -1) {
  32099. const keys = key.split(".");
  32100. inFn(obj, keys, value2);
  32101. } else {
  32102. obj[key] = value2;
  32103. }
  32104. }
  32105. function page() {
  32106. const pages2 = getCurrentPages();
  32107. return `/${pages2[pages2.length - 1].route || ""}`;
  32108. }
  32109. function pages() {
  32110. const pages2 = getCurrentPages();
  32111. return pages2;
  32112. }
  32113. function setConfig({
  32114. props: props2 = {},
  32115. config: config2 = {},
  32116. color: color2 = {},
  32117. zIndex: zIndex2 = {}
  32118. }) {
  32119. const {
  32120. deepMerge: deepMerge2
  32121. } = uni.$u;
  32122. uni.$u.config = deepMerge2(uni.$u.config, config2);
  32123. uni.$u.props = deepMerge2(uni.$u.props, props2);
  32124. uni.$u.color = deepMerge2(uni.$u.color, color2);
  32125. uni.$u.zIndex = deepMerge2(uni.$u.zIndex, zIndex2);
  32126. }
  32127. const index = {
  32128. range,
  32129. getPx,
  32130. sleep,
  32131. os,
  32132. sys,
  32133. random,
  32134. guid,
  32135. $parent,
  32136. addStyle,
  32137. addUnit,
  32138. deepClone,
  32139. deepMerge,
  32140. error,
  32141. randomArray,
  32142. timeFormat,
  32143. timeFrom,
  32144. trim,
  32145. queryParams,
  32146. toast,
  32147. type2icon,
  32148. priceFormat,
  32149. getDuration,
  32150. padZero,
  32151. formValidate,
  32152. getProperty,
  32153. setProperty,
  32154. page,
  32155. pages,
  32156. setConfig
  32157. };
  32158. const zIndex = {
  32159. toast: 10090,
  32160. noNetwork: 10080,
  32161. // popup包含popup,actionsheet,keyboard,picker的值
  32162. popup: 10075,
  32163. mask: 10070,
  32164. navbar: 980,
  32165. topTips: 975,
  32166. sticky: 970,
  32167. indexListSticky: 965
  32168. };
  32169. let platform = "none";
  32170. platform = "vue3";
  32171. platform = "plus";
  32172. const platform$1 = platform;
  32173. const $u = {
  32174. route,
  32175. date: index.timeFormat,
  32176. // 另名date
  32177. colorGradient: colorGradient$1.colorGradient,
  32178. hexToRgb: colorGradient$1.hexToRgb,
  32179. rgbToHex: colorGradient$1.rgbToHex,
  32180. colorToRgba: colorGradient$1.colorToRgba,
  32181. test,
  32182. type: ["primary", "success", "error", "warning", "info"],
  32183. http: new Request(),
  32184. config,
  32185. // uView配置信息相关,比如版本号
  32186. zIndex,
  32187. debounce,
  32188. throttle,
  32189. mixin,
  32190. mpMixin,
  32191. props: props$E,
  32192. ...index,
  32193. color,
  32194. platform: platform$1
  32195. };
  32196. uni.$u = $u;
  32197. const install = (Vue2) => {
  32198. Vue2.config.globalProperties.$u = $u;
  32199. Vue2.config.globalProperties.$nextTick = (cb) => {
  32200. cb();
  32201. };
  32202. Vue2.mixin(mixin);
  32203. };
  32204. const uviewPlus = {
  32205. install
  32206. };
  32207. const share = {
  32208. data() {
  32209. return {
  32210. // 默认的全局分享内容
  32211. share: {
  32212. title: "标题",
  32213. path: "/pages/home/home",
  32214. // 这里是分享的页面
  32215. imageUrl: ""
  32216. // 这里是分析的图片,如果不写则默认截取当前分享页为分享图片
  32217. }
  32218. };
  32219. },
  32220. // 定义全局分享
  32221. // 1.发送给朋友
  32222. onShareAppMessage(res2) {
  32223. return {
  32224. title: this.share.title,
  32225. path: this.share.path,
  32226. imageUrl: this.share.imageUrl
  32227. };
  32228. },
  32229. //2.分享到朋友圈
  32230. onShareTimeline(res2) {
  32231. return {
  32232. title: this.share.title,
  32233. path: this.share.path,
  32234. imageUrl: this.share.imageUrl
  32235. };
  32236. }
  32237. };
  32238. let ttsModule = new VolumeTTS();
  32239. useInit();
  32240. uni.$u.ttsModule = ttsModule;
  32241. uni.$u.useGlobalEvent = useGlobalEvent;
  32242. function createApp() {
  32243. const app = vue.createVueApp(App);
  32244. initRequest();
  32245. const pinia2 = createPinia();
  32246. app.use(pinia2).use(uviewPlus);
  32247. app.mixin(share);
  32248. return {
  32249. app,
  32250. pinia: pinia2
  32251. };
  32252. }
  32253. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  32254. uni.Vuex = __Vuex__;
  32255. uni.Pinia = __Pinia__;
  32256. __app__.provide("__globalStyles", __uniConfig.styles);
  32257. __app__._component.mpType = "app";
  32258. __app__._component.render = () => {
  32259. };
  32260. __app__.mount("#app");
  32261. })(Vue);