app-service.js 1.1 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428
  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. const props$q = {
  9737. props: {
  9738. // 是否展示组件
  9739. show: {
  9740. type: Boolean,
  9741. default: props$E.transition.show
  9742. },
  9743. // 使用的动画模式
  9744. mode: {
  9745. type: String,
  9746. default: props$E.transition.mode
  9747. },
  9748. // 动画的执行时间,单位ms
  9749. duration: {
  9750. type: [String, Number],
  9751. default: props$E.transition.duration
  9752. },
  9753. // 使用的动画过渡函数
  9754. timingFunction: {
  9755. type: String,
  9756. default: props$E.transition.timingFunction
  9757. }
  9758. }
  9759. };
  9760. const getClassNames = (name) => ({
  9761. enter: `u-${name}-enter u-${name}-enter-active`,
  9762. "enter-to": `u-${name}-enter-to u-${name}-enter-active`,
  9763. leave: `u-${name}-leave u-${name}-leave-active`,
  9764. "leave-to": `u-${name}-leave-to u-${name}-leave-active`
  9765. });
  9766. const transition = {
  9767. methods: {
  9768. // 组件被点击发出事件
  9769. clickHandler() {
  9770. this.$emit("click");
  9771. },
  9772. // vue版本的组件进场处理
  9773. vueEnter() {
  9774. const classNames = getClassNames(this.mode);
  9775. this.status = "enter";
  9776. this.$emit("beforeEnter");
  9777. this.inited = true;
  9778. this.display = true;
  9779. this.classes = classNames.enter;
  9780. this.$nextTick(async () => {
  9781. this.$emit("enter");
  9782. this.transitionEnded = false;
  9783. this.$emit("afterEnter");
  9784. this.classes = classNames["enter-to"];
  9785. });
  9786. },
  9787. // 动画离场处理
  9788. vueLeave() {
  9789. if (!this.display)
  9790. return;
  9791. const classNames = getClassNames(this.mode);
  9792. this.status = "leave";
  9793. this.$emit("beforeLeave");
  9794. this.classes = classNames.leave;
  9795. this.$nextTick(() => {
  9796. this.transitionEnded = false;
  9797. this.$emit("leave");
  9798. setTimeout(this.onTransitionEnd, this.duration);
  9799. this.classes = classNames["leave-to"];
  9800. });
  9801. },
  9802. // 完成过渡后触发
  9803. onTransitionEnd() {
  9804. if (this.transitionEnded)
  9805. return;
  9806. this.transitionEnded = true;
  9807. this.$emit(this.status === "leave" ? "afterLeave" : "afterEnter");
  9808. if (!this.show && this.display) {
  9809. this.display = false;
  9810. this.inited = false;
  9811. }
  9812. }
  9813. }
  9814. };
  9815. const _sfc_main$1I = {
  9816. name: "u-transition",
  9817. data() {
  9818. return {
  9819. inited: false,
  9820. // 是否显示/隐藏组件
  9821. viewStyle: {},
  9822. // 组件内部的样式
  9823. status: "",
  9824. // 记录组件动画的状态
  9825. transitionEnded: false,
  9826. // 组件是否结束的标记
  9827. display: false,
  9828. // 组件是否展示
  9829. classes: ""
  9830. // 应用的类名
  9831. };
  9832. },
  9833. computed: {
  9834. mergeStyle() {
  9835. const { viewStyle, customStyle } = this;
  9836. return {
  9837. transitionDuration: `${this.duration}ms`,
  9838. // display: `${this.display ? '' : 'none'}`,
  9839. transitionTimingFunction: this.timingFunction,
  9840. // 避免自定义样式影响到动画属性,所以写在viewStyle前面
  9841. ...uni.$u.addStyle(customStyle),
  9842. ...viewStyle
  9843. };
  9844. }
  9845. },
  9846. // 将mixin挂在到组件中,uni.$u.mixin实际上为一个vue格式对象
  9847. mixins: [mpMixin, mixin, transition, props$q],
  9848. watch: {
  9849. show: {
  9850. handler(newVal) {
  9851. newVal ? this.vueEnter() : this.vueLeave();
  9852. },
  9853. // 表示同时监听初始化时的props的show的意思
  9854. immediate: true
  9855. }
  9856. }
  9857. };
  9858. function _sfc_render$1H(_ctx, _cache, $props, $setup, $data, $options) {
  9859. return $data.inited ? (vue.openBlock(), vue.createElementBlock(
  9860. "view",
  9861. {
  9862. key: 0,
  9863. class: vue.normalizeClass(["u-transition", $data.classes]),
  9864. ref: "u-transition",
  9865. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clickHandler && _ctx.clickHandler(...args)),
  9866. style: vue.normalizeStyle([$options.mergeStyle]),
  9867. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.noop && _ctx.noop(...args))
  9868. },
  9869. [
  9870. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  9871. ],
  9872. 38
  9873. /* CLASS, STYLE, NEED_HYDRATION */
  9874. )) : vue.createCommentVNode("v-if", true);
  9875. }
  9876. const __easycom_1$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1I, [["render", _sfc_render$1H], ["__scopeId", "data-v-5cec8177"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-transition/u-transition.vue"]]);
  9877. const props$p = {
  9878. props: {
  9879. // 是否显示遮罩
  9880. show: {
  9881. type: Boolean,
  9882. default: props$E.overlay.show
  9883. },
  9884. // 层级z-index
  9885. zIndex: {
  9886. type: [String, Number],
  9887. default: props$E.overlay.zIndex
  9888. },
  9889. // 遮罩的过渡时间,单位为ms
  9890. duration: {
  9891. type: [String, Number],
  9892. default: props$E.overlay.duration
  9893. },
  9894. // 不透明度值,当做rgba的第四个参数
  9895. opacity: {
  9896. type: [String, Number],
  9897. default: props$E.overlay.opacity
  9898. }
  9899. }
  9900. };
  9901. const _sfc_main$1H = {
  9902. name: "u-overlay",
  9903. mixins: [mpMixin, mixin, props$p],
  9904. computed: {
  9905. overlayStyle() {
  9906. const style = {
  9907. position: "fixed",
  9908. top: 0,
  9909. left: 0,
  9910. right: 0,
  9911. zIndex: this.zIndex,
  9912. bottom: 0,
  9913. "background-color": `rgba(0, 0, 0, ${this.opacity})`
  9914. };
  9915. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  9916. }
  9917. },
  9918. methods: {
  9919. clickHandler() {
  9920. this.$emit("click");
  9921. }
  9922. }
  9923. };
  9924. function _sfc_render$1G(_ctx, _cache, $props, $setup, $data, $options) {
  9925. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
  9926. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  9927. show: _ctx.show,
  9928. "custom-class": "u-overlay",
  9929. duration: _ctx.duration,
  9930. "custom-style": $options.overlayStyle,
  9931. onClick: $options.clickHandler
  9932. }, {
  9933. default: vue.withCtx(() => [
  9934. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  9935. ]),
  9936. _: 3
  9937. /* FORWARDED */
  9938. }, 8, ["show", "duration", "custom-style", "onClick"]);
  9939. }
  9940. const __easycom_0$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1H, [["render", _sfc_render$1G], ["__scopeId", "data-v-9112bed9"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-overlay/u-overlay.vue"]]);
  9941. const props$o = {
  9942. props: {
  9943. bgColor: {
  9944. type: String,
  9945. default: props$E.statusBar.bgColor
  9946. }
  9947. }
  9948. };
  9949. const _sfc_main$1G = {
  9950. name: "u-status-bar",
  9951. mixins: [mpMixin, mixin, props$o],
  9952. data() {
  9953. return {};
  9954. },
  9955. computed: {
  9956. style() {
  9957. const style = {};
  9958. style.height = uni.$u.addUnit(uni.$u.sys().statusBarHeight, "px");
  9959. style.backgroundColor = this.bgColor;
  9960. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  9961. }
  9962. }
  9963. };
  9964. function _sfc_render$1F(_ctx, _cache, $props, $setup, $data, $options) {
  9965. return vue.openBlock(), vue.createElementBlock(
  9966. "view",
  9967. {
  9968. style: vue.normalizeStyle([$options.style]),
  9969. class: "u-status-bar"
  9970. },
  9971. [
  9972. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  9973. ],
  9974. 4
  9975. /* STYLE */
  9976. );
  9977. }
  9978. const __easycom_0$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["render", _sfc_render$1F], ["__scopeId", "data-v-eb8e0cdd"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-status-bar/u-status-bar.vue"]]);
  9979. const props$n = {
  9980. props: {}
  9981. };
  9982. const _sfc_main$1F = {
  9983. name: "u-safe-bottom",
  9984. mixins: [mpMixin, mixin, props$n],
  9985. data() {
  9986. return {
  9987. safeAreaBottomHeight: 0,
  9988. isNvue: false
  9989. };
  9990. },
  9991. computed: {
  9992. style() {
  9993. const style = {};
  9994. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  9995. }
  9996. },
  9997. mounted() {
  9998. }
  9999. };
  10000. function _sfc_render$1E(_ctx, _cache, $props, $setup, $data, $options) {
  10001. return vue.openBlock(), vue.createElementBlock(
  10002. "view",
  10003. {
  10004. class: vue.normalizeClass(["u-safe-bottom", [!$data.isNvue && "u-safe-area-inset-bottom"]]),
  10005. style: vue.normalizeStyle([$options.style])
  10006. },
  10007. null,
  10008. 6
  10009. /* CLASS, STYLE */
  10010. );
  10011. }
  10012. const __easycom_3$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["render", _sfc_render$1E], ["__scopeId", "data-v-f3d22cfe"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.vue"]]);
  10013. const props$m = {
  10014. props: {
  10015. // 是否展示弹窗
  10016. show: {
  10017. type: Boolean,
  10018. default: props$E.popup.show
  10019. },
  10020. // 是否显示遮罩
  10021. overlay: {
  10022. type: Boolean,
  10023. default: props$E.popup.overlay
  10024. },
  10025. // 弹出的方向,可选值为 top bottom right left center
  10026. mode: {
  10027. type: String,
  10028. default: props$E.popup.mode
  10029. },
  10030. // 动画时长,单位ms
  10031. duration: {
  10032. type: [String, Number],
  10033. default: props$E.popup.duration
  10034. },
  10035. // 是否显示关闭图标
  10036. closeable: {
  10037. type: Boolean,
  10038. default: props$E.popup.closeable
  10039. },
  10040. // 自定义遮罩的样式
  10041. overlayStyle: {
  10042. type: [Object, String],
  10043. default: props$E.popup.overlayStyle
  10044. },
  10045. // 点击遮罩是否关闭弹窗
  10046. closeOnClickOverlay: {
  10047. type: Boolean,
  10048. default: props$E.popup.closeOnClickOverlay
  10049. },
  10050. // 层级
  10051. zIndex: {
  10052. type: [String, Number],
  10053. default: props$E.popup.zIndex
  10054. },
  10055. // 是否为iPhoneX留出底部安全距离
  10056. safeAreaInsetBottom: {
  10057. type: Boolean,
  10058. default: props$E.popup.safeAreaInsetBottom
  10059. },
  10060. // 是否留出顶部安全距离(状态栏高度)
  10061. safeAreaInsetTop: {
  10062. type: Boolean,
  10063. default: props$E.popup.safeAreaInsetTop
  10064. },
  10065. // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角
  10066. closeIconPos: {
  10067. type: String,
  10068. default: props$E.popup.closeIconPos
  10069. },
  10070. // 是否显示圆角
  10071. round: {
  10072. type: [Boolean, String, Number],
  10073. default: props$E.popup.round
  10074. },
  10075. // mode=center,也即中部弹出时,是否使用缩放模式
  10076. zoom: {
  10077. type: Boolean,
  10078. default: props$E.popup.zoom
  10079. },
  10080. // 弹窗背景色,设置为transparent可去除白色背景
  10081. bgColor: {
  10082. type: String,
  10083. default: props$E.popup.bgColor
  10084. },
  10085. // 遮罩的透明度,0-1之间
  10086. overlayOpacity: {
  10087. type: [Number, String],
  10088. default: props$E.popup.overlayOpacity
  10089. }
  10090. }
  10091. };
  10092. const _sfc_main$1E = {
  10093. name: "u-popup",
  10094. mixins: [mpMixin, mixin, props$m],
  10095. data() {
  10096. return {
  10097. overlayDuration: this.duration + 50
  10098. };
  10099. },
  10100. watch: {
  10101. show(newValue, oldValue) {
  10102. }
  10103. },
  10104. computed: {
  10105. transitionStyle() {
  10106. const style = {
  10107. zIndex: this.zIndex,
  10108. position: "fixed",
  10109. display: "flex"
  10110. };
  10111. style[this.mode] = 0;
  10112. if (this.mode === "left") {
  10113. return uni.$u.deepMerge(style, {
  10114. bottom: 0,
  10115. top: 0
  10116. });
  10117. } else if (this.mode === "right") {
  10118. return uni.$u.deepMerge(style, {
  10119. bottom: 0,
  10120. top: 0
  10121. });
  10122. } else if (this.mode === "top") {
  10123. return uni.$u.deepMerge(style, {
  10124. left: 0,
  10125. right: 0
  10126. });
  10127. } else if (this.mode === "bottom") {
  10128. return uni.$u.deepMerge(style, {
  10129. left: 0,
  10130. right: 0
  10131. });
  10132. } else if (this.mode === "center") {
  10133. return uni.$u.deepMerge(style, {
  10134. alignItems: "center",
  10135. "justify-content": "center",
  10136. top: 0,
  10137. left: 0,
  10138. right: 0,
  10139. bottom: 0
  10140. });
  10141. }
  10142. },
  10143. contentStyle() {
  10144. const style = {};
  10145. uni.$u.sys();
  10146. if (this.mode !== "center") {
  10147. style.flex = 1;
  10148. }
  10149. if (this.bgColor) {
  10150. style.backgroundColor = this.bgColor;
  10151. }
  10152. if (this.round) {
  10153. const value2 = uni.$u.addUnit(this.round);
  10154. if (this.mode === "top") {
  10155. style.borderBottomLeftRadius = value2;
  10156. style.borderBottomRightRadius = value2;
  10157. } else if (this.mode === "bottom") {
  10158. style.borderTopLeftRadius = value2;
  10159. style.borderTopRightRadius = value2;
  10160. } else if (this.mode === "center") {
  10161. style.borderRadius = value2;
  10162. }
  10163. }
  10164. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  10165. },
  10166. position() {
  10167. if (this.mode === "center") {
  10168. return this.zoom ? "fade-zoom" : "fade";
  10169. }
  10170. if (this.mode === "left") {
  10171. return "slide-left";
  10172. }
  10173. if (this.mode === "right") {
  10174. return "slide-right";
  10175. }
  10176. if (this.mode === "bottom") {
  10177. return "slide-up";
  10178. }
  10179. if (this.mode === "top") {
  10180. return "slide-down";
  10181. }
  10182. }
  10183. },
  10184. methods: {
  10185. // 点击遮罩
  10186. overlayClick() {
  10187. if (this.closeOnClickOverlay) {
  10188. this.$emit("close");
  10189. }
  10190. },
  10191. close(e) {
  10192. this.$emit("close");
  10193. },
  10194. afterEnter() {
  10195. this.$emit("open");
  10196. },
  10197. clickHandler() {
  10198. if (this.mode === "center") {
  10199. this.overlayClick();
  10200. }
  10201. this.$emit("click");
  10202. }
  10203. }
  10204. };
  10205. function _sfc_render$1D(_ctx, _cache, $props, $setup, $data, $options) {
  10206. const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$9);
  10207. const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$8);
  10208. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  10209. const _component_u_safe_bottom = resolveEasycom(vue.resolveDynamicComponent("u-safe-bottom"), __easycom_3$5);
  10210. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
  10211. return vue.openBlock(), vue.createElementBlock("view", { class: "u-popup" }, [
  10212. _ctx.overlay ? (vue.openBlock(), vue.createBlock(_component_u_overlay, {
  10213. key: 0,
  10214. show: _ctx.show,
  10215. onClick: $options.overlayClick,
  10216. duration: $data.overlayDuration,
  10217. customStyle: _ctx.overlayStyle,
  10218. opacity: _ctx.overlayOpacity
  10219. }, null, 8, ["show", "onClick", "duration", "customStyle", "opacity"])) : vue.createCommentVNode("v-if", true),
  10220. vue.createVNode(_component_u_transition, {
  10221. show: _ctx.show,
  10222. customStyle: $options.transitionStyle,
  10223. mode: $options.position,
  10224. duration: _ctx.duration,
  10225. onAfterEnter: $options.afterEnter,
  10226. onClick: $options.clickHandler
  10227. }, {
  10228. default: vue.withCtx(() => [
  10229. vue.createElementVNode(
  10230. "view",
  10231. {
  10232. class: "u-popup__content",
  10233. style: vue.normalizeStyle([$options.contentStyle]),
  10234. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop"]))
  10235. },
  10236. [
  10237. _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true),
  10238. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  10239. _ctx.closeable ? (vue.openBlock(), vue.createElementBlock(
  10240. "view",
  10241. {
  10242. key: 1,
  10243. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.close && $options.close(...args), ["stop"])),
  10244. class: vue.normalizeClass(["u-popup__content__close", ["u-popup__content__close--" + _ctx.closeIconPos]]),
  10245. "hover-class": "u-popup__content__close--hover",
  10246. "hover-stay-time": "150"
  10247. },
  10248. [
  10249. vue.createVNode(_component_u_icon, {
  10250. name: "close",
  10251. color: "#909399",
  10252. size: "18",
  10253. bold: ""
  10254. })
  10255. ],
  10256. 2
  10257. /* CLASS */
  10258. )) : vue.createCommentVNode("v-if", true),
  10259. _ctx.safeAreaInsetBottom ? (vue.openBlock(), vue.createBlock(_component_u_safe_bottom, { key: 2 })) : vue.createCommentVNode("v-if", true)
  10260. ],
  10261. 4
  10262. /* STYLE */
  10263. )
  10264. ]),
  10265. _: 3
  10266. /* FORWARDED */
  10267. }, 8, ["show", "customStyle", "mode", "duration", "onAfterEnter", "onClick"])
  10268. ]);
  10269. }
  10270. const __easycom_3$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1E, [["render", _sfc_render$1D], ["__scopeId", "data-v-05c24e9b"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-popup/u-popup.vue"]]);
  10271. function pickExclude(obj, keys) {
  10272. if (!["[object Object]", "[object File]"].includes(Object.prototype.toString.call(obj))) {
  10273. return {};
  10274. }
  10275. return Object.keys(obj).reduce((prev, key) => {
  10276. if (!keys.includes(key)) {
  10277. prev[key] = obj[key];
  10278. }
  10279. return prev;
  10280. }, {});
  10281. }
  10282. function formatImage(res2) {
  10283. return res2.tempFiles.map((item) => ({
  10284. ...pickExclude(item, ["path"]),
  10285. type: "image",
  10286. url: item.path,
  10287. thumb: item.path,
  10288. size: item.size
  10289. }));
  10290. }
  10291. function formatVideo(res2) {
  10292. return [
  10293. {
  10294. ...pickExclude(res2, ["tempFilePath", "thumbTempFilePath", "errMsg"]),
  10295. type: "video",
  10296. url: res2.tempFilePath,
  10297. thumb: res2.thumbTempFilePath,
  10298. size: res2.size
  10299. }
  10300. ];
  10301. }
  10302. function chooseFile({
  10303. accept,
  10304. multiple,
  10305. capture,
  10306. compressed,
  10307. maxDuration,
  10308. sizeType,
  10309. camera,
  10310. maxCount
  10311. }) {
  10312. return new Promise((resolve, reject) => {
  10313. switch (accept) {
  10314. case "image":
  10315. uni.chooseImage({
  10316. count: multiple ? Math.min(maxCount, 9) : 1,
  10317. sourceType: capture,
  10318. sizeType,
  10319. success: (res2) => resolve(formatImage(res2)),
  10320. fail: reject
  10321. });
  10322. break;
  10323. case "video":
  10324. uni.chooseVideo({
  10325. sourceType: capture,
  10326. compressed,
  10327. maxDuration,
  10328. camera,
  10329. success: (res2) => resolve(formatVideo(res2)),
  10330. fail: reject
  10331. });
  10332. break;
  10333. }
  10334. });
  10335. }
  10336. const mixinUp = {
  10337. watch: {
  10338. // 监听accept的变化,判断是否符合个平台要求
  10339. // 只有微信小程序才支持选择媒体,文件类型,所以这里做一个判断提示
  10340. accept: {
  10341. immediate: true,
  10342. handler(val) {
  10343. if (val === "all" || val === "media") {
  10344. uni.$u.error("只有微信小程序才支持把accept配置为all、media之一");
  10345. }
  10346. if (val === "file") {
  10347. uni.$u.error("只有微信小程序和H5(HX2.9.9)才支持把accept配置为file");
  10348. }
  10349. }
  10350. }
  10351. }
  10352. };
  10353. const props$l = {
  10354. props: {
  10355. // 接受的文件类型, 可选值为all media image file video
  10356. accept: {
  10357. type: String,
  10358. default: props$E.upload.accept
  10359. },
  10360. // 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头
  10361. capture: {
  10362. type: [String, Array],
  10363. default: props$E.upload.capture
  10364. },
  10365. // 当accept为video时生效,是否压缩视频,默认为true
  10366. compressed: {
  10367. type: Boolean,
  10368. default: props$E.upload.compressed
  10369. },
  10370. // 当accept为video时生效,可选值为back或front
  10371. camera: {
  10372. type: String,
  10373. default: props$E.upload.camera
  10374. },
  10375. // 当accept为video时生效,拍摄视频最长拍摄时间,单位秒
  10376. maxDuration: {
  10377. type: Number,
  10378. default: props$E.upload.maxDuration
  10379. },
  10380. // 上传区域的图标,只能内置图标
  10381. uploadIcon: {
  10382. type: String,
  10383. default: props$E.upload.uploadIcon
  10384. },
  10385. // 上传区域的图标的颜色,默认
  10386. uploadIconColor: {
  10387. type: String,
  10388. default: props$E.upload.uploadIconColor
  10389. },
  10390. // 是否开启文件读取前事件
  10391. useBeforeRead: {
  10392. type: Boolean,
  10393. default: props$E.upload.useBeforeRead
  10394. },
  10395. // 读取后的处理函数
  10396. afterRead: {
  10397. type: Function,
  10398. default: null
  10399. },
  10400. // 读取前的处理函数
  10401. beforeRead: {
  10402. type: Function,
  10403. default: null
  10404. },
  10405. // 是否显示组件自带的图片预览功能
  10406. previewFullImage: {
  10407. type: Boolean,
  10408. default: props$E.upload.previewFullImage
  10409. },
  10410. // 最大上传数量
  10411. maxCount: {
  10412. type: [String, Number],
  10413. default: props$E.upload.maxCount
  10414. },
  10415. // 是否启用
  10416. disabled: {
  10417. type: Boolean,
  10418. default: props$E.upload.disabled
  10419. },
  10420. // 预览上传的图片时的裁剪模式,和image组件mode属性一致
  10421. imageMode: {
  10422. type: String,
  10423. default: props$E.upload.imageMode
  10424. },
  10425. // 标识符,可以在回调函数的第二项参数中获取
  10426. name: {
  10427. type: String,
  10428. default: props$E.upload.name
  10429. },
  10430. // 所选的图片的尺寸, 可选值为original compressed
  10431. sizeType: {
  10432. type: Array,
  10433. default: props$E.upload.sizeType
  10434. },
  10435. // 是否开启图片多选,部分安卓机型不支持
  10436. multiple: {
  10437. type: Boolean,
  10438. default: props$E.upload.multiple
  10439. },
  10440. // 是否展示删除按钮
  10441. deletable: {
  10442. type: Boolean,
  10443. default: props$E.upload.deletable
  10444. },
  10445. // 文件大小限制,单位为byte
  10446. maxSize: {
  10447. type: [String, Number],
  10448. default: props$E.upload.maxSize
  10449. },
  10450. // 显示已上传的文件列表
  10451. fileList: {
  10452. type: Array,
  10453. default: props$E.upload.fileList
  10454. },
  10455. // 上传区域的提示文字
  10456. uploadText: {
  10457. type: String,
  10458. default: props$E.upload.uploadText
  10459. },
  10460. // 内部预览图片区域和选择图片按钮的区域宽度
  10461. width: {
  10462. type: [String, Number],
  10463. default: props$E.upload.width
  10464. },
  10465. // 内部预览图片区域和选择图片按钮的区域高度
  10466. height: {
  10467. type: [String, Number],
  10468. default: props$E.upload.height
  10469. },
  10470. // 是否在上传完成后展示预览图
  10471. previewImage: {
  10472. type: Boolean,
  10473. default: props$E.upload.previewImage
  10474. }
  10475. }
  10476. };
  10477. const _sfc_main$1D = {
  10478. name: "u-upload",
  10479. mixins: [mpMixin, mixin, mixinUp, props$l],
  10480. data() {
  10481. return {
  10482. lists: [],
  10483. isInCount: true
  10484. };
  10485. },
  10486. watch: {
  10487. // 监听文件列表的变化,重新整理内部数据
  10488. fileList: {
  10489. immediate: true,
  10490. handler() {
  10491. this.formatFileList();
  10492. },
  10493. immediate: true,
  10494. deep: true
  10495. }
  10496. },
  10497. emits: ["error", "beforeRead", "oversize", "afterRead", "delete", "clickPreview"],
  10498. methods: {
  10499. formatFileList() {
  10500. const {
  10501. fileList = [],
  10502. maxCount
  10503. } = this;
  10504. const lists = fileList.map(
  10505. (item) => Object.assign(Object.assign({}, item), {
  10506. // 如果item.url为本地选择的blob文件的话,无法判断其为video还是image,此处优先通过accept做判断处理
  10507. isImage: this.accept === "image" || uni.$u.test.image(item.url || item.thumb),
  10508. isVideo: this.accept === "video" || uni.$u.test.video(item.url || item.thumb),
  10509. deletable: typeof item.deletable === "boolean" ? item.deletable : this.deletable
  10510. })
  10511. );
  10512. this.lists = lists;
  10513. this.isInCount = lists.length < maxCount;
  10514. },
  10515. chooseFile() {
  10516. const {
  10517. maxCount,
  10518. multiple,
  10519. lists,
  10520. disabled
  10521. } = this;
  10522. if (disabled)
  10523. return;
  10524. let capture;
  10525. try {
  10526. capture = uni.$u.test.array(this.capture) ? this.capture : this.capture.split(",");
  10527. } catch (e) {
  10528. capture = [];
  10529. }
  10530. chooseFile(
  10531. Object.assign({
  10532. accept: this.accept,
  10533. multiple: this.multiple,
  10534. capture,
  10535. compressed: this.compressed,
  10536. maxDuration: this.maxDuration,
  10537. sizeType: this.sizeType,
  10538. camera: this.camera
  10539. }, {
  10540. maxCount: maxCount - lists.length
  10541. })
  10542. ).then((res2) => {
  10543. this.onBeforeRead(multiple ? res2 : res2[0]);
  10544. }).catch((error2) => {
  10545. this.$emit("error", error2);
  10546. });
  10547. },
  10548. // 文件读取之前
  10549. onBeforeRead(file) {
  10550. const {
  10551. beforeRead,
  10552. useBeforeRead
  10553. } = this;
  10554. let res2 = true;
  10555. if (uni.$u.test.func(beforeRead)) {
  10556. res2 = beforeRead(file, this.getDetail());
  10557. }
  10558. if (useBeforeRead) {
  10559. res2 = new Promise((resolve, reject) => {
  10560. this.$emit(
  10561. "beforeRead",
  10562. Object.assign(Object.assign({
  10563. file
  10564. }, this.getDetail()), {
  10565. callback: (ok) => {
  10566. ok ? resolve() : reject();
  10567. }
  10568. })
  10569. );
  10570. });
  10571. }
  10572. if (!res2) {
  10573. return;
  10574. }
  10575. if (uni.$u.test.promise(res2)) {
  10576. res2.then((data) => this.onAfterRead(data || file));
  10577. } else {
  10578. this.onAfterRead(file);
  10579. }
  10580. },
  10581. getDetail(index2) {
  10582. return {
  10583. name: this.name,
  10584. index: index2 == null ? this.fileList.length : index2
  10585. };
  10586. },
  10587. onAfterRead(file) {
  10588. const {
  10589. maxSize,
  10590. afterRead
  10591. } = this;
  10592. const oversize = Array.isArray(file) ? file.some((item) => item.size > maxSize) : file.size > maxSize;
  10593. if (oversize) {
  10594. this.$emit("oversize", Object.assign({
  10595. file
  10596. }, this.getDetail()));
  10597. return;
  10598. }
  10599. if (typeof afterRead === "function") {
  10600. afterRead(file, this.getDetail());
  10601. }
  10602. this.$emit("afterRead", Object.assign({
  10603. file
  10604. }, this.getDetail()));
  10605. },
  10606. deleteItem(index2) {
  10607. this.$emit(
  10608. "delete",
  10609. Object.assign(Object.assign({}, this.getDetail(index2)), {
  10610. file: this.fileList[index2]
  10611. })
  10612. );
  10613. },
  10614. // 预览图片
  10615. onPreviewImage(item) {
  10616. if (!item.isImage || !this.previewFullImage)
  10617. return;
  10618. uni.previewImage({
  10619. // 先filter找出为图片的item,再返回filter结果中的图片url
  10620. urls: this.lists.filter((item2) => this.accept === "image" || uni.$u.test.image(item2.url || item2.thumb)).map((item2) => item2.url || item2.thumb),
  10621. current: item.url || item.thumb,
  10622. fail() {
  10623. uni.$u.toast("预览图片失败");
  10624. }
  10625. });
  10626. },
  10627. onPreviewVideo(event) {
  10628. if (!this.data.previewFullImage)
  10629. return;
  10630. const {
  10631. index: index2
  10632. } = event.currentTarget.dataset;
  10633. const {
  10634. lists
  10635. } = this.data;
  10636. wx.previewMedia({
  10637. sources: lists.filter((item) => isVideoFile(item)).map(
  10638. (item) => Object.assign(Object.assign({}, item), {
  10639. type: "video"
  10640. })
  10641. ),
  10642. current: index2,
  10643. fail() {
  10644. uni.$u.toast("预览视频失败");
  10645. }
  10646. });
  10647. },
  10648. onClickPreview(event) {
  10649. const {
  10650. index: index2
  10651. } = event.currentTarget.dataset;
  10652. const item = this.data.lists[index2];
  10653. this.$emit(
  10654. "clickPreview",
  10655. Object.assign(Object.assign({}, item), this.getDetail(index2))
  10656. );
  10657. }
  10658. }
  10659. };
  10660. function _sfc_render$1C(_ctx, _cache, $props, $setup, $data, $options) {
  10661. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  10662. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  10663. return vue.openBlock(), vue.createElementBlock(
  10664. "view",
  10665. {
  10666. class: "u-upload",
  10667. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  10668. },
  10669. [
  10670. vue.createElementVNode("view", { class: "u-upload__wrap" }, [
  10671. _ctx.previewImage ? (vue.openBlock(true), vue.createElementBlock(
  10672. vue.Fragment,
  10673. { key: 0 },
  10674. vue.renderList($data.lists, (item, index2) => {
  10675. return vue.openBlock(), vue.createElementBlock("view", {
  10676. class: "u-upload__wrap__preview",
  10677. key: index2
  10678. }, [
  10679. item.isImage || item.type && item.type === "image" ? (vue.openBlock(), vue.createElementBlock("image", {
  10680. key: 0,
  10681. src: item.thumb || item.url,
  10682. mode: _ctx.imageMode,
  10683. class: "u-upload__wrap__preview__image",
  10684. onClick: ($event) => $options.onPreviewImage(item),
  10685. style: vue.normalizeStyle([{
  10686. width: _ctx.$u.addUnit(_ctx.width),
  10687. height: _ctx.$u.addUnit(_ctx.height)
  10688. }])
  10689. }, null, 12, ["src", "mode", "onClick"])) : (vue.openBlock(), vue.createElementBlock("view", {
  10690. key: 1,
  10691. class: "u-upload__wrap__preview__other"
  10692. }, [
  10693. vue.createVNode(_component_u_icon, {
  10694. color: "#80CBF9",
  10695. size: "26",
  10696. name: item.isVideo || item.type && item.type === "video" ? "movie" : "folder"
  10697. }, null, 8, ["name"]),
  10698. vue.createElementVNode(
  10699. "text",
  10700. { class: "u-upload__wrap__preview__other__text" },
  10701. vue.toDisplayString(item.isVideo || item.type && item.type === "video" ? "视频" : "文件"),
  10702. 1
  10703. /* TEXT */
  10704. )
  10705. ])),
  10706. item.status === "uploading" || item.status === "failed" ? (vue.openBlock(), vue.createElementBlock("view", {
  10707. key: 2,
  10708. class: "u-upload__status"
  10709. }, [
  10710. vue.createElementVNode("view", { class: "u-upload__status__icon" }, [
  10711. item.status === "failed" ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  10712. key: 0,
  10713. name: "close-circle",
  10714. color: "#ffffff",
  10715. size: "25"
  10716. })) : (vue.openBlock(), vue.createBlock(_component_u_loading_icon, {
  10717. key: 1,
  10718. size: "22",
  10719. mode: "circle",
  10720. color: "#ffffff"
  10721. }))
  10722. ]),
  10723. item.message ? (vue.openBlock(), vue.createElementBlock(
  10724. "text",
  10725. {
  10726. key: 0,
  10727. class: "u-upload__status__message"
  10728. },
  10729. vue.toDisplayString(item.message),
  10730. 1
  10731. /* TEXT */
  10732. )) : vue.createCommentVNode("v-if", true)
  10733. ])) : vue.createCommentVNode("v-if", true),
  10734. item.status !== "uploading" && (_ctx.deletable || item.deletable) ? (vue.openBlock(), vue.createElementBlock("view", {
  10735. key: 3,
  10736. class: "u-upload__deletable",
  10737. onClick: vue.withModifiers(($event) => $options.deleteItem(index2), ["stop"])
  10738. }, [
  10739. vue.createElementVNode("view", { class: "u-upload__deletable__icon" }, [
  10740. vue.createVNode(_component_u_icon, {
  10741. name: "close",
  10742. color: "#ffffff",
  10743. size: "10"
  10744. })
  10745. ])
  10746. ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  10747. item.status === "success" ? (vue.openBlock(), vue.createElementBlock("view", {
  10748. key: 4,
  10749. class: "u-upload__success"
  10750. }, [
  10751. vue.createElementVNode("view", { class: "u-upload__success__icon" }, [
  10752. vue.createVNode(_component_u_icon, {
  10753. name: "checkmark",
  10754. color: "#ffffff",
  10755. size: "12"
  10756. })
  10757. ])
  10758. ])) : vue.createCommentVNode("v-if", true)
  10759. ]);
  10760. }),
  10761. 128
  10762. /* KEYED_FRAGMENT */
  10763. )) : vue.createCommentVNode("v-if", true),
  10764. $data.isInCount ? (vue.openBlock(), vue.createElementBlock(
  10765. vue.Fragment,
  10766. { key: 1 },
  10767. [
  10768. _ctx.$slots.default || _ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock("view", {
  10769. key: 0,
  10770. onClick: _cache[0] || (_cache[0] = (...args) => $options.chooseFile && $options.chooseFile(...args))
  10771. }, [
  10772. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  10773. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  10774. key: 1,
  10775. class: vue.normalizeClass(["u-upload__button", [_ctx.disabled && "u-upload__button--disabled"]]),
  10776. "hover-class": !_ctx.disabled ? "u-upload__button--hover" : "",
  10777. "hover-stay-time": "150",
  10778. onClick: _cache[1] || (_cache[1] = (...args) => $options.chooseFile && $options.chooseFile(...args)),
  10779. style: vue.normalizeStyle([{
  10780. width: _ctx.$u.addUnit(_ctx.width),
  10781. height: _ctx.$u.addUnit(_ctx.height)
  10782. }])
  10783. }, [
  10784. vue.createVNode(_component_u_icon, {
  10785. name: _ctx.uploadIcon,
  10786. size: "26",
  10787. color: _ctx.uploadIconColor
  10788. }, null, 8, ["name", "color"]),
  10789. _ctx.uploadText ? (vue.openBlock(), vue.createElementBlock(
  10790. "text",
  10791. {
  10792. key: 0,
  10793. class: "u-upload__button__text"
  10794. },
  10795. vue.toDisplayString(_ctx.uploadText),
  10796. 1
  10797. /* TEXT */
  10798. )) : vue.createCommentVNode("v-if", true)
  10799. ], 14, ["hover-class"]))
  10800. ],
  10801. 64
  10802. /* STABLE_FRAGMENT */
  10803. )) : vue.createCommentVNode("v-if", true)
  10804. ])
  10805. ],
  10806. 4
  10807. /* STYLE */
  10808. );
  10809. }
  10810. const __easycom_0$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1D, [["render", _sfc_render$1C], ["__scopeId", "data-v-c8491d64"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-upload/u-upload.vue"]]);
  10811. const baseUrl = "http://bk.shuhi.com";
  10812. function initRequest() {
  10813. formatAppLog("log", "at config/request.js:9", "初始化了 http 请求代码");
  10814. uni.$u.http.setConfig((config2) => {
  10815. config2.baseURL = baseUrl;
  10816. config2.custom.toast = true;
  10817. return config2;
  10818. });
  10819. uni.$u.http.interceptors.request.use((config2) => {
  10820. config2.data = config2.data || {};
  10821. let token = store.token || uni.getStorageSync("token");
  10822. config2.header.Authorization = token ? `Bearer ${token}` : "";
  10823. return config2;
  10824. }, (config2) => {
  10825. return Promise.reject(config2);
  10826. });
  10827. uni.$u.http.interceptors.response.use((response) => {
  10828. var _a;
  10829. const data = response.data;
  10830. const custom = (_a = response.config) == null ? void 0 : _a.custom;
  10831. if (data.code !== 200) {
  10832. if (data.code === 401) {
  10833. uni.$u.toast(data.msg || "身份认证失败,请先登录");
  10834. uni.removeStorageSync("token");
  10835. store.setToken("");
  10836. setTimeout(() => {
  10837. uni.$u.route({
  10838. type: "reLaunch",
  10839. url: "/pages/login/login"
  10840. // 跳转到登录页
  10841. });
  10842. }, 1e3);
  10843. } else {
  10844. if (custom.toast !== false) {
  10845. uni.$u.toast(data.msg);
  10846. }
  10847. return data;
  10848. }
  10849. }
  10850. return data;
  10851. }, (response) => {
  10852. return Promise.reject(response);
  10853. });
  10854. }
  10855. const _sfc_main$1C = {
  10856. __name: "index",
  10857. props: {
  10858. filename: {
  10859. type: [Array, String],
  10860. default: () => []
  10861. },
  10862. url: {
  10863. type: String
  10864. },
  10865. notFile: {
  10866. type: Boolean,
  10867. default: false
  10868. },
  10869. tips: {
  10870. type: String
  10871. },
  10872. disabled: {
  10873. type: Boolean,
  10874. default: false
  10875. },
  10876. isUpdate: {
  10877. type: Boolean,
  10878. default: false
  10879. }
  10880. },
  10881. emits: ["update:filename", "update:keyValue", "success"],
  10882. setup(__props, { expose: __expose, emit: __emit }) {
  10883. __expose();
  10884. const emit2 = __emit;
  10885. const props2 = __props;
  10886. const fileList = vue.ref([]);
  10887. vue.watch(() => props2.filename, (filename) => {
  10888. if (!filename)
  10889. return fileList.value = [];
  10890. if (typeof filename == "string") {
  10891. fileList.value = filename.split(",").map((v) => ({
  10892. url: baseUrl + v
  10893. }));
  10894. } else {
  10895. fileList.value = filename && filename.length > 0 ? filename.map((v) => ({
  10896. url: v.url || v
  10897. })) : [];
  10898. }
  10899. }, {
  10900. immediate: true,
  10901. deep: true
  10902. });
  10903. const afterRead = async (e) => {
  10904. const {
  10905. file
  10906. } = e;
  10907. fileList.value.push({
  10908. ...file,
  10909. status: "uploading",
  10910. message: "上传中..."
  10911. });
  10912. const result = await uploadFilePromise(file.url);
  10913. formatAppLog("log", "at components/cy-upload/index.vue:68", result, "result");
  10914. fileList.value.forEach((v, index2) => {
  10915. if (index2 == fileList.value.length - 1) {
  10916. v.url = result.url;
  10917. v.status = "success";
  10918. v.message = "";
  10919. }
  10920. });
  10921. formatAppLog("log", "at components/cy-upload/index.vue:77", fileList.value, "fileList.value");
  10922. emit2("update:filename", fileList.value.map((v) => v.url));
  10923. emit2("success", result);
  10924. };
  10925. const deletePic = (event) => {
  10926. fileList.value.splice(event.index, 1);
  10927. };
  10928. const uploadFilePromise = (url2, baseStr = "/app/common/upload") => {
  10929. let token = uni.getStorageSync("token");
  10930. return new Promise((resolve, reject) => {
  10931. uni.uploadFile({
  10932. url: baseUrl + baseStr,
  10933. // 图片上传地址
  10934. filePath: url2,
  10935. name: "file",
  10936. header: {
  10937. "Authorization": token
  10938. },
  10939. success: (res2) => {
  10940. let respic = JSON.parse(res2.data);
  10941. resolve(respic);
  10942. }
  10943. });
  10944. });
  10945. };
  10946. const __returned__ = { emit: emit2, props: props2, fileList, afterRead, deletePic, uploadFilePromise, watch: vue.watch, ref: vue.ref, get baseUrl() {
  10947. return baseUrl;
  10948. } };
  10949. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  10950. return __returned__;
  10951. }
  10952. };
  10953. function _sfc_render$1B(_ctx, _cache, $props, $setup, $data, $options) {
  10954. const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_0$7);
  10955. return vue.openBlock(), vue.createElementBlock(
  10956. vue.Fragment,
  10957. null,
  10958. [
  10959. vue.createVNode(_component_u_upload, vue.mergeProps(_ctx.$attrs, {
  10960. fileList: $setup.fileList,
  10961. onAfterRead: $setup.afterRead,
  10962. onDelete: $setup.deletePic,
  10963. notFile: $props.notFile,
  10964. disabled: $props.disabled
  10965. }), null, 16, ["fileList", "notFile", "disabled"]),
  10966. $props.tips ? (vue.openBlock(), vue.createElementBlock(
  10967. "view",
  10968. {
  10969. key: 0,
  10970. class: "tips"
  10971. },
  10972. vue.toDisplayString($props.tips),
  10973. 1
  10974. /* TEXT */
  10975. )) : vue.createCommentVNode("v-if", true)
  10976. ],
  10977. 64
  10978. /* STABLE_FRAGMENT */
  10979. );
  10980. }
  10981. const cyUpload = /* @__PURE__ */ _export_sfc(_sfc_main$1C, [["render", _sfc_render$1B], ["__scopeId", "data-v-5002576b"], ["__file", "E:/书嗨项目/shuhi-app-fornt/components/cy-upload/index.vue"]]);
  10982. const _sfc_main$1B = {
  10983. __name: "feedbackPopup",
  10984. emits: ["submit"],
  10985. setup(__props, { expose: __expose, emit: __emit }) {
  10986. const show = vue.ref(false);
  10987. const emit2 = __emit;
  10988. const formRef = vue.ref(null);
  10989. const submitting = vue.ref(false);
  10990. const formData = vue.reactive({
  10991. feedbackContent: "",
  10992. imgUrl: [],
  10993. isbn: ""
  10994. });
  10995. const rules2 = {
  10996. feedbackContent: [
  10997. {
  10998. required: true,
  10999. message: "请输入反馈信息",
  11000. trigger: ["blur", "change"]
  11001. }
  11002. ]
  11003. };
  11004. function open2(data) {
  11005. show.value = true;
  11006. formData.isbn = data.isbn;
  11007. }
  11008. function handleCancel() {
  11009. resetForm();
  11010. show.value = false;
  11011. }
  11012. async function handleConfirm() {
  11013. var _a;
  11014. (_a = formRef.value) == null ? void 0 : _a.validate().then((res2) => {
  11015. submitting.value = true;
  11016. let data = JSON.parse(JSON.stringify(formData));
  11017. data.imgUrl = data.imgUrl.join(",");
  11018. uni.$u.http.post("/app/feedback/add", data).then((res3) => {
  11019. if (res3.code == 200) {
  11020. uni.showToast({
  11021. title: "反馈已提交",
  11022. icon: "success"
  11023. });
  11024. emit2("submit", formData);
  11025. show.value = false;
  11026. } else {
  11027. uni.$u.toast(res3.msg);
  11028. }
  11029. }).finally(() => {
  11030. submitting.value = false;
  11031. });
  11032. });
  11033. }
  11034. function resetForm() {
  11035. var _a;
  11036. formData.feedbackContent = "";
  11037. formData.imgUrl = "";
  11038. (_a = formRef.value) == null ? void 0 : _a.resetFields();
  11039. }
  11040. __expose({
  11041. open: open2
  11042. });
  11043. const __returned__ = { show, emit: emit2, formRef, submitting, formData, rules: rules2, open: open2, handleCancel, handleConfirm, resetForm, cyUpload, ref: vue.ref, reactive: vue.reactive };
  11044. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11045. return __returned__;
  11046. }
  11047. };
  11048. function _sfc_render$1A(_ctx, _cache, $props, $setup, $data, $options) {
  11049. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  11050. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$a);
  11051. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  11052. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$7);
  11053. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  11054. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_3$4);
  11055. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  11056. mode: "center",
  11057. show: $setup.show,
  11058. onClose: $setup.handleCancel,
  11059. closeOnClickOverlay: false
  11060. }, {
  11061. default: vue.withCtx(() => [
  11062. vue.createElementVNode("view", { class: "popup-container" }, [
  11063. vue.createVNode(_component_u_form, {
  11064. ref: "formRef",
  11065. model: $setup.formData,
  11066. rules: $setup.rules,
  11067. labelPosition: "top",
  11068. labelWidth: "100%",
  11069. "error-type": "toast"
  11070. }, {
  11071. default: vue.withCtx(() => [
  11072. vue.createCommentVNode(" 反馈信息 "),
  11073. vue.createVNode(_component_u_form_item, {
  11074. label: "反馈图书信息",
  11075. prop: "feedbackContent",
  11076. borderBottom: true
  11077. }, {
  11078. default: vue.withCtx(() => [
  11079. vue.createVNode(_component_u_input, {
  11080. modelValue: $setup.formData.feedbackContent,
  11081. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.feedbackContent = $event),
  11082. type: "textarea",
  11083. placeholder: "请输入反馈信息",
  11084. height: "100"
  11085. }, null, 8, ["modelValue"])
  11086. ]),
  11087. _: 1
  11088. /* STABLE */
  11089. }),
  11090. vue.createCommentVNode(" 图片上传 "),
  11091. vue.createVNode(_component_u_form_item, {
  11092. label: "上传照片",
  11093. prop: "imgUrl",
  11094. borderBottom: false
  11095. }, {
  11096. default: vue.withCtx(() => [
  11097. vue.createVNode($setup["cyUpload"], {
  11098. filename: $setup.formData.imgUrl,
  11099. "onUpdate:filename": _cache[1] || (_cache[1] = ($event) => $setup.formData.imgUrl = $event),
  11100. multiple: "",
  11101. maxCount: 4
  11102. }, {
  11103. default: vue.withCtx(() => [
  11104. vue.createElementVNode("view", { class: "upload-slot" }, [
  11105. vue.createVNode(_component_u_icon, {
  11106. name: "plus",
  11107. size: "30"
  11108. }),
  11109. vue.createElementVNode("text", { class: "upload-text" }, "上传照片")
  11110. ])
  11111. ]),
  11112. _: 1
  11113. /* STABLE */
  11114. }, 8, ["filename"])
  11115. ]),
  11116. _: 1
  11117. /* STABLE */
  11118. })
  11119. ]),
  11120. _: 1
  11121. /* STABLE */
  11122. }, 8, ["model"]),
  11123. vue.createCommentVNode(" 按钮组 "),
  11124. vue.createElementVNode("view", { class: "button-group" }, [
  11125. vue.createVNode(_component_u_button, {
  11126. type: "info",
  11127. text: "取消",
  11128. plain: true,
  11129. onClick: $setup.handleCancel,
  11130. disabled: $setup.submitting
  11131. }, null, 8, ["disabled"]),
  11132. vue.createVNode(_component_u_button, {
  11133. type: "primary",
  11134. text: "确认",
  11135. onClick: $setup.handleConfirm,
  11136. loading: $setup.submitting
  11137. }, null, 8, ["loading"])
  11138. ])
  11139. ])
  11140. ]),
  11141. _: 1
  11142. /* STABLE */
  11143. }, 8, ["show"]);
  11144. }
  11145. const FeedbackPopup = /* @__PURE__ */ _export_sfc(_sfc_main$1B, [["render", _sfc_render$1A], ["__scopeId", "data-v-0265fb8a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/book/components/feedbackPopup.vue"]]);
  11146. const _sfc_main$1A = {
  11147. __name: "index",
  11148. setup(__props, { expose: __expose }) {
  11149. __expose();
  11150. const showFeedback = vue.ref(null);
  11151. function handleFeedbackSubmit(data) {
  11152. formatAppLog("log", "at pages/book/index.vue:47", "反馈数据:", data);
  11153. }
  11154. const searchText = vue.ref("");
  11155. const bookList = vue.ref([]);
  11156. async function handleSearch() {
  11157. if (!searchText.value) {
  11158. uni.showToast({
  11159. title: "请输入ISBN",
  11160. icon: "none"
  11161. });
  11162. return;
  11163. }
  11164. await getSimpleBookInfoByIsbn(searchText.value);
  11165. }
  11166. async function getSimpleBookInfoByIsbn(isbn) {
  11167. uni.$u.http.get(`/app/book/getSimpleBookInfoByIsbn/${isbn}`).then((res2) => {
  11168. if (res2.code == 200) {
  11169. let bool = bookList.value.some((v) => v.isbn == isbn);
  11170. if (!bool) {
  11171. bookList.value.push(res2.data);
  11172. }
  11173. } else {
  11174. uni.$u.toast(res2.msg);
  11175. }
  11176. });
  11177. }
  11178. function scanCode() {
  11179. uni.scanCode({
  11180. scanType: ["barCode"],
  11181. success: (res2) => {
  11182. searchText.value = res2.result;
  11183. getSimpleBookInfoByIsbn(res2.result);
  11184. },
  11185. fail: () => {
  11186. uni.showToast({
  11187. title: "扫码失败",
  11188. icon: "none"
  11189. });
  11190. }
  11191. });
  11192. }
  11193. function editBook(book) {
  11194. var _a;
  11195. (_a = showFeedback.value) == null ? void 0 : _a.open(book);
  11196. }
  11197. onLoad(() => {
  11198. uni.$u.useGlobalEvent((e) => {
  11199. if (!e.barcode)
  11200. return;
  11201. getSimpleBookInfoByIsbn(e.barcode);
  11202. });
  11203. });
  11204. const __returned__ = { showFeedback, handleFeedbackSubmit, searchText, bookList, handleSearch, getSimpleBookInfoByIsbn, scanCode, editBook, ref: vue.ref, computed: vue.computed, get onLoad() {
  11205. return onLoad;
  11206. }, FeedbackPopup };
  11207. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11208. return __returned__;
  11209. }
  11210. };
  11211. function _sfc_render$1z(_ctx, _cache, $props, $setup, $data, $options) {
  11212. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  11213. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  11214. return vue.openBlock(), vue.createElementBlock("view", {
  11215. class: "book-list",
  11216. style: { "padding": "0" }
  11217. }, [
  11218. vue.createCommentVNode(" 搜索框 "),
  11219. vue.createElementVNode("view", { class: "search-header" }, [
  11220. vue.createElementVNode("view", { class: "search-box" }, [
  11221. vue.createVNode(_component_u_icon, {
  11222. style: { "margin-right": "16rpx" },
  11223. name: "scan",
  11224. size: "30",
  11225. color: "#ffffff",
  11226. onClick: $setup.scanCode
  11227. }),
  11228. vue.createVNode(_component_u_search, {
  11229. height: "80rpx",
  11230. modelValue: $setup.searchText,
  11231. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  11232. placeholder: "请输入ISBN",
  11233. showAction: false,
  11234. clearabled: true,
  11235. onSearch: $setup.handleSearch,
  11236. bgColor: "#ffffff"
  11237. }, null, 8, ["modelValue"])
  11238. ])
  11239. ]),
  11240. vue.createCommentVNode(" 搜索结果列表 "),
  11241. $setup.bookList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11242. key: 0,
  11243. class: "book-list"
  11244. }, [
  11245. (vue.openBlock(true), vue.createElementBlock(
  11246. vue.Fragment,
  11247. null,
  11248. vue.renderList($setup.bookList, (book, index2) => {
  11249. return vue.openBlock(), vue.createElementBlock("view", {
  11250. class: "book-item",
  11251. key: index2
  11252. }, [
  11253. vue.createElementVNode("view", { class: "book-info" }, [
  11254. vue.createElementVNode("image", {
  11255. class: "book-image",
  11256. src: book.cover,
  11257. mode: "aspectFill"
  11258. }, null, 8, ["src"]),
  11259. vue.createElementVNode("view", { class: "book-details" }, [
  11260. vue.createElementVNode(
  11261. "text",
  11262. { class: "book-title" },
  11263. vue.toDisplayString(book.bookName),
  11264. 1
  11265. /* TEXT */
  11266. ),
  11267. vue.createElementVNode(
  11268. "text",
  11269. { class: "book-isbn" },
  11270. "ISBN: " + vue.toDisplayString(book.isbn),
  11271. 1
  11272. /* TEXT */
  11273. ),
  11274. vue.createElementVNode(
  11275. "text",
  11276. { class: "book-price" },
  11277. "定价: " + vue.toDisplayString(book.price),
  11278. 1
  11279. /* TEXT */
  11280. ),
  11281. vue.createElementVNode(
  11282. "text",
  11283. { class: "book-set" },
  11284. "套装: " + vue.toDisplayString(book.suit == 1 ? "是" : "否"),
  11285. 1
  11286. /* TEXT */
  11287. )
  11288. ])
  11289. ]),
  11290. vue.createElementVNode("view", { class: "book-action" }, [
  11291. vue.createVNode(_component_u_icon, {
  11292. name: "edit-pen",
  11293. size: "30",
  11294. color: "#4cd964",
  11295. onClick: ($event) => $setup.editBook(book)
  11296. }, null, 8, ["onClick"])
  11297. ])
  11298. ]);
  11299. }),
  11300. 128
  11301. /* KEYED_FRAGMENT */
  11302. ))
  11303. ])) : vue.createCommentVNode("v-if", true),
  11304. vue.createVNode(
  11305. $setup["FeedbackPopup"],
  11306. {
  11307. ref: "showFeedback",
  11308. onSubmit: $setup.handleFeedbackSubmit
  11309. },
  11310. null,
  11311. 512
  11312. /* NEED_PATCH */
  11313. )
  11314. ]);
  11315. }
  11316. const PagesBookIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1A, [["render", _sfc_render$1z], ["__scopeId", "data-v-0452ab4c"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/book/index.vue"]]);
  11317. const props$k = {
  11318. props: {
  11319. // 标签类型info、primary、success、warning、error
  11320. type: {
  11321. type: String,
  11322. default: props$E.tag.type
  11323. },
  11324. // 不可用
  11325. disabled: {
  11326. type: [Boolean, String],
  11327. default: props$E.tag.disabled
  11328. },
  11329. // 标签的大小,large,medium,mini
  11330. size: {
  11331. type: String,
  11332. default: props$E.tag.size
  11333. },
  11334. // tag的形状,circle(两边半圆形), square(方形,带圆角)
  11335. shape: {
  11336. type: String,
  11337. default: props$E.tag.shape
  11338. },
  11339. // 标签文字
  11340. text: {
  11341. type: [String, Number],
  11342. default: props$E.tag.text
  11343. },
  11344. // 背景颜色,默认为空字符串,即不处理
  11345. bgColor: {
  11346. type: String,
  11347. default: props$E.tag.bgColor
  11348. },
  11349. // 标签字体颜色,默认为空字符串,即不处理
  11350. color: {
  11351. type: String,
  11352. default: props$E.tag.color
  11353. },
  11354. // 标签的边框颜色
  11355. borderColor: {
  11356. type: String,
  11357. default: props$E.tag.borderColor
  11358. },
  11359. // 关闭按钮图标的颜色
  11360. closeColor: {
  11361. type: String,
  11362. default: props$E.tag.closeColor
  11363. },
  11364. // 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了
  11365. name: {
  11366. type: [String, Number],
  11367. default: props$E.tag.name
  11368. },
  11369. // // 模式选择,dark|light|plain
  11370. // mode: {
  11371. // type: String,
  11372. // default: 'light'
  11373. // },
  11374. // 镂空时是否填充背景色
  11375. plainFill: {
  11376. type: Boolean,
  11377. default: props$E.tag.plainFill
  11378. },
  11379. // 是否镂空
  11380. plain: {
  11381. type: Boolean,
  11382. default: props$E.tag.plain
  11383. },
  11384. // 是否可关闭
  11385. closable: {
  11386. type: Boolean,
  11387. default: props$E.tag.closable
  11388. },
  11389. // 是否显示
  11390. show: {
  11391. type: Boolean,
  11392. default: props$E.tag.show
  11393. },
  11394. // 内置图标,或绝对路径的图片
  11395. icon: {
  11396. type: String,
  11397. default: props$E.tag.icon
  11398. }
  11399. }
  11400. };
  11401. const _sfc_main$1z = {
  11402. name: "u-tag",
  11403. mixins: [mpMixin, mixin, props$k],
  11404. data() {
  11405. return {};
  11406. },
  11407. computed: {
  11408. style() {
  11409. const style = {};
  11410. if (this.bgColor) {
  11411. style.backgroundColor = this.bgColor;
  11412. }
  11413. if (this.color) {
  11414. style.color = this.color;
  11415. }
  11416. if (this.borderColor) {
  11417. style.borderColor = this.borderColor;
  11418. }
  11419. return style;
  11420. },
  11421. // nvue下,文本颜色无法继承父元素
  11422. textColor() {
  11423. const style = {};
  11424. if (this.color) {
  11425. style.color = this.color;
  11426. }
  11427. return style;
  11428. },
  11429. imgStyle() {
  11430. const width = this.size === "large" ? "17px" : this.size === "medium" ? "15px" : "13px";
  11431. return {
  11432. width,
  11433. height: width
  11434. };
  11435. },
  11436. // 文本的样式
  11437. closeSize() {
  11438. const size = this.size === "large" ? 15 : this.size === "medium" ? 13 : 12;
  11439. return size;
  11440. },
  11441. // 图标大小
  11442. iconSize() {
  11443. const size = this.size === "large" ? 21 : this.size === "medium" ? 19 : 16;
  11444. return size;
  11445. },
  11446. // 图标颜色
  11447. elIconColor() {
  11448. return this.iconColor ? this.iconColor : this.plain ? this.type : "#ffffff";
  11449. }
  11450. },
  11451. methods: {
  11452. // 点击关闭按钮
  11453. closeHandler() {
  11454. this.$emit("close", this.name);
  11455. },
  11456. // 点击标签
  11457. clickHandler() {
  11458. this.$emit("click", this.name);
  11459. }
  11460. }
  11461. };
  11462. function _sfc_render$1y(_ctx, _cache, $props, $setup, $data, $options) {
  11463. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  11464. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
  11465. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  11466. mode: "fade",
  11467. show: _ctx.show,
  11468. style: { "display": "inline-flex" }
  11469. }, {
  11470. default: vue.withCtx(() => [
  11471. vue.createElementVNode("view", { class: "u-tag-wrapper" }, [
  11472. vue.createElementVNode(
  11473. "view",
  11474. {
  11475. 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`]]),
  11476. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
  11477. style: vue.normalizeStyle([{
  11478. marginRight: _ctx.closable ? "10px" : 0,
  11479. marginTop: _ctx.closable ? "10px" : 0
  11480. }, $options.style])
  11481. },
  11482. [
  11483. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  11484. _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", {
  11485. key: 0,
  11486. class: "u-tag__icon"
  11487. }, [
  11488. _ctx.$u.test.image(_ctx.icon) ? (vue.openBlock(), vue.createElementBlock("image", {
  11489. key: 0,
  11490. src: _ctx.icon,
  11491. style: vue.normalizeStyle([$options.imgStyle])
  11492. }, null, 12, ["src"])) : (vue.openBlock(), vue.createBlock(_component_u_icon, {
  11493. key: 1,
  11494. color: $options.elIconColor,
  11495. name: _ctx.icon,
  11496. size: $options.iconSize
  11497. }, null, 8, ["color", "name", "size"]))
  11498. ])) : vue.createCommentVNode("v-if", true)
  11499. ], true),
  11500. vue.createElementVNode(
  11501. "text",
  11502. {
  11503. class: vue.normalizeClass(["u-tag__text", [`u-tag__text--${_ctx.type}`, _ctx.plain && `u-tag__text--${_ctx.type}--plain`, `u-tag__text--${_ctx.size}`]]),
  11504. style: vue.normalizeStyle([$options.textColor])
  11505. },
  11506. vue.toDisplayString(_ctx.text),
  11507. 7
  11508. /* TEXT, CLASS, STYLE */
  11509. )
  11510. ],
  11511. 6
  11512. /* CLASS, STYLE */
  11513. ),
  11514. _ctx.closable ? (vue.openBlock(), vue.createElementBlock(
  11515. "view",
  11516. {
  11517. key: 0,
  11518. class: vue.normalizeClass(["u-tag__close", [`u-tag__close--${_ctx.size}`]]),
  11519. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"])),
  11520. style: vue.normalizeStyle({ backgroundColor: _ctx.closeColor })
  11521. },
  11522. [
  11523. vue.createVNode(_component_u_icon, {
  11524. name: "close",
  11525. size: $options.closeSize,
  11526. color: "#ffffff"
  11527. }, null, 8, ["size"])
  11528. ],
  11529. 6
  11530. /* CLASS, STYLE */
  11531. )) : vue.createCommentVNode("v-if", true)
  11532. ])
  11533. ]),
  11534. _: 3
  11535. /* FORWARDED */
  11536. }, 8, ["show"]);
  11537. }
  11538. const __easycom_2$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["render", _sfc_render$1y], ["__scopeId", "data-v-2fd891bb"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-tag/u-tag.vue"]]);
  11539. const _sfc_main$1y = {
  11540. __name: "WarehouseSelector",
  11541. props: {
  11542. show: {
  11543. type: Boolean,
  11544. default: false
  11545. }
  11546. },
  11547. emits: ["update:show", "warehouse-selected"],
  11548. setup(__props, { expose: __expose, emit: __emit }) {
  11549. __expose();
  11550. const props2 = __props;
  11551. const emit2 = __emit;
  11552. const searchKeyword = vue.ref("");
  11553. const searchResults = vue.ref([]);
  11554. const historyWarehouses = vue.ref([""]);
  11555. const selectedWarehouse = vue.ref("");
  11556. const warehouseSearch = (name) => {
  11557. formatAppLog("log", "at pages/index/express/components/WarehouseSelector.vue:68", name);
  11558. uni.$u.http.post("/app/appUser/searchGodown?name=" + name).then((res2) => {
  11559. if (res2.code == 200) {
  11560. searchResults.value = res2.data;
  11561. }
  11562. });
  11563. };
  11564. const getUserBindHistory = () => {
  11565. uni.$u.http.get("/app/appUser/getUserBindGodownReocrd").then((res2) => {
  11566. if (res2.code == 200) {
  11567. historyWarehouses.value = res2.data;
  11568. }
  11569. });
  11570. };
  11571. getUserBindHistory();
  11572. const handleSearch = () => {
  11573. warehouseSearch(searchKeyword.value);
  11574. };
  11575. const selectItem = vue.ref({});
  11576. const selectWarehouse = (item) => {
  11577. selectedWarehouse.value = item.godownName;
  11578. selectItem.value = item;
  11579. };
  11580. const handleClose = () => {
  11581. emit2("update:show", false);
  11582. searchKeyword.value = "";
  11583. };
  11584. const handleConfirm = () => {
  11585. if (selectedWarehouse.value) {
  11586. emit2("warehouse-selected", selectItem.value);
  11587. handleClose();
  11588. }
  11589. };
  11590. const __returned__ = { props: props2, emit: emit2, searchKeyword, searchResults, historyWarehouses, selectedWarehouse, warehouseSearch, getUserBindHistory, handleSearch, selectItem, selectWarehouse, handleClose, handleConfirm, ref: vue.ref };
  11591. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11592. return __returned__;
  11593. }
  11594. };
  11595. function _sfc_render$1x(_ctx, _cache, $props, $setup, $data, $options) {
  11596. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  11597. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$4);
  11598. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  11599. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_3$4);
  11600. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  11601. show: $props.show,
  11602. onClose: $setup.handleClose,
  11603. mode: "bottom",
  11604. round: "10"
  11605. }, {
  11606. default: vue.withCtx(() => [
  11607. vue.createElementVNode("view", { class: "warehouse-selector" }, [
  11608. vue.createElementVNode("view", { style: { "flex": "1" } }, [
  11609. vue.createCommentVNode(" 标题 "),
  11610. vue.createElementVNode("view", { class: "header" }, [
  11611. vue.createElementVNode("text", { class: "title" }, "绑定仓库")
  11612. ]),
  11613. vue.createCommentVNode(" 搜索框 "),
  11614. vue.createElementVNode("view", { class: "search-box" }, [
  11615. vue.createVNode(_component_u_search, {
  11616. inputStyle: { "height": "80rpx", "font-size": "16px" },
  11617. actionStyle: { "font-size": "16px", color: "#22ac38" },
  11618. modelValue: $setup.searchKeyword,
  11619. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchKeyword = $event),
  11620. placeholder: "搜索仓库",
  11621. "show-action": true,
  11622. "action-text": "搜索",
  11623. onSearch: $setup.handleSearch,
  11624. onCustom: $setup.handleSearch
  11625. }, null, 8, ["modelValue"])
  11626. ]),
  11627. vue.createCommentVNode(" 搜索结果 "),
  11628. $setup.searchResults.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11629. key: 0,
  11630. class: "search-result"
  11631. }, [
  11632. vue.createElementVNode("text", { class: "section-title" }, "搜索结果"),
  11633. vue.createElementVNode("view", { class: "tag-group" }, [
  11634. (vue.openBlock(true), vue.createElementBlock(
  11635. vue.Fragment,
  11636. null,
  11637. vue.renderList($setup.searchResults, (item) => {
  11638. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  11639. key: item,
  11640. text: item.godownName,
  11641. plain: $setup.selectedWarehouse !== item.godownName,
  11642. shape: "circle",
  11643. onClick: ($event) => $setup.selectWarehouse(item),
  11644. size: "large"
  11645. }, null, 8, ["text", "plain", "onClick"]);
  11646. }),
  11647. 128
  11648. /* KEYED_FRAGMENT */
  11649. ))
  11650. ])
  11651. ])) : vue.createCommentVNode("v-if", true),
  11652. vue.createCommentVNode(" 历史绑定 "),
  11653. $setup.historyWarehouses.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11654. key: 1,
  11655. class: "history-section"
  11656. }, [
  11657. vue.createElementVNode("text", { class: "section-title" }, "历史绑定"),
  11658. vue.createElementVNode("view", { class: "tag-group" }, [
  11659. (vue.openBlock(true), vue.createElementBlock(
  11660. vue.Fragment,
  11661. null,
  11662. vue.renderList($setup.historyWarehouses, (item) => {
  11663. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  11664. key: item,
  11665. text: item,
  11666. plain: $setup.selectedWarehouse !== item.godownName,
  11667. shape: "circle",
  11668. onClick: ($event) => $setup.selectWarehouse(item),
  11669. size: "large"
  11670. }, null, 8, ["text", "plain", "onClick"]);
  11671. }),
  11672. 128
  11673. /* KEYED_FRAGMENT */
  11674. ))
  11675. ])
  11676. ])) : vue.createCommentVNode("v-if", true)
  11677. ]),
  11678. vue.createCommentVNode(" 底部按钮 "),
  11679. vue.createElementVNode("view", { class: "footer" }, [
  11680. vue.createVNode(_component_u_button, {
  11681. onClick: $setup.handleClose,
  11682. text: "取消",
  11683. plain: "",
  11684. shape: "circle"
  11685. }),
  11686. vue.createVNode(_component_u_button, {
  11687. type: "primary",
  11688. onClick: $setup.handleConfirm,
  11689. text: "确定",
  11690. shape: "circle"
  11691. })
  11692. ])
  11693. ])
  11694. ]),
  11695. _: 1
  11696. /* STABLE */
  11697. }, 8, ["show"]);
  11698. }
  11699. const WarehouseSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["render", _sfc_render$1x], ["__scopeId", "data-v-b9bd3f04"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/WarehouseSelector.vue"]]);
  11700. const placeholderStyle$2 = "font-size:32rpx";
  11701. const _sfc_main$1x = {
  11702. __name: "transfer-sign",
  11703. setup(__props, { expose: __expose }) {
  11704. __expose();
  11705. const customStyle = vue.reactive({
  11706. height: "90rpx"
  11707. });
  11708. const selectedWarehouse = vue.ref("");
  11709. const form = vue.ref({
  11710. "packageCode": "",
  11711. "godownId": ""
  11712. });
  11713. const showSelector = vue.ref(false);
  11714. function openWarehouseSelector() {
  11715. showSelector.value = true;
  11716. }
  11717. function handleWarehouseSelected(item) {
  11718. selectedWarehouse.value = item.godownName;
  11719. form.value.godownId = item.id;
  11720. }
  11721. function scanCode() {
  11722. uni.scanCode({
  11723. success: (res2) => {
  11724. form.value.packageCode = res2.result;
  11725. handleBarcode(res2.result);
  11726. },
  11727. fail: (err) => {
  11728. uni.$u.toast("扫码失败");
  11729. }
  11730. });
  11731. }
  11732. function handleBarcode(code2) {
  11733. if (!code2)
  11734. return uni.$u.toast("请输入物流单号");
  11735. uni.$u.http.post("/app/ordersign/transferSign", form.value).then((res2) => {
  11736. if (res2.code == 200) {
  11737. let text = code2 + "签收成功";
  11738. uni.$u.ttsModule.speak(text);
  11739. } else {
  11740. let text = code2 + "订单不存在";
  11741. uni.$u.ttsModule.speak(text);
  11742. }
  11743. });
  11744. }
  11745. function getUserBindWarehouse() {
  11746. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
  11747. var _a, _b;
  11748. if (res2.code == 200) {
  11749. selectedWarehouse.value = (_a = res2.data) == null ? void 0 : _a.godownName;
  11750. form.value.godownId = (_b = res2.data) == null ? void 0 : _b.id;
  11751. }
  11752. });
  11753. }
  11754. onLoad(() => {
  11755. getUserBindWarehouse();
  11756. uni.$u.useGlobalEvent((e) => {
  11757. form.value.packageCode = e.barcode;
  11758. handleBarcode(e.barcode);
  11759. });
  11760. });
  11761. const __returned__ = { placeholderStyle: placeholderStyle$2, customStyle, selectedWarehouse, form, showSelector, openWarehouseSelector, handleWarehouseSelected, scanCode, handleBarcode, getUserBindWarehouse, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  11762. return onLoad;
  11763. }, WarehouseSelector };
  11764. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11765. return __returned__;
  11766. }
  11767. };
  11768. function _sfc_render$1w(_ctx, _cache, $props, $setup, $data, $options) {
  11769. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  11770. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  11771. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11772. vue.createElementVNode("view", { class: "main-content" }, [
  11773. vue.createElementVNode("view", { class: "input-group" }, [
  11774. vue.createVNode(_component_u_input, {
  11775. customStyle: $setup.customStyle,
  11776. "placeholder-style": $setup.placeholderStyle,
  11777. modelValue: $setup.selectedWarehouse,
  11778. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedWarehouse = $event),
  11779. placeholder: "请选择仓库",
  11780. readonly: "",
  11781. border: "surround"
  11782. }, null, 8, ["customStyle", "modelValue"]),
  11783. vue.createVNode(_component_u_button, {
  11784. customStyle: $setup.customStyle,
  11785. type: "info",
  11786. color: "#a4adb3",
  11787. onClick: $setup.openWarehouseSelector,
  11788. text: "选择"
  11789. }, null, 8, ["customStyle"])
  11790. ]),
  11791. vue.createElementVNode("view", { class: "input-group" }, [
  11792. vue.createVNode(_component_u_input, {
  11793. customStyle: $setup.customStyle,
  11794. "placeholder-style": $setup.placeholderStyle,
  11795. modelValue: $setup.form.packageCode,
  11796. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.packageCode = $event),
  11797. placeholder: "扫描/输入物流单号",
  11798. border: "surround"
  11799. }, null, 8, ["customStyle", "modelValue"]),
  11800. vue.createVNode(_component_u_button, {
  11801. customStyle: $setup.customStyle,
  11802. type: "info",
  11803. color: "#a4adb3",
  11804. onClick: _cache[2] || (_cache[2] = ($event) => $setup.handleBarcode($setup.form.packageCode)),
  11805. text: "确定"
  11806. }, null, 8, ["customStyle"])
  11807. ])
  11808. ]),
  11809. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  11810. vue.createVNode(_component_u_button, {
  11811. size: "large",
  11812. type: "success",
  11813. onClick: $setup.scanCode,
  11814. text: "扫码",
  11815. class: "scan-button"
  11816. })
  11817. ]),
  11818. vue.createVNode($setup["WarehouseSelector"], {
  11819. show: $setup.showSelector,
  11820. "onUpdate:show": _cache[3] || (_cache[3] = ($event) => $setup.showSelector = $event),
  11821. onWarehouseSelected: $setup.handleWarehouseSelected
  11822. }, null, 8, ["show"])
  11823. ]);
  11824. }
  11825. const PagesIndexExpressTransferSign = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["render", _sfc_render$1w], ["__scopeId", "data-v-333d344a"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/transfer-sign.vue"]]);
  11826. const _sfc_main$1w = {
  11827. __name: "scan",
  11828. setup(__props, { expose: __expose }) {
  11829. __expose();
  11830. const isInitializing = vue.ref(false);
  11831. const isBluetoothOpened = vue.ref(false);
  11832. const isDiscovering = vue.ref(false);
  11833. const isConnecting = vue.ref(false);
  11834. const isConnected = vue.ref(false);
  11835. const devices = vue.ref([]);
  11836. const selectedDevice = vue.ref(null);
  11837. const scanData = vue.ref(null);
  11838. const deviceId = vue.ref("");
  11839. const serviceId = vue.ref("");
  11840. const characteristicId = vue.ref("");
  11841. const initBluetooth = () => {
  11842. isInitializing.value = true;
  11843. uni.openBluetoothAdapter({
  11844. success: (res2) => {
  11845. formatAppLog("log", "at pages/index/express/scan.vue:35", "蓝牙适配器初始化成功");
  11846. isBluetoothOpened.value = true;
  11847. isInitializing.value = false;
  11848. },
  11849. fail: (err) => {
  11850. formatAppLog("log", "at pages/index/express/scan.vue:40", "蓝牙适配器初始化失败:", err);
  11851. isInitializing.value = false;
  11852. }
  11853. });
  11854. };
  11855. const startDiscovery = () => {
  11856. isDiscovering.value = true;
  11857. uni.startBluetoothDevicesDiscovery({
  11858. success: (res2) => {
  11859. formatAppLog("log", "at pages/index/express/scan.vue:50", "开始搜索蓝牙设备成功");
  11860. uni.onBluetoothDeviceFound((devicesRes) => {
  11861. const newDevices = devicesRes.devices;
  11862. devices.value = devices.value.concat(newDevices);
  11863. formatAppLog("log", "at pages/index/express/scan.vue:54", devices.value, "devices.value");
  11864. const scanGunDevice = newDevices.find((device) => device.name.includes("Z0"));
  11865. if (scanGunDevice) {
  11866. selectedDevice.value = scanGunDevice;
  11867. deviceId.value = scanGunDevice.deviceId;
  11868. }
  11869. });
  11870. uni.onBluetoothAdapterStateChange((stateRes) => {
  11871. if (!stateRes.available) {
  11872. isDiscovering.value = false;
  11873. formatAppLog("log", "at pages/index/express/scan.vue:64", "蓝牙适配器不可用,停止搜索");
  11874. }
  11875. });
  11876. },
  11877. fail: (err) => {
  11878. formatAppLog("log", "at pages/index/express/scan.vue:69", "开始搜索蓝牙设备失败:", err);
  11879. isDiscovering.value = false;
  11880. }
  11881. });
  11882. };
  11883. const connectDevice = () => {
  11884. isConnecting.value = true;
  11885. uni.createBLEConnection({
  11886. deviceId: deviceId.value,
  11887. success: (res2) => {
  11888. formatAppLog("log", "at pages/index/express/scan.vue:80", "连接蓝牙设备成功");
  11889. isConnected.value = true;
  11890. isConnecting.value = false;
  11891. getBLEDeviceServices(deviceId.value);
  11892. },
  11893. fail: (err) => {
  11894. formatAppLog("log", "at pages/index/express/scan.vue:86", "连接蓝牙设备失败:", err);
  11895. isConnecting.value = false;
  11896. }
  11897. });
  11898. };
  11899. const getBLEDeviceServices = (deviceId2) => {
  11900. uni.getBLEDeviceServices({
  11901. deviceId: deviceId2,
  11902. success: (res2) => {
  11903. formatAppLog("log", "at pages/index/express/scan.vue:96", "获取服务列表成功:", res2.services);
  11904. const targetService = res2.services.find((service) => service.uuid === "目标服务UUID");
  11905. if (targetService) {
  11906. serviceId.value = targetService.uuid;
  11907. getBLEDeviceCharacteristics(deviceId2, serviceId.value);
  11908. }
  11909. },
  11910. fail: (err) => {
  11911. formatAppLog("log", "at pages/index/express/scan.vue:104", "获取服务列表失败:", err);
  11912. }
  11913. });
  11914. };
  11915. const getBLEDeviceCharacteristics = (deviceId2, serviceId2) => {
  11916. uni.getBLEDeviceCharacteristics({
  11917. deviceId: deviceId2,
  11918. serviceId: serviceId2,
  11919. success: (res2) => {
  11920. formatAppLog("log", "at pages/index/express/scan.vue:114", "获取特征列表成功:", res2.characteristics);
  11921. const targetCharacteristic = res2.characteristics.find((characteristic) => characteristic.properties.read && characteristic.properties.notify);
  11922. if (targetCharacteristic) {
  11923. characteristicId.value = targetCharacteristic.uuid;
  11924. }
  11925. },
  11926. fail: (err) => {
  11927. formatAppLog("log", "at pages/index/express/scan.vue:121", "获取特征列表失败:", err);
  11928. }
  11929. });
  11930. };
  11931. const startDataMonitor = () => {
  11932. uni.onBLECharacteristicValueChange((characteristicRes) => {
  11933. const value2 = characteristicRes.value;
  11934. const data = ab2str(value2);
  11935. formatAppLog("log", "at pages/index/express/scan.vue:130", "获取到扫码枪扫描的数据:", data);
  11936. scanData.value = data;
  11937. });
  11938. uni.notifyBLECharacteristicValueChange({
  11939. state: true,
  11940. deviceId: deviceId.value,
  11941. characteristicId: characteristicId.value,
  11942. success: (res2) => {
  11943. formatAppLog("log", "at pages/index/express/scan.vue:138", "开启特征值通知成功");
  11944. },
  11945. fail: (err) => {
  11946. formatAppLog("log", "at pages/index/express/scan.vue:141", "开启特征值通知失败:", err);
  11947. }
  11948. });
  11949. };
  11950. const ab2str = (buffer) => {
  11951. return String.fromCharCode.apply(null, new Uint8Array(buffer));
  11952. };
  11953. 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() {
  11954. return onLoad;
  11955. } };
  11956. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  11957. return __returned__;
  11958. }
  11959. };
  11960. function _sfc_render$1v(_ctx, _cache, $props, $setup, $data, $options) {
  11961. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11962. vue.createElementVNode("button", {
  11963. onClick: $setup.initBluetooth,
  11964. disabled: $setup.isInitializing
  11965. }, "初始化蓝牙", 8, ["disabled"]),
  11966. vue.createElementVNode("button", {
  11967. onClick: $setup.startDiscovery,
  11968. disabled: $setup.isDiscovering || !$setup.isBluetoothOpened
  11969. }, "开始搜索设备", 8, ["disabled"]),
  11970. vue.createElementVNode("button", {
  11971. onClick: $setup.connectDevice,
  11972. disabled: !$setup.selectedDevice || $setup.isConnecting
  11973. }, "连接设备", 8, ["disabled"]),
  11974. vue.createElementVNode("button", {
  11975. onClick: $setup.startDataMonitor,
  11976. disabled: !$setup.isConnected
  11977. }, "开始监听数据", 8, ["disabled"]),
  11978. $setup.scanData ? (vue.openBlock(), vue.createElementBlock(
  11979. "view",
  11980. { key: 0 },
  11981. "扫描结果: " + vue.toDisplayString($setup.scanData),
  11982. 1
  11983. /* TEXT */
  11984. )) : vue.createCommentVNode("v-if", true),
  11985. (vue.openBlock(true), vue.createElementBlock(
  11986. vue.Fragment,
  11987. null,
  11988. vue.renderList($setup.devices, (item) => {
  11989. return vue.openBlock(), vue.createElementBlock(
  11990. "view",
  11991. null,
  11992. vue.toDisplayString(item.name),
  11993. 1
  11994. /* TEXT */
  11995. );
  11996. }),
  11997. 256
  11998. /* UNKEYED_FRAGMENT */
  11999. ))
  12000. ]);
  12001. }
  12002. const PagesIndexExpressScan = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["render", _sfc_render$1v], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/scan.vue"]]);
  12003. const props$j = {
  12004. props: {
  12005. // radio的名称
  12006. name: {
  12007. type: [String, Number, Boolean],
  12008. default: props$E.radio.name
  12009. },
  12010. // 形状,square为方形,circle为圆型
  12011. shape: {
  12012. type: String,
  12013. default: props$E.radio.shape
  12014. },
  12015. // 是否禁用
  12016. disabled: {
  12017. type: [String, Boolean],
  12018. default: props$E.radio.disabled
  12019. },
  12020. // 是否禁止点击提示语选中单选框
  12021. labelDisabled: {
  12022. type: [String, Boolean],
  12023. default: props$E.radio.labelDisabled
  12024. },
  12025. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  12026. activeColor: {
  12027. type: String,
  12028. default: props$E.radio.activeColor
  12029. },
  12030. // 未选中的颜色
  12031. inactiveColor: {
  12032. type: String,
  12033. default: props$E.radio.inactiveColor
  12034. },
  12035. // 图标的大小,单位px
  12036. iconSize: {
  12037. type: [String, Number],
  12038. default: props$E.radio.iconSize
  12039. },
  12040. // label的字体大小,px单位
  12041. labelSize: {
  12042. type: [String, Number],
  12043. default: props$E.radio.labelSize
  12044. },
  12045. // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
  12046. label: {
  12047. type: [String, Number],
  12048. default: props$E.radio.label
  12049. },
  12050. // 整体的大小
  12051. size: {
  12052. type: [String, Number],
  12053. default: props$E.radio.size
  12054. },
  12055. // 图标颜色
  12056. color: {
  12057. type: String,
  12058. default: props$E.radio.color
  12059. },
  12060. // label的颜色
  12061. labelColor: {
  12062. type: String,
  12063. default: props$E.radio.labelColor
  12064. },
  12065. // 图标颜色
  12066. iconColor: {
  12067. type: String,
  12068. default: props$E.radio.iconColor
  12069. }
  12070. }
  12071. };
  12072. const _sfc_main$1v = {
  12073. name: "u-radio",
  12074. mixins: [mpMixin, mixin, props$j],
  12075. data() {
  12076. return {
  12077. checked: false,
  12078. // 当你看到这段代码的时候,
  12079. // 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式
  12080. // 故只能使用如此方法
  12081. parentData: {
  12082. iconSize: 12,
  12083. labelDisabled: null,
  12084. disabled: null,
  12085. shape: null,
  12086. activeColor: null,
  12087. inactiveColor: null,
  12088. size: 18,
  12089. value: null,
  12090. modelValue: null,
  12091. iconColor: null,
  12092. placement: "row",
  12093. borderBottom: false,
  12094. iconPlacement: "left"
  12095. }
  12096. };
  12097. },
  12098. computed: {
  12099. // 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置
  12100. elDisabled() {
  12101. return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false;
  12102. },
  12103. // 是否禁用label点击
  12104. elLabelDisabled() {
  12105. return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false;
  12106. },
  12107. // 组件尺寸,对应size的值,默认值为21px
  12108. elSize() {
  12109. return this.size ? this.size : this.parentData.size ? this.parentData.size : 21;
  12110. },
  12111. // 组件的勾选图标的尺寸,默认12px
  12112. elIconSize() {
  12113. return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12;
  12114. },
  12115. // 组件选中激活时的颜色
  12116. elActiveColor() {
  12117. return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : "#2979ff";
  12118. },
  12119. // 组件选未中激活时的颜色
  12120. elInactiveColor() {
  12121. return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : "#c8c9cc";
  12122. },
  12123. // label的颜色
  12124. elLabelColor() {
  12125. return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : "#606266";
  12126. },
  12127. // 组件的形状
  12128. elShape() {
  12129. return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle";
  12130. },
  12131. // label大小
  12132. elLabelSize() {
  12133. return uni.$u.addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : "15");
  12134. },
  12135. elIconColor() {
  12136. const iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : "#ffffff";
  12137. if (this.elDisabled) {
  12138. return this.checked ? this.elInactiveColor : "transparent";
  12139. } else {
  12140. return this.checked ? iconColor : "transparent";
  12141. }
  12142. },
  12143. iconClasses() {
  12144. let classes = [];
  12145. classes.push("u-radio__icon-wrap--" + this.elShape);
  12146. if (this.elDisabled) {
  12147. classes.push("u-radio__icon-wrap--disabled");
  12148. }
  12149. if (this.checked && this.elDisabled) {
  12150. classes.push("u-radio__icon-wrap--disabled--checked");
  12151. }
  12152. return classes;
  12153. },
  12154. iconWrapStyle() {
  12155. const style = {};
  12156. style.backgroundColor = this.checked && !this.elDisabled ? this.elActiveColor : "#ffffff";
  12157. style.borderColor = this.checked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor;
  12158. style.width = uni.$u.addUnit(this.elSize);
  12159. style.height = uni.$u.addUnit(this.elSize);
  12160. if (this.parentData.iconPlacement === "right") {
  12161. style.marginRight = 0;
  12162. }
  12163. return style;
  12164. },
  12165. radioStyle() {
  12166. const style = {};
  12167. if (this.parentData.borderBottom && this.parentData.placement === "row") {
  12168. uni.$u.error("检测到您将borderBottom设置为true,需要同时将u-radio-group的placement设置为column才有效");
  12169. }
  12170. if (this.parentData.borderBottom && this.parentData.placement === "column") {
  12171. style.paddingBottom = uni.$u.os() === "ios" ? "12px" : "8px";
  12172. }
  12173. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  12174. }
  12175. },
  12176. mounted() {
  12177. this.init();
  12178. },
  12179. methods: {
  12180. init() {
  12181. this.updateParentData();
  12182. if (!this.parent) {
  12183. uni.$u.error("u-radio必须搭配u-radio-group组件使用");
  12184. }
  12185. this.checked = this.name === this.parentData.modelValue;
  12186. },
  12187. updateParentData() {
  12188. this.getParentData("u-radio-group");
  12189. },
  12190. // 点击图标
  12191. iconClickHandler(e) {
  12192. this.preventEvent(e);
  12193. if (!this.elDisabled) {
  12194. this.setRadioCheckedStatus();
  12195. }
  12196. },
  12197. // 横向两端排列时,点击组件即可触发选中事件
  12198. wrapperClickHandler(e) {
  12199. this.parentData.iconPlacement === "right" && this.iconClickHandler(e);
  12200. },
  12201. // 点击label
  12202. labelClickHandler(e) {
  12203. this.preventEvent(e);
  12204. if (!this.elLabelDisabled && !this.elDisabled) {
  12205. this.setRadioCheckedStatus();
  12206. }
  12207. },
  12208. emitEvent() {
  12209. if (!this.checked) {
  12210. this.$emit("change", this.name);
  12211. this.$nextTick(() => {
  12212. uni.$u.formValidate(this, "change");
  12213. });
  12214. }
  12215. },
  12216. // 改变组件选中状态
  12217. // 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-radio实例
  12218. // 将本组件外的其他u-radio的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态
  12219. setRadioCheckedStatus() {
  12220. this.emitEvent();
  12221. this.checked = true;
  12222. typeof this.parent.unCheckedOther === "function" && this.parent.unCheckedOther(this);
  12223. }
  12224. }
  12225. };
  12226. function _sfc_render$1u(_ctx, _cache, $props, $setup, $data, $options) {
  12227. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  12228. return vue.openBlock(), vue.createElementBlock(
  12229. "view",
  12230. {
  12231. class: vue.normalizeClass(["u-radio", [`u-radio-label--${$data.parentData.iconPlacement}`, $data.parentData.borderBottom && $data.parentData.placement === "column" && "u-border-bottom"]]),
  12232. onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.wrapperClickHandler && $options.wrapperClickHandler(...args), ["stop"])),
  12233. style: vue.normalizeStyle([$options.radioStyle])
  12234. },
  12235. [
  12236. vue.createElementVNode(
  12237. "view",
  12238. {
  12239. class: vue.normalizeClass(["u-radio__icon-wrap", $options.iconClasses]),
  12240. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.iconClickHandler && $options.iconClickHandler(...args), ["stop"])),
  12241. style: vue.normalizeStyle([$options.iconWrapStyle])
  12242. },
  12243. [
  12244. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  12245. vue.createVNode(_component_u_icon, {
  12246. class: "u-radio__icon-wrap__icon",
  12247. name: "checkbox-mark",
  12248. size: $options.elIconSize,
  12249. color: $options.elIconColor
  12250. }, null, 8, ["size", "color"])
  12251. ], true)
  12252. ],
  12253. 6
  12254. /* CLASS, STYLE */
  12255. ),
  12256. vue.createElementVNode(
  12257. "text",
  12258. {
  12259. class: "u-radio__text",
  12260. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.labelClickHandler && $options.labelClickHandler(...args), ["stop"])),
  12261. style: vue.normalizeStyle({
  12262. color: $options.elDisabled ? $options.elInactiveColor : $options.elLabelColor,
  12263. fontSize: $options.elLabelSize,
  12264. lineHeight: $options.elLabelSize
  12265. })
  12266. },
  12267. vue.toDisplayString(_ctx.label),
  12268. 5
  12269. /* TEXT, STYLE */
  12270. )
  12271. ],
  12272. 6
  12273. /* CLASS, STYLE */
  12274. );
  12275. }
  12276. const __easycom_0$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["render", _sfc_render$1u], ["__scopeId", "data-v-83036558"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-radio/u-radio.vue"]]);
  12277. const props$i = {
  12278. props: {
  12279. // 绑定的值
  12280. modelValue: {
  12281. type: [String, Number, Boolean],
  12282. default: props$E.radioGroup.value
  12283. },
  12284. // 是否禁用全部radio
  12285. disabled: {
  12286. type: Boolean,
  12287. default: props$E.radioGroup.disabled
  12288. },
  12289. // 形状,circle-圆形,square-方形
  12290. shape: {
  12291. type: String,
  12292. default: props$E.radioGroup.shape
  12293. },
  12294. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  12295. activeColor: {
  12296. type: String,
  12297. default: props$E.radioGroup.activeColor
  12298. },
  12299. // 未选中的颜色
  12300. inactiveColor: {
  12301. type: String,
  12302. default: props$E.radioGroup.inactiveColor
  12303. },
  12304. // 标识符
  12305. name: {
  12306. type: String,
  12307. default: props$E.radioGroup.name
  12308. },
  12309. // 整个组件的尺寸,默认px
  12310. size: {
  12311. type: [String, Number],
  12312. default: props$E.radioGroup.size
  12313. },
  12314. // 布局方式,row-横向,column-纵向
  12315. placement: {
  12316. type: String,
  12317. default: props$E.radioGroup.placement
  12318. },
  12319. // label的文本
  12320. label: {
  12321. type: [String],
  12322. default: props$E.radioGroup.label
  12323. },
  12324. // label的颜色 (默认 '#303133' )
  12325. labelColor: {
  12326. type: [String],
  12327. default: props$E.radioGroup.labelColor
  12328. },
  12329. // label的字体大小,px单位
  12330. labelSize: {
  12331. type: [String, Number],
  12332. default: props$E.radioGroup.labelSize
  12333. },
  12334. // 是否禁止点击文本操作checkbox(默认 false )
  12335. labelDisabled: {
  12336. type: Boolean,
  12337. default: props$E.radioGroup.labelDisabled
  12338. },
  12339. // 图标颜色
  12340. iconColor: {
  12341. type: String,
  12342. default: props$E.radioGroup.iconColor
  12343. },
  12344. // 图标的大小,单位px
  12345. iconSize: {
  12346. type: [String, Number],
  12347. default: props$E.radioGroup.iconSize
  12348. },
  12349. // 竖向配列时,是否显示下划线
  12350. borderBottom: {
  12351. type: Boolean,
  12352. default: props$E.radioGroup.borderBottom
  12353. },
  12354. // 图标与文字的对齐方式
  12355. iconPlacement: {
  12356. type: String,
  12357. default: props$E.radio.iconPlacement
  12358. }
  12359. }
  12360. };
  12361. const _sfc_main$1u = {
  12362. name: "u-radio-group",
  12363. mixins: [mpMixin, mixin, props$i],
  12364. computed: {
  12365. // 这里computed的变量,都是子组件u-radio需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
  12366. // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-radio-group)
  12367. // 拉取父组件新的变化后的参数
  12368. parentData() {
  12369. return [
  12370. this.modelValue,
  12371. this.disabled,
  12372. this.inactiveColor,
  12373. this.activeColor,
  12374. this.size,
  12375. this.labelDisabled,
  12376. this.shape,
  12377. this.iconSize,
  12378. this.borderBottom,
  12379. this.placement
  12380. ];
  12381. },
  12382. bemClass() {
  12383. return this.bem("radio-group", ["placement"]);
  12384. }
  12385. },
  12386. watch: {
  12387. // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
  12388. parentData() {
  12389. if (this.children.length) {
  12390. this.children.map((child) => {
  12391. typeof child.init === "function" && child.init();
  12392. });
  12393. }
  12394. }
  12395. },
  12396. data() {
  12397. return {};
  12398. },
  12399. created() {
  12400. this.children = [];
  12401. },
  12402. emits: ["update:modelValue", "change"],
  12403. methods: {
  12404. // 将其他的radio设置为未选中的状态
  12405. unCheckedOther(childInstance) {
  12406. this.children.map((child) => {
  12407. if (childInstance !== child) {
  12408. child.checked = false;
  12409. }
  12410. });
  12411. const {
  12412. name
  12413. } = childInstance;
  12414. this.$emit("update:modelValue", name);
  12415. this.$emit("change", name);
  12416. }
  12417. }
  12418. };
  12419. function _sfc_render$1t(_ctx, _cache, $props, $setup, $data, $options) {
  12420. return vue.openBlock(), vue.createElementBlock(
  12421. "view",
  12422. {
  12423. class: vue.normalizeClass(["u-radio-group", $options.bemClass])
  12424. },
  12425. [
  12426. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  12427. ],
  12428. 2
  12429. /* CLASS */
  12430. );
  12431. }
  12432. const __easycom_1$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["render", _sfc_render$1t], ["__scopeId", "data-v-cbc8bf70"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-radio-group/u-radio-group.vue"]]);
  12433. const props$h = {
  12434. props: {
  12435. // 是否虚线
  12436. dashed: {
  12437. type: Boolean,
  12438. default: props$E.divider.dashed
  12439. },
  12440. // 是否细线
  12441. hairline: {
  12442. type: Boolean,
  12443. default: props$E.divider.hairline
  12444. },
  12445. // 是否以点替代文字,优先于text字段起作用
  12446. dot: {
  12447. type: Boolean,
  12448. default: props$E.divider.dot
  12449. },
  12450. // 内容文本的位置,left-左边,center-中间,right-右边
  12451. textPosition: {
  12452. type: String,
  12453. default: props$E.divider.textPosition
  12454. },
  12455. // 文本内容
  12456. text: {
  12457. type: [String, Number],
  12458. default: props$E.divider.text
  12459. },
  12460. // 文本大小
  12461. textSize: {
  12462. type: [String, Number],
  12463. default: props$E.divider.textSize
  12464. },
  12465. // 文本颜色
  12466. textColor: {
  12467. type: String,
  12468. default: props$E.divider.textColor
  12469. },
  12470. // 线条颜色
  12471. lineColor: {
  12472. type: String,
  12473. default: props$E.divider.lineColor
  12474. }
  12475. }
  12476. };
  12477. const _sfc_main$1t = {
  12478. name: "u-divider",
  12479. mixins: [mpMixin, mixin, props$h],
  12480. computed: {
  12481. textStyle() {
  12482. const style = {};
  12483. style.fontSize = uni.$u.addUnit(this.textSize);
  12484. style.color = this.textColor;
  12485. return style;
  12486. },
  12487. // 左边线条的的样式
  12488. leftLineStyle() {
  12489. const style = {};
  12490. if (this.textPosition === "left") {
  12491. style.width = "80rpx";
  12492. } else {
  12493. style.flex = 1;
  12494. }
  12495. return style;
  12496. },
  12497. // 右边线条的的样式
  12498. rightLineStyle() {
  12499. const style = {};
  12500. if (this.textPosition === "right") {
  12501. style.width = "80rpx";
  12502. } else {
  12503. style.flex = 1;
  12504. }
  12505. return style;
  12506. }
  12507. },
  12508. methods: {
  12509. // divider组件被点击时触发
  12510. click() {
  12511. this.$emit("click");
  12512. }
  12513. }
  12514. };
  12515. function _sfc_render$1s(_ctx, _cache, $props, $setup, $data, $options) {
  12516. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$e);
  12517. return vue.openBlock(), vue.createElementBlock(
  12518. "view",
  12519. {
  12520. class: "u-divider",
  12521. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]),
  12522. onClick: _cache[0] || (_cache[0] = (...args) => $options.click && $options.click(...args))
  12523. },
  12524. [
  12525. vue.createVNode(_component_u_line, {
  12526. color: _ctx.lineColor,
  12527. customStyle: $options.leftLineStyle,
  12528. hairline: _ctx.hairline,
  12529. dashed: _ctx.dashed
  12530. }, null, 8, ["color", "customStyle", "hairline", "dashed"]),
  12531. _ctx.dot ? (vue.openBlock(), vue.createElementBlock("text", {
  12532. key: 0,
  12533. class: "u-divider__dot"
  12534. }, "●")) : _ctx.text ? (vue.openBlock(), vue.createElementBlock(
  12535. "text",
  12536. {
  12537. key: 1,
  12538. class: "u-divider__text",
  12539. style: vue.normalizeStyle([$options.textStyle])
  12540. },
  12541. vue.toDisplayString(_ctx.text),
  12542. 5
  12543. /* TEXT, STYLE */
  12544. )) : vue.createCommentVNode("v-if", true),
  12545. vue.createVNode(_component_u_line, {
  12546. color: _ctx.lineColor,
  12547. customStyle: $options.rightLineStyle,
  12548. hairline: _ctx.hairline,
  12549. dashed: _ctx.dashed
  12550. }, null, 8, ["color", "customStyle", "hairline", "dashed"])
  12551. ],
  12552. 4
  12553. /* STYLE */
  12554. );
  12555. }
  12556. const __easycom_2$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["render", _sfc_render$1s], ["__scopeId", "data-v-ea022cee"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-divider/u-divider.vue"]]);
  12557. const _sfc_main$1s = {
  12558. __name: "quick-check",
  12559. setup(__props, { expose: __expose }) {
  12560. __expose();
  12561. const selectedBatchId = vue.ref("");
  12562. const showBatchSelector = vue.ref(false);
  12563. const count = vue.ref(0);
  12564. const formData = vue.ref({
  12565. batchNum: "",
  12566. packageCode: "",
  12567. searchType: "2",
  12568. packageStatus: ""
  12569. });
  12570. const batchList = vue.ref([]);
  12571. function getBatchList() {
  12572. uni.$u.http.get("/app/batchnum/pagelist").then((res2) => {
  12573. batchList.value = res2.rows;
  12574. });
  12575. }
  12576. getBatchList();
  12577. const openBatchSelector = () => {
  12578. showBatchSelector.value = true;
  12579. };
  12580. const selectBatch = (batch) => {
  12581. selectedBatchId.value = batch.id;
  12582. count.value = Number(batch.num);
  12583. formData.value.batchNum = batch.batchNum;
  12584. showBatchSelector.value = false;
  12585. };
  12586. const handleSearch = () => {
  12587. formatAppLog("log", "at pages/index/express/quick-check.vue:116", "查询:", formData.value.packageCode);
  12588. };
  12589. const handleSubmitBatch = () => {
  12590. formatAppLog("log", "at pages/index/express/quick-check.vue:121", "提交批次:", formData.value.batchNum);
  12591. if (!formData.value.batchNum) {
  12592. uni.$u.toast("请选择批次");
  12593. return;
  12594. }
  12595. if (!formData.value.packageCode) {
  12596. uni.$u.toast("请扫描/输入物流单号");
  12597. return;
  12598. }
  12599. uni.$u.http.post("/app/ordersign/deliverySign", formData.value).then((res2) => {
  12600. formatAppLog("log", "at pages/index/express/quick-check.vue:131", res2);
  12601. if (res2.code == 200) {
  12602. let text = code + "快递验收成功";
  12603. uni.$u.ttsModule.speak(text);
  12604. } else {
  12605. let text = code + "订单不存在";
  12606. uni.$u.ttsModule.speak(text);
  12607. }
  12608. });
  12609. };
  12610. const handleScan = () => {
  12611. uni.scanCode({
  12612. success: (res2) => {
  12613. formData.value.packageCode = res2.result;
  12614. handleSubmitBatch();
  12615. }
  12616. });
  12617. };
  12618. const createNewBatch = () => {
  12619. selectedBatchId.value = "new";
  12620. formData.value.batchNum = "新建批次";
  12621. count.value = 0;
  12622. };
  12623. onLoad(() => {
  12624. uni.$u.useGlobalEvent((e) => {
  12625. formData.value.packageCode = e.barcode;
  12626. handleSubmitBatch();
  12627. });
  12628. });
  12629. const __returned__ = { selectedBatchId, showBatchSelector, count, formData, batchList, getBatchList, openBatchSelector, selectBatch, handleSearch, handleSubmitBatch, handleScan, createNewBatch, ref: vue.ref, get onLoad() {
  12630. return onLoad;
  12631. } };
  12632. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  12633. return __returned__;
  12634. }
  12635. };
  12636. function _sfc_render$1r(_ctx, _cache, $props, $setup, $data, $options) {
  12637. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  12638. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  12639. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
  12640. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$4);
  12641. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  12642. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$3);
  12643. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_3$4);
  12644. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12645. vue.createCommentVNode(" 批次选择区域 "),
  12646. vue.createElementVNode("view", { class: "select-section" }, [
  12647. vue.createElementVNode("view", { class: "batch-select" }, [
  12648. vue.createElementVNode("text", { class: "required" }, "*"),
  12649. vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "批次:"),
  12650. vue.createElementVNode("view", { class: "batch-input" }, [
  12651. vue.createElementVNode("view", {
  12652. class: "batch-input-text",
  12653. onClick: $setup.openBatchSelector
  12654. }),
  12655. vue.createVNode(_component_u_input, {
  12656. modelValue: $setup.formData.batchNum,
  12657. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.batchNum = $event),
  12658. placeholder: "请选择/新建批次",
  12659. readonly: "",
  12660. border: "surround",
  12661. "placeholder-style": "font-size: 32rpx",
  12662. "custom-style": "font-size: 32rpx;height: 88rpx;"
  12663. }, {
  12664. suffix: vue.withCtx(() => [
  12665. vue.createVNode(_component_u_icon, {
  12666. name: "arrow-down",
  12667. size: "18"
  12668. })
  12669. ]),
  12670. _: 1
  12671. /* STABLE */
  12672. }, 8, ["modelValue"])
  12673. ])
  12674. ])
  12675. ]),
  12676. vue.createCommentVNode(" 数量显示 "),
  12677. vue.createElementVNode("view", { class: "count-badge" }, [
  12678. vue.createTextVNode(" 数量 "),
  12679. vue.createElementVNode(
  12680. "text",
  12681. { style: { "font-size": "32rpx" } },
  12682. vue.toDisplayString($setup.count),
  12683. 1
  12684. /* TEXT */
  12685. )
  12686. ]),
  12687. vue.createCommentVNode(" 底部按钮 "),
  12688. vue.createElementVNode("view", { class: "footer" }, [
  12689. vue.createCommentVNode(" 查询区域 "),
  12690. vue.createElementVNode("view", { class: "query-section" }, [
  12691. vue.createVNode(_component_u_radio_group, {
  12692. modelValue: $setup.formData.searchType,
  12693. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.searchType = $event),
  12694. class: "query-radio"
  12695. }, {
  12696. default: vue.withCtx(() => [
  12697. vue.createVNode(_component_u_radio, {
  12698. label: "查订单",
  12699. name: "1",
  12700. labelSize: "16px",
  12701. iconSize: "16px"
  12702. }),
  12703. vue.createVNode(_component_u_radio, {
  12704. label: "查物流",
  12705. "custom-style": "margin-left:20px",
  12706. name: "2",
  12707. labelSize: "16px",
  12708. iconSize: "16px"
  12709. })
  12710. ]),
  12711. _: 1
  12712. /* STABLE */
  12713. }, 8, ["modelValue"]),
  12714. vue.createElementVNode("view", { class: "search-box" }, [
  12715. vue.createVNode(_component_u_input, {
  12716. "custom-style": "font-size: 32rpx;",
  12717. "placeholder-style": "font-size: 32rpx;",
  12718. modelValue: $setup.formData.packageCode,
  12719. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.packageCode = $event),
  12720. adjustPosition: true,
  12721. placeholder: "扫描/输入物流单号",
  12722. border: "surround",
  12723. clearable: ""
  12724. }, null, 8, ["modelValue"]),
  12725. vue.createVNode(_component_u_button, {
  12726. color: "#c8c8c8",
  12727. text: "查询",
  12728. onClick: $setup.handleSearch
  12729. })
  12730. ])
  12731. ]),
  12732. vue.createVNode(_component_u_divider),
  12733. vue.createElementVNode("view", { style: { "display": "flex" } }, [
  12734. vue.createVNode(_component_u_button, {
  12735. size: "large",
  12736. type: "warning",
  12737. text: "验收扫码",
  12738. onClick: $setup.handleScan
  12739. }),
  12740. vue.createVNode(_component_u_button, {
  12741. size: "large",
  12742. type: "primary",
  12743. text: "提交批次",
  12744. onClick: $setup.handleSubmitBatch
  12745. })
  12746. ])
  12747. ]),
  12748. vue.createCommentVNode(" 批次选择弹窗 "),
  12749. vue.createVNode(_component_u_popup, {
  12750. show: $setup.showBatchSelector,
  12751. mode: "bottom",
  12752. onClose: _cache[3] || (_cache[3] = ($event) => $setup.showBatchSelector = false)
  12753. }, {
  12754. default: vue.withCtx(() => [
  12755. vue.createElementVNode("view", {
  12756. class: "batch-popup",
  12757. style: { "min-height": "300px" }
  12758. }, [
  12759. vue.createElementVNode("view", { class: "popup-header" }, [
  12760. vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "批次")
  12761. ]),
  12762. vue.createElementVNode("scroll-view", {
  12763. "scroll-y": "",
  12764. class: "batch-list"
  12765. }, [
  12766. vue.createElementVNode(
  12767. "view",
  12768. {
  12769. class: vue.normalizeClass(["batch-item", { active: $setup.selectedBatchId === "new" }]),
  12770. onClick: $setup.createNewBatch
  12771. },
  12772. [
  12773. vue.createElementVNode("text", null, "新建批次")
  12774. ],
  12775. 2
  12776. /* CLASS */
  12777. ),
  12778. (vue.openBlock(true), vue.createElementBlock(
  12779. vue.Fragment,
  12780. null,
  12781. vue.renderList($setup.batchList, (batch) => {
  12782. return vue.openBlock(), vue.createElementBlock("view", {
  12783. key: batch.id,
  12784. class: vue.normalizeClass(["batch-item", { active: $setup.selectedBatchId === batch.id }]),
  12785. onClick: ($event) => $setup.selectBatch(batch)
  12786. }, [
  12787. vue.createElementVNode(
  12788. "text",
  12789. null,
  12790. vue.toDisplayString(batch.batchNum),
  12791. 1
  12792. /* TEXT */
  12793. ),
  12794. vue.createElementVNode(
  12795. "text",
  12796. null,
  12797. vue.toDisplayString(batch.num),
  12798. 1
  12799. /* TEXT */
  12800. )
  12801. ], 10, ["onClick"]);
  12802. }),
  12803. 128
  12804. /* KEYED_FRAGMENT */
  12805. ))
  12806. ])
  12807. ])
  12808. ]),
  12809. _: 1
  12810. /* STABLE */
  12811. }, 8, ["show"])
  12812. ]);
  12813. }
  12814. const PagesIndexExpressQuickCheck = /* @__PURE__ */ _export_sfc(_sfc_main$1s, [["render", _sfc_render$1r], ["__scopeId", "data-v-61cc11f4"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/quick-check.vue"]]);
  12815. const keymap = {
  12816. "7": "0",
  12817. "8": "1",
  12818. "9": "2",
  12819. "10": "3",
  12820. "11": "4",
  12821. "12": "5",
  12822. "13": "6",
  12823. "14": "7",
  12824. "15": "8",
  12825. "16": "9",
  12826. "29": "A",
  12827. "30": "B",
  12828. "31": "C",
  12829. "32": "D",
  12830. "33": "E",
  12831. "34": "F",
  12832. "35": "G",
  12833. "36": "H",
  12834. "37": "I",
  12835. "38": "J",
  12836. "39": "K",
  12837. "40": "L",
  12838. "41": "M",
  12839. "42": "N",
  12840. "43": "O",
  12841. "44": "P",
  12842. "45": "Q",
  12843. "46": "R",
  12844. "47": "S",
  12845. "48": "T",
  12846. "49": "U",
  12847. "50": "V",
  12848. "51": "W",
  12849. "52": "X",
  12850. "53": "Y",
  12851. "54": "Z",
  12852. "55": ",",
  12853. "56": ".",
  12854. "59": "",
  12855. "69": "-",
  12856. "70": "=",
  12857. "81": "+"
  12858. };
  12859. const _sfc_main$1r = {
  12860. __name: "quick-unpack",
  12861. setup(__props, { expose: __expose }) {
  12862. __expose();
  12863. function goScan() {
  12864. uni.navigateTo({
  12865. url: "/pages/index/express/scan"
  12866. });
  12867. }
  12868. const unpackCode = vue.ref("");
  12869. function confirmTrackingNumber(code2) {
  12870. uni.$u.http.post("/app/ordersign/unpackingSign", {
  12871. packageCode: code2
  12872. }).then((res2) => {
  12873. if (res2.code == 200) {
  12874. let text = code2 + "拆包成功";
  12875. uni.$u.ttsModule.speak(text);
  12876. } else {
  12877. let text = code2 + res2.msg;
  12878. uni.$u.ttsModule.speak(text);
  12879. }
  12880. });
  12881. }
  12882. function scanCode() {
  12883. uni.scanCode({
  12884. success: (res2) => {
  12885. unpackCode.value = res2.result;
  12886. confirmTrackingNumber(res2.result);
  12887. formatAppLog("log", "at pages/index/express/quick-unpack.vue:66", "扫码结果:", res2.result);
  12888. },
  12889. fail: (err) => {
  12890. formatAppLog("error", "at pages/index/express/quick-unpack.vue:69", "扫码失败:", err);
  12891. }
  12892. });
  12893. }
  12894. const inputCache = vue.ref("");
  12895. const keypress = (e) => {
  12896. if (e.keyCode === 66 || e.key == "Enter") {
  12897. unpackCode.value = inputCache.value;
  12898. confirmTrackingNumber(unpackCode.value);
  12899. inputCache.value = "";
  12900. } else {
  12901. inputCache.value += keymap[e.keyCode] || "";
  12902. }
  12903. };
  12904. onLoad(() => {
  12905. uni.$u.useGlobalEvent((e) => {
  12906. unpackCode.value = e.barcode;
  12907. confirmTrackingNumber(e.barcode);
  12908. });
  12909. plus.key.addEventListener("keyup", keypress);
  12910. });
  12911. onUnload(() => {
  12912. plus.key.removeEventListener("keyup", keypress);
  12913. });
  12914. const __returned__ = { goScan, unpackCode, confirmTrackingNumber, scanCode, inputCache, keypress, ref: vue.ref, get onLoad() {
  12915. return onLoad;
  12916. }, get onUnload() {
  12917. return onUnload;
  12918. }, get keymap() {
  12919. return keymap;
  12920. } };
  12921. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  12922. return __returned__;
  12923. }
  12924. };
  12925. function _sfc_render$1q(_ctx, _cache, $props, $setup, $data, $options) {
  12926. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  12927. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  12928. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12929. 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> '),
  12930. vue.createCommentVNode(' <u-button type="primary" @click="goScan" text="扫码" /> '),
  12931. vue.createElementVNode("view", { class: "main-content" }, [
  12932. vue.createElementVNode("view", { class: "input-group" }, [
  12933. vue.createVNode(_component_u_input, {
  12934. "placeholder-style": "font-size:32rpx",
  12935. modelValue: $setup.unpackCode,
  12936. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.unpackCode = $event),
  12937. placeholder: "扫描/输入物流单号",
  12938. border: "surround"
  12939. }, null, 8, ["modelValue"]),
  12940. vue.createVNode(_component_u_button, {
  12941. type: "primary",
  12942. onClick: _cache[1] || (_cache[1] = ($event) => $setup.confirmTrackingNumber($setup.unpackCode)),
  12943. text: "确定"
  12944. })
  12945. ])
  12946. ]),
  12947. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  12948. vue.createVNode(_component_u_button, {
  12949. size: "large",
  12950. type: "success",
  12951. onClick: $setup.scanCode,
  12952. text: "扫码",
  12953. class: "scan-button"
  12954. })
  12955. ])
  12956. ]);
  12957. }
  12958. const PagesIndexExpressQuickUnpack = /* @__PURE__ */ _export_sfc(_sfc_main$1r, [["render", _sfc_render$1q], ["__scopeId", "data-v-cd1b3ab5"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/quick-unpack.vue"]]);
  12959. const props$g = {
  12960. props: {
  12961. // tab的数据
  12962. list: {
  12963. type: Array,
  12964. default: props$E.subsection.list
  12965. },
  12966. // 当前活动的tab的index
  12967. current: {
  12968. type: [String, Number],
  12969. default: props$E.subsection.current
  12970. },
  12971. // 激活的颜色
  12972. activeColor: {
  12973. type: String,
  12974. default: props$E.subsection.activeColor
  12975. },
  12976. // 未激活的颜色
  12977. inactiveColor: {
  12978. type: String,
  12979. default: props$E.subsection.inactiveColor
  12980. },
  12981. // 模式选择,mode=button为按钮形式,mode=subsection时为分段模式
  12982. mode: {
  12983. type: String,
  12984. default: props$E.subsection.mode
  12985. },
  12986. // 字体大小
  12987. fontSize: {
  12988. type: [String, Number],
  12989. default: props$E.subsection.fontSize
  12990. },
  12991. // 激活tab的字体是否加粗
  12992. bold: {
  12993. type: Boolean,
  12994. default: props$E.subsection.bold
  12995. },
  12996. // mode = button时,组件背景颜色
  12997. bgColor: {
  12998. type: String,
  12999. default: props$E.subsection.bgColor
  13000. },
  13001. // 从list元素对象中读取的键名
  13002. keyName: {
  13003. type: String,
  13004. default: props$E.subsection.keyName
  13005. }
  13006. }
  13007. };
  13008. const _sfc_main$1q = {
  13009. name: "u-subsection",
  13010. mixins: [mpMixin, mixin, props$g],
  13011. data() {
  13012. return {
  13013. // 组件尺寸
  13014. itemRect: {
  13015. width: 0,
  13016. height: 0
  13017. }
  13018. };
  13019. },
  13020. watch: {
  13021. list(newValue, oldValue) {
  13022. this.init();
  13023. },
  13024. current: {
  13025. immediate: true,
  13026. handler(n) {
  13027. }
  13028. }
  13029. },
  13030. computed: {
  13031. wrapperStyle() {
  13032. const style = {};
  13033. if (this.mode === "button") {
  13034. style.backgroundColor = this.bgColor;
  13035. }
  13036. return style;
  13037. },
  13038. // 滑块的样式
  13039. barStyle() {
  13040. const style = {};
  13041. style.width = `${this.itemRect.width}px`;
  13042. style.height = `${this.itemRect.height}px`;
  13043. style.transform = `translateX(${this.current * this.itemRect.width}px)`;
  13044. if (this.mode === "subsection") {
  13045. style.backgroundColor = this.activeColor;
  13046. }
  13047. return style;
  13048. },
  13049. // 分段器item的样式
  13050. itemStyle(index2) {
  13051. return (index3) => {
  13052. const style = {};
  13053. if (this.mode === "subsection") {
  13054. style.borderColor = this.activeColor;
  13055. style.borderWidth = "1px";
  13056. style.borderStyle = "solid";
  13057. }
  13058. return style;
  13059. };
  13060. },
  13061. // 分段器文字颜色
  13062. textStyle(index2) {
  13063. return (index3) => {
  13064. const style = {};
  13065. style.fontWeight = this.bold && this.current === index3 ? "bold" : "normal";
  13066. style.fontSize = uni.$u.addUnit(this.fontSize);
  13067. if (this.mode === "subsection") {
  13068. style.color = this.current === index3 ? "#fff" : this.inactiveColor;
  13069. } else {
  13070. style.color = this.current === index3 ? this.activeColor : this.inactiveColor;
  13071. }
  13072. return style;
  13073. };
  13074. }
  13075. },
  13076. mounted() {
  13077. this.init();
  13078. },
  13079. methods: {
  13080. init() {
  13081. uni.$u.sleep().then(() => this.getRect());
  13082. },
  13083. // 判断展示文本
  13084. getText(item) {
  13085. return typeof item === "object" ? item[this.keyName] : item;
  13086. },
  13087. // 获取组件的尺寸
  13088. getRect() {
  13089. this.$uGetRect(".u-subsection__item--0").then((size) => {
  13090. this.itemRect = size;
  13091. });
  13092. },
  13093. clickHandler(index2) {
  13094. this.$emit("change", index2);
  13095. }
  13096. }
  13097. };
  13098. function _sfc_render$1p(_ctx, _cache, $props, $setup, $data, $options) {
  13099. return vue.openBlock(), vue.createElementBlock(
  13100. "view",
  13101. {
  13102. class: vue.normalizeClass(["u-subsection", [`u-subsection--${_ctx.mode}`]]),
  13103. ref: "u-subsection",
  13104. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), $options.wrapperStyle])
  13105. },
  13106. [
  13107. vue.createElementVNode(
  13108. "view",
  13109. {
  13110. class: vue.normalizeClass(["u-subsection__bar", [
  13111. _ctx.mode === "button" && "u-subsection--button__bar",
  13112. _ctx.current === 0 && _ctx.mode === "subsection" && "u-subsection__bar--first",
  13113. _ctx.current > 0 && _ctx.current < _ctx.list.length - 1 && _ctx.mode === "subsection" && "u-subsection__bar--center",
  13114. _ctx.current === _ctx.list.length - 1 && _ctx.mode === "subsection" && "u-subsection__bar--last"
  13115. ]]),
  13116. ref: "u-subsection__bar",
  13117. style: vue.normalizeStyle([$options.barStyle])
  13118. },
  13119. null,
  13120. 6
  13121. /* CLASS, STYLE */
  13122. ),
  13123. (vue.openBlock(true), vue.createElementBlock(
  13124. vue.Fragment,
  13125. null,
  13126. vue.renderList(_ctx.list, (item, index2) => {
  13127. return vue.openBlock(), vue.createElementBlock("view", {
  13128. class: vue.normalizeClass(["u-subsection__item", [
  13129. `u-subsection__item--${index2}`,
  13130. index2 < _ctx.list.length - 1 && "u-subsection__item--no-border-right",
  13131. index2 === 0 && "u-subsection__item--first",
  13132. index2 === _ctx.list.length - 1 && "u-subsection__item--last"
  13133. ]]),
  13134. ref_for: true,
  13135. ref: `u-subsection__item--${index2}`,
  13136. style: vue.normalizeStyle([$options.itemStyle(index2)]),
  13137. onClick: ($event) => $options.clickHandler(index2),
  13138. key: index2
  13139. }, [
  13140. vue.createElementVNode(
  13141. "text",
  13142. {
  13143. class: "u-subsection__item__text",
  13144. style: vue.normalizeStyle([$options.textStyle(index2)])
  13145. },
  13146. vue.toDisplayString($options.getText(item)),
  13147. 5
  13148. /* TEXT, STYLE */
  13149. )
  13150. ], 14, ["onClick"]);
  13151. }),
  13152. 128
  13153. /* KEYED_FRAGMENT */
  13154. ))
  13155. ],
  13156. 6
  13157. /* CLASS, STYLE */
  13158. );
  13159. }
  13160. const __easycom_0$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", _sfc_render$1p], ["__scopeId", "data-v-b5ccb67e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-subsection/u-subsection.vue"]]);
  13161. const props$f = {
  13162. props: {
  13163. // 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px
  13164. offsetTop: {
  13165. type: [String, Number],
  13166. default: props$E.sticky.offsetTop
  13167. },
  13168. // 自定义导航栏的高度
  13169. customNavHeight: {
  13170. type: [String, Number],
  13171. default: props$E.sticky.customNavHeight
  13172. },
  13173. // 是否开启吸顶功能
  13174. disabled: {
  13175. type: Boolean,
  13176. default: props$E.sticky.disabled
  13177. },
  13178. // 吸顶区域的背景颜色
  13179. bgColor: {
  13180. type: String,
  13181. default: props$E.sticky.bgColor
  13182. },
  13183. // z-index值
  13184. zIndex: {
  13185. type: [String, Number],
  13186. default: props$E.sticky.zIndex
  13187. },
  13188. // 列表中的索引值
  13189. index: {
  13190. type: [String, Number],
  13191. default: props$E.sticky.index
  13192. }
  13193. }
  13194. };
  13195. const _sfc_main$1p = {
  13196. name: "u-sticky",
  13197. mixins: [mpMixin, mixin, props$f],
  13198. data() {
  13199. return {
  13200. cssSticky: false,
  13201. // 是否使用css的sticky实现
  13202. stickyTop: 0,
  13203. // 吸顶的top值,因为可能受自定义导航栏影响,最终的吸顶值非offsetTop值
  13204. elId: uni.$u.guid(),
  13205. left: 0,
  13206. // js模式时,吸顶的内容因为处于postition: fixed模式,为了和原来保持一致的样式,需要记录并重新设置它的left,height,width属性
  13207. width: "auto",
  13208. height: "auto",
  13209. fixed: false
  13210. // js模式时,是否处于吸顶模式
  13211. };
  13212. },
  13213. computed: {
  13214. style() {
  13215. const style = {};
  13216. if (!this.disabled) {
  13217. if (this.cssSticky) {
  13218. style.position = "sticky";
  13219. style.zIndex = this.uZindex;
  13220. style.top = uni.$u.addUnit(this.stickyTop);
  13221. } else {
  13222. style.height = this.fixed ? this.height + "px" : "auto";
  13223. }
  13224. } else {
  13225. style.position = "static";
  13226. }
  13227. style.backgroundColor = this.bgColor;
  13228. return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style);
  13229. },
  13230. // 吸顶内容的样式
  13231. stickyContent() {
  13232. const style = {};
  13233. if (!this.cssSticky) {
  13234. style.position = this.fixed ? "fixed" : "static";
  13235. style.top = this.stickyTop + "px";
  13236. style.left = this.left + "px";
  13237. style.width = this.width == "auto" ? "auto" : this.width + "px";
  13238. style.zIndex = this.uZindex;
  13239. }
  13240. return style;
  13241. },
  13242. uZindex() {
  13243. return this.zIndex ? this.zIndex : uni.$u.zIndex.sticky;
  13244. }
  13245. },
  13246. mounted() {
  13247. this.init();
  13248. },
  13249. methods: {
  13250. init() {
  13251. this.getStickyTop();
  13252. this.checkSupportCssSticky();
  13253. if (!this.cssSticky) {
  13254. !this.disabled && this.initObserveContent();
  13255. }
  13256. },
  13257. initObserveContent() {
  13258. this.$uGetRect("#" + this.elId).then((res2) => {
  13259. this.height = res2.height;
  13260. this.left = res2.left;
  13261. this.width = res2.width;
  13262. this.$nextTick(() => {
  13263. this.observeContent();
  13264. });
  13265. });
  13266. },
  13267. observeContent() {
  13268. this.disconnectObserver("contentObserver");
  13269. const contentObserver = uni.createIntersectionObserver({
  13270. // 检测的区间范围
  13271. thresholds: [0.95, 0.98, 1]
  13272. });
  13273. contentObserver.relativeToViewport({
  13274. top: -this.stickyTop
  13275. });
  13276. contentObserver.observe(`#${this.elId}`, (res2) => {
  13277. this.setFixed(res2.boundingClientRect.top);
  13278. });
  13279. this.contentObserver = contentObserver;
  13280. },
  13281. setFixed(top) {
  13282. const fixed = top <= this.stickyTop;
  13283. this.fixed = fixed;
  13284. },
  13285. disconnectObserver(observerName) {
  13286. const observer = this[observerName];
  13287. observer && observer.disconnect();
  13288. },
  13289. getStickyTop() {
  13290. this.stickyTop = uni.$u.getPx(this.offsetTop) + uni.$u.getPx(this.customNavHeight);
  13291. },
  13292. async checkSupportCssSticky() {
  13293. if (uni.$u.os() === "android" && Number(uni.$u.sys().system) > 8) {
  13294. this.cssSticky = true;
  13295. }
  13296. this.cssSticky = await this.checkComputedStyle();
  13297. if (uni.$u.os() === "ios") {
  13298. this.cssSticky = true;
  13299. }
  13300. },
  13301. // 在APP和微信小程序上,通过uni.createSelectorQuery可以判断是否支持css sticky
  13302. checkComputedStyle() {
  13303. return new Promise((resolve) => {
  13304. uni.createSelectorQuery().in(this).select(".u-sticky").fields({
  13305. computedStyle: ["position"]
  13306. }).exec((e) => {
  13307. resolve("sticky" === e[0].position);
  13308. });
  13309. });
  13310. },
  13311. // H5通过创建元素的形式嗅探是否支持css sticky
  13312. // 判断浏览器是否支持sticky属性
  13313. checkCssStickyForH5() {
  13314. }
  13315. },
  13316. beforeDestroy() {
  13317. this.disconnectObserver("contentObserver");
  13318. }
  13319. };
  13320. function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) {
  13321. return vue.openBlock(), vue.createElementBlock("view", {
  13322. class: "u-sticky",
  13323. id: $data.elId,
  13324. style: vue.normalizeStyle([$options.style])
  13325. }, [
  13326. vue.createElementVNode(
  13327. "view",
  13328. {
  13329. style: vue.normalizeStyle([$options.stickyContent]),
  13330. class: "u-sticky__content"
  13331. },
  13332. [
  13333. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  13334. ],
  13335. 4
  13336. /* STYLE */
  13337. )
  13338. ], 12, ["id"]);
  13339. }
  13340. const __easycom_1$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1p, [["render", _sfc_render$1o], ["__scopeId", "data-v-8b303089"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-sticky/u-sticky.vue"]]);
  13341. const props$e = {
  13342. props: {
  13343. // 是否展示modal
  13344. show: {
  13345. type: Boolean,
  13346. default: props$E.modal.show
  13347. },
  13348. // 标题
  13349. title: {
  13350. type: [String],
  13351. default: props$E.modal.title
  13352. },
  13353. // 弹窗内容
  13354. content: {
  13355. type: String,
  13356. default: props$E.modal.content
  13357. },
  13358. // 确认文案
  13359. confirmText: {
  13360. type: String,
  13361. default: props$E.modal.confirmText
  13362. },
  13363. // 取消文案
  13364. cancelText: {
  13365. type: String,
  13366. default: props$E.modal.cancelText
  13367. },
  13368. // 是否显示确认按钮
  13369. showConfirmButton: {
  13370. type: Boolean,
  13371. default: props$E.modal.showConfirmButton
  13372. },
  13373. // 是否显示取消按钮
  13374. showCancelButton: {
  13375. type: Boolean,
  13376. default: props$E.modal.showCancelButton
  13377. },
  13378. // 确认按钮颜色
  13379. confirmColor: {
  13380. type: String,
  13381. default: props$E.modal.confirmColor
  13382. },
  13383. // 取消文字颜色
  13384. cancelColor: {
  13385. type: String,
  13386. default: props$E.modal.cancelColor
  13387. },
  13388. // 对调确认和取消的位置
  13389. buttonReverse: {
  13390. type: Boolean,
  13391. default: props$E.modal.buttonReverse
  13392. },
  13393. // 是否开启缩放效果
  13394. zoom: {
  13395. type: Boolean,
  13396. default: props$E.modal.zoom
  13397. },
  13398. // 是否异步关闭,只对确定按钮有效
  13399. asyncClose: {
  13400. type: Boolean,
  13401. default: props$E.modal.asyncClose
  13402. },
  13403. // 是否允许点击遮罩关闭modal
  13404. closeOnClickOverlay: {
  13405. type: Boolean,
  13406. default: props$E.modal.closeOnClickOverlay
  13407. },
  13408. // 给一个负的margin-top,往上偏移,避免和键盘重合的情况
  13409. negativeTop: {
  13410. type: [String, Number],
  13411. default: props$E.modal.negativeTop
  13412. },
  13413. // modal宽度,不支持百分比,可以数值,px,rpx单位
  13414. width: {
  13415. type: [String, Number],
  13416. default: props$E.modal.width
  13417. },
  13418. // 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮
  13419. confirmButtonShape: {
  13420. type: String,
  13421. default: props$E.modal.confirmButtonShape
  13422. }
  13423. }
  13424. };
  13425. const _sfc_main$1o = {
  13426. name: "u-modal",
  13427. mixins: [mpMixin, mixin, props$e],
  13428. data() {
  13429. return {
  13430. loading: false
  13431. };
  13432. },
  13433. watch: {
  13434. show(n) {
  13435. if (n && this.loading)
  13436. this.loading = false;
  13437. }
  13438. },
  13439. methods: {
  13440. // 点击确定按钮
  13441. confirmHandler() {
  13442. if (this.asyncClose) {
  13443. this.loading = true;
  13444. }
  13445. this.$emit("confirm");
  13446. },
  13447. // 点击取消按钮
  13448. cancelHandler() {
  13449. this.$emit("cancel");
  13450. },
  13451. // 点击遮罩
  13452. // 从原理上来说,modal的遮罩点击,并不是真的点击到了遮罩
  13453. // 因为modal依赖于popup的中部弹窗类型,中部弹窗比较特殊,虽有然遮罩,但是为了让弹窗内容能flex居中
  13454. // 多了一个透明的遮罩,此透明的遮罩会覆盖在灰色的遮罩上,所以实际上是点击不到灰色遮罩的,popup内部在
  13455. // 透明遮罩的子元素做了.stop处理,所以点击内容区,也不会导致误触发
  13456. clickHandler() {
  13457. if (this.closeOnClickOverlay) {
  13458. this.$emit("close");
  13459. }
  13460. }
  13461. }
  13462. };
  13463. function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) {
  13464. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$e);
  13465. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  13466. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_3$4);
  13467. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  13468. mode: "center",
  13469. zoom: _ctx.zoom,
  13470. show: _ctx.show,
  13471. customStyle: {
  13472. borderRadius: "6px",
  13473. overflow: "hidden",
  13474. marginTop: `-${_ctx.$u.addUnit(_ctx.negativeTop)}`
  13475. },
  13476. closeOnClickOverlay: _ctx.closeOnClickOverlay,
  13477. safeAreaInsetBottom: false,
  13478. duration: 400,
  13479. onClick: $options.clickHandler
  13480. }, {
  13481. default: vue.withCtx(() => [
  13482. vue.createElementVNode(
  13483. "view",
  13484. {
  13485. class: "u-modal",
  13486. style: vue.normalizeStyle({
  13487. width: _ctx.$u.addUnit(_ctx.width)
  13488. })
  13489. },
  13490. [
  13491. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  13492. "text",
  13493. {
  13494. key: 0,
  13495. class: "u-modal__title"
  13496. },
  13497. vue.toDisplayString(_ctx.title),
  13498. 1
  13499. /* TEXT */
  13500. )) : vue.createCommentVNode("v-if", true),
  13501. vue.createElementVNode(
  13502. "view",
  13503. {
  13504. class: "u-modal__content",
  13505. style: vue.normalizeStyle({
  13506. paddingTop: `${_ctx.title ? 12 : 25}px`
  13507. })
  13508. },
  13509. [
  13510. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  13511. vue.createElementVNode(
  13512. "text",
  13513. { class: "u-modal__content__text" },
  13514. vue.toDisplayString(_ctx.content),
  13515. 1
  13516. /* TEXT */
  13517. )
  13518. ], true)
  13519. ],
  13520. 4
  13521. /* STYLE */
  13522. ),
  13523. _ctx.$slots.confirmButton ? (vue.openBlock(), vue.createElementBlock("view", {
  13524. key: 1,
  13525. class: "u-modal__button-group--confirm-button"
  13526. }, [
  13527. vue.renderSlot(_ctx.$slots, "confirmButton", {}, void 0, true)
  13528. ])) : (vue.openBlock(), vue.createElementBlock(
  13529. vue.Fragment,
  13530. { key: 2 },
  13531. [
  13532. vue.createVNode(_component_u_line),
  13533. vue.createElementVNode(
  13534. "view",
  13535. {
  13536. class: "u-modal__button-group",
  13537. style: vue.normalizeStyle({
  13538. flexDirection: _ctx.buttonReverse ? "row-reverse" : "row"
  13539. })
  13540. },
  13541. [
  13542. _ctx.showCancelButton ? (vue.openBlock(), vue.createElementBlock(
  13543. "view",
  13544. {
  13545. key: 0,
  13546. 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"]]),
  13547. "hover-stay-time": 150,
  13548. "hover-class": "u-modal__button-group__wrapper--hover",
  13549. onClick: _cache[0] || (_cache[0] = (...args) => $options.cancelHandler && $options.cancelHandler(...args))
  13550. },
  13551. [
  13552. vue.createElementVNode(
  13553. "text",
  13554. {
  13555. class: "u-modal__button-group__wrapper__text",
  13556. style: vue.normalizeStyle({
  13557. color: _ctx.cancelColor
  13558. })
  13559. },
  13560. vue.toDisplayString(_ctx.cancelText),
  13561. 5
  13562. /* TEXT, STYLE */
  13563. )
  13564. ],
  13565. 2
  13566. /* CLASS */
  13567. )) : vue.createCommentVNode("v-if", true),
  13568. _ctx.showConfirmButton && _ctx.showCancelButton ? (vue.openBlock(), vue.createBlock(_component_u_line, {
  13569. key: 1,
  13570. direction: "column"
  13571. })) : vue.createCommentVNode("v-if", true),
  13572. _ctx.showConfirmButton ? (vue.openBlock(), vue.createElementBlock(
  13573. "view",
  13574. {
  13575. key: 2,
  13576. 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"]]),
  13577. "hover-stay-time": 150,
  13578. "hover-class": "u-modal__button-group__wrapper--hover",
  13579. onClick: _cache[1] || (_cache[1] = (...args) => $options.confirmHandler && $options.confirmHandler(...args))
  13580. },
  13581. [
  13582. $data.loading ? (vue.openBlock(), vue.createBlock(_component_u_loading_icon, { key: 0 })) : (vue.openBlock(), vue.createElementBlock(
  13583. "text",
  13584. {
  13585. key: 1,
  13586. class: "u-modal__button-group__wrapper__text",
  13587. style: vue.normalizeStyle({
  13588. color: _ctx.confirmColor
  13589. })
  13590. },
  13591. vue.toDisplayString(_ctx.confirmText),
  13592. 5
  13593. /* TEXT, STYLE */
  13594. ))
  13595. ],
  13596. 2
  13597. /* CLASS */
  13598. )) : vue.createCommentVNode("v-if", true)
  13599. ],
  13600. 4
  13601. /* STYLE */
  13602. )
  13603. ],
  13604. 64
  13605. /* STABLE_FRAGMENT */
  13606. ))
  13607. ],
  13608. 4
  13609. /* STYLE */
  13610. )
  13611. ]),
  13612. _: 3
  13613. /* FORWARDED */
  13614. }, 8, ["zoom", "show", "customStyle", "closeOnClickOverlay", "onClick"]);
  13615. }
  13616. const __easycom_1$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1o, [["render", _sfc_render$1n], ["__scopeId", "data-v-f667648f"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-modal/u-modal.vue"]]);
  13617. const _sfc_main$1n = {
  13618. __name: "ApproveButton",
  13619. emits: ["approve"],
  13620. setup(__props, { expose: __expose, emit: __emit }) {
  13621. __expose();
  13622. const emit2 = __emit;
  13623. const showConfirmModal = vue.ref(false);
  13624. const handleApprove = () => {
  13625. showConfirmModal.value = true;
  13626. };
  13627. const confirmApprove = () => {
  13628. emit2("approve");
  13629. showConfirmModal.value = false;
  13630. };
  13631. const __returned__ = { emit: emit2, showConfirmModal, handleApprove, confirmApprove, ref: vue.ref };
  13632. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  13633. return __returned__;
  13634. }
  13635. };
  13636. function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) {
  13637. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  13638. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$2);
  13639. return vue.openBlock(), vue.createElementBlock("view", { style: { "width": "50%" } }, [
  13640. vue.createVNode(
  13641. _component_u_button,
  13642. vue.mergeProps({
  13643. type: "success",
  13644. text: "同意",
  13645. size: "small",
  13646. onClick: $setup.handleApprove
  13647. }, _ctx.$attrs),
  13648. null,
  13649. 16
  13650. /* FULL_PROPS */
  13651. ),
  13652. vue.createCommentVNode(" 确认弹窗 "),
  13653. vue.createVNode(_component_u_modal, {
  13654. show: $setup.showConfirmModal,
  13655. title: "确认",
  13656. content: "确认收到货了吗?",
  13657. onConfirm: $setup.confirmApprove,
  13658. showCancelButton: "",
  13659. "content-style": { textAlign: "center" },
  13660. onCancel: _cache[0] || (_cache[0] = ($event) => $setup.showConfirmModal = false)
  13661. }, null, 8, ["show"])
  13662. ]);
  13663. }
  13664. const ApproveButton = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["render", _sfc_render$1m], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/ApproveButton.vue"]]);
  13665. const props$d = {
  13666. props: {
  13667. // 是否展示工具条
  13668. show: {
  13669. type: Boolean,
  13670. default: props$E.toolbar.show
  13671. },
  13672. // 取消按钮的文字
  13673. cancelText: {
  13674. type: String,
  13675. default: props$E.toolbar.cancelText
  13676. },
  13677. // 确认按钮的文字
  13678. confirmText: {
  13679. type: String,
  13680. default: props$E.toolbar.confirmText
  13681. },
  13682. // 取消按钮的颜色
  13683. cancelColor: {
  13684. type: String,
  13685. default: props$E.toolbar.cancelColor
  13686. },
  13687. // 确认按钮的颜色
  13688. confirmColor: {
  13689. type: String,
  13690. default: props$E.toolbar.confirmColor
  13691. },
  13692. // 标题文字
  13693. title: {
  13694. type: String,
  13695. default: props$E.toolbar.title
  13696. }
  13697. }
  13698. };
  13699. const _sfc_main$1m = {
  13700. name: "u-toolbar",
  13701. mixins: [mpMixin, mixin, props$d],
  13702. methods: {
  13703. // 点击取消按钮
  13704. cancel() {
  13705. this.$emit("cancel");
  13706. },
  13707. // 点击确定按钮
  13708. confirm() {
  13709. this.$emit("confirm");
  13710. }
  13711. }
  13712. };
  13713. function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) {
  13714. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  13715. "view",
  13716. {
  13717. key: 0,
  13718. class: "u-toolbar",
  13719. onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"]))
  13720. },
  13721. [
  13722. vue.createElementVNode("view", {
  13723. class: "u-toolbar__cancel__wrapper",
  13724. "hover-class": "u-hover-class"
  13725. }, [
  13726. vue.createElementVNode(
  13727. "text",
  13728. {
  13729. class: "u-toolbar__wrapper__cancel",
  13730. onClick: _cache[0] || (_cache[0] = (...args) => $options.cancel && $options.cancel(...args)),
  13731. style: vue.normalizeStyle({
  13732. color: _ctx.cancelColor
  13733. })
  13734. },
  13735. vue.toDisplayString(_ctx.cancelText),
  13736. 5
  13737. /* TEXT, STYLE */
  13738. )
  13739. ]),
  13740. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  13741. "text",
  13742. {
  13743. key: 0,
  13744. class: "u-toolbar__title u-line-1"
  13745. },
  13746. vue.toDisplayString(_ctx.title),
  13747. 1
  13748. /* TEXT */
  13749. )) : vue.createCommentVNode("v-if", true),
  13750. vue.createElementVNode("view", {
  13751. class: "u-toolbar__confirm__wrapper",
  13752. "hover-class": "u-hover-class"
  13753. }, [
  13754. vue.createElementVNode(
  13755. "text",
  13756. {
  13757. class: "u-toolbar__wrapper__confirm",
  13758. onClick: _cache[1] || (_cache[1] = (...args) => $options.confirm && $options.confirm(...args)),
  13759. style: vue.normalizeStyle({
  13760. color: _ctx.confirmColor
  13761. })
  13762. },
  13763. vue.toDisplayString(_ctx.confirmText),
  13764. 5
  13765. /* TEXT, STYLE */
  13766. )
  13767. ])
  13768. ],
  13769. 32
  13770. /* NEED_HYDRATION */
  13771. )) : vue.createCommentVNode("v-if", true);
  13772. }
  13773. const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["render", _sfc_render$1l], ["__scopeId", "data-v-eadae74e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-toolbar/u-toolbar.vue"]]);
  13774. const props$c = {
  13775. props: {
  13776. // 是否展示picker弹窗
  13777. show: {
  13778. type: Boolean,
  13779. default: props$E.picker.show
  13780. },
  13781. // 是否展示顶部的操作栏
  13782. showToolbar: {
  13783. type: Boolean,
  13784. default: props$E.picker.showToolbar
  13785. },
  13786. // 顶部标题
  13787. title: {
  13788. type: String,
  13789. default: props$E.picker.title
  13790. },
  13791. // 对象数组,设置每一列的数据
  13792. columns: {
  13793. type: Array,
  13794. default: props$E.picker.columns
  13795. },
  13796. // 是否显示加载中状态
  13797. loading: {
  13798. type: Boolean,
  13799. default: props$E.picker.loading
  13800. },
  13801. // 各列中,单个选项的高度
  13802. itemHeight: {
  13803. type: [String, Number],
  13804. default: props$E.picker.itemHeight
  13805. },
  13806. // 取消按钮的文字
  13807. cancelText: {
  13808. type: String,
  13809. default: props$E.picker.cancelText
  13810. },
  13811. // 确认按钮的文字
  13812. confirmText: {
  13813. type: String,
  13814. default: props$E.picker.confirmText
  13815. },
  13816. // 取消按钮的颜色
  13817. cancelColor: {
  13818. type: String,
  13819. default: props$E.picker.cancelColor
  13820. },
  13821. // 确认按钮的颜色
  13822. confirmColor: {
  13823. type: String,
  13824. default: props$E.picker.confirmColor
  13825. },
  13826. // 每列中可见选项的数量
  13827. visibleItemCount: {
  13828. type: [String, Number],
  13829. default: props$E.picker.visibleItemCount
  13830. },
  13831. // 选项对象中,需要展示的属性键名
  13832. keyName: {
  13833. type: String,
  13834. default: props$E.picker.keyName
  13835. },
  13836. // 是否允许点击遮罩关闭选择器
  13837. closeOnClickOverlay: {
  13838. type: Boolean,
  13839. default: props$E.picker.closeOnClickOverlay
  13840. },
  13841. // 各列的默认索引
  13842. defaultIndex: {
  13843. type: Array,
  13844. default: props$E.picker.defaultIndex
  13845. },
  13846. // 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效
  13847. immediateChange: {
  13848. type: Boolean,
  13849. default: props$E.picker.immediateChange
  13850. }
  13851. }
  13852. };
  13853. const _sfc_main$1l = {
  13854. name: "u-picker",
  13855. mixins: [mpMixin, mixin, props$c],
  13856. data() {
  13857. return {
  13858. // 上一次选择的列索引
  13859. lastIndex: [],
  13860. // 索引值 ,对应picker-view的value
  13861. innerIndex: [],
  13862. // 各列的值
  13863. innerColumns: [],
  13864. // 上一次的变化列索引
  13865. columnIndex: 0
  13866. };
  13867. },
  13868. watch: {
  13869. // 监听默认索引的变化,重新设置对应的值
  13870. defaultIndex: {
  13871. immediate: true,
  13872. handler(n) {
  13873. this.setIndexs(n, true);
  13874. }
  13875. },
  13876. // 监听columns参数的变化
  13877. columns: {
  13878. immediate: true,
  13879. deep: true,
  13880. handler(n) {
  13881. this.setColumns(n);
  13882. }
  13883. }
  13884. },
  13885. emits: ["close", "cancel", "confirm", "change"],
  13886. methods: {
  13887. // 获取item需要显示的文字,判别为对象还是文本
  13888. getItemText(item) {
  13889. if (uni.$u.test.object(item)) {
  13890. return item[this.keyName];
  13891. } else {
  13892. return item;
  13893. }
  13894. },
  13895. // 关闭选择器
  13896. closeHandler() {
  13897. if (this.closeOnClickOverlay) {
  13898. this.$emit("close");
  13899. }
  13900. },
  13901. // 点击工具栏的取消按钮
  13902. cancel() {
  13903. this.$emit("cancel");
  13904. },
  13905. // 点击工具栏的确定按钮
  13906. confirm() {
  13907. this.$emit("confirm", {
  13908. indexs: this.innerIndex,
  13909. value: this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]),
  13910. values: this.innerColumns
  13911. });
  13912. },
  13913. // 选择器某一列的数据发生变化时触发
  13914. changeHandler(e) {
  13915. const {
  13916. value: value2
  13917. } = e.detail;
  13918. let index2 = 0, columnIndex = 0;
  13919. for (let i = 0; i < value2.length; i++) {
  13920. let item = value2[i];
  13921. if (item !== (this.lastIndex[i] || 0)) {
  13922. columnIndex = i;
  13923. index2 = item;
  13924. break;
  13925. }
  13926. }
  13927. this.columnIndex = columnIndex;
  13928. const values = this.innerColumns;
  13929. this.setLastIndex(value2);
  13930. this.setIndexs(value2);
  13931. this.$emit("change", {
  13932. // 微信小程序不能传递this,会因为循环引用而报错
  13933. picker: this,
  13934. value: this.innerColumns.map((item, index3) => item[value2[index3]]),
  13935. index: index2,
  13936. indexs: value2,
  13937. // values为当前变化列的数组内容
  13938. values,
  13939. columnIndex
  13940. });
  13941. },
  13942. // 设置index索引,此方法可被外部调用设置
  13943. setIndexs(index2, setLastIndex) {
  13944. this.innerIndex = uni.$u.deepClone(index2);
  13945. if (setLastIndex) {
  13946. this.setLastIndex(index2);
  13947. }
  13948. },
  13949. // 记录上一次的各列索引位置
  13950. setLastIndex(index2) {
  13951. this.lastIndex = uni.$u.deepClone(index2);
  13952. },
  13953. // 设置对应列选项的所有值
  13954. setColumnValues(columnIndex, values) {
  13955. this.innerColumns.splice(columnIndex, 1, values);
  13956. let tmpIndex = uni.$u.deepClone(this.innerIndex);
  13957. for (let i = 0; i < this.innerColumns.length; i++) {
  13958. if (i > this.columnIndex) {
  13959. tmpIndex[i] = 0;
  13960. }
  13961. }
  13962. this.setIndexs(tmpIndex);
  13963. },
  13964. // 获取对应列的所有选项
  13965. getColumnValues(columnIndex) {
  13966. (async () => {
  13967. await uni.$u.sleep();
  13968. })();
  13969. return this.innerColumns[columnIndex];
  13970. },
  13971. // 设置整体各列的columns的值
  13972. setColumns(columns) {
  13973. formatAppLog("log", "at uni_modules/uview-plus/components/u-picker/u-picker.vue:217", columns);
  13974. this.innerColumns = uni.$u.deepClone(columns);
  13975. if (this.innerIndex.length === 0) {
  13976. this.innerIndex = new Array(columns.length).fill(0);
  13977. }
  13978. },
  13979. // 获取各列选中值对应的索引
  13980. getIndexs() {
  13981. return this.innerIndex;
  13982. },
  13983. // 获取各列选中的值
  13984. getValues() {
  13985. (async () => {
  13986. await uni.$u.sleep();
  13987. })();
  13988. return this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]);
  13989. }
  13990. }
  13991. };
  13992. function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
  13993. const _component_u_toolbar = resolveEasycom(vue.resolveDynamicComponent("u-toolbar"), __easycom_0$4);
  13994. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  13995. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_3$4);
  13996. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  13997. show: _ctx.show,
  13998. onClose: $options.closeHandler
  13999. }, {
  14000. default: vue.withCtx(() => [
  14001. vue.createElementVNode("view", { class: "u-picker" }, [
  14002. _ctx.showToolbar ? (vue.openBlock(), vue.createBlock(_component_u_toolbar, {
  14003. key: 0,
  14004. cancelColor: _ctx.cancelColor,
  14005. confirmColor: _ctx.confirmColor,
  14006. cancelText: _ctx.cancelText,
  14007. confirmText: _ctx.confirmText,
  14008. title: _ctx.title,
  14009. onCancel: $options.cancel,
  14010. onConfirm: $options.confirm
  14011. }, null, 8, ["cancelColor", "confirmColor", "cancelText", "confirmText", "title", "onCancel", "onConfirm"])) : vue.createCommentVNode("v-if", true),
  14012. vue.createElementVNode("picker-view", {
  14013. class: "u-picker__view",
  14014. indicatorStyle: `height: ${_ctx.$u.addUnit(_ctx.itemHeight)}`,
  14015. value: $data.innerIndex,
  14016. immediateChange: _ctx.immediateChange,
  14017. style: vue.normalizeStyle({
  14018. height: `${_ctx.$u.addUnit(_ctx.visibleItemCount * _ctx.itemHeight)}`
  14019. }),
  14020. onChange: _cache[0] || (_cache[0] = (...args) => $options.changeHandler && $options.changeHandler(...args))
  14021. }, [
  14022. (vue.openBlock(true), vue.createElementBlock(
  14023. vue.Fragment,
  14024. null,
  14025. vue.renderList($data.innerColumns, (item, index2) => {
  14026. return vue.openBlock(), vue.createElementBlock("picker-view-column", {
  14027. key: index2,
  14028. class: "u-picker__view__column"
  14029. }, [
  14030. _ctx.$u.test.array(item) ? (vue.openBlock(true), vue.createElementBlock(
  14031. vue.Fragment,
  14032. { key: 0 },
  14033. vue.renderList(item, (item1, index1) => {
  14034. return vue.openBlock(), vue.createElementBlock(
  14035. "text",
  14036. {
  14037. class: "u-picker__view__column__item u-line-1",
  14038. key: index1,
  14039. style: vue.normalizeStyle({
  14040. height: _ctx.$u.addUnit(_ctx.itemHeight),
  14041. lineHeight: _ctx.$u.addUnit(_ctx.itemHeight),
  14042. fontWeight: index1 === $data.innerIndex[index2] ? "bold" : "normal"
  14043. })
  14044. },
  14045. vue.toDisplayString($options.getItemText(item1)),
  14046. 5
  14047. /* TEXT, STYLE */
  14048. );
  14049. }),
  14050. 128
  14051. /* KEYED_FRAGMENT */
  14052. )) : vue.createCommentVNode("v-if", true)
  14053. ]);
  14054. }),
  14055. 128
  14056. /* KEYED_FRAGMENT */
  14057. ))
  14058. ], 44, ["indicatorStyle", "value", "immediateChange"]),
  14059. _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  14060. key: 1,
  14061. class: "u-picker--loading"
  14062. }, [
  14063. vue.createVNode(_component_u_loading_icon, { mode: "circle" })
  14064. ])) : vue.createCommentVNode("v-if", true)
  14065. ])
  14066. ]),
  14067. _: 1
  14068. /* STABLE */
  14069. }, 8, ["show", "onClose"]);
  14070. }
  14071. const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["render", _sfc_render$1k], ["__scopeId", "data-v-91b05052"], ["__file", "E:/书嗨项目/shuhi-app-fornt/uni_modules/uview-plus/components/u-picker/u-picker.vue"]]);
  14072. const _sfc_main$1k = {
  14073. __name: "RejectButton",
  14074. emits: ["reject"],
  14075. setup(__props, { expose: __expose, emit: __emit }) {
  14076. __expose();
  14077. const emit2 = __emit;
  14078. const showRejectPicker = vue.ref(false);
  14079. const rejectReasons = vue.ref([]);
  14080. const getRejectReason = async () => {
  14081. const res2 = await uni.$u.http.get("/app/sysDict/getDict?key=route_exception_reason ");
  14082. if (res2.code == 200) {
  14083. rejectReasons.value = res2.data.map((item) => item.dictValue);
  14084. }
  14085. };
  14086. getRejectReason();
  14087. const handleReject = () => {
  14088. showRejectPicker.value = true;
  14089. };
  14090. const confirmReject = (e) => {
  14091. const reason = e.value[0];
  14092. emit2("reject", reason);
  14093. showRejectPicker.value = false;
  14094. };
  14095. const __returned__ = { emit: emit2, showRejectPicker, rejectReasons, getRejectReason, handleReject, confirmReject, ref: vue.ref };
  14096. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14097. return __returned__;
  14098. }
  14099. };
  14100. function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) {
  14101. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  14102. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$1);
  14103. return vue.openBlock(), vue.createElementBlock("view", { style: { "width": "50%" } }, [
  14104. vue.createVNode(
  14105. _component_u_button,
  14106. vue.mergeProps({
  14107. type: "warning",
  14108. text: "驳回",
  14109. size: "small",
  14110. onClick: $setup.handleReject
  14111. }, _ctx.$attrs),
  14112. null,
  14113. 16
  14114. /* FULL_PROPS */
  14115. ),
  14116. vue.createCommentVNode(" 驳回原因选择器 "),
  14117. vue.createVNode(_component_u_picker, {
  14118. show: $setup.showRejectPicker,
  14119. columns: [$setup.rejectReasons],
  14120. onConfirm: $setup.confirmReject,
  14121. onCancel: _cache[0] || (_cache[0] = ($event) => $setup.showRejectPicker = false)
  14122. }, null, 8, ["show", "columns"])
  14123. ]);
  14124. }
  14125. const RejectButton = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1j], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/RejectButton.vue"]]);
  14126. const _sfc_main$1j = {
  14127. __name: "ExceptionItem",
  14128. props: {
  14129. order: {
  14130. type: Object,
  14131. default: () => ({
  14132. orderNo: "",
  14133. expressNo: "",
  14134. estimatedPrice: "",
  14135. pusher: "",
  14136. pushTime: ""
  14137. })
  14138. }
  14139. },
  14140. emits: ["refresh"],
  14141. setup(__props, { expose: __expose, emit: __emit }) {
  14142. __expose();
  14143. const props2 = __props;
  14144. const emit2 = __emit;
  14145. const handleCheckLogistics = () => {
  14146. uni.navigateTo({
  14147. url: `/pages/index/express/logistics-detail?orderId=${props2.order.orderId}&status=${props2.order.checkStatus}&id=${props2.order.id}`
  14148. });
  14149. };
  14150. function handleButtonClick(checkStatus, reason) {
  14151. uni.$u.http.post("/app/orderexception/update", {
  14152. id: props2.order.id,
  14153. checkStatus,
  14154. refusalReason: reason
  14155. }).then((res2) => {
  14156. if (res2.code == 200) {
  14157. if (checkStatus == 2) {
  14158. let text = props2.order.waybillCode + "签收成功";
  14159. uni.$u.ttsModule.speak(text);
  14160. }
  14161. uni.$u.toast("操作成功");
  14162. emit2("refresh");
  14163. } else {
  14164. uni.$u.toast(res2.msg);
  14165. }
  14166. });
  14167. }
  14168. const __returned__ = { props: props2, emit: emit2, handleCheckLogistics, handleButtonClick, ref: vue.ref, ApproveButton, RejectButton };
  14169. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14170. return __returned__;
  14171. }
  14172. };
  14173. function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
  14174. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  14175. return vue.openBlock(), vue.createElementBlock("view", { class: "exception-item" }, [
  14176. vue.createCommentVNode(" 订单信息 "),
  14177. vue.createElementVNode("view", { class: "info-section flex-1" }, [
  14178. vue.createElementVNode("view", { class: "info-row" }, [
  14179. vue.createElementVNode("text", { class: "label" }, "订单编号:"),
  14180. vue.createElementVNode(
  14181. "text",
  14182. { class: "value" },
  14183. vue.toDisplayString($props.order.orderId),
  14184. 1
  14185. /* TEXT */
  14186. )
  14187. ]),
  14188. vue.createElementVNode("view", { class: "info-row" }, [
  14189. vue.createElementVNode("text", { class: "label" }, "快递单号:"),
  14190. vue.createElementVNode(
  14191. "text",
  14192. { class: "value" },
  14193. vue.toDisplayString($props.order.waybillCode),
  14194. 1
  14195. /* TEXT */
  14196. )
  14197. ]),
  14198. vue.createElementVNode("view", { class: "info-row" }, [
  14199. vue.createElementVNode("text", { class: "label" }, "预估单价:"),
  14200. vue.createElementVNode(
  14201. "text",
  14202. { class: "value" },
  14203. vue.toDisplayString($props.order.expectMoney) + "元",
  14204. 1
  14205. /* TEXT */
  14206. )
  14207. ]),
  14208. vue.createElementVNode("view", { class: "info-row" }, [
  14209. vue.createElementVNode("text", { class: "label" }, "推送人:"),
  14210. vue.createElementVNode(
  14211. "text",
  14212. { class: "value" },
  14213. vue.toDisplayString($props.order.createName),
  14214. 1
  14215. /* TEXT */
  14216. )
  14217. ]),
  14218. vue.createElementVNode("view", {
  14219. class: "info-row",
  14220. style: { "margin-bottom": "0" }
  14221. }, [
  14222. vue.createElementVNode("text", { class: "label" }, "推送时间:"),
  14223. vue.createElementVNode(
  14224. "text",
  14225. { class: "value" },
  14226. vue.toDisplayString($props.order.createTime),
  14227. 1
  14228. /* TEXT */
  14229. )
  14230. ])
  14231. ]),
  14232. vue.createCommentVNode(" 操作按钮 "),
  14233. vue.createElementVNode("view", { class: "action-section" }, [
  14234. vue.createVNode(_component_u_button, {
  14235. type: "primary",
  14236. text: "查看物流",
  14237. size: "small",
  14238. onClick: $setup.handleCheckLogistics
  14239. }),
  14240. $props.order.checkStatus == 1 ? (vue.openBlock(), vue.createBlock($setup["ApproveButton"], {
  14241. key: 0,
  14242. onApprove: _cache[0] || (_cache[0] = ($event) => $setup.handleButtonClick(2))
  14243. })) : vue.createCommentVNode("v-if", true),
  14244. $props.order.checkStatus == 1 ? (vue.openBlock(), vue.createBlock($setup["RejectButton"], {
  14245. key: 1,
  14246. onReject: _cache[1] || (_cache[1] = (reason) => $setup.handleButtonClick(3, reason))
  14247. })) : vue.createCommentVNode("v-if", true),
  14248. $props.order.checkStatus == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  14249. key: 2,
  14250. style: { "color": "#19be6b" }
  14251. }, "[已签收]")) : vue.createCommentVNode("v-if", true),
  14252. $props.order.checkStatus == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  14253. key: 3,
  14254. style: { "color": "#f00" }
  14255. }, "[已驳回]")) : vue.createCommentVNode("v-if", true)
  14256. ])
  14257. ]);
  14258. }
  14259. const ExceptionItem = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$1i], ["__scopeId", "data-v-e0527396"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/components/ExceptionItem.vue"]]);
  14260. const _sfc_main$1i = {
  14261. __name: "route-exception",
  14262. setup(__props, { expose: __expose }) {
  14263. __expose();
  14264. const tabList = ["待处理订单", "历史异常签收"];
  14265. const curNow = vue.ref(0);
  14266. const exceptionList = vue.ref([]);
  14267. let urlList = ["/app/orderexception/pagelist", "/app/orderexception/getPageLoglist"];
  14268. const requestStr = vue.ref(urlList[0]);
  14269. function sectionChange(index2) {
  14270. curNow.value = index2;
  14271. requestStr.value = urlList[index2];
  14272. handleSearch();
  14273. }
  14274. const pageScrollRef = vue.ref(null);
  14275. const otherParams = vue.ref({ search: "" });
  14276. const updateList = (list) => {
  14277. exceptionList.value = list;
  14278. };
  14279. const handleSearch = () => {
  14280. var _a;
  14281. (_a = pageScrollRef.value) == null ? void 0 : _a.resetUpScroll();
  14282. };
  14283. const handleScan = () => {
  14284. uni.scanCode({
  14285. success: (res2) => {
  14286. otherParams.value.search = res2.result;
  14287. handleSearch();
  14288. }
  14289. });
  14290. };
  14291. onLoad(() => {
  14292. uni.$u.useGlobalEvent((e) => {
  14293. otherParams.value.search = e.barcode;
  14294. handleSearch();
  14295. });
  14296. });
  14297. const __returned__ = { tabList, curNow, exceptionList, get urlList() {
  14298. return urlList;
  14299. }, set urlList(v) {
  14300. urlList = v;
  14301. }, requestStr, sectionChange, pageScrollRef, otherParams, updateList, handleSearch, handleScan, ref: vue.ref, get onLoad() {
  14302. return onLoad;
  14303. }, ExceptionItem, PageScroll };
  14304. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14305. return __returned__;
  14306. }
  14307. };
  14308. function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
  14309. const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$5);
  14310. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$3);
  14311. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  14312. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  14313. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14314. vue.createCommentVNode(" 列表区域 "),
  14315. vue.createVNode($setup["PageScroll"], {
  14316. ref: "pageScrollRef",
  14317. height: "100vh",
  14318. requestStr: $setup.requestStr,
  14319. onUpdateList: $setup.updateList,
  14320. otherParams: $setup.otherParams
  14321. }, {
  14322. default: vue.withCtx(() => [
  14323. vue.createVNode(_component_u_sticky, { "offset-top": 0 }, {
  14324. default: vue.withCtx(() => [
  14325. vue.createCommentVNode(" 顶部标签页 "),
  14326. vue.createVNode(_component_u_subsection, {
  14327. fontSize: "16",
  14328. list: $setup.tabList,
  14329. current: $setup.curNow,
  14330. onChange: $setup.sectionChange,
  14331. mode: "subsection",
  14332. class: "tabs-list"
  14333. }, null, 8, ["current"])
  14334. ]),
  14335. _: 1
  14336. /* STABLE */
  14337. }),
  14338. vue.createElementVNode("view", { class: "list-container" }, [
  14339. (vue.openBlock(true), vue.createElementBlock(
  14340. vue.Fragment,
  14341. null,
  14342. vue.renderList($setup.exceptionList, (item) => {
  14343. return vue.openBlock(), vue.createBlock($setup["ExceptionItem"], {
  14344. key: item.orderNo,
  14345. order: item,
  14346. onRefresh: $setup.handleSearch
  14347. }, null, 8, ["order"]);
  14348. }),
  14349. 128
  14350. /* KEYED_FRAGMENT */
  14351. ))
  14352. ])
  14353. ]),
  14354. _: 1
  14355. /* STABLE */
  14356. }, 8, ["requestStr", "otherParams"]),
  14357. vue.createCommentVNode(" 底部搜索框 "),
  14358. vue.createElementVNode("view", { class: "search-bar fixed-bottom" }, [
  14359. vue.createVNode(_component_u_search, {
  14360. modelValue: $setup.otherParams.search,
  14361. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.otherParams.search = $event),
  14362. placeholder: "请输入物流单号/订单编号",
  14363. "show-action": false,
  14364. inputStyle: { fontSize: "32rpx" },
  14365. onSearch: $setup.handleSearch,
  14366. height: "80rpx",
  14367. shape: "round"
  14368. }, null, 8, ["modelValue"]),
  14369. vue.createVNode(_component_u_icon, {
  14370. name: "scan",
  14371. size: "28",
  14372. color: "#19be6b",
  14373. onClick: $setup.handleScan
  14374. })
  14375. ])
  14376. ]);
  14377. }
  14378. const PagesIndexExpressRouteException = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$1h], ["__scopeId", "data-v-388e5b84"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/route-exception.vue"]]);
  14379. const placeholderStyle$1 = "font-size:32rpx";
  14380. const _sfc_main$1h = {
  14381. __name: "warehouse-sign",
  14382. setup(__props, { expose: __expose }) {
  14383. __expose();
  14384. const customStyle = vue.reactive({
  14385. height: "90rpx"
  14386. });
  14387. const selectedWarehouse = vue.ref("");
  14388. const form = vue.ref({
  14389. "packageCode": "",
  14390. "godownId": ""
  14391. });
  14392. const showSelector = vue.ref(false);
  14393. function openWarehouseSelector() {
  14394. showSelector.value = true;
  14395. }
  14396. function handleWarehouseSelected(item) {
  14397. selectedWarehouse.value = item.godownName;
  14398. form.value.godownId = item.id;
  14399. }
  14400. function scanCode() {
  14401. uni.scanCode({
  14402. success: (res2) => {
  14403. form.value.packageCode = res2.result;
  14404. handleBarcode(res2.result);
  14405. },
  14406. fail: (err) => {
  14407. uni.$u.toast("扫码失败");
  14408. }
  14409. });
  14410. }
  14411. function handleBarcode(code2) {
  14412. if (!code2)
  14413. return uni.$u.toast("请输入物流单号");
  14414. uni.$u.http.post("/app/ordersign/toGodownSign", form.value).then((res2) => {
  14415. if (res2.code == 200) {
  14416. let text = code2 + "到仓签收成功";
  14417. uni.$u.ttsModule.speak(text);
  14418. } else {
  14419. let text = code2 + "订单不存在";
  14420. uni.$u.ttsModule.speak(text);
  14421. }
  14422. });
  14423. }
  14424. function getUserBindWarehouse() {
  14425. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
  14426. var _a, _b;
  14427. if (res2.code == 200) {
  14428. selectedWarehouse.value = (_a = res2.data) == null ? void 0 : _a.godownName;
  14429. form.value.godownId = (_b = res2.data) == null ? void 0 : _b.id;
  14430. }
  14431. });
  14432. }
  14433. onLoad(() => {
  14434. getUserBindWarehouse();
  14435. uni.$u.useGlobalEvent((e) => {
  14436. form.value.packageCode = e.barcode;
  14437. handleBarcode(e.barcode);
  14438. });
  14439. });
  14440. const __returned__ = { placeholderStyle: placeholderStyle$1, customStyle, selectedWarehouse, form, showSelector, openWarehouseSelector, handleWarehouseSelected, scanCode, handleBarcode, getUserBindWarehouse, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  14441. return onLoad;
  14442. }, WarehouseSelector };
  14443. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14444. return __returned__;
  14445. }
  14446. };
  14447. function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) {
  14448. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  14449. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  14450. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14451. vue.createElementVNode("view", { class: "main-content" }, [
  14452. vue.createElementVNode("view", { class: "input-group" }, [
  14453. vue.createVNode(_component_u_input, {
  14454. customStyle: $setup.customStyle,
  14455. "placeholder-style": $setup.placeholderStyle,
  14456. modelValue: $setup.selectedWarehouse,
  14457. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedWarehouse = $event),
  14458. placeholder: "请选择仓库",
  14459. readonly: "",
  14460. border: "surround"
  14461. }, null, 8, ["customStyle", "modelValue"]),
  14462. vue.createVNode(_component_u_button, {
  14463. customStyle: $setup.customStyle,
  14464. type: "info",
  14465. color: "#a4adb3",
  14466. onClick: $setup.openWarehouseSelector,
  14467. text: "选择"
  14468. }, null, 8, ["customStyle"])
  14469. ]),
  14470. vue.createElementVNode("view", { class: "input-group" }, [
  14471. vue.createVNode(_component_u_input, {
  14472. customStyle: $setup.customStyle,
  14473. "placeholder-style": $setup.placeholderStyle,
  14474. modelValue: $setup.form.packageCode,
  14475. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.packageCode = $event),
  14476. placeholder: "扫描/输入物流单号",
  14477. border: "surround"
  14478. }, null, 8, ["customStyle", "modelValue"]),
  14479. vue.createVNode(_component_u_button, {
  14480. customStyle: $setup.customStyle,
  14481. type: "info",
  14482. color: "#a4adb3",
  14483. onClick: _cache[2] || (_cache[2] = ($event) => $setup.handleBarcode($setup.form.packageCode)),
  14484. text: "确定"
  14485. }, null, 8, ["customStyle"])
  14486. ])
  14487. ]),
  14488. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  14489. vue.createVNode(_component_u_button, {
  14490. size: "large",
  14491. type: "success",
  14492. onClick: $setup.scanCode,
  14493. text: "扫码",
  14494. class: "scan-button"
  14495. })
  14496. ]),
  14497. vue.createVNode($setup["WarehouseSelector"], {
  14498. show: $setup.showSelector,
  14499. "onUpdate:show": _cache[3] || (_cache[3] = ($event) => $setup.showSelector = $event),
  14500. onWarehouseSelected: $setup.handleWarehouseSelected
  14501. }, null, 8, ["show"])
  14502. ]);
  14503. }
  14504. const PagesIndexExpressWarehouseSign = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1g], ["__scopeId", "data-v-7473f06e"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/express/warehouse-sign.vue"]]);
  14505. const placeholderStyle = "font-size:32rpx";
  14506. const _sfc_main$1g = {
  14507. __name: "weight-modify",
  14508. setup(__props, { expose: __expose }) {
  14509. __expose();
  14510. const customStyle = vue.reactive({
  14511. height: "90rpx"
  14512. });
  14513. const formRef = vue.ref(null);
  14514. const form = vue.ref({
  14515. "packageCode": "",
  14516. "batchNum": "",
  14517. "godownId": "",
  14518. "otherInfo": "",
  14519. "actualWeight": "",
  14520. "imgUrlList": []
  14521. });
  14522. const rules2 = {
  14523. packageCode: [{
  14524. required: true,
  14525. message: "请输入物流单号",
  14526. trigger: "blur"
  14527. }],
  14528. actualWeight: [{
  14529. required: true,
  14530. message: "请输入重量",
  14531. trigger: "blur"
  14532. }]
  14533. };
  14534. function scanCode() {
  14535. uni.scanCode({
  14536. success: (res2) => {
  14537. form.value.packageCode = res2.result;
  14538. },
  14539. fail: (err) => {
  14540. uni.$u.toast("扫码失败");
  14541. }
  14542. });
  14543. }
  14544. function submitForm() {
  14545. formRef.value.validate().then((valid) => {
  14546. if (valid) {
  14547. uni.$u.http.post("/app/ordersign/changeWeight", form.value).then((res2) => {
  14548. if (res2.code == 200) {
  14549. uni.$u.toast("重量修改成功");
  14550. let text = code + "已提交审核";
  14551. uni.$u.ttsModule.speak(text);
  14552. } else {
  14553. let text = code + "订单不存在";
  14554. uni.$u.ttsModule.speak(text);
  14555. }
  14556. });
  14557. }
  14558. });
  14559. }
  14560. onLoad(() => {
  14561. uni.$u.useGlobalEvent((e) => {
  14562. form.value.packageCode = e.barcode;
  14563. });
  14564. });
  14565. const __returned__ = { placeholderStyle, customStyle, formRef, form, rules: rules2, scanCode, submitForm, ref: vue.ref, reactive: vue.reactive, get onLoad() {
  14566. return onLoad;
  14567. }, cyUpload };
  14568. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14569. return __returned__;
  14570. }
  14571. };
  14572. function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) {
  14573. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  14574. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$a);
  14575. const _component_u__form = resolveEasycom(vue.resolveDynamicComponent("u--form"), __easycom_2$6);
  14576. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  14577. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14578. vue.createVNode(_component_u__form, {
  14579. ref: "formRef",
  14580. model: $setup.form,
  14581. rules: $setup.rules,
  14582. "label-width": "165px",
  14583. "label-position": "top",
  14584. labelStyle: { fontSize: "32rpx" },
  14585. errorType: "toast"
  14586. }, {
  14587. default: vue.withCtx(() => [
  14588. vue.createCommentVNode(" 物流单号输入 "),
  14589. vue.createVNode(_component_u_form_item, {
  14590. label: "",
  14591. prop: "packageCode"
  14592. }, {
  14593. default: vue.withCtx(() => [
  14594. vue.createVNode(_component_u_input, {
  14595. placeholderStyle: $setup.placeholderStyle,
  14596. customStyle: $setup.customStyle,
  14597. modelValue: $setup.form.packageCode,
  14598. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.packageCode = $event),
  14599. placeholder: "扫描/输入物流单号",
  14600. border: "surround",
  14601. name: "packageCode"
  14602. }, null, 8, ["customStyle", "modelValue"])
  14603. ]),
  14604. _: 1
  14605. /* STABLE */
  14606. }),
  14607. vue.createCommentVNode(" 重量输入 "),
  14608. vue.createVNode(_component_u_form_item, {
  14609. label: "重量(kg)",
  14610. prop: "actualWeight"
  14611. }, {
  14612. default: vue.withCtx(() => [
  14613. vue.createVNode(_component_u_input, {
  14614. placeholderStyle: $setup.placeholderStyle,
  14615. customStyle: $setup.customStyle,
  14616. modelValue: $setup.form.actualWeight,
  14617. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.actualWeight = $event),
  14618. placeholder: "请输入重量",
  14619. border: "surround",
  14620. name: "actualWeight",
  14621. type: "number"
  14622. }, null, 8, ["customStyle", "modelValue"])
  14623. ]),
  14624. _: 1
  14625. /* STABLE */
  14626. }),
  14627. vue.createCommentVNode(" 图片上传 "),
  14628. vue.createVNode(_component_u_form_item, {
  14629. label: "上传图片",
  14630. prop: "imgUrlList"
  14631. }, {
  14632. default: vue.withCtx(() => [
  14633. vue.createVNode($setup["cyUpload"], {
  14634. filename: $setup.form.imgUrlList,
  14635. "onUpdate:filename": _cache[2] || (_cache[2] = ($event) => $setup.form.imgUrlList = $event),
  14636. name: "imgUrlList",
  14637. limit: 10,
  14638. "max-size": 1024 * 1024
  14639. }, null, 8, ["filename"])
  14640. ]),
  14641. _: 1
  14642. /* STABLE */
  14643. })
  14644. ]),
  14645. _: 1
  14646. /* STABLE */
  14647. }, 8, ["model"]),
  14648. vue.createCommentVNode(" 底部按钮 "),
  14649. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  14650. vue.createVNode(_component_u_button, {
  14651. size: "large",
  14652. type: "warning",
  14653. onClick: $setup.scanCode,
  14654. text: "扫码",
  14655. class: "scan-button"
  14656. }),
  14657. vue.createVNode(_component_u_button, {
  14658. size: "large",
  14659. type: "success",
  14660. onClick: $setup.submitForm,
  14661. text: "提交",
  14662. class: "submit-button"
  14663. })
  14664. ])
  14665. ]);
  14666. }
  14667. 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"]]);
  14668. const _sfc_main$1f = {
  14669. __name: "confirm-receipt",
  14670. setup(__props, { expose: __expose }) {
  14671. __expose();
  14672. const formData = vue.ref({
  14673. searchType: "2",
  14674. search: ""
  14675. });
  14676. const searchKeyword = vue.ref("");
  14677. const handleSubmit = () => {
  14678. formatAppLog("log", "at pages/index/audit/confirm-receipt.vue:48", "查询:", searchKeyword.value);
  14679. if (!formData.value.search) {
  14680. uni.$u.toast("请扫描/输入物流单号");
  14681. return;
  14682. }
  14683. uni.$u.http.post("/app/orderinfo/confirmOrder", formData.value).then((res2) => {
  14684. formatAppLog("log", "at pages/index/audit/confirm-receipt.vue:54", res2);
  14685. if (res2.code == 200) {
  14686. let text = code + "收货成功";
  14687. uni.$u.ttsModule.speak(text);
  14688. } else {
  14689. let text = code + "订单不存在";
  14690. uni.$u.ttsModule.speak(text);
  14691. }
  14692. });
  14693. };
  14694. const handleScan = () => {
  14695. uni.scanCode({
  14696. success: (res2) => {
  14697. formData.value.search = res2.result;
  14698. handleSubmit();
  14699. }
  14700. });
  14701. };
  14702. onLoad(() => {
  14703. uni.$u.useGlobalEvent((e) => {
  14704. formData.value.search = e.barcode;
  14705. handleSubmit();
  14706. });
  14707. });
  14708. const __returned__ = { formData, searchKeyword, handleSubmit, handleScan, ref: vue.ref, get onLoad() {
  14709. return onLoad;
  14710. } };
  14711. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  14712. return __returned__;
  14713. }
  14714. };
  14715. function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
  14716. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
  14717. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$4);
  14718. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  14719. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  14720. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$3);
  14721. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  14722. vue.createCommentVNode(" 底部按钮 "),
  14723. vue.createElementVNode("view", { class: "footer" }, [
  14724. vue.createCommentVNode(" 查询区域 "),
  14725. vue.createElementVNode("view", { class: "query-section" }, [
  14726. vue.createVNode(_component_u_radio_group, {
  14727. modelValue: $setup.formData.searchType,
  14728. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.searchType = $event)
  14729. }, {
  14730. default: vue.withCtx(() => [
  14731. vue.createVNode(_component_u_radio, {
  14732. label: "查订单",
  14733. name: "1",
  14734. labelSize: "16px",
  14735. iconSize: "16px"
  14736. }),
  14737. vue.createVNode(_component_u_radio, {
  14738. label: "查物流",
  14739. "custom-style": "margin-left:20px",
  14740. name: "2",
  14741. labelSize: "16px",
  14742. iconSize: "16px"
  14743. })
  14744. ]),
  14745. _: 1
  14746. /* STABLE */
  14747. }, 8, ["modelValue"]),
  14748. vue.createElementVNode("view", { class: "search-box" }, [
  14749. vue.createVNode(_component_u_input, {
  14750. "custom-style": "font-size:32rpx",
  14751. "placeholder-style": "fong-size:32rpx",
  14752. modelValue: $setup.formData.search,
  14753. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.search = $event),
  14754. placeholder: $setup.formData.searchType == "1" ? "扫描/输入订单号" : "扫描/输入物流单号",
  14755. border: "surround",
  14756. clearable: ""
  14757. }, null, 8, ["modelValue", "placeholder"]),
  14758. vue.createVNode(_component_u_button, {
  14759. color: "#c8c8c8",
  14760. text: "查询",
  14761. onClick: $setup.handleSubmit
  14762. })
  14763. ])
  14764. ]),
  14765. vue.createVNode(_component_u_divider),
  14766. vue.createElementVNode("view", { style: { "display": "flex" } }, [
  14767. vue.createVNode(_component_u_button, {
  14768. size: "large",
  14769. type: "success",
  14770. text: "确认收货扫码",
  14771. onClick: $setup.handleScan
  14772. })
  14773. ])
  14774. ])
  14775. ]);
  14776. }
  14777. 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"]]);
  14778. const props$b = {
  14779. props: {
  14780. // 是否开启顶部安全区适配
  14781. safeAreaInsetTop: {
  14782. type: Boolean,
  14783. default: props$E.navbar.safeAreaInsetTop
  14784. },
  14785. // 固定在顶部时,是否生成一个等高元素,以防止塌陷
  14786. placeholder: {
  14787. type: Boolean,
  14788. default: props$E.navbar.placeholder
  14789. },
  14790. // 是否固定在顶部
  14791. fixed: {
  14792. type: Boolean,
  14793. default: props$E.navbar.fixed
  14794. },
  14795. // 是否显示下边框
  14796. border: {
  14797. type: Boolean,
  14798. default: props$E.navbar.border
  14799. },
  14800. // 左边的图标
  14801. leftIcon: {
  14802. type: String,
  14803. default: props$E.navbar.leftIcon
  14804. },
  14805. // 左边的提示文字
  14806. leftText: {
  14807. type: String,
  14808. default: props$E.navbar.leftText
  14809. },
  14810. // 左右的提示文字
  14811. rightText: {
  14812. type: String,
  14813. default: props$E.navbar.rightText
  14814. },
  14815. // 右边的图标
  14816. rightIcon: {
  14817. type: String,
  14818. default: props$E.navbar.rightIcon
  14819. },
  14820. // 标题
  14821. title: {
  14822. type: [String, Number],
  14823. default: props$E.navbar.title
  14824. },
  14825. // 背景颜色
  14826. bgColor: {
  14827. type: String,
  14828. default: props$E.navbar.bgColor
  14829. },
  14830. // 标题的宽度
  14831. titleWidth: {
  14832. type: [String, Number],
  14833. default: props$E.navbar.titleWidth
  14834. },
  14835. // 导航栏高度
  14836. height: {
  14837. type: [String, Number],
  14838. default: props$E.navbar.height
  14839. },
  14840. // 左侧返回图标的大小
  14841. leftIconSize: {
  14842. type: [String, Number],
  14843. default: props$E.navbar.leftIconSize
  14844. },
  14845. // 左侧返回图标的颜色
  14846. leftIconColor: {
  14847. type: String,
  14848. default: props$E.navbar.leftIconColor
  14849. },
  14850. // 点击左侧区域(返回图标),是否自动返回上一页
  14851. autoBack: {
  14852. type: Boolean,
  14853. default: props$E.navbar.autoBack
  14854. },
  14855. // 标题的样式,对象或字符串
  14856. titleStyle: {
  14857. type: [String, Object],
  14858. default: props$E.navbar.titleStyle
  14859. }
  14860. }
  14861. };
  14862. const _sfc_main$1e = {
  14863. name: "u-navbar",
  14864. mixins: [mpMixin, mixin, props$b],
  14865. data() {
  14866. return {};
  14867. },
  14868. methods: {
  14869. // 点击左侧区域
  14870. leftClick() {
  14871. this.$emit("leftClick");
  14872. if (this.autoBack) {
  14873. uni.navigateBack();
  14874. }
  14875. },
  14876. // 点击右侧区域
  14877. rightClick() {
  14878. this.$emit("rightClick");
  14879. }
  14880. }
  14881. };
  14882. function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) {
  14883. const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$8);
  14884. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  14885. return vue.openBlock(), vue.createElementBlock("view", { class: "u-navbar" }, [
  14886. _ctx.fixed && _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock(
  14887. "view",
  14888. {
  14889. key: 0,
  14890. class: "u-navbar__placeholder",
  14891. style: vue.normalizeStyle({
  14892. height: _ctx.$u.addUnit(_ctx.$u.getPx(_ctx.height) + _ctx.$u.sys().statusBarHeight, "px")
  14893. })
  14894. },
  14895. null,
  14896. 4
  14897. /* STYLE */
  14898. )) : vue.createCommentVNode("v-if", true),
  14899. vue.createElementVNode(
  14900. "view",
  14901. {
  14902. class: vue.normalizeClass([_ctx.fixed && "u-navbar--fixed"])
  14903. },
  14904. [
  14905. _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, {
  14906. key: 0,
  14907. bgColor: _ctx.bgColor
  14908. }, null, 8, ["bgColor"])) : vue.createCommentVNode("v-if", true),
  14909. vue.createElementVNode(
  14910. "view",
  14911. {
  14912. class: vue.normalizeClass(["u-navbar__content", [_ctx.border && "u-border-bottom"]]),
  14913. style: vue.normalizeStyle({
  14914. height: _ctx.$u.addUnit(_ctx.height),
  14915. backgroundColor: _ctx.bgColor
  14916. })
  14917. },
  14918. [
  14919. vue.createElementVNode("view", {
  14920. class: "u-navbar__content__left",
  14921. "hover-class": "u-navbar__content__left--hover",
  14922. "hover-start-time": "150",
  14923. onClick: _cache[0] || (_cache[0] = (...args) => $options.leftClick && $options.leftClick(...args))
  14924. }, [
  14925. vue.renderSlot(_ctx.$slots, "left", {}, () => [
  14926. _ctx.leftIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  14927. key: 0,
  14928. name: _ctx.leftIcon,
  14929. size: _ctx.leftIconSize,
  14930. color: _ctx.leftIconColor
  14931. }, null, 8, ["name", "size", "color"])) : vue.createCommentVNode("v-if", true),
  14932. _ctx.leftText ? (vue.openBlock(), vue.createElementBlock(
  14933. "text",
  14934. {
  14935. key: 1,
  14936. style: vue.normalizeStyle({
  14937. color: _ctx.leftIconColor
  14938. }),
  14939. class: "u-navbar__content__left__text"
  14940. },
  14941. vue.toDisplayString(_ctx.leftText),
  14942. 5
  14943. /* TEXT, STYLE */
  14944. )) : vue.createCommentVNode("v-if", true)
  14945. ], true)
  14946. ]),
  14947. vue.renderSlot(_ctx.$slots, "center", {}, () => [
  14948. vue.createElementVNode(
  14949. "text",
  14950. {
  14951. class: "u-line-1 u-navbar__content__title",
  14952. style: vue.normalizeStyle([{
  14953. width: _ctx.$u.addUnit(_ctx.titleWidth)
  14954. }, _ctx.$u.addStyle(_ctx.titleStyle)])
  14955. },
  14956. vue.toDisplayString(_ctx.title),
  14957. 5
  14958. /* TEXT, STYLE */
  14959. )
  14960. ], true),
  14961. _ctx.$slots.right || _ctx.rightIcon || _ctx.rightText ? (vue.openBlock(), vue.createElementBlock("view", {
  14962. key: 0,
  14963. class: "u-navbar__content__right",
  14964. onClick: _cache[1] || (_cache[1] = (...args) => $options.rightClick && $options.rightClick(...args))
  14965. }, [
  14966. vue.renderSlot(_ctx.$slots, "right", {}, () => [
  14967. _ctx.rightIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  14968. key: 0,
  14969. name: _ctx.rightIcon,
  14970. size: "20"
  14971. }, null, 8, ["name"])) : vue.createCommentVNode("v-if", true),
  14972. _ctx.rightText ? (vue.openBlock(), vue.createElementBlock(
  14973. "text",
  14974. {
  14975. key: 1,
  14976. class: "u-navbar__content__right__text"
  14977. },
  14978. vue.toDisplayString(_ctx.rightText),
  14979. 1
  14980. /* TEXT */
  14981. )) : vue.createCommentVNode("v-if", true)
  14982. ], true)
  14983. ])) : vue.createCommentVNode("v-if", true)
  14984. ],
  14985. 6
  14986. /* CLASS, STYLE */
  14987. )
  14988. ],
  14989. 2
  14990. /* CLASS */
  14991. )
  14992. ]);
  14993. }
  14994. 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"]]);
  14995. const props$a = {
  14996. props: {
  14997. // 步进器标识符,在change回调返回
  14998. name: {
  14999. type: [String, Number],
  15000. default: props$E.numberBox.name
  15001. },
  15002. // 用于双向绑定的值,初始化时设置设为默认min值(最小值)
  15003. modelValue: {
  15004. type: [String, Number],
  15005. default: props$E.numberBox.value
  15006. },
  15007. // 最小值
  15008. min: {
  15009. type: [String, Number],
  15010. default: props$E.numberBox.min
  15011. },
  15012. // 最大值
  15013. max: {
  15014. type: [String, Number],
  15015. default: props$E.numberBox.max
  15016. },
  15017. // 加减的步长,可为小数
  15018. step: {
  15019. type: [String, Number],
  15020. default: props$E.numberBox.step
  15021. },
  15022. // 是否只允许输入整数
  15023. integer: {
  15024. type: Boolean,
  15025. default: props$E.numberBox.integer
  15026. },
  15027. // 是否禁用,包括输入框,加减按钮
  15028. disabled: {
  15029. type: Boolean,
  15030. default: props$E.numberBox.disabled
  15031. },
  15032. // 是否禁用输入框
  15033. disabledInput: {
  15034. type: Boolean,
  15035. default: props$E.numberBox.disabledInput
  15036. },
  15037. // 是否开启异步变更,开启后需要手动控制输入值
  15038. asyncChange: {
  15039. type: Boolean,
  15040. default: props$E.numberBox.asyncChange
  15041. },
  15042. // 输入框宽度,单位为px
  15043. inputWidth: {
  15044. type: [String, Number],
  15045. default: props$E.numberBox.inputWidth
  15046. },
  15047. // 是否显示减少按钮
  15048. showMinus: {
  15049. type: Boolean,
  15050. default: props$E.numberBox.showMinus
  15051. },
  15052. // 是否显示增加按钮
  15053. showPlus: {
  15054. type: Boolean,
  15055. default: props$E.numberBox.showPlus
  15056. },
  15057. // 显示的小数位数
  15058. decimalLength: {
  15059. type: [String, Number, null],
  15060. default: props$E.numberBox.decimalLength
  15061. },
  15062. // 是否开启长按加减手势
  15063. longPress: {
  15064. type: Boolean,
  15065. default: props$E.numberBox.longPress
  15066. },
  15067. // 输入框文字和加减按钮图标的颜色
  15068. color: {
  15069. type: String,
  15070. default: props$E.numberBox.color
  15071. },
  15072. // 按钮大小,宽高等于此值,单位px,输入框高度和此值保持一致
  15073. buttonSize: {
  15074. type: [String, Number],
  15075. default: props$E.numberBox.buttonSize
  15076. },
  15077. // 输入框和按钮的背景颜色
  15078. bgColor: {
  15079. type: String,
  15080. default: props$E.numberBox.bgColor
  15081. },
  15082. // 指定光标于键盘的距离,避免键盘遮挡输入框,单位px
  15083. cursorSpacing: {
  15084. type: [String, Number],
  15085. default: props$E.numberBox.cursorSpacing
  15086. },
  15087. // 是否禁用增加按钮
  15088. disablePlus: {
  15089. type: Boolean,
  15090. default: props$E.numberBox.disablePlus
  15091. },
  15092. // 是否禁用减少按钮
  15093. disableMinus: {
  15094. type: Boolean,
  15095. default: props$E.numberBox.disableMinus
  15096. },
  15097. // 加减按钮图标的样式
  15098. iconStyle: {
  15099. type: [Object, String],
  15100. default: props$E.numberBox.iconStyle
  15101. }
  15102. }
  15103. };
  15104. const _sfc_main$1d = {
  15105. name: "u-number-box",
  15106. mixins: [mpMixin, mixin, props$a],
  15107. data() {
  15108. return {
  15109. // 输入框实际操作的值
  15110. currentValue: "",
  15111. // 定时器
  15112. longPressTimer: null
  15113. };
  15114. },
  15115. watch: {
  15116. // 多个值之间,只要一个值发生变化,都要重新检查check()函数
  15117. watchChange(n) {
  15118. this.check();
  15119. },
  15120. // 监听v-mode的变化,重新初始化内部的值
  15121. modelValue(n) {
  15122. if (n !== this.currentValue) {
  15123. this.currentValue = this.format(this.modelValue);
  15124. }
  15125. }
  15126. },
  15127. computed: {
  15128. getCursorSpacing() {
  15129. return uni.$u.getPx(this.cursorSpacing);
  15130. },
  15131. // 按钮的样式
  15132. buttonStyle() {
  15133. return (type2) => {
  15134. const style = {
  15135. backgroundColor: this.bgColor,
  15136. height: uni.$u.addUnit(this.buttonSize),
  15137. color: this.color
  15138. };
  15139. if (this.isDisabled(type2)) {
  15140. style.backgroundColor = "#f7f8fa";
  15141. }
  15142. return style;
  15143. };
  15144. },
  15145. // 输入框的样式
  15146. inputStyle() {
  15147. this.disabled || this.disabledInput;
  15148. const style = {
  15149. color: this.color,
  15150. backgroundColor: this.bgColor,
  15151. height: uni.$u.addUnit(this.buttonSize),
  15152. width: uni.$u.addUnit(this.inputWidth)
  15153. };
  15154. return style;
  15155. },
  15156. // 用于监听多个值发生变化
  15157. watchChange() {
  15158. return [this.integer, this.decimalLength, this.min, this.max];
  15159. },
  15160. isDisabled() {
  15161. return (type2) => {
  15162. if (type2 === "plus") {
  15163. return this.disabled || this.disablePlus || this.currentValue >= this.max;
  15164. }
  15165. return this.disabled || this.disableMinus || this.currentValue <= this.min;
  15166. };
  15167. }
  15168. },
  15169. mounted() {
  15170. this.init();
  15171. },
  15172. emits: ["update:modelValue", "focus", "blur", "overlimit", "change", "plus", "minus"],
  15173. methods: {
  15174. init() {
  15175. this.currentValue = this.format(this.modelValue);
  15176. },
  15177. // 格式化整理数据,限制范围
  15178. format(value2) {
  15179. value2 = this.filter(value2);
  15180. value2 = value2 === "" ? 0 : +value2;
  15181. value2 = Math.max(Math.min(this.max, value2), this.min);
  15182. if (this.decimalLength !== null) {
  15183. value2 = value2.toFixed(this.decimalLength);
  15184. }
  15185. return value2;
  15186. },
  15187. // 过滤非法的字符
  15188. filter(value2) {
  15189. value2 = String(value2).replace(/[^0-9.-]/g, "");
  15190. if (this.integer && value2.indexOf(".") !== -1) {
  15191. value2 = value2.split(".")[0];
  15192. }
  15193. return value2;
  15194. },
  15195. check() {
  15196. const val = this.format(this.currentValue);
  15197. if (val !== this.currentValue) {
  15198. this.currentValue = val;
  15199. }
  15200. },
  15201. // 判断是否出于禁止操作状态
  15202. // isDisabled(type) {
  15203. // if (type === 'plus') {
  15204. // // 在点击增加按钮情况下,判断整体的disabled,是否单独禁用增加按钮,以及当前值是否大于最大的允许值
  15205. // return (
  15206. // this.disabled ||
  15207. // this.disablePlus ||
  15208. // this.currentValue >= this.max
  15209. // )
  15210. // }
  15211. // // 点击减少按钮同理
  15212. // return (
  15213. // this.disabled ||
  15214. // this.disableMinus ||
  15215. // this.currentValue <= this.min
  15216. // )
  15217. // },
  15218. // 输入框活动焦点
  15219. onFocus(event) {
  15220. this.$emit("focus", {
  15221. ...event.detail,
  15222. name: this.name
  15223. });
  15224. },
  15225. // 输入框失去焦点
  15226. onBlur(event) {
  15227. this.format(event.detail.value);
  15228. this.$emit(
  15229. "blur",
  15230. {
  15231. ...event.detail,
  15232. name: this.name
  15233. }
  15234. );
  15235. },
  15236. // 输入框值发生变化
  15237. onInput(e) {
  15238. const {
  15239. value: value2 = ""
  15240. } = e.detail || {};
  15241. if (value2 === "")
  15242. return;
  15243. let formatted = this.filter(value2);
  15244. if (this.decimalLength !== null && formatted.indexOf(".") !== -1) {
  15245. const pair = formatted.split(".");
  15246. formatted = `${pair[0]}.${pair[1].slice(0, this.decimalLength)}`;
  15247. }
  15248. formatted = this.format(formatted);
  15249. this.emitChange(formatted);
  15250. },
  15251. // 发出change事件
  15252. emitChange(value2) {
  15253. if (!this.asyncChange) {
  15254. this.$nextTick(() => {
  15255. this.$emit("update:modelValue", value2);
  15256. this.currentValue = value2;
  15257. this.$forceUpdate();
  15258. });
  15259. }
  15260. this.$emit("change", {
  15261. value: value2,
  15262. name: this.name
  15263. });
  15264. },
  15265. onChange() {
  15266. const {
  15267. type: type2
  15268. } = this;
  15269. if (this.isDisabled(type2)) {
  15270. return this.$emit("overlimit", type2);
  15271. }
  15272. const diff = type2 === "minus" ? -this.step : +this.step;
  15273. const value2 = this.format(this.add(+this.currentValue, diff));
  15274. this.emitChange(value2);
  15275. this.$emit(type2);
  15276. },
  15277. // 对值扩大后进行四舍五入,再除以扩大因子,避免出现浮点数操作的精度问题
  15278. add(num1, num2) {
  15279. const cardinal = Math.pow(10, 10);
  15280. return Math.round((num1 + num2) * cardinal) / cardinal;
  15281. },
  15282. // 点击加减按钮
  15283. clickHandler(type2) {
  15284. this.type = type2;
  15285. this.onChange();
  15286. },
  15287. longPressStep() {
  15288. this.clearTimeout();
  15289. this.longPressTimer = setTimeout(() => {
  15290. this.onChange();
  15291. this.longPressStep();
  15292. }, 250);
  15293. },
  15294. onTouchStart(type2) {
  15295. if (!this.longPress)
  15296. return;
  15297. this.clearTimeout();
  15298. this.type = type2;
  15299. this.longPressTimer = setTimeout(() => {
  15300. this.onChange();
  15301. this.longPressStep();
  15302. }, 600);
  15303. },
  15304. // 触摸结束,清除定时器,停止长按加减
  15305. onTouchEnd() {
  15306. if (!this.longPress)
  15307. return;
  15308. this.clearTimeout();
  15309. },
  15310. // 清除定时器
  15311. clearTimeout() {
  15312. clearTimeout(this.longPressTimer);
  15313. this.longPressTimer = null;
  15314. }
  15315. }
  15316. };
  15317. function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) {
  15318. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  15319. return vue.openBlock(), vue.createElementBlock("view", { class: "u-number-box" }, [
  15320. _ctx.showMinus && _ctx.$slots.minus ? (vue.openBlock(), vue.createElementBlock(
  15321. "view",
  15322. {
  15323. key: 0,
  15324. class: "u-number-box__slot",
  15325. onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => $options.clickHandler("minus"), ["stop"])),
  15326. onTouchstart: _cache[1] || (_cache[1] = ($event) => $options.onTouchStart("minus")),
  15327. onTouchend: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"]))
  15328. },
  15329. [
  15330. vue.renderSlot(_ctx.$slots, "minus", {}, void 0, true)
  15331. ],
  15332. 32
  15333. /* NEED_HYDRATION */
  15334. )) : _ctx.showMinus ? (vue.openBlock(), vue.createElementBlock(
  15335. "view",
  15336. {
  15337. key: 1,
  15338. class: vue.normalizeClass(["u-number-box__minus", { "u-number-box__minus--disabled": $options.isDisabled("minus") }]),
  15339. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.clickHandler("minus"), ["stop"])),
  15340. onTouchstart: _cache[4] || (_cache[4] = ($event) => $options.onTouchStart("minus")),
  15341. onTouchend: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"])),
  15342. "hover-class": "u-number-box__minus--hover",
  15343. "hover-stay-time": "150",
  15344. style: vue.normalizeStyle([$options.buttonStyle("minus")])
  15345. },
  15346. [
  15347. vue.createVNode(_component_u_icon, {
  15348. name: "minus",
  15349. color: $options.isDisabled("minus") ? "#c8c9cc" : "#323233",
  15350. size: "15",
  15351. bold: "",
  15352. customStyle: _ctx.iconStyle
  15353. }, null, 8, ["color", "customStyle"])
  15354. ],
  15355. 38
  15356. /* CLASS, STYLE, NEED_HYDRATION */
  15357. )) : vue.createCommentVNode("v-if", true),
  15358. vue.renderSlot(_ctx.$slots, "input", {}, () => [
  15359. vue.withDirectives(vue.createElementVNode("input", {
  15360. disabled: _ctx.disabledInput || _ctx.disabled,
  15361. "cursor-spacing": $options.getCursorSpacing,
  15362. class: vue.normalizeClass([{ "u-number-box__input--disabled": _ctx.disabled || _ctx.disabledInput }, "u-number-box__input"]),
  15363. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.currentValue = $event),
  15364. onBlur: _cache[7] || (_cache[7] = (...args) => $options.onBlur && $options.onBlur(...args)),
  15365. onFocus: _cache[8] || (_cache[8] = (...args) => $options.onFocus && $options.onFocus(...args)),
  15366. onInput: _cache[9] || (_cache[9] = (...args) => $options.onInput && $options.onInput(...args)),
  15367. type: "number",
  15368. style: vue.normalizeStyle([$options.inputStyle])
  15369. }, null, 46, ["disabled", "cursor-spacing"]), [
  15370. [vue.vModelText, $data.currentValue]
  15371. ])
  15372. ], true),
  15373. _ctx.showPlus && _ctx.$slots.plus ? (vue.openBlock(), vue.createElementBlock(
  15374. "view",
  15375. {
  15376. key: 2,
  15377. class: "u-number-box__slot",
  15378. onClick: _cache[10] || (_cache[10] = vue.withModifiers(($event) => $options.clickHandler("plus"), ["stop"])),
  15379. onTouchstart: _cache[11] || (_cache[11] = ($event) => $options.onTouchStart("plus")),
  15380. onTouchend: _cache[12] || (_cache[12] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"]))
  15381. },
  15382. [
  15383. vue.renderSlot(_ctx.$slots, "plus", {}, void 0, true)
  15384. ],
  15385. 32
  15386. /* NEED_HYDRATION */
  15387. )) : _ctx.showPlus ? (vue.openBlock(), vue.createElementBlock(
  15388. "view",
  15389. {
  15390. key: 3,
  15391. class: vue.normalizeClass(["u-number-box__plus", { "u-number-box__minus--disabled": $options.isDisabled("plus") }]),
  15392. onClick: _cache[13] || (_cache[13] = vue.withModifiers(($event) => $options.clickHandler("plus"), ["stop"])),
  15393. onTouchstart: _cache[14] || (_cache[14] = ($event) => $options.onTouchStart("plus")),
  15394. onTouchend: _cache[15] || (_cache[15] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"])),
  15395. "hover-class": "u-number-box__plus--hover",
  15396. "hover-stay-time": "150",
  15397. style: vue.normalizeStyle([$options.buttonStyle("plus")])
  15398. },
  15399. [
  15400. vue.createVNode(_component_u_icon, {
  15401. name: "plus",
  15402. color: $options.isDisabled("plus") ? "#c8c9cc" : "#323233",
  15403. size: "15",
  15404. bold: "",
  15405. customStyle: _ctx.iconStyle
  15406. }, null, 8, ["color", "customStyle"])
  15407. ],
  15408. 38
  15409. /* CLASS, STYLE, NEED_HYDRATION */
  15410. )) : vue.createCommentVNode("v-if", true)
  15411. ]);
  15412. }
  15413. 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"]]);
  15414. const _sfc_main$1c = {
  15415. __name: "scan-order",
  15416. setup(__props, { expose: __expose }) {
  15417. __expose();
  15418. const isbnList = vue.ref([]);
  15419. const showModal = vue.ref(false);
  15420. const newIsbn = vue.ref("");
  15421. const removeItem = (index2) => {
  15422. isbnList.value.splice(index2, 1);
  15423. };
  15424. const goBack = () => {
  15425. uni.navigateBack();
  15426. };
  15427. function clearAll() {
  15428. isbnList.value.length = 0;
  15429. }
  15430. const addOrUpdateIsbn = (isbn) => {
  15431. const existingItem = isbnList.value.find((item) => item.isbn === isbn);
  15432. if (existingItem) {
  15433. existingItem.quantity += 1;
  15434. } else {
  15435. isbnList.value.push({
  15436. isbn,
  15437. quantity: 1
  15438. });
  15439. }
  15440. };
  15441. function handleIsbn(isbn) {
  15442. if (isValidISBN(isbn)) {
  15443. addOrUpdateIsbn(isbn);
  15444. } else {
  15445. uni.$u.ttsModule.speak("不正确的ISBN码");
  15446. }
  15447. }
  15448. const handleScan = () => {
  15449. uni.scanCode({
  15450. success: (res2) => {
  15451. handleIsbn(res2.result);
  15452. }
  15453. });
  15454. };
  15455. const isValidISBN = (isbn) => {
  15456. return /^97[89]\d{10}$/.test(isbn);
  15457. };
  15458. const handleQuery = () => {
  15459. if (isbnList.value.length === 0) {
  15460. uni.showToast({
  15461. title: "请先添加ISBN",
  15462. icon: "none"
  15463. });
  15464. return;
  15465. }
  15466. uni.setStorageSync("isbnList", isbnList.value);
  15467. uni.navigateTo({
  15468. url: "/pages/index/audit/isbn-order"
  15469. });
  15470. };
  15471. const addIsbn = () => {
  15472. if (isValidISBN(newIsbn.value)) {
  15473. addOrUpdateIsbn(newIsbn.value);
  15474. showModal.value = false;
  15475. newIsbn.value = "";
  15476. } else {
  15477. uni.$u.ttsModule.speak("不正确的ISBN码");
  15478. }
  15479. };
  15480. onLoad(() => {
  15481. uni.$u.useGlobalEvent((e) => {
  15482. addOrUpdateIsbn(e.barcode);
  15483. });
  15484. });
  15485. const __returned__ = { isbnList, showModal, newIsbn, removeItem, goBack, clearAll, addOrUpdateIsbn, handleIsbn, handleScan, isValidISBN, handleQuery, addIsbn, ref: vue.ref, get onLoad() {
  15486. return onLoad;
  15487. } };
  15488. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15489. return __returned__;
  15490. }
  15491. };
  15492. function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
  15493. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  15494. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_2$2);
  15495. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$3);
  15496. const _component_u_number_box = resolveEasycom(vue.resolveDynamicComponent("u-number-box"), __easycom_3$3);
  15497. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  15498. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  15499. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_3$4);
  15500. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  15501. vue.createVNode(_component_u_navbar, {
  15502. title: "扫书查单",
  15503. border: false,
  15504. fixed: "",
  15505. bgColor: "#22ac38",
  15506. leftIconColor: "#fff",
  15507. titleStyle: "font-size:36rpx;color:#fff"
  15508. }, {
  15509. left: vue.withCtx(() => [
  15510. vue.createVNode(_component_u_icon, {
  15511. name: "arrow-left",
  15512. color: "#fff",
  15513. size: "20",
  15514. onClick: $setup.goBack
  15515. })
  15516. ]),
  15517. right: vue.withCtx(() => [
  15518. vue.createElementVNode("text", {
  15519. style: { "color": "#fff", "font-size": "32rpx" },
  15520. type: "primary",
  15521. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showModal = true)
  15522. }, "新增")
  15523. ]),
  15524. _: 1
  15525. /* STABLE */
  15526. }),
  15527. vue.createCommentVNode(" 顶部操作栏 "),
  15528. vue.createVNode(_component_u_sticky, null, {
  15529. default: vue.withCtx(() => [
  15530. vue.createElementVNode("view", {
  15531. class: "header",
  15532. onClick: $setup.clearAll
  15533. }, "清除全部"),
  15534. vue.createCommentVNode(" 提示信息 "),
  15535. vue.createElementVNode("view", { class: "tips" }, [
  15536. vue.createElementVNode("text", null, "请勿录入审核为不良的书籍ISBN!"),
  15537. vue.createElementVNode("text", { class: "sub-tips" }, "不良书籍的ISBN可能是错误的!")
  15538. ])
  15539. ]),
  15540. _: 1
  15541. /* STABLE */
  15542. }),
  15543. vue.createCommentVNode(" ISBN列表 "),
  15544. vue.createElementVNode("scroll-view", {
  15545. "scroll-y": "",
  15546. class: "isbn-list"
  15547. }, [
  15548. (vue.openBlock(true), vue.createElementBlock(
  15549. vue.Fragment,
  15550. null,
  15551. vue.renderList($setup.isbnList, (item, index2) => {
  15552. return vue.openBlock(), vue.createElementBlock("view", {
  15553. key: index2,
  15554. class: "isbn-item"
  15555. }, [
  15556. vue.createElementVNode("view", { class: "item-left" }, [
  15557. vue.createVNode(_component_u_icon, {
  15558. name: "minus-circle-fill",
  15559. color: "#dd524d",
  15560. size: "24",
  15561. onClick: ($event) => $setup.removeItem(index2)
  15562. }, null, 8, ["onClick"]),
  15563. vue.createElementVNode(
  15564. "text",
  15565. { class: "index" },
  15566. vue.toDisplayString(index2 + 1) + "、",
  15567. 1
  15568. /* TEXT */
  15569. ),
  15570. vue.createElementVNode(
  15571. "text",
  15572. { class: "isbn" },
  15573. vue.toDisplayString(item.isbn),
  15574. 1
  15575. /* TEXT */
  15576. )
  15577. ]),
  15578. vue.createVNode(_component_u_number_box, {
  15579. modelValue: item.quantity,
  15580. "onUpdate:modelValue": ($event) => item.quantity = $event,
  15581. disableMinus: item.quantity <= 1
  15582. }, null, 8, ["modelValue", "onUpdate:modelValue", "disableMinus"])
  15583. ]);
  15584. }),
  15585. 128
  15586. /* KEYED_FRAGMENT */
  15587. ))
  15588. ]),
  15589. vue.createCommentVNode(" 底部按钮 "),
  15590. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  15591. vue.createVNode(_component_u_button, {
  15592. size: "large",
  15593. type: "warning",
  15594. text: "扫码加书",
  15595. onClick: $setup.handleScan
  15596. }),
  15597. vue.createVNode(_component_u_button, {
  15598. size: "large",
  15599. type: "primary",
  15600. text: "查询",
  15601. onClick: $setup.handleQuery
  15602. })
  15603. ]),
  15604. vue.createCommentVNode(" ISBN Input Modal "),
  15605. vue.createVNode(_component_u_popup, {
  15606. show: $setup.showModal,
  15607. mode: "center",
  15608. customStyle: "width: 84%;border-radius:10px"
  15609. }, {
  15610. default: vue.withCtx(() => [
  15611. vue.createElementVNode("view", { class: "modal-content" }, [
  15612. vue.createElementVNode("text", null, "输入ISBN码"),
  15613. vue.createVNode(_component_u_input, {
  15614. modelValue: $setup.newIsbn,
  15615. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.newIsbn = $event),
  15616. placeholder: "请输入ISBN码",
  15617. "custom-style": "margin:60rpx 0"
  15618. }, null, 8, ["modelValue"]),
  15619. vue.createElementVNode("view", { class: "modal-buttons" }, [
  15620. vue.createVNode(_component_u_button, {
  15621. text: "取消",
  15622. onClick: _cache[2] || (_cache[2] = ($event) => $setup.showModal = false)
  15623. }),
  15624. vue.createVNode(_component_u_button, {
  15625. type: "primary",
  15626. text: "确定",
  15627. onClick: $setup.addIsbn
  15628. })
  15629. ])
  15630. ])
  15631. ]),
  15632. _: 1
  15633. /* STABLE */
  15634. }, 8, ["show"])
  15635. ]);
  15636. }
  15637. 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"]]);
  15638. const _sfc_main$1b = {
  15639. __name: "orderItem",
  15640. props: {
  15641. item: {
  15642. type: Object,
  15643. default: () => {
  15644. }
  15645. }
  15646. },
  15647. setup(__props, { expose: __expose }) {
  15648. __expose();
  15649. const props2 = __props;
  15650. const statusEnum = {
  15651. "0": "创建",
  15652. "1": "用户删除",
  15653. "2": "下单(待初审)",
  15654. "3": "初审(待取书)",
  15655. "4": "初审未通过",
  15656. "5": "快递取书(待签收)",
  15657. "6": "快递签收(待收货)",
  15658. "7": "物流签收(路由异常)",
  15659. "8": "仓库收货(待审核)",
  15660. "9": "审核中(审核未提交)",
  15661. "10": "已审核(待付款)",
  15662. "11": "已完成"
  15663. };
  15664. const maskedNickName = vue.computed(() => {
  15665. if (!props2.item.nickName)
  15666. return "";
  15667. return props2.item.nickName.charAt(0) + "*".repeat(props2.item.nickName.length - 1);
  15668. });
  15669. let statusText = vue.computed(() => {
  15670. return props2.item.status ? statusEnum[props2.item.status] : "-";
  15671. });
  15672. const statusColor = vue.ref("#FF4D4F");
  15673. const copyToClipboard = (text) => {
  15674. uni.setClipboardData({
  15675. data: text,
  15676. success: () => {
  15677. uni.showToast({
  15678. title: "复制成功",
  15679. icon: "success"
  15680. });
  15681. }
  15682. });
  15683. };
  15684. const handleAudit = () => {
  15685. uni.navigateTo({
  15686. url: `/pages/index/detail/index?id=${props2.item.orderId}`
  15687. });
  15688. };
  15689. const handleView = () => {
  15690. uni.navigateTo({
  15691. url: `/pages/index/detail/index?id=${props2.item.orderId}&type=2`
  15692. });
  15693. };
  15694. const __returned__ = { props: props2, statusEnum, maskedNickName, get statusText() {
  15695. return statusText;
  15696. }, set statusText(v) {
  15697. statusText = v;
  15698. }, statusColor, copyToClipboard, handleAudit, handleView, ref: vue.ref, computed: vue.computed };
  15699. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15700. return __returned__;
  15701. }
  15702. };
  15703. function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
  15704. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  15705. return vue.openBlock(), vue.createElementBlock("view", { class: "order-card" }, [
  15706. vue.createCommentVNode(" 用户信息 "),
  15707. vue.createElementVNode("view", { class: "user-info" }, [
  15708. vue.createElementVNode("image", {
  15709. class: "avatar",
  15710. src: $props.item.imgPath,
  15711. mode: "aspectFill"
  15712. }, null, 8, ["src"]),
  15713. vue.createElementVNode("view", { class: "user-details" }, [
  15714. vue.createElementVNode(
  15715. "text",
  15716. { class: "username" },
  15717. vue.toDisplayString($props.item.plat == 1 ? "微信用户" : "支付宝用户") + " (" + vue.toDisplayString($setup.maskedNickName) + ")",
  15718. 1
  15719. /* TEXT */
  15720. ),
  15721. vue.createElementVNode(
  15722. "text",
  15723. { class: "date" },
  15724. "共卖出" + vue.toDisplayString($props.item.totalNum) + "本书",
  15725. 1
  15726. /* TEXT */
  15727. ),
  15728. vue.createElementVNode(
  15729. "text",
  15730. { class: "date" },
  15731. "来自" + vue.toDisplayString($props.item.sendSsq),
  15732. 1
  15733. /* TEXT */
  15734. )
  15735. ]),
  15736. vue.createElementVNode("view", { class: "user-details right-items" }, [
  15737. vue.createElementVNode(
  15738. "text",
  15739. { class: "date" },
  15740. vue.toDisplayString($props.item.schedulePickupStartTime),
  15741. 1
  15742. /* TEXT */
  15743. ),
  15744. vue.createElementVNode(
  15745. "text",
  15746. {
  15747. class: "status",
  15748. style: vue.normalizeStyle({ color: $setup.statusColor })
  15749. },
  15750. "[" + vue.toDisplayString($setup.statusText) + "]",
  15751. 5
  15752. /* TEXT, STYLE */
  15753. )
  15754. ])
  15755. ]),
  15756. vue.createCommentVNode(" 订单详情 "),
  15757. vue.createElementVNode("view", { class: "order-details" }, [
  15758. vue.createElementVNode("view", { class: "detail-row flex flex-col" }, [
  15759. vue.createElementVNode("view", { class: "flex-1" }, [
  15760. vue.createElementVNode("text", null, "订单ID:"),
  15761. vue.createElementVNode(
  15762. "text",
  15763. {
  15764. class: "link",
  15765. onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyToClipboard($props.item.orderId))
  15766. },
  15767. vue.toDisplayString($props.item.orderId),
  15768. 1
  15769. /* TEXT */
  15770. )
  15771. ]),
  15772. vue.createElementVNode("view", { class: "flex-1" }, [
  15773. vue.createElementVNode("text", null, "运单号:"),
  15774. vue.createElementVNode(
  15775. "text",
  15776. {
  15777. class: "link",
  15778. onClick: _cache[1] || (_cache[1] = ($event) => $setup.copyToClipboard($props.item.waybillCode))
  15779. },
  15780. vue.toDisplayString($props.item.waybillCode),
  15781. 1
  15782. /* TEXT */
  15783. )
  15784. ])
  15785. ]),
  15786. vue.createElementVNode("view", { class: "detail-row" }, [
  15787. vue.createElementVNode(
  15788. "text",
  15789. { class: "flex-1" },
  15790. "预估金额:" + vue.toDisplayString($props.item.expectMoney || 0),
  15791. 1
  15792. /* TEXT */
  15793. ),
  15794. vue.createElementVNode(
  15795. "text",
  15796. { class: "flex-1" },
  15797. "审核金额:" + vue.toDisplayString($props.item.finalMoney || "待核算"),
  15798. 1
  15799. /* TEXT */
  15800. )
  15801. ]),
  15802. vue.createElementVNode("view", { class: "detail-row" }, [
  15803. vue.createElementVNode(
  15804. "text",
  15805. null,
  15806. "内部备注:" + vue.toDisplayString($props.item.manageRemark ? $props.item.manageRemark[0].remark : "-"),
  15807. 1
  15808. /* TEXT */
  15809. )
  15810. ])
  15811. ]),
  15812. vue.createCommentVNode(" 操作按钮 "),
  15813. vue.createElementVNode("view", { class: "action-buttons" }, [
  15814. vue.createVNode(_component_u_button, {
  15815. size: "small",
  15816. type: "primary",
  15817. onClick: $setup.handleAudit
  15818. }, {
  15819. default: vue.withCtx(() => [
  15820. vue.createTextVNode("到货审核")
  15821. ]),
  15822. _: 1
  15823. /* STABLE */
  15824. }),
  15825. vue.createVNode(_component_u_button, {
  15826. size: "small",
  15827. onClick: $setup.handleView
  15828. }, {
  15829. default: vue.withCtx(() => [
  15830. vue.createTextVNode("查看")
  15831. ]),
  15832. _: 1
  15833. /* STABLE */
  15834. })
  15835. ])
  15836. ]);
  15837. }
  15838. 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"]]);
  15839. const _sfc_main$1a = {
  15840. __name: "isbn-order",
  15841. setup(__props, { expose: __expose }) {
  15842. __expose();
  15843. const otherParams = vue.ref({
  15844. isbnList: ""
  15845. });
  15846. const scrollRef = vue.ref(null);
  15847. const refreshList = () => {
  15848. var _a;
  15849. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  15850. };
  15851. let dataList = vue.ref([]);
  15852. const updateList = (data, page2) => {
  15853. dataList.value = data;
  15854. if (data.length > 0 && page2 == 1) {
  15855. uni.$u.ttsModule.speak("查询到" + data.length + "条数据");
  15856. }
  15857. if (data.length == 0 && page2 == 1) {
  15858. uni.$u.ttsModule.speak("未查询到数据");
  15859. }
  15860. };
  15861. onLoad(() => {
  15862. const storedList = uni.getStorageSync("isbnList");
  15863. if (storedList) {
  15864. otherParams.value.isbnList = storedList.map((v) => v.isbn);
  15865. refreshList();
  15866. }
  15867. });
  15868. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  15869. return dataList;
  15870. }, set dataList(v) {
  15871. dataList = v;
  15872. }, updateList, reactive: vue.reactive, PageScroll, OrderItem: orderItem, ref: vue.ref, get onLoad() {
  15873. return onLoad;
  15874. } };
  15875. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15876. return __returned__;
  15877. }
  15878. };
  15879. function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
  15880. return vue.openBlock(), vue.createElementBlock("view", {
  15881. class: "common-page",
  15882. style: { "padding": "0" }
  15883. }, [
  15884. vue.createVNode($setup["PageScroll"], {
  15885. requestStr: "/app/orderinfo/getOrderListByIsbn",
  15886. onUpdateList: $setup.updateList,
  15887. ref: "scrollRef",
  15888. otherParams: $setup.otherParams,
  15889. method: "post"
  15890. }, {
  15891. default: vue.withCtx(() => [
  15892. $setup.dataList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  15893. key: 0,
  15894. class: "list-con"
  15895. }, [
  15896. (vue.openBlock(true), vue.createElementBlock(
  15897. vue.Fragment,
  15898. null,
  15899. vue.renderList($setup.dataList, (cell) => {
  15900. return vue.openBlock(), vue.createBlock($setup["OrderItem"], {
  15901. key: cell.id,
  15902. item: cell,
  15903. class: "mt-20"
  15904. }, null, 8, ["item"]);
  15905. }),
  15906. 128
  15907. /* KEYED_FRAGMENT */
  15908. ))
  15909. ])) : vue.createCommentVNode("v-if", true)
  15910. ]),
  15911. _: 1
  15912. /* STABLE */
  15913. }, 8, ["otherParams"])
  15914. ]);
  15915. }
  15916. const PagesIndexAuditIsbnOrder = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$19], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/isbn-order.vue"]]);
  15917. const _sfc_main$19 = {
  15918. __name: "express-order",
  15919. setup(__props, { expose: __expose }) {
  15920. __expose();
  15921. const form = vue.ref({
  15922. searchType: "2",
  15923. search: ""
  15924. });
  15925. const handleSearch = () => {
  15926. formatAppLog("log", "at pages/index/audit/express-order.vue:46", "查询:", form.value.search);
  15927. uni.$u.http.get("/app/orderinfo/getOrderInfoForCheck", {
  15928. params: {
  15929. ...form.value
  15930. }
  15931. }).then((res2) => {
  15932. if (res2.code == 200) {
  15933. uni.setStorageSync("orderDetail", res2.data);
  15934. uni.navigateTo({
  15935. url: `/pages/index/detail/index?id=${res2.data.orderId}`
  15936. });
  15937. } else {
  15938. let text = form.value.search + res2.msg;
  15939. uni.$u.ttsModule.speak(text);
  15940. }
  15941. });
  15942. };
  15943. const handleScan = () => {
  15944. uni.scanCode({
  15945. success: (res2) => {
  15946. form.value.search = res2.result;
  15947. handleSearch();
  15948. }
  15949. });
  15950. };
  15951. onLoad(() => {
  15952. uni.$u.useGlobalEvent((e) => {
  15953. form.value.search = e.barcode;
  15954. handleSearch();
  15955. });
  15956. });
  15957. const __returned__ = { form, handleSearch, handleScan, ref: vue.ref, get onLoad() {
  15958. return onLoad;
  15959. } };
  15960. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  15961. return __returned__;
  15962. }
  15963. };
  15964. function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
  15965. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_0$6);
  15966. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_1$4);
  15967. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  15968. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  15969. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$3);
  15970. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  15971. vue.createCommentVNode(" 底部按钮 "),
  15972. vue.createElementVNode("view", { class: "footer" }, [
  15973. vue.createCommentVNode(" 查询区域 "),
  15974. vue.createElementVNode("view", { class: "query-section" }, [
  15975. vue.createVNode(_component_u_radio_group, {
  15976. modelValue: $setup.form.searchType,
  15977. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.searchType = $event)
  15978. }, {
  15979. default: vue.withCtx(() => [
  15980. vue.createVNode(_component_u_radio, {
  15981. label: "查订单",
  15982. name: "1",
  15983. "label-size": "17"
  15984. }),
  15985. vue.createVNode(_component_u_radio, {
  15986. label: "查物流",
  15987. "custom-style": "margin-left:20px",
  15988. name: "2",
  15989. "label-size": "17"
  15990. })
  15991. ]),
  15992. _: 1
  15993. /* STABLE */
  15994. }, 8, ["modelValue"]),
  15995. vue.createElementVNode("view", { class: "search-box" }, [
  15996. vue.createVNode(_component_u_input, {
  15997. "custom-style": "width:100rpx",
  15998. modelValue: $setup.form.search,
  15999. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.search = $event),
  16000. placeholder: $setup.form.searchType == "1" ? "扫描/输入订单编号" : "扫描/输入物流单号",
  16001. border: "surround",
  16002. clearable: "",
  16003. "placeholder-style": "font-size:32rpx"
  16004. }, null, 8, ["modelValue", "placeholder"]),
  16005. vue.createVNode(_component_u_button, {
  16006. color: "#c8c8c8",
  16007. text: "查询",
  16008. onClick: $setup.handleSearch
  16009. })
  16010. ])
  16011. ]),
  16012. vue.createVNode(_component_u_divider),
  16013. vue.createElementVNode("view", { style: { "display": "flex" } }, [
  16014. vue.createVNode(_component_u_button, {
  16015. size: "large",
  16016. type: "success",
  16017. text: "扫码",
  16018. onClick: $setup.handleScan
  16019. })
  16020. ])
  16021. ])
  16022. ]);
  16023. }
  16024. 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"]]);
  16025. const _sfc_main$18 = {
  16026. __name: "AuditorSelector",
  16027. props: {
  16028. show: {
  16029. type: Boolean,
  16030. default: false
  16031. }
  16032. },
  16033. emits: ["update:show", "auditor-selected"],
  16034. setup(__props, { expose: __expose, emit: __emit }) {
  16035. __expose();
  16036. const props2 = __props;
  16037. const emit2 = __emit;
  16038. const searchKeyword = vue.ref("");
  16039. const searchResults = vue.ref([]);
  16040. const historyAuditors = vue.ref(uni.getStorageSync("historyAuditors") || []);
  16041. const checkUserId = vue.ref("");
  16042. const auditorSearch = (name) => {
  16043. formatAppLog("log", "at pages/index/detail/components/AuditorSelector.vue:66", name);
  16044. uni.$u.http.get("/app/appUser/getCheckUser?name=" + name).then((res2) => {
  16045. if (res2.code == 200) {
  16046. searchResults.value = res2.data;
  16047. }
  16048. });
  16049. };
  16050. const handleSearch = () => {
  16051. auditorSearch(searchKeyword.value);
  16052. };
  16053. const selectItem = vue.ref({});
  16054. const selectAuditor = (item) => {
  16055. checkUserId.value = item.userId;
  16056. selectItem.value = item;
  16057. };
  16058. const handleClose = () => {
  16059. emit2("update:show", false);
  16060. searchKeyword.value = "";
  16061. };
  16062. const handleConfirm = () => {
  16063. if (checkUserId.value) {
  16064. emit2("auditor-selected", selectItem.value);
  16065. uni.setStorageSync("checkUserInfo", selectItem.value);
  16066. addToHistory(selectItem.value);
  16067. handleClose();
  16068. }
  16069. };
  16070. const addToHistory = (item) => {
  16071. const existingIndex = historyAuditors.value.findIndex((auditor) => auditor.userId === item.userId);
  16072. if (existingIndex !== -1) {
  16073. historyAuditors.value.splice(existingIndex, 1);
  16074. }
  16075. historyAuditors.value.unshift(item);
  16076. if (historyAuditors.value.length > 10) {
  16077. historyAuditors.value.pop();
  16078. }
  16079. uni.setStorageSync("historyAuditors", historyAuditors.value);
  16080. };
  16081. vue.onMounted(() => {
  16082. const storedHistory = uni.getStorageSync("historyAuditors") || [];
  16083. historyAuditors.value = storedHistory;
  16084. });
  16085. const __returned__ = { props: props2, emit: emit2, searchKeyword, searchResults, historyAuditors, checkUserId, auditorSearch, handleSearch, selectItem, selectAuditor, handleClose, handleConfirm, addToHistory, ref: vue.ref, onMounted: vue.onMounted };
  16086. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16087. return __returned__;
  16088. }
  16089. };
  16090. function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
  16091. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  16092. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$4);
  16093. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  16094. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_3$4);
  16095. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  16096. show: $props.show,
  16097. onClose: $setup.handleClose,
  16098. mode: "bottom",
  16099. round: "10"
  16100. }, {
  16101. default: vue.withCtx(() => [
  16102. vue.createElementVNode("view", { class: "auditor-selector" }, [
  16103. vue.createElementVNode("view", { style: { "flex": "1" } }, [
  16104. vue.createCommentVNode(" Title "),
  16105. vue.createElementVNode("view", { class: "header" }, [
  16106. vue.createElementVNode("text", { class: "title" }, "绑定审核员")
  16107. ]),
  16108. vue.createCommentVNode(" Search Box "),
  16109. vue.createElementVNode("view", { class: "search-box" }, [
  16110. vue.createVNode(_component_u_search, {
  16111. inputStyle: { "height": "80rpx", "font-size": "16px" },
  16112. actionStyle: { "font-size": "16px", color: "#22ac38" },
  16113. modelValue: $setup.searchKeyword,
  16114. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchKeyword = $event),
  16115. placeholder: "搜索审核员",
  16116. "show-action": true,
  16117. "action-text": "搜索",
  16118. onSearch: $setup.handleSearch,
  16119. onCustom: $setup.handleSearch
  16120. }, null, 8, ["modelValue"])
  16121. ]),
  16122. vue.createCommentVNode(" Search Results "),
  16123. $setup.searchResults.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  16124. key: 0,
  16125. class: "search-result"
  16126. }, [
  16127. vue.createElementVNode("text", { class: "section-title" }, "搜索结果"),
  16128. vue.createElementVNode("view", { class: "tag-group" }, [
  16129. (vue.openBlock(true), vue.createElementBlock(
  16130. vue.Fragment,
  16131. null,
  16132. vue.renderList($setup.searchResults, (item) => {
  16133. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  16134. key: item,
  16135. text: item.userName,
  16136. plain: $setup.checkUserId !== item.userId,
  16137. shape: "circle",
  16138. onClick: ($event) => $setup.selectAuditor(item),
  16139. size: "large"
  16140. }, null, 8, ["text", "plain", "onClick"]);
  16141. }),
  16142. 128
  16143. /* KEYED_FRAGMENT */
  16144. ))
  16145. ])
  16146. ])) : vue.createCommentVNode("v-if", true),
  16147. vue.createCommentVNode(" History "),
  16148. $setup.historyAuditors.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  16149. key: 1,
  16150. class: "history-section"
  16151. }, [
  16152. vue.createElementVNode("text", { class: "section-title" }, "历史绑定"),
  16153. vue.createElementVNode("view", { class: "tag-group" }, [
  16154. (vue.openBlock(true), vue.createElementBlock(
  16155. vue.Fragment,
  16156. null,
  16157. vue.renderList($setup.historyAuditors, (item) => {
  16158. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  16159. key: item,
  16160. text: item.userName,
  16161. plain: $setup.checkUserId !== item.userId,
  16162. shape: "circle",
  16163. onClick: ($event) => $setup.selectAuditor(item),
  16164. size: "large"
  16165. }, null, 8, ["text", "plain", "onClick"]);
  16166. }),
  16167. 128
  16168. /* KEYED_FRAGMENT */
  16169. ))
  16170. ])
  16171. ])) : vue.createCommentVNode("v-if", true)
  16172. ]),
  16173. vue.createCommentVNode(" Footer Buttons "),
  16174. vue.createElementVNode("view", { class: "footer" }, [
  16175. vue.createVNode(_component_u_button, {
  16176. onClick: $setup.handleClose,
  16177. text: "取消",
  16178. plain: "",
  16179. shape: "circle"
  16180. }),
  16181. vue.createVNode(_component_u_button, {
  16182. type: "primary",
  16183. onClick: $setup.handleConfirm,
  16184. text: "确定",
  16185. shape: "circle"
  16186. })
  16187. ])
  16188. ])
  16189. ]),
  16190. _: 1
  16191. /* STABLE */
  16192. }, 8, ["show"]);
  16193. }
  16194. 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"]]);
  16195. const props$9 = {
  16196. props: {
  16197. // 输入框的内容
  16198. value: {
  16199. type: [String, Number],
  16200. default: props$E.textarea.value
  16201. },
  16202. // 输入框的内容
  16203. modelValue: {
  16204. type: [String, Number],
  16205. default: props$E.textarea.value
  16206. },
  16207. // 输入框为空时占位符
  16208. placeholder: {
  16209. type: [String, Number],
  16210. default: props$E.textarea.placeholder
  16211. },
  16212. // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
  16213. placeholderClass: {
  16214. type: String,
  16215. default: props$E.input.placeholderClass
  16216. },
  16217. // 指定placeholder的样式
  16218. placeholderStyle: {
  16219. type: [String, Object],
  16220. default: props$E.input.placeholderStyle
  16221. },
  16222. // 输入框高度
  16223. height: {
  16224. type: [String, Number],
  16225. default: props$E.textarea.height
  16226. },
  16227. // 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效
  16228. confirmType: {
  16229. type: String,
  16230. default: props$E.textarea.confirmType
  16231. },
  16232. // 是否禁用
  16233. disabled: {
  16234. type: Boolean,
  16235. default: props$E.textarea.disabled
  16236. },
  16237. // 是否显示统计字数
  16238. count: {
  16239. type: Boolean,
  16240. default: props$E.textarea.count
  16241. },
  16242. // 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现
  16243. focus: {
  16244. type: Boolean,
  16245. default: props$E.textarea.focus
  16246. },
  16247. // 是否自动增加高度
  16248. autoHeight: {
  16249. type: Boolean,
  16250. default: props$E.textarea.autoHeight
  16251. },
  16252. // 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true
  16253. fixed: {
  16254. type: Boolean,
  16255. default: props$E.textarea.fixed
  16256. },
  16257. // 指定光标与键盘的距离
  16258. cursorSpacing: {
  16259. type: Number,
  16260. default: props$E.textarea.cursorSpacing
  16261. },
  16262. // 指定focus时的光标位置
  16263. cursor: {
  16264. type: [String, Number],
  16265. default: props$E.textarea.cursor
  16266. },
  16267. // 是否显示键盘上方带有”完成“按钮那一栏,
  16268. showConfirmBar: {
  16269. type: Boolean,
  16270. default: props$E.textarea.showConfirmBar
  16271. },
  16272. // 光标起始位置,自动聚焦时有效,需与selection-end搭配使用
  16273. selectionStart: {
  16274. type: Number,
  16275. default: props$E.textarea.selectionStart
  16276. },
  16277. // 光标结束位置,自动聚焦时有效,需与selection-start搭配使用
  16278. selectionEnd: {
  16279. type: Number,
  16280. default: props$E.textarea.selectionEnd
  16281. },
  16282. // 键盘弹起时,是否自动上推页面
  16283. adjustPosition: {
  16284. type: Boolean,
  16285. default: props$E.textarea.adjustPosition
  16286. },
  16287. // 是否去掉 iOS 下的默认内边距,只微信小程序有效
  16288. disableDefaultPadding: {
  16289. type: Boolean,
  16290. default: props$E.textarea.disableDefaultPadding
  16291. },
  16292. // focus时,点击页面的时候不收起键盘,只微信小程序有效
  16293. holdKeyboard: {
  16294. type: Boolean,
  16295. default: props$E.textarea.holdKeyboard
  16296. },
  16297. // 最大输入长度,设置为 -1 的时候不限制最大长度
  16298. maxlength: {
  16299. type: [String, Number],
  16300. default: props$E.textarea.maxlength
  16301. },
  16302. // 边框类型,surround-四周边框,bottom-底部边框
  16303. border: {
  16304. type: String,
  16305. default: props$E.textarea.border
  16306. },
  16307. // 用于处理或者过滤输入框内容的方法
  16308. formatter: {
  16309. type: [Function, null],
  16310. default: props$E.textarea.formatter
  16311. },
  16312. // 是否忽略组件内对文本合成系统事件的处理
  16313. ignoreCompositionEvent: {
  16314. type: Boolean,
  16315. default: true
  16316. }
  16317. }
  16318. };
  16319. const _sfc_main$17 = {
  16320. name: "u-textarea",
  16321. mixins: [mpMixin, mixin, props$9],
  16322. data() {
  16323. return {
  16324. // 输入框的值
  16325. innerValue: "",
  16326. // 是否处于获得焦点状态
  16327. focused: false,
  16328. // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
  16329. firstChange: true,
  16330. // value绑定值的变化是由内部还是外部引起的
  16331. changeFromInner: false,
  16332. // 过滤处理方法
  16333. innerFormatter: (value2) => value2
  16334. };
  16335. },
  16336. created() {
  16337. },
  16338. watch: {
  16339. modelValue: {
  16340. immediate: true,
  16341. handler(newVal, oldVal) {
  16342. this.innerValue = newVal;
  16343. this.firstChange = false;
  16344. this.changeFromInner = false;
  16345. }
  16346. }
  16347. },
  16348. computed: {
  16349. // 组件的类名
  16350. textareaClass() {
  16351. let classes = [], { border, disabled } = this;
  16352. border === "surround" && (classes = classes.concat(["u-border", "u-textarea--radius"]));
  16353. border === "bottom" && (classes = classes.concat([
  16354. "u-border-bottom",
  16355. "u-textarea--no-radius"
  16356. ]));
  16357. disabled && classes.push("u-textarea--disabled");
  16358. return classes.join(" ");
  16359. },
  16360. // 组件的样式
  16361. textareaStyle() {
  16362. const style = {};
  16363. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  16364. }
  16365. },
  16366. emits: ["update:modelValue", "linechange", "focus", "blur", "change", "confirm", "keyboardheightchange"],
  16367. methods: {
  16368. // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
  16369. setFormatter(e) {
  16370. this.innerFormatter = e;
  16371. },
  16372. onFocus(e) {
  16373. this.$emit("focus", e);
  16374. },
  16375. onBlur(e) {
  16376. this.$emit("blur", e);
  16377. uni.$u.formValidate(this, "blur");
  16378. },
  16379. onLinechange(e) {
  16380. this.$emit("linechange", e);
  16381. },
  16382. onInput(e) {
  16383. let { value: value2 = "" } = e.detail || {};
  16384. const formatter = this.formatter || this.innerFormatter;
  16385. const formatValue = formatter(value2);
  16386. this.innerValue = value2;
  16387. this.$nextTick(() => {
  16388. this.innerValue = formatValue;
  16389. this.valueChange();
  16390. });
  16391. },
  16392. // 内容发生变化,进行处理
  16393. valueChange() {
  16394. const value2 = this.innerValue;
  16395. this.$nextTick(() => {
  16396. this.$emit("update:modelValue", value2);
  16397. this.changeFromInner = true;
  16398. this.$emit("change", value2);
  16399. uni.$u.formValidate(this, "change");
  16400. });
  16401. },
  16402. onConfirm(e) {
  16403. this.$emit("confirm", e);
  16404. },
  16405. onKeyboardheightchange(e) {
  16406. this.$emit("keyboardheightchange", e);
  16407. }
  16408. }
  16409. };
  16410. function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
  16411. return vue.openBlock(), vue.createElementBlock(
  16412. "view",
  16413. {
  16414. class: vue.normalizeClass(["u-textarea", $options.textareaClass]),
  16415. style: vue.normalizeStyle([$options.textareaStyle])
  16416. },
  16417. [
  16418. vue.createElementVNode("textarea", {
  16419. class: "u-textarea__field",
  16420. value: $data.innerValue,
  16421. style: vue.normalizeStyle({ height: _ctx.$u.addUnit(_ctx.height) }),
  16422. placeholder: _ctx.placeholder,
  16423. "placeholder-style": _ctx.$u.addStyle(_ctx.placeholderStyle, "string"),
  16424. "placeholder-class": _ctx.placeholderClass,
  16425. disabled: _ctx.disabled,
  16426. focus: _ctx.focus,
  16427. autoHeight: _ctx.autoHeight,
  16428. fixed: _ctx.fixed,
  16429. cursorSpacing: _ctx.cursorSpacing,
  16430. cursor: _ctx.cursor,
  16431. showConfirmBar: _ctx.showConfirmBar,
  16432. selectionStart: _ctx.selectionStart,
  16433. selectionEnd: _ctx.selectionEnd,
  16434. adjustPosition: _ctx.adjustPosition,
  16435. disableDefaultPadding: _ctx.disableDefaultPadding,
  16436. holdKeyboard: _ctx.holdKeyboard,
  16437. maxlength: _ctx.maxlength,
  16438. "confirm-type": _ctx.confirmType,
  16439. ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
  16440. onFocus: _cache[0] || (_cache[0] = (...args) => $options.onFocus && $options.onFocus(...args)),
  16441. onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)),
  16442. onLinechange: _cache[2] || (_cache[2] = (...args) => $options.onLinechange && $options.onLinechange(...args)),
  16443. onInput: _cache[3] || (_cache[3] = (...args) => $options.onInput && $options.onInput(...args)),
  16444. onConfirm: _cache[4] || (_cache[4] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
  16445. onKeyboardheightchange: _cache[5] || (_cache[5] = (...args) => $options.onKeyboardheightchange && $options.onKeyboardheightchange(...args))
  16446. }, null, 44, ["value", "placeholder", "placeholder-style", "placeholder-class", "disabled", "focus", "autoHeight", "fixed", "cursorSpacing", "cursor", "showConfirmBar", "selectionStart", "selectionEnd", "adjustPosition", "disableDefaultPadding", "holdKeyboard", "maxlength", "confirm-type", "ignoreCompositionEvent"]),
  16447. _ctx.count ? (vue.openBlock(), vue.createElementBlock(
  16448. "text",
  16449. {
  16450. key: 0,
  16451. class: "u-textarea__count",
  16452. style: vue.normalizeStyle({
  16453. "background-color": _ctx.disabled ? "transparent" : "#fff"
  16454. })
  16455. },
  16456. vue.toDisplayString($data.innerValue.length) + "/" + vue.toDisplayString(_ctx.maxlength),
  16457. 5
  16458. /* TEXT, STYLE */
  16459. )) : vue.createCommentVNode("v-if", true)
  16460. ],
  16461. 6
  16462. /* CLASS, STYLE */
  16463. );
  16464. }
  16465. 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"]]);
  16466. const _sfc_main$16 = {
  16467. __name: "OrderInfo",
  16468. props: {
  16469. orderId: String,
  16470. estimatedAmount: Number,
  16471. userNote: String,
  16472. detail: Object
  16473. // Add more props as needed
  16474. },
  16475. setup(__props, { expose: __expose }) {
  16476. __expose();
  16477. const props2 = __props;
  16478. let finalExpressList = { "1": "顺丰快递", "2": "京东快递", "3": "德邦快递" };
  16479. let finalExpressText = vue.computed(() => {
  16480. return props2.detail.finalExpress ? finalExpressList[props2.detail.finalExpress] : "";
  16481. });
  16482. const statusEnum = {
  16483. 0: "创建",
  16484. 1: "用户删除",
  16485. 2: "下单(待初审)",
  16486. 3: "初审(待取书)",
  16487. 4: "初审未通过",
  16488. 5: "快递取书(待签收)",
  16489. 6: "快递签收(待收货)",
  16490. 7: "物流签收(路由异常)",
  16491. 8: "仓库收货(待审核)",
  16492. 9: "审核中(审核未提交)",
  16493. 10: "已审核(待付款)",
  16494. 11: "已完成"
  16495. };
  16496. let statusText = vue.computed(() => {
  16497. return statusEnum[props2.detail.status] || "未知状态";
  16498. });
  16499. const maskedSendMobile = vue.computed(() => {
  16500. if (props2.detail.sendMobile && props2.detail.sendMobile.length === 11) {
  16501. return props2.detail.sendMobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
  16502. }
  16503. return props2.detail.sendMobile;
  16504. });
  16505. function copyToClipboard(text) {
  16506. uni.setClipboardData({
  16507. data: text,
  16508. success: function() {
  16509. uni.showToast({
  16510. title: "复制成功",
  16511. icon: "success"
  16512. });
  16513. },
  16514. fail: function(err) {
  16515. formatAppLog("error", "at pages/index/detail/components/OrderInfo.vue:120", "Could not copy text: ", err);
  16516. }
  16517. });
  16518. }
  16519. const showModal = vue.ref(false);
  16520. const internalRemark = vue.ref("");
  16521. function fillRemark(text) {
  16522. internalRemark.value = text;
  16523. }
  16524. const remarkInfo = vue.ref({});
  16525. function handleRemark() {
  16526. var _a;
  16527. showModal.value = true;
  16528. remarkInfo.value = ((_a = props2.detail.manageRemark) == null ? void 0 : _a[0]) || {};
  16529. internalRemark.value = remarkInfo.value.remark || "";
  16530. }
  16531. function confirmRemark() {
  16532. uni.$u.http.post("/app/orderinfo/setManageRemark", {
  16533. orderId: props2.detail.orderId,
  16534. remark: internalRemark.value,
  16535. id: remarkInfo.value.id
  16536. }).then((res2) => {
  16537. if (res2.code == 200) {
  16538. uni.$u.toast("保存成功");
  16539. uni.$u.ttsModule.speak("保存成功");
  16540. showModal.value = false;
  16541. getOrderDetail();
  16542. } else {
  16543. uni.$u.toast(res2.msg);
  16544. }
  16545. });
  16546. }
  16547. const __returned__ = { props: props2, get finalExpressList() {
  16548. return finalExpressList;
  16549. }, set finalExpressList(v) {
  16550. finalExpressList = v;
  16551. }, get finalExpressText() {
  16552. return finalExpressText;
  16553. }, set finalExpressText(v) {
  16554. finalExpressText = v;
  16555. }, statusEnum, get statusText() {
  16556. return statusText;
  16557. }, set statusText(v) {
  16558. statusText = v;
  16559. }, maskedSendMobile, copyToClipboard, showModal, internalRemark, fillRemark, remarkInfo, handleRemark, confirmRemark, computed: vue.computed, ref: vue.ref, watch: vue.watch };
  16560. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16561. return __returned__;
  16562. }
  16563. };
  16564. function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
  16565. var _a;
  16566. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  16567. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$2);
  16568. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$4);
  16569. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$2);
  16570. return vue.openBlock(), vue.createElementBlock(
  16571. vue.Fragment,
  16572. null,
  16573. [
  16574. vue.createElementVNode("view", { class: "order-info bg-white" }, [
  16575. vue.createElementVNode("view", { class: "info-item flex" }, [
  16576. vue.createElementVNode("text", { class: "label" }, "订单编号"),
  16577. vue.createElementVNode(
  16578. "text",
  16579. {
  16580. style: { "color": "#22ac38" },
  16581. class: "flex-1 text-center content",
  16582. onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyToClipboard($props.detail.orderId))
  16583. },
  16584. vue.toDisplayString($props.detail.orderId),
  16585. 1
  16586. /* TEXT */
  16587. )
  16588. ]),
  16589. vue.createElementVNode("view", { class: "info-item" }, [
  16590. vue.createElementVNode("text", { class: "label" }, "预估金额"),
  16591. vue.createElementVNode(
  16592. "text",
  16593. { class: "content" },
  16594. vue.toDisplayString($props.detail.expectMoney),
  16595. 1
  16596. /* TEXT */
  16597. ),
  16598. vue.createElementVNode("text", { class: "label border-left" }, "审核金额"),
  16599. vue.createElementVNode(
  16600. "text",
  16601. { class: "content" },
  16602. vue.toDisplayString($props.detail.finalMoney),
  16603. 1
  16604. /* TEXT */
  16605. )
  16606. ]),
  16607. vue.createElementVNode("view", { class: "info-item" }, [
  16608. vue.createElementVNode("text", { class: "label" }, "用户备注"),
  16609. vue.createElementVNode(
  16610. "text",
  16611. { class: "content" },
  16612. vue.toDisplayString($props.detail.userRemark),
  16613. 1
  16614. /* TEXT */
  16615. )
  16616. ]),
  16617. vue.createElementVNode("view", {
  16618. class: "info-item",
  16619. onClick: $setup.handleRemark
  16620. }, [
  16621. vue.createElementVNode("text", { class: "label" }, "内部备注"),
  16622. vue.createElementVNode(
  16623. "text",
  16624. { class: "content" },
  16625. vue.toDisplayString($props.detail.manageRemark ? $props.detail.manageRemark.length > 0 ? (_a = $props.detail.manageRemark[0]) == null ? void 0 : _a.remark : " " : " "),
  16626. 1
  16627. /* TEXT */
  16628. )
  16629. ]),
  16630. vue.createElementVNode("view", { class: "info-item" }, [
  16631. vue.createElementVNode("text", { class: "label" }, "订单状态"),
  16632. vue.createElementVNode(
  16633. "text",
  16634. {
  16635. class: "content",
  16636. style: { "color": "#c5493e" }
  16637. },
  16638. "[" + vue.toDisplayString($setup.statusText) + "]",
  16639. 1
  16640. /* TEXT */
  16641. )
  16642. ]),
  16643. vue.createElementVNode("view", { class: "info-item" }, [
  16644. vue.createElementVNode("text", { class: "label" }, "快递"),
  16645. vue.createElementVNode(
  16646. "text",
  16647. { class: "content" },
  16648. vue.toDisplayString($setup.finalExpressText) + "(单号:" + vue.toDisplayString($props.detail.waybillCode) + ")",
  16649. 1
  16650. /* TEXT */
  16651. )
  16652. ]),
  16653. vue.createElementVNode("view", { class: "info-item" }, [
  16654. vue.createElementVNode("text", { class: "label" }, [
  16655. vue.createTextVNode("发件人"),
  16656. vue.createElementVNode("text", { style: { "color": "#e99d42" } }, "(所有单)")
  16657. ]),
  16658. vue.createElementVNode("view", { class: "content flex flex-a-c flex-j-c" }, [
  16659. vue.createElementVNode("text", {
  16660. class: "content-text",
  16661. onClick: _cache[1] || (_cache[1] = ($event) => $setup.copyToClipboard($props.detail.sendMobile))
  16662. }, "复制"),
  16663. vue.createElementVNode(
  16664. "text",
  16665. { class: "content-text ml-10 mr-10" },
  16666. vue.toDisplayString($setup.maskedSendMobile),
  16667. 1
  16668. /* TEXT */
  16669. ),
  16670. $props.detail.orderFrom == 1 ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  16671. key: 0,
  16672. name: "weixin-circle-fill",
  16673. size: "18",
  16674. color: "#22ac38"
  16675. })) : vue.createCommentVNode("v-if", true),
  16676. $props.detail.orderFrom == 2 ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  16677. key: 1,
  16678. name: "zhifubao-circle-fill",
  16679. size: "18",
  16680. color: "#999"
  16681. })) : vue.createCommentVNode("v-if", true)
  16682. ])
  16683. ]),
  16684. vue.createElementVNode("view", { class: "info-item" }, [
  16685. vue.createElementVNode("text", { class: "label" }, "发货地址"),
  16686. vue.createElementVNode(
  16687. "text",
  16688. { class: "content" },
  16689. vue.toDisplayString($props.detail.sendAddress),
  16690. 1
  16691. /* TEXT */
  16692. )
  16693. ]),
  16694. vue.createElementVNode("view", { class: "info-item" }, [
  16695. vue.createElementVNode("text", { class: "label" }, "收货仓库"),
  16696. vue.createElementVNode(
  16697. "text",
  16698. { class: "content" },
  16699. vue.toDisplayString($props.detail.recipientAddress) + "-" + vue.toDisplayString($props.detail.recipientGodown) + "-" + vue.toDisplayString($props.detail.recipientName),
  16700. 1
  16701. /* TEXT */
  16702. )
  16703. ])
  16704. ]),
  16705. vue.createVNode(_component_u_modal, {
  16706. show: $setup.showModal,
  16707. "onUpdate:show": _cache[8] || (_cache[8] = ($event) => $setup.showModal = $event),
  16708. title: "编辑内部备注",
  16709. showCancelButton: true,
  16710. onConfirm: $setup.confirmRemark
  16711. }, {
  16712. default: vue.withCtx(() => [
  16713. vue.createElementVNode("view", { class: "modal-content w100" }, [
  16714. vue.createVNode(_component_u_textarea, {
  16715. modelValue: $setup.internalRemark,
  16716. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.internalRemark = $event),
  16717. placeholder: "编辑内部备注",
  16718. autoHeight: "",
  16719. style: { "min-height": "100px" }
  16720. }, null, 8, ["modelValue"]),
  16721. vue.createElementVNode("view", { class: "mt-20 common-title" }, "快速填入"),
  16722. vue.createElementVNode("view", { class: "quick-fill mt-16" }, [
  16723. vue.createVNode(_component_u_tag, {
  16724. class: "mr-10 mb-10",
  16725. onClick: _cache[3] || (_cache[3] = ($event) => $setup.fillRemark("少书给客服")),
  16726. text: "少书给客服"
  16727. }),
  16728. vue.createVNode(_component_u_tag, {
  16729. class: "mr-10 mb-10",
  16730. onClick: _cache[4] || (_cache[4] = ($event) => $setup.fillRemark("多书给客服")),
  16731. text: "多书给客服"
  16732. }),
  16733. vue.createVNode(_component_u_tag, {
  16734. class: "mr-10 mb-10",
  16735. onClick: _cache[5] || (_cache[5] = ($event) => $setup.fillRemark("子母件")),
  16736. text: "子母件"
  16737. }),
  16738. vue.createVNode(_component_u_tag, {
  16739. class: "mr-10 mb-10",
  16740. onClick: _cache[6] || (_cache[6] = ($event) => $setup.fillRemark("书单不符给客服")),
  16741. text: "书单不符给客服"
  16742. }),
  16743. vue.createVNode(_component_u_tag, {
  16744. class: "mr-10 mb-10",
  16745. onClick: _cache[7] || (_cache[7] = ($event) => $setup.fillRemark("需理赔给客服")),
  16746. text: "需理赔给客服"
  16747. })
  16748. ])
  16749. ])
  16750. ]),
  16751. _: 1
  16752. /* STABLE */
  16753. }, 8, ["show"])
  16754. ],
  16755. 64
  16756. /* STABLE_FRAGMENT */
  16757. );
  16758. }
  16759. 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"]]);
  16760. const _sfc_main$15 = {
  16761. __name: "UserInfoCard",
  16762. props: {
  16763. detail: {
  16764. type: Object,
  16765. default: () => ({})
  16766. }
  16767. },
  16768. setup(__props, { expose: __expose }) {
  16769. __expose();
  16770. const props2 = __props;
  16771. const formattedName = vue.computed(() => {
  16772. var _a, _b;
  16773. return ((_b = (_a = props2.detail) == null ? void 0 : _a.userNick) == null ? void 0 : _b.charAt(0)) + "**";
  16774. });
  16775. const statusClass = vue.computed(() => {
  16776. return props2.detail.userStatus == 1 ? "color-green" : "color-red";
  16777. });
  16778. const blacklistAction = vue.computed(() => {
  16779. return props2.detail.userStatus == 1 ? "加入黑名单" : "移除黑名单";
  16780. });
  16781. const showModal = vue.ref(false);
  16782. const showBlacklistModal = vue.ref(false);
  16783. const reason = vue.ref("");
  16784. const toggleBlacklist = () => {
  16785. showBlacklistModal.value = true;
  16786. };
  16787. const confirmBlacklist = () => {
  16788. let apiStr = props2.detail.userStatus == 1 ? "/app/appUser/setUserBlack" : "app/appUser/removeUserBlack";
  16789. uni.$u.http.post(apiStr, {
  16790. userId: props2.detail.userId,
  16791. reason: reason.value
  16792. }).then((res2) => {
  16793. if (res2.code == 200) {
  16794. uni.$u.toast("操作成功");
  16795. showBlacklistModal.value = false;
  16796. props2.detail.userStatus = props2.detail.userStatus == 1 ? 2 : 1;
  16797. } else {
  16798. uni.$u.toast(res2.msg);
  16799. }
  16800. });
  16801. };
  16802. const __returned__ = { props: props2, formattedName, statusClass, blacklistAction, showModal, showBlacklistModal, reason, toggleBlacklist, confirmBlacklist, ref: vue.ref, computed: vue.computed };
  16803. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16804. return __returned__;
  16805. }
  16806. };
  16807. function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
  16808. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$2);
  16809. return vue.openBlock(), vue.createElementBlock("view", { class: "user-info-card bg-white mt-16" }, [
  16810. vue.createElementVNode("view", { class: "header" }, [
  16811. vue.createElementVNode(
  16812. "text",
  16813. { style: { "color": "#666" } },
  16814. vue.toDisplayString($props.detail.orderTime),
  16815. 1
  16816. /* TEXT */
  16817. ),
  16818. vue.createElementVNode("text", {
  16819. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showModal = true),
  16820. class: "color-green"
  16821. }, "[查看订单日志]")
  16822. ]),
  16823. vue.createElementVNode("view", { class: "content flex flex-j-b" }, [
  16824. vue.createElementVNode("image", {
  16825. src: $props.detail.imgPath,
  16826. class: "user-image"
  16827. }, null, 8, ["src"]),
  16828. vue.createElementVNode("view", { class: "flex flex-a-e flex-1 ml-12" }, [
  16829. vue.createElementVNode("view", { class: "flex flex-d flex-1" }, [
  16830. vue.createElementVNode("text", { class: "color-green" }, [
  16831. vue.createTextVNode(
  16832. vue.toDisplayString($setup.formattedName),
  16833. 1
  16834. /* TEXT */
  16835. ),
  16836. vue.createElementVNode("text", { style: { "color": "#e99d42" } }, "(所有单)")
  16837. ]),
  16838. vue.createElementVNode(
  16839. "text",
  16840. {
  16841. class: "common-text",
  16842. style: { "margin-top": "10rpx" }
  16843. },
  16844. "共卖出" + vue.toDisplayString($props.detail.totalNum) + "本书",
  16845. 1
  16846. /* TEXT */
  16847. ),
  16848. vue.createElementVNode(
  16849. "text",
  16850. { class: "common-text" },
  16851. "来自" + vue.toDisplayString($props.detail.sendSsq),
  16852. 1
  16853. /* TEXT */
  16854. ),
  16855. vue.createElementVNode("text", {
  16856. class: "common-text",
  16857. style: { "margin-top": "10rpx" }
  16858. }, [
  16859. vue.createTextVNode("用户状态: "),
  16860. vue.createElementVNode(
  16861. "text",
  16862. {
  16863. class: vue.normalizeClass($setup.statusClass)
  16864. },
  16865. vue.toDisplayString($props.detail.userStatus == 1 ? "正常" : $props.detail.userStatus == 2 ? "黑名单" : "-"),
  16866. 3
  16867. /* TEXT, CLASS */
  16868. )
  16869. ])
  16870. ]),
  16871. vue.createElementVNode(
  16872. "text",
  16873. {
  16874. style: { "min-width": "160rpx" },
  16875. onClick: $setup.toggleBlacklist,
  16876. class: "color-red"
  16877. },
  16878. "[" + vue.toDisplayString($setup.blacklistAction) + "]",
  16879. 1
  16880. /* TEXT */
  16881. )
  16882. ])
  16883. ]),
  16884. vue.createVNode(_component_u_modal, {
  16885. show: $setup.showModal,
  16886. "onUpdate:show": _cache[1] || (_cache[1] = ($event) => $setup.showModal = $event),
  16887. title: "订单日志",
  16888. showCancelButton: false,
  16889. confirmText: "关闭",
  16890. onConfirm: _cache[2] || (_cache[2] = ($event) => $setup.showModal = false),
  16891. class: "log-modal"
  16892. }, {
  16893. default: vue.withCtx(() => [
  16894. vue.createElementVNode("view", { class: "log-container" }, [
  16895. vue.createElementVNode("view", { class: "log-header" }, [
  16896. vue.createElementVNode("text", null, "描述"),
  16897. vue.createElementVNode("text", null, "操作人"),
  16898. vue.createElementVNode("text", null, "时间")
  16899. ]),
  16900. (vue.openBlock(true), vue.createElementBlock(
  16901. vue.Fragment,
  16902. null,
  16903. vue.renderList($props.detail.logVoList, (log, index2) => {
  16904. return vue.openBlock(), vue.createElementBlock("view", {
  16905. class: "log-item",
  16906. key: index2
  16907. }, [
  16908. vue.createElementVNode(
  16909. "text",
  16910. { class: "log-item-content" },
  16911. vue.toDisplayString(log.statusName),
  16912. 1
  16913. /* TEXT */
  16914. ),
  16915. vue.createElementVNode(
  16916. "text",
  16917. { class: "log-item-name" },
  16918. vue.toDisplayString(log.createName),
  16919. 1
  16920. /* TEXT */
  16921. ),
  16922. vue.createElementVNode(
  16923. "text",
  16924. { class: "log-item-time" },
  16925. vue.toDisplayString(log.createTime),
  16926. 1
  16927. /* TEXT */
  16928. )
  16929. ]);
  16930. }),
  16931. 128
  16932. /* KEYED_FRAGMENT */
  16933. ))
  16934. ])
  16935. ]),
  16936. _: 1
  16937. /* STABLE */
  16938. }, 8, ["show"]),
  16939. vue.createVNode(_component_u_modal, {
  16940. show: $setup.showBlacklistModal,
  16941. "onUpdate:show": _cache[4] || (_cache[4] = ($event) => $setup.showBlacklistModal = $event),
  16942. title: "拉黑用户",
  16943. showCancelButton: true,
  16944. confirmText: "提交",
  16945. cancelText: "取消",
  16946. onConfirm: $setup.confirmBlacklist,
  16947. onCancel: _cache[5] || (_cache[5] = ($event) => $setup.showBlacklistModal = false)
  16948. }, {
  16949. default: vue.withCtx(() => [
  16950. vue.withDirectives(vue.createElementVNode(
  16951. "textarea",
  16952. {
  16953. class: "reason-textarea",
  16954. placeholder: "请输入拉黑原因...",
  16955. autoHeight: "",
  16956. "bg-color": "#f8f8f8",
  16957. "border-radius": "10rpx",
  16958. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.reason = $event),
  16959. height: "100px"
  16960. },
  16961. null,
  16962. 512
  16963. /* NEED_PATCH */
  16964. ), [
  16965. [vue.vModelText, $setup.reason]
  16966. ])
  16967. ]),
  16968. _: 1
  16969. /* STABLE */
  16970. }, 8, ["show"])
  16971. ]);
  16972. }
  16973. 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"]]);
  16974. const _sfc_main$14 = {
  16975. __name: "LogisticsTimeline",
  16976. props: {
  16977. list: {
  16978. type: Array,
  16979. default: []
  16980. }
  16981. },
  16982. setup(__props, { expose: __expose }) {
  16983. __expose();
  16984. const props2 = __props;
  16985. const __returned__ = { props: props2 };
  16986. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  16987. return __returned__;
  16988. }
  16989. };
  16990. function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
  16991. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  16992. return vue.openBlock(), vue.createElementBlock("view", {
  16993. "scroll-y": "",
  16994. class: "timeline-container"
  16995. }, [
  16996. (vue.openBlock(true), vue.createElementBlock(
  16997. vue.Fragment,
  16998. null,
  16999. vue.renderList($props.list, (item, index2) => {
  17000. return vue.openBlock(), vue.createElementBlock("view", {
  17001. key: index2,
  17002. class: "timeline-item"
  17003. }, [
  17004. vue.createElementVNode("view", { class: "timeline-icon" }, [
  17005. vue.createVNode(_component_u_icon, {
  17006. name: "map-fill",
  17007. color: "#19be6b",
  17008. size: "16"
  17009. })
  17010. ]),
  17011. vue.createElementVNode("view", { class: "timeline-content" }, [
  17012. vue.createElementVNode(
  17013. "text",
  17014. { class: "title" },
  17015. vue.toDisplayString(item.title),
  17016. 1
  17017. /* TEXT */
  17018. ),
  17019. vue.createElementVNode(
  17020. "text",
  17021. { class: "desc" },
  17022. vue.toDisplayString(item.description),
  17023. 1
  17024. /* TEXT */
  17025. ),
  17026. vue.createElementVNode(
  17027. "text",
  17028. { class: "time" },
  17029. vue.toDisplayString(item.time),
  17030. 1
  17031. /* TEXT */
  17032. )
  17033. ]),
  17034. index2 < $props.list.length - 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  17035. key: 0,
  17036. class: "timeline-line"
  17037. })) : vue.createCommentVNode("v-if", true)
  17038. ]);
  17039. }),
  17040. 128
  17041. /* KEYED_FRAGMENT */
  17042. ))
  17043. ]);
  17044. }
  17045. 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"]]);
  17046. const _sfc_main$13 = {
  17047. __name: "BookItem",
  17048. props: {
  17049. item: Object,
  17050. showClose: {
  17051. type: Boolean,
  17052. default: false
  17053. }
  17054. },
  17055. setup(__props, { expose: __expose }) {
  17056. __expose();
  17057. const props2 = __props;
  17058. const goodNum = vue.computed(() => {
  17059. var _a;
  17060. return ((_a = props2.item.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 1).length) || 0;
  17061. });
  17062. const badNum = vue.computed(() => {
  17063. var _a;
  17064. return ((_a = props2.item.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 3).length) || 0;
  17065. });
  17066. const reasons = vue.computed(() => {
  17067. let list = props2.item.auditCommentList;
  17068. if (!list)
  17069. return "";
  17070. if (list.length > 0) {
  17071. let poorList = list.filter((v) => v.sts == 3);
  17072. if (poorList.length == 0)
  17073. return "";
  17074. return poorList.map((v) => v.com).join(";");
  17075. }
  17076. });
  17077. const __returned__ = { props: props2, goodNum, badNum, reasons, computed: vue.computed };
  17078. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  17079. return __returned__;
  17080. }
  17081. };
  17082. function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
  17083. return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [
  17084. vue.createElementVNode("view", { class: "flex w100" }, [
  17085. vue.createElementVNode("view", { class: "flex-d" }, [
  17086. vue.createElementVNode("image", {
  17087. style: { "width": "70px", "height": "90px" },
  17088. src: $props.item.cover,
  17089. mode: "aspectFill"
  17090. }, null, 8, ["src"]),
  17091. !$props.showClose ? (vue.openBlock(), vue.createElementBlock(
  17092. "view",
  17093. {
  17094. key: 0,
  17095. class: "quantity mt-24"
  17096. },
  17097. "数量: " + vue.toDisplayString($props.item.num),
  17098. 1
  17099. /* TEXT */
  17100. )) : vue.createCommentVNode("v-if", true)
  17101. ]),
  17102. vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
  17103. vue.createElementVNode(
  17104. "view",
  17105. { class: "common-title mb-20" },
  17106. vue.toDisplayString($props.item.bookName),
  17107. 1
  17108. /* TEXT */
  17109. ),
  17110. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  17111. vue.createElementVNode(
  17112. "view",
  17113. { class: "isbn" },
  17114. "ISBN: " + vue.toDisplayString($props.item.isbn),
  17115. 1
  17116. /* TEXT */
  17117. ),
  17118. vue.createElementVNode(
  17119. "view",
  17120. { class: "set" },
  17121. "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "不是"),
  17122. 1
  17123. /* TEXT */
  17124. )
  17125. ]),
  17126. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  17127. vue.createElementVNode(
  17128. "view",
  17129. { class: "price" },
  17130. "定价: " + vue.toDisplayString($props.item.bookPrice),
  17131. 1
  17132. /* TEXT */
  17133. ),
  17134. vue.createElementVNode(
  17135. "view",
  17136. { class: "estimate" },
  17137. "预估单价: " + vue.toDisplayString(($props.item.recycleDiscount * $props.item.bookPrice * 0.1).toFixed(2)),
  17138. 1
  17139. /* TEXT */
  17140. )
  17141. ]),
  17142. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  17143. vue.createElementVNode(
  17144. "view",
  17145. { class: "discount" },
  17146. "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
  17147. 1
  17148. /* TEXT */
  17149. ),
  17150. vue.createElementVNode("view", { class: "review" }, [
  17151. vue.createTextVNode("审核金额: "),
  17152. vue.createElementVNode(
  17153. "text",
  17154. { class: "color-red" },
  17155. vue.toDisplayString($props.item.finalMoney || 0),
  17156. 1
  17157. /* TEXT */
  17158. )
  17159. ])
  17160. ]),
  17161. vue.createElementVNode("view", { class: "quality mb-10" }, [
  17162. vue.createTextVNode(
  17163. " 品相: 良好(" + vue.toDisplayString($setup.goodNum) + ") 、 一般(" + vue.toDisplayString($props.item.averageNum || 0) + ") 、 ",
  17164. 1
  17165. /* TEXT */
  17166. ),
  17167. vue.createElementVNode(
  17168. "text",
  17169. {
  17170. class: vue.normalizeClass($props.item.badNum > 0 ? "color-red" : "")
  17171. },
  17172. "极差(" + vue.toDisplayString($setup.badNum) + ")",
  17173. 3
  17174. /* TEXT, CLASS */
  17175. )
  17176. ]),
  17177. $setup.reasons ? (vue.openBlock(), vue.createElementBlock(
  17178. "view",
  17179. {
  17180. key: 0,
  17181. class: "color-red"
  17182. },
  17183. "原因:" + vue.toDisplayString($setup.reasons),
  17184. 1
  17185. /* TEXT */
  17186. )) : vue.createCommentVNode("v-if", true)
  17187. ])
  17188. ])
  17189. ]);
  17190. }
  17191. 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"]]);
  17192. const pinyin = {
  17193. "a": "啊阿锕",
  17194. "ai": "埃挨哎唉哀皑癌蔼矮艾碍爱隘诶捱嗳嗌嫒瑷暧砹锿霭",
  17195. "an": "鞍氨安俺按暗岸胺案谙埯揞犴庵桉铵鹌顸黯",
  17196. "ang": "肮昂盎",
  17197. "ao": "凹敖熬翱袄傲奥懊澳坳拗嗷噢岙廒遨媪骜聱螯鏊鳌鏖",
  17198. "ba": "芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸茇菝萆捭岜灞杷钯粑鲅魃",
  17199. "bai": "白柏百摆佰败拜稗薜掰鞴",
  17200. "ban": "斑班搬扳般颁板版扮拌伴瓣半办绊阪坂豳钣瘢癍舨",
  17201. "bang": "邦帮梆榜膀绑棒磅蚌镑傍谤蒡螃",
  17202. "bao": "苞胞包褒雹保堡饱宝抱报暴豹鲍爆勹葆宀孢煲鸨褓趵龅",
  17203. "bo": "剥薄玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳亳蕃啵饽檗擘礴钹鹁簸跛",
  17204. "bei": "杯碑悲卑北辈背贝钡倍狈备惫焙被孛陂邶埤蓓呗怫悖碚鹎褙鐾",
  17205. "ben": "奔苯本笨畚坌锛",
  17206. "beng": "崩绷甭泵蹦迸唪嘣甏",
  17207. "bi": "逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛匕仳俾芘荜荸吡哔狴庳愎滗濞弼妣婢嬖璧贲畀铋秕裨筚箅篦舭襞跸髀",
  17208. "bian": "鞭边编贬扁便变卞辨辩辫遍匾弁苄忭汴缏煸砭碥稹窆蝙笾鳊",
  17209. "biao": "标彪膘表婊骠飑飙飚灬镖镳瘭裱鳔",
  17210. "bie": "鳖憋别瘪蹩鳘",
  17211. "bin": "彬斌濒滨宾摈傧浜缤玢殡膑镔髌鬓",
  17212. "bing": "兵冰柄丙秉饼炳病并禀邴摒绠枋槟燹",
  17213. "bu": "捕卜哺补埠不布步簿部怖拊卟逋瓿晡钚醭",
  17214. "ca": "擦嚓礤",
  17215. "cai": "猜裁材才财睬踩采彩菜蔡",
  17216. "can": "餐参蚕残惭惨灿骖璨粲黪",
  17217. "cang": "苍舱仓沧藏伧",
  17218. "cao": "操糙槽曹草艹嘈漕螬艚",
  17219. "ce": "厕策侧册测刂帻恻",
  17220. "ceng": "层蹭噌",
  17221. "cha": "插叉茬茶查碴搽察岔差诧猹馇汊姹杈楂槎檫钗锸镲衩",
  17222. "chai": "拆柴豺侪茈瘥虿龇",
  17223. "chan": "搀掺蝉馋谗缠铲产阐颤冁谄谶蒇廛忏潺澶孱羼婵嬗骣觇禅镡裣蟾躔",
  17224. "chang": "昌猖场尝常长偿肠厂敞畅唱倡伥鬯苌菖徜怅惝阊娼嫦昶氅鲳",
  17225. "chao": "超抄钞朝嘲潮巢吵炒怊绉晁耖",
  17226. "che": "车扯撤掣彻澈坼屮砗",
  17227. "chen": "郴臣辰尘晨忱沉陈趁衬称谌抻嗔宸琛榇肜胂碜龀",
  17228. "cheng": "撑城橙成呈乘程惩澄诚承逞骋秤埕嵊徵浈枨柽樘晟塍瞠铖裎蛏酲",
  17229. "chi": "吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽傺墀芪茌搋叱哧啻嗤彳饬沲媸敕胝眙眵鸱瘛褫蚩螭笞篪豉踅踟魑",
  17230. "chong": "充冲虫崇宠茺忡憧铳艟",
  17231. "chou": "抽酬畴踌稠愁筹仇绸瞅丑俦圳帱惆溴妯瘳雠鲋",
  17232. "chu": "臭初出橱厨躇锄雏滁除楚础储矗搐触处亍刍憷绌杵楮樗蜍蹰黜",
  17233. "chuan": "揣川穿椽传船喘串掾舛惴遄巛氚钏镩舡",
  17234. "chuang": "疮窗幢床闯创怆",
  17235. "chui": "吹炊捶锤垂陲棰槌",
  17236. "chun": "春椿醇唇淳纯蠢促莼沌肫朐鹑蝽",
  17237. "chuo": "戳绰蔟辶辍镞踔龊",
  17238. "ci": "疵茨磁雌辞慈瓷词此刺赐次荠呲嵯鹚螅糍趑",
  17239. "cong": "聪葱囱匆从丛偬苁淙骢琮璁枞",
  17240. "cu": "凑粗醋簇猝殂蹙",
  17241. "cuan": "蹿篡窜汆撺昕爨",
  17242. "cui": "摧崔催脆瘁粹淬翠萃悴璀榱隹",
  17243. "cun": "村存寸磋忖皴",
  17244. "cuo": "撮搓措挫错厝脞锉矬痤鹾蹉躜",
  17245. "da": "搭达答瘩打大耷哒嗒怛妲疸褡笪靼鞑",
  17246. "dai": "呆歹傣戴带殆代贷袋待逮怠埭甙呔岱迨逯骀绐玳黛",
  17247. "dan": "耽担丹单郸掸胆旦氮但惮淡诞弹蛋亻儋卩萏啖澹檐殚赕眈瘅聃箪",
  17248. "dang": "当挡党荡档谠凼菪宕砀铛裆",
  17249. "dao": "刀捣蹈倒岛祷导到稻悼道盗叨啁忉洮氘焘忑纛",
  17250. "de": "德得的锝",
  17251. "deng": "蹬灯登等瞪凳邓噔嶝戥磴镫簦",
  17252. "di": "堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔氐籴诋谛邸坻莜荻嘀娣柢棣觌砥碲睇镝羝骶",
  17253. "dian": "颠掂滇碘点典靛垫电佃甸店惦奠淀殿丶阽坫埝巅玷癜癫簟踮",
  17254. "diao": "碉叼雕凋刁掉吊钓调轺铞蜩粜貂",
  17255. "die": "跌爹碟蝶迭谍叠佚垤堞揲喋渫轶牒瓞褶耋蹀鲽鳎",
  17256. "ding": "丁盯叮钉顶鼎锭定订丢仃啶玎腚碇町铤疔耵酊",
  17257. "dong": "东冬董懂动栋侗恫冻洞垌咚岽峒夂氡胨胴硐鸫",
  17258. "dou": "兜抖斗陡豆逗痘蔸钭窦窬蚪篼酡",
  17259. "du": "都督毒犊独读堵睹赌杜镀肚度渡妒芏嘟渎椟橐牍蠹笃髑黩",
  17260. "duan": "端短锻段断缎彖椴煅簖",
  17261. "dui": "堆兑队对怼憝碓",
  17262. "dun": "墩吨蹲敦顿囤钝盾遁炖砘礅盹镦趸",
  17263. "duo": "掇哆多夺垛躲朵跺舵剁惰堕咄哚缍柁铎裰踱",
  17264. "e": "蛾峨鹅俄额讹娥恶厄扼遏鄂饿噩谔垩垭苊莪萼呃愕屙婀轭曷腭硪锇锷鹗颚鳄",
  17265. "en": "恩蒽摁唔嗯",
  17266. "er": "而儿耳尔饵洱二贰迩珥铒鸸鲕",
  17267. "fa": "发罚筏伐乏阀法珐垡砝",
  17268. "fan": "藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛蘩幡犭梵攵燔畈蹯",
  17269. "fang": "坊芳方肪房防妨仿访纺放匚邡彷钫舫鲂",
  17270. "fei": "菲非啡飞肥匪诽吠肺废沸费芾狒悱淝妃绋绯榧腓斐扉祓砩镄痱蜚篚翡霏鲱",
  17271. "fen": "芬酚吩氛分纷坟焚汾粉奋份忿愤粪偾瀵棼愍鲼鼢",
  17272. "feng": "丰封枫蜂峰锋风疯烽逢冯缝讽奉凤俸酆葑沣砜",
  17273. "fu": "佛否夫敷肤孵扶拂辐幅氟符伏俘服浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐匐凫郛芙苻茯莩菔呋幞滏艴孚驸绂桴赙黻黼罘稃馥虍蚨蜉蝠蝮麸趺跗鳆",
  17274. "ga": "噶嘎蛤尬呷尕尜旮钆",
  17275. "gai": "该改概钙盖溉丐陔垓戤赅胲",
  17276. "gan": "干甘杆柑竿肝赶感秆敢赣坩苷尴擀泔淦澉绀橄旰矸疳酐",
  17277. "gang": "冈刚钢缸肛纲岗港戆罡颃筻",
  17278. "gong": "杠工攻功恭龚供躬公宫弓巩汞拱贡共蕻廾咣珙肱蚣蛩觥",
  17279. "gao": "篙皋高膏羔糕搞镐稿告睾诰郜蒿藁缟槔槁杲锆",
  17280. "ge": "哥歌搁戈鸽胳疙割革葛格阁隔铬个各鬲仡哿塥嗝纥搿膈硌铪镉袼颌虼舸骼髂",
  17281. "gei": "给",
  17282. "gen": "根跟亘茛哏艮",
  17283. "geng": "耕更庚羹埂耿梗哽赓鲠",
  17284. "gou": "钩勾沟苟狗垢构购够佝诟岣遘媾缑觏彀鸲笱篝鞲",
  17285. "gu": "辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇嘏诂菰哌崮汩梏轱牯牿胍臌毂瞽罟钴锢瓠鸪鹄痼蛄酤觚鲴骰鹘",
  17286. "gua": "刮瓜剐寡挂褂卦诖呱栝鸹",
  17287. "guai": "乖拐怪哙",
  17288. "guan": "棺关官冠观管馆罐惯灌贯倌莞掼涫盥鹳鳏",
  17289. "guang": "光广逛犷桄胱疒",
  17290. "gui": "瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽匦刿庋宄妫桧炅晷皈簋鲑鳜",
  17291. "gun": "辊滚棍丨衮绲磙鲧",
  17292. "guo": "锅郭国果裹过馘蠃埚掴呙囗帼崞猓椁虢锞聒蜮蜾蝈",
  17293. "ha": "哈",
  17294. "hai": "骸孩海氦亥害骇咴嗨颏醢",
  17295. "han": "酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉邗菡撖阚瀚晗焓颔蚶鼾",
  17296. "hen": "夯痕很狠恨",
  17297. "hang": "杭航沆绗珩桁",
  17298. "hao": "壕嚎豪毫郝好耗号浩薅嗥嚆濠灏昊皓颢蚝",
  17299. "he": "呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺诃劾壑藿嗑嗬阖盍蚵翮",
  17300. "hei": "嘿黑",
  17301. "heng": "哼亨横衡恒訇蘅",
  17302. "hong": "轰哄烘虹鸿洪宏弘红黉讧荭薨闳泓",
  17303. "hou": "喉侯猴吼厚候后堠後逅瘊篌糇鲎骺",
  17304. "hu": "呼乎忽瑚壶葫胡蝴狐糊湖弧虎唬护互沪户冱唿囫岵猢怙惚浒滹琥槲轷觳烀煳戽扈祜鹕鹱笏醐斛",
  17305. "hua": "花哗华猾滑画划化话劐浍骅桦铧稞",
  17306. "huai": "槐徊怀淮坏还踝",
  17307. "huan": "欢环桓缓换患唤痪豢焕涣宦幻郇奂垸擐圜洹浣漶寰逭缳锾鲩鬟",
  17308. "huang": "荒慌黄磺蝗簧皇凰惶煌晃幌恍谎隍徨湟潢遑璜肓癀蟥篁鳇",
  17309. "hui": "灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘诙茴荟蕙哕喙隳洄彗缋珲晖恚虺蟪麾",
  17310. "hun": "荤昏婚魂浑混诨馄阍溷缗",
  17311. "huo": "豁活伙火获或惑霍货祸攉嚯夥钬锪镬耠蠖",
  17312. "ji": "击圾基机畸稽积箕肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪居丌乩剞佶佴脔墼芨芰萁蒺蕺掎叽咭哜唧岌嵴洎彐屐骥畿玑楫殛戟戢赍觊犄齑矶羁嵇稷瘠瘵虮笈笄暨跻跽霁鲚鲫髻麂",
  17313. "jia": "嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁伽郏拮岬浃迦珈戛胛恝铗镓痂蛱笳袈跏",
  17314. "jian": "歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件健舰剑饯渐溅涧建僭谏谫菅蒹搛囝湔蹇謇缣枧柙楗戋戬牮犍毽腱睑锏鹣裥笕箴翦趼踺鲣鞯",
  17315. "jiang": "僵姜将浆江疆蒋桨奖讲匠酱降茳洚绛缰犟礓耩糨豇",
  17316. "jiao": "蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫佼僬茭挢噍峤徼姣纟敫皎鹪蛟醮跤鲛",
  17317. "jie": "窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届偈讦诘喈嗟獬婕孑桀獒碣锴疖袷颉蚧羯鲒骱髫",
  17318. "jin": "巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸尽卺荩堇噤馑廑妗缙瑾槿赆觐钅锓衿矜",
  17319. "jing": "劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净刭儆阱菁獍憬泾迳弪婧肼胫腈旌",
  17320. "jiong": "炯窘冂迥扃",
  17321. "jiu": "揪究纠玖韭久灸九酒厩救旧臼舅咎就疚僦啾阄柩桕鹫赳鬏",
  17322. "ju": "鞠拘狙疽驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧倨讵苣苴莒掬遽屦琚枸椐榘榉橘犋飓钜锔窭裾趄醵踽龃雎鞫",
  17323. "juan": "捐鹃娟倦眷卷绢鄄狷涓桊蠲锩镌隽",
  17324. "jue": "撅攫抉掘倔爵觉决诀绝厥劂谲矍蕨噘崛獗孓珏桷橛爝镢蹶觖",
  17325. "jun": "均菌钧军君峻俊竣浚郡骏捃狻皲筠麇",
  17326. "ka": "喀咖卡佧咔胩",
  17327. "ke": "咯坷苛柯棵磕颗科壳咳可渴克刻客课岢恪溘骒缂珂轲氪瞌钶疴窠蝌髁",
  17328. "kai": "开揩楷凯慨剀垲蒈忾恺铠锎",
  17329. "kan": "刊堪勘坎砍看侃凵莰莶戡龛瞰",
  17330. "kang": "康慷糠扛抗亢炕坑伉闶钪",
  17331. "kao": "考拷烤靠尻栲犒铐",
  17332. "ken": "肯啃垦恳垠裉颀",
  17333. "keng": "吭忐铿",
  17334. "kong": "空恐孔控倥崆箜",
  17335. "kou": "抠口扣寇芤蔻叩眍筘",
  17336. "ku": "枯哭窟苦酷库裤刳堀喾绔骷",
  17337. "kua": "夸垮挎跨胯侉",
  17338. "kuai": "块筷侩快蒯郐蒉狯脍",
  17339. "kuan": "宽款髋",
  17340. "kuang": "匡筐狂框矿眶旷况诓诳邝圹夼哐纩贶",
  17341. "kui": "亏盔岿窥葵奎魁傀馈愧溃馗匮夔隗揆喹喟悝愦阕逵暌睽聩蝰篑臾跬",
  17342. "kun": "坤昆捆困悃阃琨锟醌鲲髡",
  17343. "kuo": "括扩廓阔蛞",
  17344. "la": "垃拉喇蜡腊辣啦剌摺邋旯砬瘌",
  17345. "lai": "莱来赖崃徕涞濑赉睐铼癞籁",
  17346. "lan": "蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥啉岚懔漤榄斓罱镧褴",
  17347. "lang": "琅榔狼廊郎朗浪莨蒗啷阆锒稂螂",
  17348. "lao": "捞劳牢老佬姥酪烙涝唠崂栳铑铹痨醪",
  17349. "le": "勒乐肋仂叻嘞泐鳓",
  17350. "lei": "雷镭蕾磊累儡垒擂类泪羸诔荽咧漯嫘缧檑耒酹",
  17351. "ling": "棱冷拎玲菱零龄铃伶羚凌灵陵岭领另令酃塄苓呤囹泠绫柃棂瓴聆蛉翎鲮",
  17352. "leng": "楞愣",
  17353. "li": "厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐痢立粒沥隶力璃哩俪俚郦坜苈莅蓠藜捩呖唳喱猁溧澧逦娌嫠骊缡珞枥栎轹戾砺詈罹锂鹂疠疬蛎蜊蠡笠篥粝醴跞雳鲡鳢黧",
  17354. "lian": "俩联莲连镰廉怜涟帘敛脸链恋炼练挛蔹奁潋濂娈琏楝殓臁膦裢蠊鲢",
  17355. "liang": "粮凉梁粱良两辆量晾亮谅墚椋踉靓魉",
  17356. "liao": "撩聊僚疗燎寥辽潦了撂镣廖料蓼尥嘹獠寮缭钌鹩耢",
  17357. "lie": "列裂烈劣猎冽埒洌趔躐鬣",
  17358. "lin": "琳林磷霖临邻鳞淋凛赁吝蔺嶙廪遴檩辚瞵粼躏麟",
  17359. "liu": "溜琉榴硫馏留刘瘤流柳六抡偻蒌泖浏遛骝绺旒熘锍镏鹨鎏",
  17360. "long": "龙聋咙笼窿隆垄拢陇弄垅茏泷珑栊胧砻癃",
  17361. "lou": "楼娄搂篓漏陋喽嵝镂瘘耧蝼髅",
  17362. "lu": "芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮垆摅撸噜泸渌漉璐栌橹轳辂辘氇胪镥鸬鹭簏舻鲈",
  17363. "lv": "驴吕铝侣旅履屡缕虑氯律率滤绿捋闾榈膂稆褛",
  17364. "luan": "峦孪滦卵乱栾鸾銮",
  17365. "lue": "掠略锊",
  17366. "lun": "轮伦仑沦纶论囵",
  17367. "luo": "萝螺罗逻锣箩骡裸落洛骆络倮荦摞猡泺椤脶镙瘰雒",
  17368. "ma": "妈麻玛码蚂马骂嘛吗唛犸嬷杩麽",
  17369. "mai": "埋买麦卖迈脉劢荬咪霾",
  17370. "man": "瞒馒蛮满蔓曼慢漫谩墁幔缦熳镘颟螨鳗鞔",
  17371. "mang": "芒茫盲忙莽邙漭朦硭蟒",
  17372. "meng": "氓萌蒙檬盟锰猛梦孟勐甍瞢懵礞虻蜢蠓艋艨黾",
  17373. "miao": "猫苗描瞄藐秒渺庙妙喵邈缈缪杪淼眇鹋蜱",
  17374. "mao": "茅锚毛矛铆卯茂冒帽貌贸侔袤勖茆峁瑁昴牦耄旄懋瞀蛑蝥蟊髦",
  17375. "me": "么",
  17376. "mei": "玫枚梅酶霉煤没眉媒镁每美昧寐妹媚坶莓嵋猸浼湄楣镅鹛袂魅",
  17377. "men": "门闷们扪玟焖懑钔",
  17378. "mi": "眯醚靡糜迷谜弥米秘觅泌蜜密幂芈冖谧蘼嘧猕獯汨宓弭脒敉糸縻麋",
  17379. "mian": "棉眠绵冕免勉娩缅面沔湎腼眄",
  17380. "mie": "蔑灭咩蠛篾",
  17381. "min": "民抿皿敏悯闽苠岷闵泯珉",
  17382. "ming": "明螟鸣铭名命冥茗溟暝瞑酩",
  17383. "miu": "谬",
  17384. "mo": "摸摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谟茉蓦馍嫫镆秣瘼耱蟆貊貘",
  17385. "mou": "谋牟某厶哞婺眸鍪",
  17386. "mu": "拇牡亩姆母墓暮幕募慕木目睦牧穆仫苜呒沐毪钼",
  17387. "na": "拿哪呐钠那娜纳内捺肭镎衲箬",
  17388. "nai": "氖乃奶耐奈鼐艿萘柰",
  17389. "nan": "南男难囊喃囡楠腩蝻赧",
  17390. "nao": "挠脑恼闹孬垴猱瑙硇铙蛲",
  17391. "ne": "淖呢讷",
  17392. "nei": "馁",
  17393. "nen": "嫩能枘恁",
  17394. "ni": "妮霓倪泥尼拟你匿腻逆溺伲坭猊怩滠昵旎祢慝睨铌鲵",
  17395. "nian": "蔫拈年碾撵捻念廿辇黏鲇鲶",
  17396. "niang": "娘酿",
  17397. "niao": "鸟尿茑嬲脲袅",
  17398. "nie": "捏聂孽啮镊镍涅乜陧蘖嗫肀颞臬蹑",
  17399. "nin": "您柠",
  17400. "ning": "狞凝宁拧泞佞蓥咛甯聍",
  17401. "niu": "牛扭钮纽狃忸妞蚴",
  17402. "nong": "脓浓农侬",
  17403. "nu": "奴努怒呶帑弩胬孥驽",
  17404. "nv": "女恧钕衄",
  17405. "nuan": "暖",
  17406. "nuenue": "虐",
  17407. "nue": "疟谑",
  17408. "nuo": "挪懦糯诺傩搦喏锘",
  17409. "ou": "哦欧鸥殴藕呕偶沤怄瓯耦",
  17410. "pa": "啪趴爬帕怕琶葩筢",
  17411. "pai": "拍排牌徘湃派俳蒎",
  17412. "pan": "攀潘盘磐盼畔判叛爿泮袢襻蟠蹒",
  17413. "pang": "乓庞旁耪胖滂逄",
  17414. "pao": "抛咆刨炮袍跑泡匏狍庖脬疱",
  17415. "pei": "呸胚培裴赔陪配佩沛掊辔帔淠旆锫醅霈",
  17416. "pen": "喷盆湓",
  17417. "peng": "砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯堋嘭怦蟛",
  17418. "pi": "砒霹批披劈琵毗啤脾疲皮匹痞僻屁譬丕陴邳郫圮鼙擗噼庀媲纰枇甓睥罴铍痦癖疋蚍貔",
  17419. "pian": "篇偏片骗谝骈犏胼褊翩蹁",
  17420. "piao": "飘漂瓢票剽嘌嫖缥殍瞟螵",
  17421. "pie": "撇瞥丿苤氕",
  17422. "pin": "拼频贫品聘拚姘嫔榀牝颦",
  17423. "ping": "乒坪苹萍平凭瓶评屏俜娉枰鲆",
  17424. "po": "坡泼颇婆破魄迫粕叵鄱溥珀钋钷皤笸",
  17425. "pou": "剖裒踣",
  17426. "pu": "扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑匍噗濮璞氆镤镨蹼",
  17427. "qi": "期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫亟亓圻芑萋葺嘁屺岐汔淇骐绮琪琦杞桤槭欹祺憩碛蛴蜞綦綮趿蹊鳍麒",
  17428. "qia": "掐恰洽葜",
  17429. "qian": "牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉佥阡芊芡荨掮岍悭慊骞搴褰缱椠肷愆钤虔箝",
  17430. "qiang": "枪呛腔羌墙蔷强抢嫱樯戗炝锖锵镪襁蜣羟跫跄",
  17431. "qiao": "橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍劁诮谯荞愀憔缲樵毳硗跷鞒",
  17432. "qie": "切茄且怯窃郄唼惬妾挈锲箧",
  17433. "qin": "钦侵亲秦琴勤芹擒禽寝沁芩蓁蕲揿吣嗪噙溱檎螓衾",
  17434. "qing": "青轻氢倾卿清擎晴氰情顷请庆倩苘圊檠磬蜻罄箐謦鲭黥",
  17435. "qiong": "琼穷邛茕穹筇銎",
  17436. "qiu": "秋丘邱球求囚酋泅俅氽巯艽犰湫逑遒楸赇鸠虬蚯蝤裘糗鳅鼽",
  17437. "qu": "趋区蛆曲躯屈驱渠取娶龋趣去诎劬蕖蘧岖衢阒璩觑氍祛磲癯蛐蠼麴瞿黢",
  17438. "quan": "圈颧权醛泉全痊拳犬券劝诠荃獾悛绻辁畎铨蜷筌鬈",
  17439. "que": "缺炔瘸却鹊榷确雀阙悫",
  17440. "qun": "裙群逡",
  17441. "ran": "然燃冉染苒髯",
  17442. "rang": "瓤壤攘嚷让禳穰",
  17443. "rao": "饶扰绕荛娆桡",
  17444. "ruo": "惹若弱",
  17445. "re": "热偌",
  17446. "ren": "壬仁人忍韧任认刃妊纫仞荏葚饪轫稔衽",
  17447. "reng": "扔仍",
  17448. "ri": "日",
  17449. "rong": "戎茸蓉荣融熔溶容绒冗嵘狨缛榕蝾",
  17450. "rou": "揉柔肉糅蹂鞣",
  17451. "ru": "茹蠕儒孺如辱乳汝入褥蓐薷嚅洳溽濡铷襦颥",
  17452. "ruan": "软阮朊",
  17453. "rui": "蕊瑞锐芮蕤睿蚋",
  17454. "run": "闰润",
  17455. "sa": "撒洒萨卅仨挲飒",
  17456. "sai": "腮鳃塞赛噻",
  17457. "san": "三叁伞散彡馓氵毵糁霰",
  17458. "sang": "桑嗓丧搡磉颡",
  17459. "sao": "搔骚扫嫂埽臊瘙鳋",
  17460. "se": "瑟色涩啬铩铯穑",
  17461. "sen": "森",
  17462. "seng": "僧",
  17463. "sha": "莎砂杀刹沙纱傻啥煞脎歃痧裟霎鲨",
  17464. "shai": "筛晒酾",
  17465. "shan": "珊苫杉山删煽衫闪陕擅赡膳善汕扇缮剡讪鄯埏芟潸姗骟膻钐疝蟮舢跚鳝",
  17466. "shang": "墒伤商赏晌上尚裳垧绱殇熵觞",
  17467. "shao": "梢捎稍烧芍勺韶少哨邵绍劭苕潲蛸笤筲艄",
  17468. "she": "奢赊蛇舌舍赦摄射慑涉社设厍佘猞畲麝",
  17469. "shen": "砷申呻伸身深娠绅神沈审婶甚肾慎渗诜谂吲哂渖椹矧蜃",
  17470. "sheng": "声生甥牲升绳省盛剩胜圣丞渑媵眚笙",
  17471. "shi": "师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试谥埘莳蓍弑唑饣轼耆贳炻礻铈铊螫舐筮豕鲥鲺",
  17472. "shou": "收手首守寿授售受瘦兽扌狩绶艏",
  17473. "shu": "蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱恕倏塾菽忄沭涑澍姝纾毹腧殳镯秫鹬",
  17474. "shua": "刷耍唰涮",
  17475. "shuai": "摔衰甩帅蟀",
  17476. "shuan": "栓拴闩",
  17477. "shuang": "霜双爽孀",
  17478. "shui": "谁水睡税",
  17479. "shun": "吮瞬顺舜恂",
  17480. "shuo": "说硕朔烁蒴搠嗍濯妁槊铄",
  17481. "si": "斯撕嘶思私司丝死肆寺嗣四伺似饲巳厮俟兕菥咝汜泗澌姒驷缌祀祠锶鸶耜蛳笥",
  17482. "song": "松耸怂颂送宋讼诵凇菘崧嵩忪悚淞竦",
  17483. "sou": "搜艘擞嗽叟嗖嗾馊溲飕瞍锼螋",
  17484. "su": "苏酥俗素速粟僳塑溯宿诉肃夙谡蔌嗉愫簌觫稣",
  17485. "suan": "酸蒜算",
  17486. "sui": "虽隋随绥髓碎岁穗遂隧祟蓑冫谇濉邃燧眭睢",
  17487. "sun": "孙损笋荪狲飧榫跣隼",
  17488. "suo": "梭唆缩琐索锁所唢嗦娑桫睃羧",
  17489. "ta": "塌他它她塔獭挞蹋踏闼溻遢榻沓",
  17490. "tai": "胎苔抬台泰酞太态汰邰薹肽炱钛跆鲐",
  17491. "tan": "坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭郯蕈昙钽锬覃",
  17492. "tang": "汤塘搪堂棠膛唐糖傥饧溏瑭铴镗耥螗螳羰醣",
  17493. "thang": "倘躺淌",
  17494. "theng": "趟烫",
  17495. "tao": "掏涛滔绦萄桃逃淘陶讨套挑鼗啕韬饕",
  17496. "te": "特",
  17497. "teng": "藤腾疼誊滕",
  17498. "ti": "梯剔踢锑提题蹄啼体替嚏惕涕剃屉荑悌逖绨缇鹈裼醍",
  17499. "tian": "天添填田甜恬舔腆掭忝阗殄畋钿蚺",
  17500. "tiao": "条迢眺跳佻祧铫窕龆鲦",
  17501. "tie": "贴铁帖萜餮",
  17502. "ting": "厅听烃汀廷停亭庭挺艇莛葶婷梃蜓霆",
  17503. "tong": "通桐酮瞳同铜彤童桶捅筒统痛佟僮仝茼嗵恸潼砼",
  17504. "tou": "偷投头透亠",
  17505. "tu": "凸秃突图徒途涂屠土吐兔堍荼菟钍酴",
  17506. "tuan": "湍团疃",
  17507. "tui": "推颓腿蜕褪退忒煺",
  17508. "tun": "吞屯臀饨暾豚窀",
  17509. "tuo": "拖托脱鸵陀驮驼椭妥拓唾乇佗坨庹沱柝砣箨舄跎鼍",
  17510. "wa": "挖哇蛙洼娃瓦袜佤娲腽",
  17511. "wai": "歪外",
  17512. "wan": "豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕剜芄苋菀纨绾琬脘畹蜿箢",
  17513. "wang": "汪王亡枉网往旺望忘妄罔尢惘辋魍",
  17514. "wei": "威巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫倭偎诿隈葳薇帏帷崴嵬猥猬闱沩洧涠逶娓玮韪軎炜煨熨痿艉鲔",
  17515. "wen": "瘟温蚊文闻纹吻稳紊问刎愠阌汶璺韫殁雯",
  17516. "weng": "嗡翁瓮蓊蕹",
  17517. "wo": "挝蜗涡窝我斡卧握沃莴幄渥杌肟龌",
  17518. "wu": "巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误兀仵阢邬圬芴庑怃忤浯寤迕妩骛牾焐鹉鹜蜈鋈鼯",
  17519. "xi": "昔熙析西硒矽晰嘻吸锡牺稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细僖兮隰郗茜葸蓰奚唏徙饩阋浠淅屣嬉玺樨曦觋欷熹禊禧钸皙穸蜥蟋舾羲粞翕醯鼷",
  17520. "xia": "瞎虾匣霞辖暇峡侠狭下厦夏吓掀葭嗄狎遐瑕硖瘕罅黠",
  17521. "xian": "锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线冼藓岘猃暹娴氙祆鹇痫蚬筅籼酰跹",
  17522. "xiang": "相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象芗葙饷庠骧缃蟓鲞飨",
  17523. "xiao": "萧硝霄削哮嚣销消宵淆晓小孝校肖啸笑效哓咻崤潇逍骁绡枭枵筱箫魈",
  17524. "xie": "楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑偕亵勰燮薤撷廨瀣邂绁缬榭榍歙躞",
  17525. "xin": "薪芯锌欣辛新忻心信衅囟馨莘歆铽鑫",
  17526. "xing": "星腥猩惺兴刑型形邢行醒幸杏性姓陉荇荥擤悻硎",
  17527. "xiong": "兄凶胸匈汹雄熊芎",
  17528. "xiu": "休修羞朽嗅锈秀袖绣莠岫馐庥鸺貅髹",
  17529. "xu": "墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续讴诩圩蓿怵洫溆顼栩煦砉盱胥糈醑",
  17530. "xuan": "轩喧宣悬旋玄选癣眩绚儇谖萱揎馔泫洵渲漩璇楦暄炫煊碹铉镟痃",
  17531. "xue": "靴薛学穴雪血噱泶鳕",
  17532. "xun": "勋熏循旬询寻驯巡殉汛训讯逊迅巽埙荀薰峋徇浔曛窨醺鲟",
  17533. "ya": "压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶伢揠吖岈迓娅琊桠氩砑睚痖",
  17534. "yan": "焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验厣靥赝俨偃兖讠谳郾鄢芫菸崦恹闫阏洇湮滟妍嫣琰晏胭腌焱罨筵酽魇餍鼹",
  17535. "yang": "殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾徉怏泱炀烊恙蛘鞅",
  17536. "yao": "邀腰妖瑶摇尧遥窑谣姚咬舀药要耀夭爻吆崾徭瀹幺珧杳曜肴鹞窈繇鳐",
  17537. "ye": "椰噎耶爷野冶也页掖业叶曳腋夜液谒邺揶馀晔烨铘",
  17538. "yi": "一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎刈劓佾诒圪圯埸懿苡薏弈奕挹弋呓咦咿噫峄嶷猗饴怿怡悒漪迤驿缢殪贻旖熠钇镒镱痍瘗癔翊衤蜴舣羿翳酏黟",
  17539. "yin": "茵荫因殷音阴姻吟银淫寅饮尹引隐印胤鄞堙茚喑狺夤氤铟瘾蚓霪龈",
  17540. "ying": "英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映嬴郢茔莺萦撄嘤膺滢潆瀛瑛璎楹鹦瘿颍罂",
  17541. "yo": "哟唷",
  17542. "yong": "拥佣臃痈庸雍踊蛹咏泳涌永恿勇用俑壅墉慵邕镛甬鳙饔",
  17543. "you": "幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼卣攸侑莸呦囿宥柚猷牖铕疣蝣鱿黝鼬",
  17544. "yu": "迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉浴寓裕预豫驭禺毓伛俣谀谕萸蓣揄喁圄圉嵛狳饫庾阈妪妤纡瑜昱觎腴欤於煜燠聿钰鹆瘐瘀窳蝓竽舁雩龉",
  17545. "yuan": "鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院塬沅媛瑗橼爰眢鸢螈鼋",
  17546. "yue": "曰约越跃钥岳粤月悦阅龠樾刖钺",
  17547. "yun": "耘云郧匀陨允运蕴酝晕韵孕郓芸狁恽纭殒昀氲",
  17548. "za": "匝砸杂拶咂",
  17549. "zai": "栽哉灾宰载再在咱崽甾",
  17550. "zan": "攒暂赞瓒昝簪糌趱錾",
  17551. "zang": "赃脏葬奘戕臧",
  17552. "zao": "遭糟凿藻枣早澡蚤躁噪造皂灶燥唣缫",
  17553. "ze": "责择则泽仄赜啧迮昃笮箦舴",
  17554. "zei": "贼",
  17555. "zen": "怎谮",
  17556. "zeng": "增憎曾赠缯甑罾锃",
  17557. "zha": "扎喳渣札轧铡闸眨栅榨咋乍炸诈揸吒咤哳怍砟痄蚱齄",
  17558. "zhai": "摘斋宅窄债寨砦",
  17559. "zhan": "瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽谵搌旃",
  17560. "zhang": "樟章彰漳张掌涨杖丈帐账仗胀瘴障仉鄣幛嶂獐嫜璋蟑",
  17561. "zhao": "招昭找沼赵照罩兆肇召爪诏棹钊笊",
  17562. "zhe": "遮折哲蛰辙者锗蔗这浙谪陬柘辄磔鹧褚蜇赭",
  17563. "zhen": "珍斟真甄砧臻贞针侦枕疹诊震振镇阵缜桢榛轸赈胗朕祯畛鸩",
  17564. "zheng": "蒸挣睁征狰争怔整拯正政帧症郑证诤峥钲铮筝",
  17565. "zhi": "芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒卮陟郅埴芷摭帙忮彘咫骘栉枳栀桎轵轾攴贽膣祉祗黹雉鸷痣蛭絷酯跖踬踯豸觯",
  17566. "zhong": "中盅忠钟衷终种肿重仲众冢锺螽舂舯踵",
  17567. "zhou": "舟周州洲诌粥轴肘帚咒皱宙昼骤啄着倜诹荮鬻纣胄碡籀舳酎鲷",
  17568. "zhu": "珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑住注祝驻伫侏邾苎茱洙渚潴驺杼槠橥炷铢疰瘃蚰竺箸翥躅麈",
  17569. "zhua": "抓",
  17570. "zhuai": "拽",
  17571. "zhuan": "专砖转撰赚篆抟啭颛",
  17572. "zhuang": "桩庄装妆撞壮状丬",
  17573. "zhui": "椎锥追赘坠缀萑骓缒",
  17574. "zhun": "谆准",
  17575. "zhuo": "捉拙卓桌琢茁酌灼浊倬诼廴蕞擢啜浞涿杓焯禚斫",
  17576. "zi": "兹咨资姿滋淄孜紫仔籽滓子自渍字谘嵫姊孳缁梓辎赀恣眦锱秭耔笫粢觜訾鲻髭",
  17577. "zong": "鬃棕踪宗综总纵腙粽",
  17578. "zou": "邹走奏揍鄹鲰",
  17579. "zu": "租足卒族祖诅阻组俎菹啐徂驵蹴",
  17580. "zuan": "钻纂攥缵",
  17581. "zui": "嘴醉最罪",
  17582. "zun": "尊遵撙樽鳟",
  17583. "zuo": "昨左佐柞做作坐座阝阼胙祚酢",
  17584. "cou": "薮楱辏腠",
  17585. "nang": "攮哝囔馕曩",
  17586. "o": "喔",
  17587. "dia": "嗲",
  17588. "chuai": "嘬膪踹",
  17589. "cen": "岑涔",
  17590. "diu": "铥",
  17591. "nou": "耨",
  17592. "fou": "缶",
  17593. "bia": "髟"
  17594. };
  17595. const _ToPinyin = class _ToPinyin {
  17596. constructor() {
  17597. }
  17598. static getInstance() {
  17599. if (!this.instance) {
  17600. this.instance = new _ToPinyin();
  17601. }
  17602. return this.instance;
  17603. }
  17604. // 转首字母 this.chineseToInitials(this.chineseToPinYin('你好')) this.chineseToInitials('NiHao')
  17605. chineseToInitials(word) {
  17606. let SX = "";
  17607. for (var i = 0; i < word.length; i++) {
  17608. var c = word.charAt(i);
  17609. if (/^[A-Z]+$/.test(c)) {
  17610. SX += c;
  17611. }
  17612. }
  17613. return SX;
  17614. }
  17615. // 转拼音
  17616. chineseToPinYin(l1) {
  17617. var l2 = l1.length;
  17618. var I1 = "";
  17619. var reg = new RegExp("[a-zA-Z0-9]");
  17620. for (var i = 0; i < l2; i++) {
  17621. var val = l1.substr(i, 1);
  17622. var name = this.arraySearch(val, pinyin);
  17623. if (reg.test(val)) {
  17624. I1 += val.toLocaleUpperCase();
  17625. } else if (name !== false) {
  17626. I1 += name;
  17627. }
  17628. }
  17629. I1 = I1.replace(/ /g, "-");
  17630. while (I1.indexOf("--") > 0) {
  17631. I1 = I1.replace("--", "-");
  17632. }
  17633. return I1;
  17634. }
  17635. arraySearch(l1, l2) {
  17636. for (var name in pinyin) {
  17637. if (pinyin[name].indexOf(l1) !== -1) {
  17638. return this.ucfirst(name);
  17639. }
  17640. }
  17641. return false;
  17642. }
  17643. ucfirst(l1) {
  17644. if (l1.length > 0) {
  17645. var first = l1.substr(0, 1).toUpperCase();
  17646. var spare = l1.substr(1, l1.length);
  17647. return first + spare;
  17648. }
  17649. }
  17650. };
  17651. __publicField(_ToPinyin, "instance");
  17652. let ToPinyin = _ToPinyin;
  17653. const toPinyin = ToPinyin.getInstance();
  17654. const _sfc_main$12 = {
  17655. __name: "BookInfo",
  17656. props: {
  17657. bookList: {
  17658. type: Array,
  17659. default: () => []
  17660. },
  17661. detail: {
  17662. type: Object,
  17663. default: () => ({})
  17664. },
  17665. isShow: {
  17666. type: Boolean,
  17667. default: true
  17668. }
  17669. },
  17670. emits: ["get-all-firstLetter"],
  17671. setup(__props, { expose: __expose, emit: __emit }) {
  17672. __expose();
  17673. const props2 = __props;
  17674. const emit2 = __emit;
  17675. const auditNum = vue.computed(() => {
  17676. return props2.bookList.reduce((total, item) => {
  17677. var _a;
  17678. return total + ((_a = item.auditCommentList) == null ? void 0 : _a.length) || 0;
  17679. }, 0);
  17680. });
  17681. function handleBookClick(book) {
  17682. if (props2.detail.status == 10) {
  17683. uni.$u.ttsModule.speak("此订单已审核");
  17684. return;
  17685. }
  17686. uni.navigateTo({
  17687. url: `/pages/index/detail/book-audit?isbn=${book.isbn}&orderId=${props2.detail.orderId}`
  17688. });
  17689. uni.setStorageSync("auditBook", book);
  17690. }
  17691. function getAuditCateNum(cate) {
  17692. let auditList = [];
  17693. props2.bookList.forEach((v) => {
  17694. auditList.push(...v.auditCommentList || []);
  17695. });
  17696. return auditList.filter((v) => v.sts == cate).length;
  17697. }
  17698. const formatBookList = (list) => {
  17699. const poorBooks = { title: "极差", list: [], backgroundColor: "#de868f", id: "poor" };
  17700. const goodBooks = { title: "良好", list: [], backgroundColor: "#81b337", id: "good" };
  17701. const otherBooks = [];
  17702. const allFirstLetter = [];
  17703. const handleBookCategorization = (book) => {
  17704. let firstLetter;
  17705. const char = book.bookName.charAt(0);
  17706. if (/^[A-Za-z]$/.test(char)) {
  17707. firstLetter = char.toUpperCase();
  17708. } else if (/^[\u4E00-\u9FA5]$/.test(char)) {
  17709. firstLetter = toPinyin.chineseToInitials(toPinyin.chineseToPinYin(char));
  17710. } else {
  17711. firstLetter = char;
  17712. }
  17713. let bool = otherBooks.some((item) => item.title == firstLetter);
  17714. if (!bool) {
  17715. otherBooks.push({ id: firstLetter, title: firstLetter, list: [{ ...book }] });
  17716. allFirstLetter.push(firstLetter);
  17717. emit2("get-all-firstLetter", allFirstLetter);
  17718. } else {
  17719. otherBooks.find((item) => item.title == firstLetter).list.push(book);
  17720. }
  17721. };
  17722. list.forEach((book) => {
  17723. var _a, _b, _c;
  17724. formatAppLog("log", "at pages/index/detail/components/BookInfo.vue:106", book, "book");
  17725. book.goodNum = ((_a = book.auditCommentList) == null ? void 0 : _a.filter((v) => v.sts == 1).length) || 0;
  17726. book.badNum = ((_b = book.auditCommentList) == null ? void 0 : _b.filter((v) => v.sts == 3).length) || 0;
  17727. const totalAudited = ((_c = book.auditCommentList) == null ? void 0 : _c.filter((v) => v.sts !== 0).length) || 0;
  17728. const isFullyAudited = totalAudited === book.num;
  17729. if (isFullyAudited) {
  17730. if (book.auditCommentList.some((v) => v.sts === 3)) {
  17731. poorBooks.list.push(book);
  17732. } else if (book.auditCommentList.every((v) => v.sts === 1)) {
  17733. goodBooks.list.push(book);
  17734. } else {
  17735. handleBookCategorization(book);
  17736. }
  17737. } else {
  17738. handleBookCategorization(book);
  17739. }
  17740. });
  17741. return { poorBooks, goodBooks, otherBooks };
  17742. };
  17743. const formatList = vue.ref([]);
  17744. vue.watch(() => props2.bookList, (newVal) => {
  17745. let { poorBooks, goodBooks, otherBooks } = formatBookList(newVal);
  17746. let poor = poorBooks.list.length > 0 ? poorBooks : {};
  17747. let good = goodBooks.list.length > 0 ? goodBooks : {};
  17748. formatList.value = [...otherBooks, poor, good];
  17749. formatAppLog("log", "at pages/index/detail/components/BookInfo.vue:139", formatList.value, "xxxxx");
  17750. }, { immediate: true, deep: true });
  17751. 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() {
  17752. return toPinyin;
  17753. } };
  17754. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  17755. return __returned__;
  17756. }
  17757. };
  17758. function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
  17759. return vue.openBlock(), vue.createElementBlock("view", { class: "book-info" }, [
  17760. $props.isShow ? (vue.openBlock(), vue.createElementBlock(
  17761. vue.Fragment,
  17762. { key: 0 },
  17763. [
  17764. vue.createElementVNode(
  17765. "view",
  17766. {
  17767. class: "font-bold mt-12 mb-10",
  17768. style: { "padding": "0 20rpx" }
  17769. },
  17770. vue.toDisplayString($props.bookList.length) + "条记录,共" + vue.toDisplayString($props.detail.totalNum) + "本,已审" + vue.toDisplayString($setup.auditNum || 0) + "本 ",
  17771. 1
  17772. /* TEXT */
  17773. ),
  17774. vue.createElementVNode(
  17775. "view",
  17776. {
  17777. class: "font-light",
  17778. style: { "padding": "0 20rpx" }
  17779. },
  17780. " 其中已审:良好" + vue.toDisplayString($setup.getAuditCateNum(1)) + "本,一般0本,极差" + vue.toDisplayString($setup.getAuditCateNum(3)) + "本 ",
  17781. 1
  17782. /* TEXT */
  17783. )
  17784. ],
  17785. 64
  17786. /* STABLE_FRAGMENT */
  17787. )) : vue.createCommentVNode("v-if", true),
  17788. (vue.openBlock(true), vue.createElementBlock(
  17789. vue.Fragment,
  17790. null,
  17791. vue.renderList($setup.formatList, (item) => {
  17792. return vue.withDirectives((vue.openBlock(), vue.createElementBlock("view", {
  17793. class: "book-info-item bg-white mt-12",
  17794. style: vue.normalizeStyle({ backgroundColor: item.backgroundColor }),
  17795. key: item.title,
  17796. id: item.id
  17797. }, [
  17798. vue.createElementVNode(
  17799. "view",
  17800. { class: "book-info-item-title" },
  17801. vue.toDisplayString(item.title),
  17802. 1
  17803. /* TEXT */
  17804. ),
  17805. vue.createElementVNode("view", { class: "book-info-item-list" }, [
  17806. (vue.openBlock(true), vue.createElementBlock(
  17807. vue.Fragment,
  17808. null,
  17809. vue.renderList(item.list, (book) => {
  17810. return vue.openBlock(), vue.createBlock($setup["BookItem"], {
  17811. key: book.bookId,
  17812. item: book,
  17813. onClick: ($event) => $setup.handleBookClick(book)
  17814. }, null, 8, ["item", "onClick"]);
  17815. }),
  17816. 128
  17817. /* KEYED_FRAGMENT */
  17818. ))
  17819. ])
  17820. ], 12, ["id"])), [
  17821. [vue.vShow, item == null ? void 0 : item.title]
  17822. ]);
  17823. }),
  17824. 128
  17825. /* KEYED_FRAGMENT */
  17826. ))
  17827. ]);
  17828. }
  17829. 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"]]);
  17830. const props$8 = {
  17831. props: {
  17832. // 图片地址
  17833. src: {
  17834. type: String,
  17835. default: props$E.image.src
  17836. },
  17837. // 裁剪模式
  17838. mode: {
  17839. type: String,
  17840. default: props$E.image.mode
  17841. },
  17842. // 宽度,单位任意
  17843. width: {
  17844. type: [String, Number],
  17845. default: props$E.image.width
  17846. },
  17847. // 高度,单位任意
  17848. height: {
  17849. type: [String, Number],
  17850. default: props$E.image.height
  17851. },
  17852. // 图片形状,circle-圆形,square-方形
  17853. shape: {
  17854. type: String,
  17855. default: props$E.image.shape
  17856. },
  17857. // 圆角,单位任意
  17858. radius: {
  17859. type: [String, Number],
  17860. default: props$E.image.radius
  17861. },
  17862. // 是否懒加载,微信小程序、App、百度小程序、字节跳动小程序
  17863. lazyLoad: {
  17864. type: Boolean,
  17865. default: props$E.image.lazyLoad
  17866. },
  17867. // 开启长按图片显示识别微信小程序码菜单
  17868. showMenuByLongpress: {
  17869. type: Boolean,
  17870. default: props$E.image.showMenuByLongpress
  17871. },
  17872. // 加载中的图标,或者小图片
  17873. loadingIcon: {
  17874. type: String,
  17875. default: props$E.image.loadingIcon
  17876. },
  17877. // 加载失败的图标,或者小图片
  17878. errorIcon: {
  17879. type: String,
  17880. default: props$E.image.errorIcon
  17881. },
  17882. // 是否显示加载中的图标或者自定义的slot
  17883. showLoading: {
  17884. type: Boolean,
  17885. default: props$E.image.showLoading
  17886. },
  17887. // 是否显示加载错误的图标或者自定义的slot
  17888. showError: {
  17889. type: Boolean,
  17890. default: props$E.image.showError
  17891. },
  17892. // 是否需要淡入效果
  17893. fade: {
  17894. type: Boolean,
  17895. default: props$E.image.fade
  17896. },
  17897. // 只支持网络资源,只对微信小程序有效
  17898. webp: {
  17899. type: Boolean,
  17900. default: props$E.image.webp
  17901. },
  17902. // 过渡时间,单位ms
  17903. duration: {
  17904. type: [String, Number],
  17905. default: props$E.image.duration
  17906. },
  17907. // 背景颜色,用于深色页面加载图片时,为了和背景色融合
  17908. bgColor: {
  17909. type: String,
  17910. default: props$E.image.bgColor
  17911. }
  17912. }
  17913. };
  17914. const _sfc_main$11 = {
  17915. name: "u-image",
  17916. mixins: [mpMixin, mixin, props$8],
  17917. data() {
  17918. return {
  17919. // 图片是否加载错误,如果是,则显示错误占位图
  17920. isError: false,
  17921. // 初始化组件时,默认为加载中状态
  17922. loading: true,
  17923. // 不透明度,为了实现淡入淡出的效果
  17924. opacity: 1,
  17925. // 过渡时间,因为props的值无法修改,故需要一个中间值
  17926. durationTime: this.duration,
  17927. // 图片加载完成时,去掉背景颜色,因为如果是png图片,就会显示灰色的背景
  17928. backgroundStyle: {},
  17929. // 用于fade模式的控制组件显示与否
  17930. show: false
  17931. };
  17932. },
  17933. watch: {
  17934. src: {
  17935. immediate: true,
  17936. handler(n) {
  17937. if (!n) {
  17938. this.isError = true;
  17939. } else {
  17940. this.isError = false;
  17941. this.loading = true;
  17942. }
  17943. }
  17944. }
  17945. },
  17946. computed: {
  17947. wrapStyle() {
  17948. let style = {};
  17949. style.width = this.$u.addUnit(this.width);
  17950. style.height = this.$u.addUnit(this.height);
  17951. style.borderRadius = this.shape == "circle" ? "10000px" : uni.$u.addUnit(this.radius);
  17952. style.overflow = this.radius > 0 ? "hidden" : "visible";
  17953. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  17954. }
  17955. },
  17956. mounted() {
  17957. this.show = true;
  17958. },
  17959. emits: ["click", "error", "load"],
  17960. methods: {
  17961. // 点击图片
  17962. onClick() {
  17963. this.$emit("click");
  17964. },
  17965. // 图片加载失败
  17966. onErrorHandler(err) {
  17967. this.loading = false;
  17968. this.isError = true;
  17969. this.$emit("error", err);
  17970. },
  17971. // 图片加载完成,标记loading结束
  17972. onLoadHandler(event) {
  17973. this.loading = false;
  17974. this.isError = false;
  17975. this.$emit("load", event);
  17976. this.removeBgColor();
  17977. },
  17978. // 移除图片的背景色
  17979. removeBgColor() {
  17980. this.backgroundStyle = {
  17981. backgroundColor: "transparent"
  17982. };
  17983. }
  17984. }
  17985. };
  17986. function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
  17987. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  17988. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
  17989. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  17990. mode: "fade",
  17991. show: $data.show,
  17992. duration: _ctx.fade ? 1e3 : 0
  17993. }, {
  17994. default: vue.withCtx(() => [
  17995. vue.createElementVNode(
  17996. "view",
  17997. {
  17998. class: "u-image",
  17999. onClick: _cache[2] || (_cache[2] = (...args) => $options.onClick && $options.onClick(...args)),
  18000. style: vue.normalizeStyle([$options.wrapStyle, $data.backgroundStyle])
  18001. },
  18002. [
  18003. !$data.isError ? (vue.openBlock(), vue.createElementBlock("image", {
  18004. key: 0,
  18005. src: _ctx.src,
  18006. mode: _ctx.mode,
  18007. onError: _cache[0] || (_cache[0] = (...args) => $options.onErrorHandler && $options.onErrorHandler(...args)),
  18008. onLoad: _cache[1] || (_cache[1] = (...args) => $options.onLoadHandler && $options.onLoadHandler(...args)),
  18009. "show-menu-by-longpress": _ctx.showMenuByLongpress,
  18010. "lazy-load": _ctx.lazyLoad,
  18011. class: "u-image__image",
  18012. style: vue.normalizeStyle({
  18013. borderRadius: _ctx.shape == "circle" ? "10000px" : _ctx.$u.addUnit(_ctx.radius),
  18014. width: _ctx.$u.addUnit(_ctx.width),
  18015. height: _ctx.$u.addUnit(_ctx.height)
  18016. })
  18017. }, null, 44, ["src", "mode", "show-menu-by-longpress", "lazy-load"])) : vue.createCommentVNode("v-if", true),
  18018. _ctx.showLoading && $data.loading ? (vue.openBlock(), vue.createElementBlock(
  18019. "view",
  18020. {
  18021. key: 1,
  18022. class: "u-image__loading",
  18023. style: vue.normalizeStyle({
  18024. borderRadius: _ctx.shape == "circle" ? "50%" : _ctx.$u.addUnit(_ctx.radius),
  18025. backgroundColor: this.bgColor,
  18026. width: _ctx.$u.addUnit(_ctx.width),
  18027. height: _ctx.$u.addUnit(_ctx.height)
  18028. })
  18029. },
  18030. [
  18031. vue.renderSlot(_ctx.$slots, "loading", {}, () => [
  18032. vue.createVNode(_component_u_icon, {
  18033. name: _ctx.loadingIcon,
  18034. width: _ctx.width,
  18035. height: _ctx.height
  18036. }, null, 8, ["name", "width", "height"])
  18037. ], true)
  18038. ],
  18039. 4
  18040. /* STYLE */
  18041. )) : vue.createCommentVNode("v-if", true),
  18042. _ctx.showError && $data.isError && !$data.loading ? (vue.openBlock(), vue.createElementBlock(
  18043. "view",
  18044. {
  18045. key: 2,
  18046. class: "u-image__error",
  18047. style: vue.normalizeStyle({
  18048. borderRadius: _ctx.shape == "circle" ? "50%" : _ctx.$u.addUnit(_ctx.radius),
  18049. width: _ctx.$u.addUnit(_ctx.width),
  18050. height: _ctx.$u.addUnit(_ctx.height)
  18051. })
  18052. },
  18053. [
  18054. vue.renderSlot(_ctx.$slots, "error", {}, () => [
  18055. vue.createVNode(_component_u_icon, {
  18056. name: _ctx.errorIcon,
  18057. width: _ctx.width,
  18058. height: _ctx.height
  18059. }, null, 8, ["name", "width", "height"])
  18060. ], true)
  18061. ],
  18062. 4
  18063. /* STYLE */
  18064. )) : vue.createCommentVNode("v-if", true)
  18065. ],
  18066. 4
  18067. /* STYLE */
  18068. )
  18069. ]),
  18070. _: 3
  18071. /* FORWARDED */
  18072. }, 8, ["show", "duration"]);
  18073. }
  18074. 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"]]);
  18075. const _sfc_main$10 = {
  18076. __name: "FileInfo",
  18077. props: {
  18078. orderId: {
  18079. type: String,
  18080. default: ""
  18081. },
  18082. annexType: {
  18083. type: Number,
  18084. default: 1
  18085. },
  18086. isbn: {
  18087. type: String,
  18088. default: ""
  18089. }
  18090. },
  18091. setup(__props, { expose: __expose }) {
  18092. __expose();
  18093. const form = vue.ref({
  18094. imgInfo: [],
  18095. remark: ""
  18096. });
  18097. const props2 = __props;
  18098. const fileList = vue.ref([]);
  18099. function getFileList() {
  18100. uni.$u.http.get("/app/orderinfo/getOrderAnnexList", {
  18101. params: {
  18102. orderId: props2.orderId,
  18103. annexType: props2.annexType,
  18104. isbn: props2.isbn
  18105. }
  18106. }).then((res2) => {
  18107. if (res2.code == 200) {
  18108. fileList.value = res2.data;
  18109. }
  18110. });
  18111. }
  18112. getFileList();
  18113. const handleUpload = () => {
  18114. formatAppLog("log", "at pages/index/detail/components/FileInfo.vue:73", form.value);
  18115. let data = {
  18116. orderId: props2.orderId,
  18117. annexType: props2.annexType,
  18118. isbn: props2.isbn,
  18119. ...form.value
  18120. };
  18121. uni.$u.http.post("/app/orderinfo/setOrderAnnex", data).then((res2) => {
  18122. if (res2.code == 200) {
  18123. uni.$u.toast("上传成功");
  18124. form.value.imgInfo = [];
  18125. form.value.remark = "";
  18126. getFileList();
  18127. } else {
  18128. uni.$u.toast(res2.msg);
  18129. }
  18130. });
  18131. };
  18132. const __returned__ = { form, props: props2, fileList, getFileList, handleUpload, ref: vue.ref, cyUpload };
  18133. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18134. return __returned__;
  18135. }
  18136. };
  18137. function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
  18138. var _a;
  18139. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$2);
  18140. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  18141. const _component_u_image = resolveEasycom(vue.resolveDynamicComponent("u-image"), __easycom_2$1);
  18142. return vue.openBlock(), vue.createElementBlock("view", { class: "file-info bg-white" }, [
  18143. vue.createElementVNode("view", { class: "file-info-container" }, [
  18144. vue.createVNode($setup["cyUpload"], {
  18145. filename: $setup.form.imgInfo,
  18146. "onUpdate:filename": _cache[0] || (_cache[0] = ($event) => $setup.form.imgInfo = $event),
  18147. limit: 3
  18148. }, null, 8, ["filename"]),
  18149. vue.createVNode(_component_u_textarea, {
  18150. modelValue: $setup.form.remark,
  18151. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.remark = $event),
  18152. placeholder: "上传说明...",
  18153. autoHeight: "",
  18154. style: { "min-height": "60px" }
  18155. }, null, 8, ["modelValue"]),
  18156. vue.createElementVNode("view", { class: "flex flex-a-c flex-j-c" }, [
  18157. vue.createVNode(_component_u_button, {
  18158. class: "mt-24",
  18159. type: "primary",
  18160. onClick: $setup.handleUpload
  18161. }, {
  18162. default: vue.withCtx(() => [
  18163. vue.createTextVNode("上传(最多上传3张)")
  18164. ]),
  18165. _: 1
  18166. /* STABLE */
  18167. })
  18168. ])
  18169. ]),
  18170. vue.createElementVNode("view", { class: "file-info-list" }, [
  18171. vue.createElementVNode("view", { class: "file-info-list-title text-center" }, "已上传记录"),
  18172. !((_a = $setup.fileList) == null ? void 0 : _a.length) ? (vue.openBlock(), vue.createElementBlock("view", {
  18173. key: 0,
  18174. class: "file-info-list-content mt-24 mb-24 text-center"
  18175. }, "还没有上传记录")) : (vue.openBlock(true), vue.createElementBlock(
  18176. vue.Fragment,
  18177. { key: 1 },
  18178. vue.renderList($setup.fileList, (item) => {
  18179. return vue.openBlock(), vue.createElementBlock("view", {
  18180. class: "file-info-item",
  18181. key: item.id
  18182. }, [
  18183. vue.createElementVNode("view", { class: "file-info-item-img flex flex-a-c" }, [
  18184. (vue.openBlock(true), vue.createElementBlock(
  18185. vue.Fragment,
  18186. null,
  18187. vue.renderList(item.imgInfo, (img) => {
  18188. return vue.openBlock(), vue.createBlock(_component_u_image, {
  18189. src: img,
  18190. width: "90",
  18191. height: "90",
  18192. style: { "margin-right": "10px" }
  18193. }, null, 8, ["src"]);
  18194. }),
  18195. 256
  18196. /* UNKEYED_FRAGMENT */
  18197. ))
  18198. ]),
  18199. vue.createElementVNode("view", { class: "file-info-item-info mt-10 font-14" }, [
  18200. vue.createElementVNode(
  18201. "view",
  18202. { class: "file-info-item-info-name" },
  18203. "上传说明:" + vue.toDisplayString(item.remark),
  18204. 1
  18205. /* TEXT */
  18206. ),
  18207. vue.createElementVNode("view", { class: "file-info-item-info-name mt-10" }, [
  18208. vue.createElementVNode(
  18209. "text",
  18210. null,
  18211. vue.toDisplayString(item.createTime),
  18212. 1
  18213. /* TEXT */
  18214. ),
  18215. vue.createElementVNode(
  18216. "text",
  18217. { class: "ml-20" },
  18218. vue.toDisplayString(item.createName),
  18219. 1
  18220. /* TEXT */
  18221. )
  18222. ])
  18223. ])
  18224. ]);
  18225. }),
  18226. 128
  18227. /* KEYED_FRAGMENT */
  18228. ))
  18229. ])
  18230. ]);
  18231. }
  18232. 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"]]);
  18233. const _sfc_main$$ = {
  18234. __name: "index",
  18235. setup(__props, { expose: __expose }) {
  18236. __expose();
  18237. const showAuditorSelector = vue.ref(false);
  18238. const selectedAuditor = vue.ref({});
  18239. const handleAuditorSelected = (auditor) => {
  18240. selectedAuditor.value = auditor;
  18241. orderDetail.value.auditUserId = auditor.userId;
  18242. orderDetail.value.auditUserName = auditor.userName;
  18243. };
  18244. const toView = vue.ref("");
  18245. function scrollToView(to) {
  18246. toView.value = to;
  18247. uni.pageScrollTo({
  18248. selector: "#" + to,
  18249. duration: 200
  18250. });
  18251. }
  18252. function scrollToTop() {
  18253. uni.pageScrollTo({
  18254. top: 0,
  18255. duration: 200
  18256. });
  18257. }
  18258. function handleBindCode() {
  18259. uni.$u.toast("暂无开发");
  18260. }
  18261. const list = vue.ref(["图书清单", "物流信息", "上传附件"]);
  18262. const current = vue.ref(0);
  18263. const handleSectionChange = (index2) => {
  18264. current.value = index2;
  18265. };
  18266. const allLetters = vue.ref([]);
  18267. function onGetAllFirstLetter(data) {
  18268. allLetters.value = data;
  18269. }
  18270. function handleLogisticsConfirm() {
  18271. uni.showModal({
  18272. title: "提示",
  18273. content: "是否确认物流签收?",
  18274. success: (res2) => {
  18275. if (res2.confirm) {
  18276. uni.showLoading({ title: "加载中...", mask: true });
  18277. uni.$u.http.post("/app/orderinfo/signLogistics", {
  18278. params: {
  18279. searchType: 1,
  18280. "search": orderId.value
  18281. }
  18282. }).then((res3) => {
  18283. if (res3.code == 200) {
  18284. uni.showToast({ title: "签收成功", icon: "none" });
  18285. uni.$u.ttsModule.speak("签收成功");
  18286. uni.navigateBack();
  18287. }
  18288. }).finally(() => {
  18289. uni.hideLoading();
  18290. });
  18291. }
  18292. }
  18293. });
  18294. }
  18295. function handleConfirm() {
  18296. uni.showLoading({ title: "加载中...", mask: true });
  18297. uni.$u.http.post("/app/orderinfo/confirmOrder", {
  18298. searchType: 1,
  18299. "search": orderDetail.value.orderId
  18300. }).then((res2) => {
  18301. if (res2.code == 200) {
  18302. uni.showToast({ title: "确认收货成功", icon: "none" });
  18303. uni.$u.ttsModule.speak("确认收货成功");
  18304. getOrderDetail2();
  18305. }
  18306. }).finally(() => {
  18307. uni.hideLoading();
  18308. });
  18309. }
  18310. function handleComplete() {
  18311. let bookList = orderDetail.value.detailVoList;
  18312. let bool = bookList.some((item) => {
  18313. var _a;
  18314. return ((_a = item.auditCommentList) == null ? void 0 : _a.length) < item.num;
  18315. });
  18316. if (bool) {
  18317. let text = "还有未审核的书";
  18318. uni.$u.toast(text);
  18319. uni.$u.ttsModule.speak(text);
  18320. return;
  18321. } else {
  18322. uni.$u.http.post("/app/orderinfo/checkOrderFinish", {
  18323. checkUserId: orderDetail.value.auditUserId,
  18324. "orderId": orderDetail.value.orderId
  18325. }).then((res2) => {
  18326. if (res2.code == 200) {
  18327. uni.showToast({ title: "审核完成", icon: "none" });
  18328. uni.$u.ttsModule.speak("审核完成");
  18329. uni.navigateBack();
  18330. }
  18331. });
  18332. }
  18333. }
  18334. const orderDetail = vue.ref({ status: 0 });
  18335. function getOrderDetail2() {
  18336. if (!orderId.value)
  18337. return;
  18338. uni.showLoading({
  18339. title: "加载中...",
  18340. mask: true
  18341. });
  18342. uni.$u.http.get("/app/orderinfo/getOrderInfoForCheck", {
  18343. params: {
  18344. searchType: 1,
  18345. "search": orderId.value
  18346. }
  18347. }).then((res2) => {
  18348. if (res2.code == 200) {
  18349. orderDetail.value = res2.data;
  18350. if (isOnLoad.value) {
  18351. if (res2.data.manageRemark.length > 0 && res2.data.status < 10) {
  18352. uni.$u.ttsModule.speak("此订单有备注信息,请注意查看");
  18353. }
  18354. if (res2.data.warnArea && res2.data.warnArea.length > 0) {
  18355. let text = `此订单来源于${res2.data.warnArea}`;
  18356. uni.$u.ttsModule.speak(text);
  18357. }
  18358. isOnLoad.value = false;
  18359. if (res2.data.auditUserId) {
  18360. let auditUserInfo = {
  18361. userName: res2.data.auditUserName,
  18362. userId: res2.data.auditUserId
  18363. };
  18364. uni.setStorageSync("checkUserInfo", auditUserInfo);
  18365. } else {
  18366. let userInfo = uni.getStorageSync("userInfo");
  18367. if (userInfo) {
  18368. orderDetail.value.auditUserName = userInfo.userName;
  18369. orderDetail.value.auditUserId = userInfo.userId;
  18370. uni.setStorageSync("checkUserInfo", {
  18371. userName: userInfo.userName,
  18372. userId: userInfo.userId
  18373. });
  18374. }
  18375. }
  18376. }
  18377. } else {
  18378. uni.$u.toast(res2.msg);
  18379. }
  18380. }).finally(() => {
  18381. uni.hideLoading();
  18382. });
  18383. }
  18384. function checkIsbn(isbn) {
  18385. const isbn13Regex = /^(?:97[89]-?\d{1,5}-?\d{1,7}-?\d{1,6}-?\d)$/;
  18386. if (isbn13Regex.test(isbn)) {
  18387. return true;
  18388. }
  18389. return false;
  18390. }
  18391. function handleScan(isbn) {
  18392. if (!checkIsbn(isbn)) {
  18393. let text = `不是正确的ISBN码`;
  18394. uni.$u.ttsModule.speak(text);
  18395. return;
  18396. }
  18397. if (orderDetail.value.status == 10) {
  18398. uni.$u.ttsModule.speak("此订单已审核");
  18399. return;
  18400. }
  18401. let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
  18402. if (isbns.includes(isbn)) {
  18403. let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
  18404. if (book.auditCommentList.every((item) => item.sts == 1)) {
  18405. let text = `${isbn}已审核为良好`;
  18406. return uni.$u.ttsModule.speak(text);
  18407. }
  18408. if (book.suit == 1) {
  18409. let text = `${isbn}请注意套装书是否齐全`;
  18410. uni.$u.ttsModule.speak(text);
  18411. }
  18412. if (book.bookWarn == 1) {
  18413. let text = `请注意${isbn}需要取出`;
  18414. uni.$u.ttsModule.speak(text);
  18415. }
  18416. uni.navigateTo({
  18417. url: `/pages/index/detail/book-audit?isbn=${isbn}&orderId=${orderDetail.value.orderId}`
  18418. });
  18419. uni.setStorageSync("auditBook", book);
  18420. uni.setStorageSync("orderDetail", orderDetail.value);
  18421. } else {
  18422. let text = `此订单中不存在${isbn}这本书 `;
  18423. uni.$u.ttsModule.speak(text);
  18424. }
  18425. }
  18426. function handleScanCode() {
  18427. uni.scanCode({
  18428. success: (res2) => {
  18429. res2.result && handleScan(res2.result);
  18430. }
  18431. });
  18432. }
  18433. const orderId = vue.ref("");
  18434. const isOnLoad = vue.ref(false);
  18435. const type2 = vue.ref(1);
  18436. onLoad((option) => {
  18437. orderId.value = option.id;
  18438. getOrderDetail2();
  18439. isOnLoad.value = true;
  18440. type2.value = option.type || 1;
  18441. uni.removeStorageSync("scannedBooks");
  18442. uni.$u.useGlobalEvent((e) => {
  18443. if (e.barcode) {
  18444. handleScan(e.barcode);
  18445. }
  18446. });
  18447. });
  18448. onShow(() => {
  18449. getOrderDetail2();
  18450. });
  18451. const __returned__ = { showAuditorSelector, selectedAuditor, handleAuditorSelected, toView, scrollToView, scrollToTop, handleBindCode, list, current, handleSectionChange, allLetters, onGetAllFirstLetter, handleLogisticsConfirm, handleConfirm, handleComplete, orderDetail, getOrderDetail: getOrderDetail2, checkIsbn, handleScan, handleScanCode, orderId, isOnLoad, type: type2, ref: vue.ref, get onLoad() {
  18452. return onLoad;
  18453. }, get onShow() {
  18454. return onShow;
  18455. }, AuditorSelector, OrderInfo, UserInfoCard, LogisticsTimeline, BookInfo, FileInfo };
  18456. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18457. return __returned__;
  18458. }
  18459. };
  18460. function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
  18461. var _a;
  18462. const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$5);
  18463. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  18464. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  18465. return vue.openBlock(), vue.createElementBlock(
  18466. "view",
  18467. {
  18468. class: vue.normalizeClass(["order-detail", { "fixed-bottom-2": $setup.type == 2 }])
  18469. },
  18470. [
  18471. vue.createElementVNode("scroll-view", {
  18472. class: "scroller",
  18473. "scroll-into-view": $setup.toView,
  18474. "scroll-y": "true",
  18475. "scroll-with-animation": "true"
  18476. }, [
  18477. vue.createElementVNode("view", { class: "flex flex-a-c flex-j-b bg-white bind-audit mb-16" }, [
  18478. vue.createElementVNode("text", null, "绑定审核员"),
  18479. vue.createElementVNode(
  18480. "text",
  18481. { class: "text-center flex-1" },
  18482. vue.toDisplayString($setup.orderDetail.auditUserName || ((_a = $setup.selectedAuditor) == null ? void 0 : _a.userName) || ""),
  18483. 1
  18484. /* TEXT */
  18485. ),
  18486. vue.createElementVNode("text", {
  18487. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showAuditorSelector = true),
  18488. class: "color-primary"
  18489. }, "绑定")
  18490. ]),
  18491. vue.createVNode($setup["OrderInfo"], { detail: $setup.orderDetail }, null, 8, ["detail"]),
  18492. vue.createVNode($setup["UserInfoCard"], { detail: $setup.orderDetail }, null, 8, ["detail"]),
  18493. vue.createElementVNode("view", {
  18494. class: "mt-16",
  18495. style: { "padding": "0 6rpx" }
  18496. }, [
  18497. vue.createVNode(_component_u_subsection, {
  18498. list: $setup.list,
  18499. mode: "subsection",
  18500. current: $setup.current,
  18501. onChange: $setup.handleSectionChange
  18502. }, null, 8, ["list", "current"]),
  18503. $setup.current == 0 ? (vue.openBlock(), vue.createBlock($setup["BookInfo"], {
  18504. key: 0,
  18505. bookList: $setup.orderDetail.detailVoList,
  18506. detail: $setup.orderDetail,
  18507. onGetAllFirstLetter: $setup.onGetAllFirstLetter
  18508. }, null, 8, ["bookList", "detail"])) : vue.createCommentVNode("v-if", true),
  18509. $setup.current == 1 ? (vue.openBlock(), vue.createBlock($setup["LogisticsTimeline"], {
  18510. key: 1,
  18511. list: $setup.orderDetail.trackingVoList
  18512. }, null, 8, ["list"])) : vue.createCommentVNode("v-if", true),
  18513. $setup.current == 2 ? (vue.openBlock(), vue.createBlock($setup["FileInfo"], {
  18514. key: 2,
  18515. orderId: $setup.orderDetail.orderId
  18516. }, null, 8, ["orderId"])) : vue.createCommentVNode("v-if", true)
  18517. ])
  18518. ], 8, ["scroll-into-view"]),
  18519. vue.createElementVNode("view", { class: "fixed-left" }, [
  18520. vue.createElementVNode("view", {
  18521. class: "bind-code common-bg",
  18522. style: { "margin-bottom": "30px", "padding": "20rpx" },
  18523. onClick: $setup.handleBindCode
  18524. }, "绑码 "),
  18525. vue.createElementVNode("view", { class: "common-bg flex flex-a-c flex-j-c flex-d" }, [
  18526. vue.createElementVNode("view", {
  18527. class: "book-status-item",
  18528. onClick: _cache[1] || (_cache[1] = ($event) => $setup.scrollToView("good"))
  18529. }, "良好"),
  18530. vue.createElementVNode("view", {
  18531. class: "book-status-item item-center",
  18532. onClick: _cache[2] || (_cache[2] = ($event) => $setup.scrollToView("average"))
  18533. }, "一般"),
  18534. vue.createElementVNode("view", {
  18535. class: "book-status-item",
  18536. onClick: _cache[3] || (_cache[3] = ($event) => $setup.scrollToView("poor"))
  18537. }, "极差")
  18538. ])
  18539. ]),
  18540. vue.createElementVNode("view", { class: "fixed-right" }, [
  18541. vue.createElementVNode("view", { class: "letter-bg flex flex-a-c flex-j-c flex-d" }, [
  18542. vue.createElementVNode("view", { class: "letter-item" }, [
  18543. vue.createVNode(_component_u_icon, {
  18544. name: "arrow-up-fill",
  18545. size: "20",
  18546. color: "#ffffff",
  18547. onClick: $setup.scrollToTop
  18548. })
  18549. ]),
  18550. (vue.openBlock(true), vue.createElementBlock(
  18551. vue.Fragment,
  18552. null,
  18553. vue.renderList($setup.allLetters, (item) => {
  18554. return vue.openBlock(), vue.createElementBlock("view", {
  18555. class: "letter-item",
  18556. onClick: ($event) => $setup.scrollToView(item)
  18557. }, vue.toDisplayString(item), 9, ["onClick"]);
  18558. }),
  18559. 256
  18560. /* UNKEYED_FRAGMENT */
  18561. ))
  18562. ])
  18563. ]),
  18564. $setup.type != 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  18565. key: 0,
  18566. class: "common-bg fixed-bottom"
  18567. }, [
  18568. $setup.orderDetail.status == 5 ? (vue.openBlock(), vue.createBlock(_component_u_button, {
  18569. key: 0,
  18570. type: "warning",
  18571. size: "large",
  18572. onClick: $setup.handleLogisticsConfirm
  18573. }, {
  18574. default: vue.withCtx(() => [
  18575. vue.createTextVNode("物流签收")
  18576. ]),
  18577. _: 1
  18578. /* STABLE */
  18579. })) : vue.createCommentVNode("v-if", true),
  18580. $setup.orderDetail.status == 6 ? (vue.openBlock(), vue.createBlock(_component_u_button, {
  18581. key: 1,
  18582. type: "primary",
  18583. size: "large",
  18584. onClick: $setup.handleConfirm
  18585. }, {
  18586. default: vue.withCtx(() => [
  18587. vue.createTextVNode("确认收货")
  18588. ]),
  18589. _: 1
  18590. /* STABLE */
  18591. })) : vue.createCommentVNode("v-if", true),
  18592. $setup.orderDetail.status == 8 || $setup.orderDetail.status == 9 || $setup.orderDetail.status == 10 ? (vue.openBlock(), vue.createElementBlock(
  18593. vue.Fragment,
  18594. { key: 2 },
  18595. [
  18596. vue.createVNode(_component_u_button, {
  18597. type: "warning",
  18598. size: "large",
  18599. onClick: $setup.handleScanCode
  18600. }, {
  18601. default: vue.withCtx(() => [
  18602. vue.createTextVNode("扫码")
  18603. ]),
  18604. _: 1
  18605. /* STABLE */
  18606. }),
  18607. vue.createVNode(_component_u_button, {
  18608. type: "primary",
  18609. size: "large",
  18610. onClick: $setup.handleComplete
  18611. }, {
  18612. default: vue.withCtx(() => [
  18613. vue.createTextVNode("完成")
  18614. ]),
  18615. _: 1
  18616. /* STABLE */
  18617. })
  18618. ],
  18619. 64
  18620. /* STABLE_FRAGMENT */
  18621. )) : vue.createCommentVNode("v-if", true)
  18622. ])) : vue.createCommentVNode("v-if", true),
  18623. vue.createVNode($setup["AuditorSelector"], {
  18624. show: $setup.showAuditorSelector,
  18625. "onUpdate:show": _cache[4] || (_cache[4] = ($event) => $setup.showAuditorSelector = $event),
  18626. onAuditorSelected: $setup.handleAuditorSelected
  18627. }, null, 8, ["show"])
  18628. ],
  18629. 2
  18630. /* CLASS */
  18631. );
  18632. }
  18633. const PagesIndexDetailIndex = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$_], ["__scopeId", "data-v-8b10f148"], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/detail/index.vue"]]);
  18634. const _sfc_main$_ = {
  18635. __name: "AuditInfo",
  18636. props: {
  18637. detail: {
  18638. type: Object,
  18639. default: () => ({})
  18640. },
  18641. auditList: {
  18642. type: Array,
  18643. default: () => []
  18644. }
  18645. },
  18646. emits: ["selected"],
  18647. setup(__props, { expose: __expose, emit: __emit }) {
  18648. const props2 = __props;
  18649. const auditCommentList = vue.ref([]);
  18650. const initAuditList = (detail) => {
  18651. formatAppLog("log", "at pages/index/detail/components/AuditInfo.vue:51", detail, "detail");
  18652. if (!(detail == null ? void 0 : detail.auditCommentList))
  18653. return;
  18654. auditCommentList.value = detail.auditCommentList.map((item) => ({
  18655. ...item,
  18656. isbn: detail.isbn,
  18657. comList: item.com ? typeof item.com === "string" ? item.com.split(",") : item.com : []
  18658. }));
  18659. };
  18660. vue.watch(() => props2.detail, () => {
  18661. initAuditList(props2.detail);
  18662. }, { deep: true, immediate: true });
  18663. const auditList = vue.ref([{ sts: 1, label: "品相良好" }, { sts: 2, label: "品相一般", disabled: true }, { sts: 3, label: "品相极差" }]);
  18664. const emit2 = __emit;
  18665. const radioClick = (audit, index2, sts) => {
  18666. if (sts == 2)
  18667. return;
  18668. audit.sts = sts;
  18669. auditCommentList.value[index2] = audit;
  18670. formatReason();
  18671. };
  18672. const getAuditCateNum = (cate) => {
  18673. var _a, _b;
  18674. return ((_b = (_a = props2.detail.auditCommentList) == null ? void 0 : _a.filter((item) => item.sts == cate)) == null ? void 0 : _b.length) || 0;
  18675. };
  18676. let reasonList = vue.ref([
  18677. { sts: 3, label: "明显泛黄水印/发霉/明显异味" },
  18678. { sts: 3, label: "老化泛黄褪色/污渍" },
  18679. { sts: 3, label: "明显破损/脱胶缺页/书籍变型" },
  18680. { sts: 3, label: "无此书" },
  18681. { sts: 3, label: "印刷不清晰" },
  18682. { sts: 3, label: "无防伪" },
  18683. { sts: 3, label: "无外护封/无ISBN" },
  18684. { sts: 3, label: "无此书多其他书" },
  18685. { sts: 3, label: "笔记杂乱/习题做完" },
  18686. { sts: 3, label: "有笔记贴" },
  18687. { sts: 3, label: "套装缺册" },
  18688. { sts: 3, label: "听力无光盘" },
  18689. { sts: 3, label: "图书馆/藏书印章" }
  18690. ]);
  18691. const formatReason = () => {
  18692. let list = auditCommentList.value.map((item, index2) => ({
  18693. ...item,
  18694. idx: index2,
  18695. com: item.comList.join(",")
  18696. }));
  18697. return list;
  18698. };
  18699. const toggleReason = (audit, index2, item) => {
  18700. const idx = audit.comList.indexOf(item.label);
  18701. if (idx > -1) {
  18702. audit.comList.splice(idx, 1);
  18703. } else {
  18704. audit.comList.push(item.label);
  18705. }
  18706. auditCommentList.value[index2] = audit;
  18707. };
  18708. __expose({
  18709. formatReason,
  18710. initAuditList
  18711. });
  18712. const __returned__ = { props: props2, auditCommentList, initAuditList, auditList, emit: emit2, radioClick, getAuditCateNum, get reasonList() {
  18713. return reasonList;
  18714. }, set reasonList(v) {
  18715. reasonList = v;
  18716. }, formatReason, toggleReason, ref: vue.ref, watch: vue.watch, nextTick: vue.nextTick, onMounted: vue.onMounted };
  18717. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18718. return __returned__;
  18719. }
  18720. };
  18721. function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
  18722. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$4);
  18723. return vue.openBlock(), vue.createElementBlock("view", { class: "audit-info" }, [
  18724. vue.createElementVNode(
  18725. "view",
  18726. {
  18727. class: "font-bold mt-16",
  18728. style: { "padding": "0 20rpx" }
  18729. },
  18730. " 该书共" + vue.toDisplayString($props.detail.num) + "本,其中:良好" + vue.toDisplayString($setup.getAuditCateNum(1)) + "本,一般" + vue.toDisplayString($setup.getAuditCateNum(2)) + "本,极差" + vue.toDisplayString($setup.getAuditCateNum(3)) + "本 ",
  18731. 1
  18732. /* TEXT */
  18733. ),
  18734. $setup.auditCommentList.length > 0 ? (vue.openBlock(true), vue.createElementBlock(
  18735. vue.Fragment,
  18736. { key: 0 },
  18737. vue.renderList($setup.auditCommentList, (audit, index2) => {
  18738. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  18739. vue.createElementVNode(
  18740. "view",
  18741. {
  18742. class: "mt-10 bind-code",
  18743. style: { "padding": "10rpx 20rpx" }
  18744. },
  18745. " 第" + vue.toDisplayString(index2 + 1) + "本的审核意见 ",
  18746. 1
  18747. /* TEXT */
  18748. ),
  18749. vue.createElementVNode("view", {
  18750. class: "mt-20 bg-white flex flex-j-a flex-a-c",
  18751. style: { "padding": "20rpx", "border-radius": "10rpx" }
  18752. }, [
  18753. (vue.openBlock(true), vue.createElementBlock(
  18754. vue.Fragment,
  18755. null,
  18756. vue.renderList($setup.auditList, (item, idx) => {
  18757. return vue.openBlock(), vue.createElementBlock("view", {
  18758. class: "u-page__tag-item",
  18759. key: idx
  18760. }, [
  18761. vue.createVNode(_component_u_tag, {
  18762. size: "large",
  18763. text: item.label,
  18764. plain: audit.sts != item.sts,
  18765. type: "primary",
  18766. name: item.sts,
  18767. class: vue.normalizeClass({ "disabled": item.sts == 2 }),
  18768. onClick: ($event) => $setup.radioClick(audit, index2, item.sts)
  18769. }, null, 8, ["text", "plain", "name", "class", "onClick"])
  18770. ]);
  18771. }),
  18772. 128
  18773. /* KEYED_FRAGMENT */
  18774. ))
  18775. ]),
  18776. audit.sts == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  18777. key: 0,
  18778. class: "mt-20 bg-white",
  18779. style: { "padding": "20rpx", "border-radius": "10rpx" }
  18780. }, [
  18781. vue.createElementVNode("view", { class: "flex flex-a-c flex-wrap" }, [
  18782. (vue.openBlock(true), vue.createElementBlock(
  18783. vue.Fragment,
  18784. null,
  18785. vue.renderList($setup.reasonList, (item, idx) => {
  18786. return vue.openBlock(), vue.createElementBlock("view", {
  18787. class: vue.normalizeClass(["mr-10 reason-item", { "selected": audit.comList.includes(item.label) }]),
  18788. key: idx,
  18789. onClick: ($event) => $setup.toggleReason(audit, index2, item)
  18790. }, vue.toDisplayString(item.label), 11, ["onClick"]);
  18791. }),
  18792. 128
  18793. /* KEYED_FRAGMENT */
  18794. ))
  18795. ])
  18796. ])) : vue.createCommentVNode("v-if", true)
  18797. ]);
  18798. }),
  18799. 128
  18800. /* KEYED_FRAGMENT */
  18801. )) : vue.createCommentVNode("v-if", true)
  18802. ]);
  18803. }
  18804. 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"]]);
  18805. const _sfc_main$Z = {
  18806. __name: "book-audit",
  18807. setup(__props, { expose: __expose }) {
  18808. __expose();
  18809. const detail = vue.ref({});
  18810. const getBookInfo = (isbn) => {
  18811. uni.$u.http.get(`/app/book/getBookByIsbn/${isbn}`).then((res2) => {
  18812. if (res2.code == 200) {
  18813. detail.value = res2.data;
  18814. }
  18815. });
  18816. };
  18817. const list = vue.ref(["图书审核", "绑码", "附件信息"]);
  18818. const current = vue.ref(0);
  18819. const handleSectionChange = (index2) => {
  18820. current.value = index2;
  18821. };
  18822. const auditData = vue.ref([]);
  18823. const handleAuditSelected = (data) => {
  18824. auditData.value = data.map((item, index2) => {
  18825. item.idx = index2;
  18826. item.com = Array.isArray(item.com) ? item.com.join(",") : item.com;
  18827. return item;
  18828. });
  18829. };
  18830. const scannedBooks = vue.ref([]);
  18831. function checkIsbn(isbn) {
  18832. const isbn13Regex = /^(?:97[89]-?\d{1,5}-?\d{1,7}-?\d{1,6}-?\d)$/;
  18833. if (isbn13Regex.test(isbn)) {
  18834. return true;
  18835. }
  18836. return false;
  18837. }
  18838. function handleScan(isbn) {
  18839. var _a, _b;
  18840. if (!checkIsbn(isbn)) {
  18841. let text = `不是正确的ISBN码`;
  18842. uni.$u.ttsModule.speak(text);
  18843. return;
  18844. }
  18845. let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
  18846. if (isbns.includes(isbn)) {
  18847. let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
  18848. if (((_a = book.auditCommentList) == null ? void 0 : _a.length) > 0) {
  18849. let text = "";
  18850. if (book.auditCommentList.every((item) => item.sts == 1)) {
  18851. text = `${isbn}已审核为良好`;
  18852. uni.$u.ttsModule.speak(text);
  18853. return;
  18854. }
  18855. book.auditCommentList.filter((item) => item.sts !== 0).length || 0;
  18856. let notAuditNum = book.auditCommentList.filter((item) => item.sts === 0).length || 0;
  18857. let poorNum = ((_b = book.auditCommentList) == null ? void 0 : _b.filter((item) => item.sts == 3).length) || 0;
  18858. let scannedNum = scannedBooks.value.filter((item) => item == isbn).length || 0;
  18859. if (scannedNum >= notAuditNum + poorNum) {
  18860. let text2 = `${isbn}已超出订单中的数量`;
  18861. return uni.$u.ttsModule.speak(text2);
  18862. } else {
  18863. if (book.suit == 1) {
  18864. let text2 = `${isbn}请注意套装书是否齐全`;
  18865. uni.$u.ttsModule.speak(text2);
  18866. }
  18867. if (book.bookWarn == 1) {
  18868. let text2 = `请注意${isbn}需要取出`;
  18869. uni.$u.ttsModule.speak(text2);
  18870. }
  18871. if (scannedNum >= notAuditNum && scannedNum < notAuditNum + poorNum) {
  18872. let text2 = `${isbn}已审核为极差`;
  18873. uni.$u.ttsModule.speak(text2);
  18874. }
  18875. scannedBooks.value.push(isbn);
  18876. uni.setStorageSync("scannedBooks", scannedBooks.value);
  18877. uni.navigateTo({
  18878. url: `/pages/index/detail/batch-audit?orderId=${orderId.value}`
  18879. });
  18880. }
  18881. }
  18882. } else {
  18883. let text = `此订单中不存在${isbn}这本书 `;
  18884. uni.$u.ttsModule.speak(text);
  18885. }
  18886. }
  18887. function handleScanCode() {
  18888. uni.scanCode({
  18889. success: (res2) => {
  18890. handleScan(res2.result);
  18891. }
  18892. });
  18893. }
  18894. const auditInfoRef = vue.ref();
  18895. const handleAudit = () => {
  18896. var _a;
  18897. let checkList = (_a = auditInfoRef.value) == null ? void 0 : _a.formatReason(auditData.value);
  18898. let checkUserInfo = uni.getStorageSync("checkUserInfo");
  18899. if (checkUserInfo.userId) {
  18900. checkUserId.value = checkUserInfo.userId;
  18901. } else {
  18902. uni.$u.toast("请先选择审核人");
  18903. }
  18904. uni.$u.http.post("/app/orderinfo/checkOrder", {
  18905. "checkUserId": checkUserId.value,
  18906. "orderId": orderId.value,
  18907. "checkList": checkList
  18908. }).then((res2) => {
  18909. if (res2.code == 200) {
  18910. uni.showToast({ title: "审核成功", icon: "none" });
  18911. uni.$u.ttsModule.speak("审核成功");
  18912. uni.navigateBack();
  18913. } else {
  18914. uni.$u.toast(res2.msg);
  18915. }
  18916. });
  18917. };
  18918. const auditBook = vue.ref({});
  18919. const checkUserId = vue.ref();
  18920. const orderId = vue.ref();
  18921. const orderDetail = vue.ref({});
  18922. let isbnScan = vue.ref("");
  18923. onLoad((options) => {
  18924. options.isbn && getBookInfo(options.isbn);
  18925. scannedBooks.value = [options.isbn];
  18926. isbnScan.value = options.isbn;
  18927. auditBook.value = uni.getStorageSync("auditBook");
  18928. orderId.value = options.orderId;
  18929. orderDetail.value = uni.getStorageSync("orderDetail");
  18930. vue.nextTick(() => {
  18931. var _a;
  18932. (_a = auditInfoRef.value) == null ? void 0 : _a.initAuditList(auditBook.value);
  18933. });
  18934. uni.$u.useGlobalEvent((e) => {
  18935. if (e.barcode) {
  18936. handleScan(e.barcode);
  18937. }
  18938. });
  18939. });
  18940. onShow(() => {
  18941. var _a;
  18942. if (isbnScan.value) {
  18943. checkUserId.value = (_a = uni.getStorageSync("userInfo")) == null ? void 0 : _a.userId;
  18944. auditBook.value = uni.getStorageSync("auditBook");
  18945. orderDetail.value = uni.getStorageSync("orderDetail");
  18946. vue.nextTick(() => {
  18947. var _a2;
  18948. (_a2 = auditInfoRef.value) == null ? void 0 : _a2.initAuditList(auditBook.value);
  18949. });
  18950. }
  18951. });
  18952. const __returned__ = { detail, getBookInfo, list, current, handleSectionChange, auditData, handleAuditSelected, scannedBooks, checkIsbn, handleScan, handleScanCode, auditInfoRef, handleAudit, auditBook, checkUserId, orderId, orderDetail, get isbnScan() {
  18953. return isbnScan;
  18954. }, set isbnScan(v) {
  18955. isbnScan = v;
  18956. }, ref: vue.ref, nextTick: vue.nextTick, get onLoad() {
  18957. return onLoad;
  18958. }, get onShow() {
  18959. return onShow;
  18960. }, AuditInfo, FileInfo };
  18961. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18962. return __returned__;
  18963. }
  18964. };
  18965. function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
  18966. const _component_u_subsection = resolveEasycom(vue.resolveDynamicComponent("u-subsection"), __easycom_0$5);
  18967. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  18968. return vue.openBlock(), vue.createElementBlock("view", { class: "book-audit" }, [
  18969. vue.createElementVNode("view", {
  18970. class: "bg-white flex flex-a-c",
  18971. style: { "padding": "20rpx", "border-radius": "10rpx" }
  18972. }, [
  18973. vue.createElementVNode("image", {
  18974. src: $setup.detail.cover,
  18975. mode: "aspectFill",
  18976. style: { "width": "80px", "height": "100px" }
  18977. }, null, 8, ["src"]),
  18978. vue.createElementVNode("view", { class: "flex flex-d flex-1 ml-20" }, [
  18979. vue.createElementVNode(
  18980. "text",
  18981. { class: "common-title mb-20" },
  18982. vue.toDisplayString($setup.detail.bookName),
  18983. 1
  18984. /* TEXT */
  18985. ),
  18986. vue.createElementVNode("text", { class: "text-sm" }, [
  18987. vue.createTextVNode("ISBN: "),
  18988. vue.createElementVNode(
  18989. "text",
  18990. { class: "color-primary" },
  18991. vue.toDisplayString($setup.detail.isbn),
  18992. 1
  18993. /* TEXT */
  18994. )
  18995. ]),
  18996. vue.createElementVNode("text", { class: "text-sm mt-6" }, [
  18997. vue.createTextVNode("作者: "),
  18998. vue.createElementVNode(
  18999. "text",
  19000. null,
  19001. vue.toDisplayString($setup.detail.author),
  19002. 1
  19003. /* TEXT */
  19004. )
  19005. ]),
  19006. vue.createElementVNode("text", { class: "text-sm mt-6" }, [
  19007. vue.createTextVNode("出版社: "),
  19008. vue.createElementVNode(
  19009. "text",
  19010. null,
  19011. vue.toDisplayString($setup.detail.publish),
  19012. 1
  19013. /* TEXT */
  19014. )
  19015. ])
  19016. ])
  19017. ]),
  19018. vue.createElementVNode("view", {
  19019. class: "mt-20 bg-white price-info",
  19020. style: { "border-radius": "10rpx" }
  19021. }, [
  19022. vue.createElementVNode("view", { class: "flex" }, [
  19023. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  19024. vue.createElementVNode("text", { class: "label" }, "定价"),
  19025. vue.createElementVNode(
  19026. "text",
  19027. { class: "content" },
  19028. "¥" + vue.toDisplayString($setup.detail.price),
  19029. 1
  19030. /* TEXT */
  19031. )
  19032. ]),
  19033. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  19034. vue.createElementVNode("text", { class: "label" }, "回收折扣"),
  19035. vue.createElementVNode(
  19036. "text",
  19037. { class: "content" },
  19038. vue.toDisplayString($setup.detail.recycleDiscount) + "折",
  19039. 1
  19040. /* TEXT */
  19041. )
  19042. ])
  19043. ]),
  19044. vue.createElementVNode("view", { class: "flex flex-a-c" }, [
  19045. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  19046. vue.createElementVNode("text", { class: "label" }, "预估金额"),
  19047. vue.createElementVNode(
  19048. "text",
  19049. { class: "content" },
  19050. "¥" + vue.toDisplayString($setup.auditBook.expectMoney),
  19051. 1
  19052. /* TEXT */
  19053. )
  19054. ]),
  19055. vue.createElementVNode("view", { class: "flex flex-a-c flex-1" }, [
  19056. vue.createElementVNode("text", { class: "label" }, "审核金额"),
  19057. vue.createElementVNode(
  19058. "text",
  19059. { class: "content" },
  19060. "¥" + vue.toDisplayString($setup.auditBook.finalMoney || 0),
  19061. 1
  19062. /* TEXT */
  19063. )
  19064. ])
  19065. ])
  19066. ]),
  19067. vue.createElementVNode("view", { class: "mt-20" }, [
  19068. vue.createVNode(_component_u_subsection, {
  19069. list: $setup.list,
  19070. mode: "subsection",
  19071. current: $setup.current,
  19072. onChange: $setup.handleSectionChange
  19073. }, null, 8, ["list", "current"]),
  19074. vue.withDirectives(vue.createVNode($setup["AuditInfo"], {
  19075. detail: $setup.auditBook,
  19076. auditList: $setup.auditBook.auditCommentList,
  19077. ref: "auditInfoRef"
  19078. }, null, 8, ["detail", "auditList"]), [
  19079. [vue.vShow, $setup.current == 0]
  19080. ]),
  19081. vue.withDirectives(vue.createVNode($setup["FileInfo"], {
  19082. orderId: $setup.orderId,
  19083. annexType: 2,
  19084. isbn: $setup.auditBook.isbn
  19085. }, null, 8, ["orderId", "isbn"]), [
  19086. [vue.vShow, $setup.current == 2]
  19087. ])
  19088. ]),
  19089. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  19090. vue.createVNode(_component_u_button, {
  19091. type: "warning",
  19092. size: "large",
  19093. onClick: $setup.handleScanCode
  19094. }, {
  19095. default: vue.withCtx(() => [
  19096. vue.createTextVNode("扫码")
  19097. ]),
  19098. _: 1
  19099. /* STABLE */
  19100. }),
  19101. vue.createVNode(_component_u_button, {
  19102. type: "primary",
  19103. size: "large",
  19104. onClick: $setup.handleAudit
  19105. }, {
  19106. default: vue.withCtx(() => [
  19107. vue.createTextVNode("确定")
  19108. ]),
  19109. _: 1
  19110. /* STABLE */
  19111. })
  19112. ])
  19113. ]);
  19114. }
  19115. 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"]]);
  19116. const _sfc_main$Y = {
  19117. __name: "BookItem2",
  19118. props: {
  19119. item: Object,
  19120. showClose: {
  19121. type: Boolean,
  19122. default: false
  19123. }
  19124. },
  19125. emits: ["close"],
  19126. setup(__props, { expose: __expose, emit: __emit }) {
  19127. __expose();
  19128. const props2 = __props;
  19129. const emit2 = __emit;
  19130. const handleClose = () => {
  19131. emit2("close", props2.item.isbn);
  19132. };
  19133. const __returned__ = { props: props2, emit: emit2, handleClose, computed: vue.computed };
  19134. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19135. return __returned__;
  19136. }
  19137. };
  19138. function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
  19139. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  19140. return vue.openBlock(), vue.createElementBlock(
  19141. "view",
  19142. {
  19143. class: vue.normalizeClass(["card", { "card-close": $props.showClose }])
  19144. },
  19145. [
  19146. vue.createElementVNode("view", { class: "flex w100" }, [
  19147. vue.createElementVNode("view", { class: "flex-d" }, [
  19148. vue.createElementVNode("image", {
  19149. style: { "width": "70px", "height": "90px" },
  19150. src: $props.item.cover,
  19151. mode: "aspectFill"
  19152. }, null, 8, ["src"]),
  19153. !$props.showClose ? (vue.openBlock(), vue.createElementBlock(
  19154. "view",
  19155. {
  19156. key: 0,
  19157. class: "quantity mt-24"
  19158. },
  19159. "数量: " + vue.toDisplayString($props.item.num),
  19160. 1
  19161. /* TEXT */
  19162. )) : vue.createCommentVNode("v-if", true)
  19163. ]),
  19164. vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
  19165. vue.createElementVNode(
  19166. "view",
  19167. { class: "common-title mb-20" },
  19168. vue.toDisplayString($props.item.bookName),
  19169. 1
  19170. /* TEXT */
  19171. ),
  19172. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  19173. vue.createElementVNode(
  19174. "view",
  19175. { class: "isbn" },
  19176. "ISBN: " + vue.toDisplayString($props.item.isbn),
  19177. 1
  19178. /* TEXT */
  19179. ),
  19180. vue.createElementVNode(
  19181. "view",
  19182. { class: "set" },
  19183. "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "不是"),
  19184. 1
  19185. /* TEXT */
  19186. )
  19187. ]),
  19188. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  19189. vue.createElementVNode(
  19190. "view",
  19191. { class: "price" },
  19192. "定价: " + vue.toDisplayString($props.item.price),
  19193. 1
  19194. /* TEXT */
  19195. ),
  19196. vue.createElementVNode(
  19197. "view",
  19198. { class: "estimate" },
  19199. "预估单价: " + vue.toDisplayString($props.item.expectMoney || 0),
  19200. 1
  19201. /* TEXT */
  19202. )
  19203. ]),
  19204. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  19205. vue.createElementVNode(
  19206. "view",
  19207. { class: "discount" },
  19208. "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
  19209. 1
  19210. /* TEXT */
  19211. ),
  19212. vue.createElementVNode("view", { class: "review" }, [
  19213. vue.createTextVNode("审核金额: "),
  19214. vue.createElementVNode(
  19215. "text",
  19216. { class: "color-red" },
  19217. vue.toDisplayString($props.item.review || 0),
  19218. 1
  19219. /* TEXT */
  19220. )
  19221. ])
  19222. ])
  19223. ])
  19224. ]),
  19225. $props.showClose ? (vue.openBlock(), vue.createElementBlock("view", {
  19226. key: 0,
  19227. class: "quantity-icon mt-24"
  19228. }, [
  19229. vue.createVNode(_component_u_icon, {
  19230. name: "close-circle-fill",
  19231. size: "18",
  19232. color: "#999",
  19233. onClick: $setup.handleClose
  19234. })
  19235. ])) : vue.createCommentVNode("v-if", true)
  19236. ],
  19237. 2
  19238. /* CLASS */
  19239. );
  19240. }
  19241. 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"]]);
  19242. const _sfc_main$X = {
  19243. __name: "batch-audit",
  19244. setup(__props, { expose: __expose }) {
  19245. __expose();
  19246. const detailMap = vue.ref({});
  19247. const scannedBooksDetail = vue.ref([]);
  19248. const getBookInfo = (isbn) => {
  19249. if (detailMap.value[isbn]) {
  19250. scannedBooksDetail.value.push(detailMap.value[isbn]);
  19251. return;
  19252. }
  19253. uni.$u.http.get(`/app/book/getSimpleBookInfoByIsbn/${isbn}`).then((res2) => {
  19254. if (res2.code == 200) {
  19255. detailMap.value[isbn] = res2.data;
  19256. scannedBooksDetail.value.push(res2.data);
  19257. formatAppLog("log", "at pages/index/detail/batch-audit.vue:39", scannedBooksDetail.value, "xxaaxx");
  19258. }
  19259. });
  19260. };
  19261. const handleClose = (index2, isbn) => {
  19262. scannedBooksDetail.value.splice(index2, 1);
  19263. scannedBooks.value = scannedBooks.value.filter((item) => item != isbn);
  19264. };
  19265. function checkIsbn(isbn) {
  19266. const isbn13Regex = /^(?:97[89]-?\d{1,5}-?\d{1,7}-?\d{1,6}-?\d)$/;
  19267. if (isbn13Regex.test(isbn)) {
  19268. return true;
  19269. }
  19270. return false;
  19271. }
  19272. const scannedBooks = vue.ref([]);
  19273. function handleScan(isbn) {
  19274. var _a, _b;
  19275. if (!checkIsbn(isbn)) {
  19276. let text = `不是正确的ISBN码`;
  19277. uni.$u.ttsModule.speak(text);
  19278. return;
  19279. }
  19280. let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
  19281. if (isbns.includes(isbn)) {
  19282. let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
  19283. if (((_a = book.auditCommentList) == null ? void 0 : _a.length) > 0) {
  19284. let text = "";
  19285. if (book.auditCommentList.every((item) => item.sts == 1)) {
  19286. text = `${isbn}已审核为良好`;
  19287. uni.$u.ttsModule.speak(text);
  19288. return;
  19289. }
  19290. book.auditCommentList.filter((item) => item.sts !== 0).length || 0;
  19291. let notAuditNum = book.auditCommentList.filter((item) => item.sts === 0).length || 0;
  19292. let poorNum = ((_b = book.auditCommentList) == null ? void 0 : _b.filter((item) => item.sts == 3).length) || 0;
  19293. let scannedNum = scannedBooks.value.filter((item) => item == isbn).length || 0;
  19294. if (scannedNum >= notAuditNum + poorNum) {
  19295. let text2 = `${isbn}已超出订单中的数量`;
  19296. return uni.$u.ttsModule.speak(text2);
  19297. } else {
  19298. if (book.suit == 1) {
  19299. let text2 = `${isbn}请注意套装书是否齐全`;
  19300. uni.$u.ttsModule.speak(text2);
  19301. }
  19302. if (book.bookWarn == 1) {
  19303. let text2 = `请注意${isbn}需要取出`;
  19304. uni.$u.ttsModule.speak(text2);
  19305. }
  19306. if (scannedNum >= notAuditNum && scannedNum < notAuditNum + poorNum) {
  19307. let text2 = `${isbn}已审核为极差`;
  19308. uni.$u.ttsModule.speak(text2);
  19309. }
  19310. scannedBooks.value.push(isbn);
  19311. getBookInfo(isbn);
  19312. }
  19313. }
  19314. } else {
  19315. let text = `此订单中不存在${isbn}这本书 `;
  19316. uni.$u.ttsModule.speak(text);
  19317. }
  19318. }
  19319. function handleScanCode() {
  19320. uni.scanCode({
  19321. success: (res2) => {
  19322. handleScan(res2.result);
  19323. }
  19324. });
  19325. }
  19326. const checkUserId = vue.ref();
  19327. const orderId = vue.ref();
  19328. const orderDetail = vue.ref({});
  19329. const showModal = vue.ref(false);
  19330. const isQualitySelected = vue.ref(false);
  19331. const showQualityModal = () => {
  19332. showModal.value = true;
  19333. };
  19334. const closeModal = () => {
  19335. showModal.value = false;
  19336. };
  19337. const toggleQuality = () => {
  19338. isQualitySelected.value = !isQualitySelected.value;
  19339. };
  19340. const handleAudit = () => {
  19341. if (!isQualitySelected.value) {
  19342. uni.$u.toast("请选择品相");
  19343. uni.$u.ttsModule.speak("请选择品相");
  19344. return;
  19345. }
  19346. let checkUserInfo = uni.getStorageSync("checkUserInfo");
  19347. if (checkUserInfo.userId) {
  19348. checkUserId.value = checkUserInfo.userId;
  19349. }
  19350. uni.$u.http.post("/app/orderinfo/checkOrder", {
  19351. "checkUserId": checkUserId.value,
  19352. "orderId": orderId.value,
  19353. "checkList": scannedBooks.value.map((isbn) => ({ sts: 1, com: "", isbn }))
  19354. }).then((res2) => {
  19355. if (res2.code == 200) {
  19356. uni.showToast({ title: "审核成功", icon: "none" });
  19357. uni.$u.ttsModule.speak("审核成功");
  19358. uni.navigateBack({ delta: 2 });
  19359. } else {
  19360. uni.$u.toast(res2.msg);
  19361. }
  19362. });
  19363. };
  19364. onLoad((options) => {
  19365. orderId.value = options.orderId;
  19366. orderDetail.value = uni.getStorageSync("orderDetail");
  19367. scannedBooks.value = uni.getStorageSync("scannedBooks");
  19368. scannedBooks.value.forEach((isbn) => {
  19369. getBookInfo(isbn);
  19370. });
  19371. uni.$u.useGlobalEvent((e) => {
  19372. if (e.barcode) {
  19373. handleScan(e.barcode);
  19374. }
  19375. });
  19376. });
  19377. onShow(() => {
  19378. var _a;
  19379. checkUserId.value = (_a = uni.getStorageSync("userInfo")) == null ? void 0 : _a.userId;
  19380. orderDetail.value = uni.getStorageSync("orderDetail");
  19381. });
  19382. const __returned__ = { detailMap, scannedBooksDetail, getBookInfo, handleClose, checkIsbn, scannedBooks, handleScan, handleScanCode, checkUserId, orderId, orderDetail, showModal, isQualitySelected, showQualityModal, closeModal, toggleQuality, handleAudit, ref: vue.ref, get onLoad() {
  19383. return onLoad;
  19384. }, get onShow() {
  19385. return onShow;
  19386. }, BookItem: BookItem$1 };
  19387. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19388. return __returned__;
  19389. }
  19390. };
  19391. function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
  19392. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  19393. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_1$2);
  19394. return vue.openBlock(), vue.createElementBlock("view", { class: "batch-audit" }, [
  19395. (vue.openBlock(true), vue.createElementBlock(
  19396. vue.Fragment,
  19397. null,
  19398. vue.renderList($setup.scannedBooksDetail, (item, index2) => {
  19399. return vue.openBlock(), vue.createBlock($setup["BookItem"], {
  19400. key: item.isbn,
  19401. item,
  19402. showClose: "",
  19403. onClose: (isbn) => $setup.handleClose(index2, isbn)
  19404. }, null, 8, ["item", "onClose"]);
  19405. }),
  19406. 128
  19407. /* KEYED_FRAGMENT */
  19408. )),
  19409. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  19410. vue.createVNode(_component_u_button, {
  19411. type: "warning",
  19412. size: "large",
  19413. onClick: $setup.handleScanCode
  19414. }, {
  19415. default: vue.withCtx(() => [
  19416. vue.createTextVNode("扫码")
  19417. ]),
  19418. _: 1
  19419. /* STABLE */
  19420. }),
  19421. vue.createVNode(_component_u_button, {
  19422. type: "primary",
  19423. size: "large",
  19424. onClick: $setup.showQualityModal
  19425. }, {
  19426. default: vue.withCtx(() => [
  19427. vue.createTextVNode("确定")
  19428. ]),
  19429. _: 1
  19430. /* STABLE */
  19431. })
  19432. ]),
  19433. vue.createVNode(_component_u_modal, {
  19434. show: $setup.showModal,
  19435. title: "品相选择",
  19436. onCancel: $setup.closeModal,
  19437. showCancelButton: true,
  19438. closeOnClickOverlay: true,
  19439. onConfirm: $setup.handleAudit
  19440. }, {
  19441. default: vue.withCtx(() => [
  19442. vue.createElementVNode("view", { class: "quality-selector" }, [
  19443. vue.createElementVNode(
  19444. "view",
  19445. {
  19446. class: vue.normalizeClass(["quality-circle", { "selected": $setup.isQualitySelected }]),
  19447. onClick: $setup.toggleQuality
  19448. },
  19449. [
  19450. vue.createElementVNode("text", null, "良好")
  19451. ],
  19452. 2
  19453. /* CLASS */
  19454. )
  19455. ])
  19456. ]),
  19457. _: 1
  19458. /* STABLE */
  19459. }, 8, ["show"])
  19460. ]);
  19461. }
  19462. 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"]]);
  19463. const _sfc_main$W = {
  19464. __name: "sender",
  19465. setup(__props, { expose: __expose }) {
  19466. __expose();
  19467. const otherParams = vue.ref({
  19468. search: ""
  19469. });
  19470. const scrollRef = vue.ref(null);
  19471. const refreshList = () => {
  19472. var _a;
  19473. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  19474. };
  19475. let dataList = vue.ref([]);
  19476. const updateList = (data, page2) => {
  19477. dataList.value = data;
  19478. if (!isSearch.value)
  19479. return;
  19480. if (data.length > 0) {
  19481. uni.$u.ttsModule.speak("查询到" + data.length + "条数据");
  19482. } else {
  19483. uni.$u.ttsModule.speak("未查询到数据");
  19484. }
  19485. isSearch.value = false;
  19486. };
  19487. const isSearch = vue.ref(false);
  19488. const handleSearch = () => {
  19489. isSearch.value = true;
  19490. refreshList();
  19491. };
  19492. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  19493. return dataList;
  19494. }, set dataList(v) {
  19495. dataList = v;
  19496. }, updateList, isSearch, handleSearch, reactive: vue.reactive, PageScroll, OrderItem: orderItem, ref: vue.ref, get onLoad() {
  19497. return onLoad;
  19498. } };
  19499. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19500. return __returned__;
  19501. }
  19502. };
  19503. function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
  19504. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  19505. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$3);
  19506. return vue.openBlock(), vue.createElementBlock("view", {
  19507. class: "common-page",
  19508. style: { "padding": "0" }
  19509. }, [
  19510. vue.createVNode($setup["PageScroll"], {
  19511. requestStr: "/app/orderinfo/getOrderListByUserInfo",
  19512. onUpdateList: $setup.updateList,
  19513. ref: "scrollRef",
  19514. otherParams: $setup.otherParams,
  19515. immediate: false
  19516. }, {
  19517. default: vue.withCtx(() => [
  19518. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  19519. default: vue.withCtx(() => [
  19520. vue.createElementVNode("view", { class: "search-area" }, [
  19521. vue.createVNode(_component_u_search, {
  19522. placeholder: "请输入发件人姓名或电话",
  19523. searchIconSize: 18,
  19524. bgColor: "#f6f7f6",
  19525. onSearch: $setup.handleSearch,
  19526. modelValue: $setup.otherParams.search,
  19527. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.otherParams.search = $event),
  19528. "custom-style": "font-size:32rpx",
  19529. "placeholder-style": "font-size:32rpx",
  19530. clearabled: true,
  19531. focus: false,
  19532. showAction: false,
  19533. height: 36
  19534. }, null, 8, ["modelValue"])
  19535. ])
  19536. ]),
  19537. _: 1
  19538. /* STABLE */
  19539. }),
  19540. $setup.dataList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  19541. key: 0,
  19542. class: "list-con"
  19543. }, [
  19544. (vue.openBlock(true), vue.createElementBlock(
  19545. vue.Fragment,
  19546. null,
  19547. vue.renderList($setup.dataList, (cell) => {
  19548. return vue.openBlock(), vue.createBlock($setup["OrderItem"], {
  19549. key: cell.id,
  19550. item: cell,
  19551. class: "mt-20"
  19552. }, null, 8, ["item"]);
  19553. }),
  19554. 128
  19555. /* KEYED_FRAGMENT */
  19556. ))
  19557. ])) : vue.createCommentVNode("v-if", true)
  19558. ]),
  19559. _: 1
  19560. /* STABLE */
  19561. }, 8, ["otherParams"])
  19562. ]);
  19563. }
  19564. const PagesIndexAuditSender = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$V], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/audit/sender.vue"]]);
  19565. const _sfc_main$V = {
  19566. __name: "audit",
  19567. setup(__props, { expose: __expose }) {
  19568. __expose();
  19569. const otherParams = vue.ref({
  19570. sender: ""
  19571. });
  19572. const scrollRef = vue.ref(null);
  19573. const refreshList = () => {
  19574. var _a;
  19575. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  19576. };
  19577. let dataList = vue.ref([{
  19578. date: "2024-10-24",
  19579. orderNum: 423,
  19580. auditNum: 293,
  19581. trueNum: 323
  19582. }, {
  19583. date: "2024-10-24",
  19584. orderNum: 423,
  19585. auditNum: 293,
  19586. trueNum: 323
  19587. }, {
  19588. date: "2024-10-24",
  19589. orderNum: 423,
  19590. auditNum: 293,
  19591. trueNum: 323
  19592. }]);
  19593. const updateList = (data) => {
  19594. dataList.value = data;
  19595. };
  19596. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  19597. return dataList;
  19598. }, set dataList(v) {
  19599. dataList = v;
  19600. }, updateList, reactive: vue.reactive, PageScroll, ref: vue.ref, get onLoad() {
  19601. return onLoad;
  19602. } };
  19603. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19604. return __returned__;
  19605. }
  19606. };
  19607. function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
  19608. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$3);
  19609. return vue.openBlock(), vue.createElementBlock("view", {
  19610. class: "common-page",
  19611. style: { "padding": "0" }
  19612. }, [
  19613. vue.createVNode($setup["PageScroll"], {
  19614. requestStr: "/team/token/shop/invite/page",
  19615. onUpdateList: $setup.updateList,
  19616. ref: "scrollRef",
  19617. otherParams: $setup.otherParams
  19618. }, {
  19619. default: vue.withCtx(() => [
  19620. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  19621. default: vue.withCtx(() => [
  19622. vue.createElementVNode("view", { class: "search-area flex-a" }, [
  19623. vue.createElementVNode("view", { class: "text-item flex-1" }, "审核日期"),
  19624. vue.createElementVNode("view", { class: "text-item flex-1" }, "订单数量"),
  19625. vue.createElementVNode("view", { class: "text-item flex-1" }, "审书数量"),
  19626. vue.createElementVNode("view", { class: "text-item flex-1" }, "实际回收")
  19627. ])
  19628. ]),
  19629. _: 1
  19630. /* STABLE */
  19631. }),
  19632. vue.createElementVNode("view", { class: "list-con" }, [
  19633. (vue.openBlock(true), vue.createElementBlock(
  19634. vue.Fragment,
  19635. null,
  19636. vue.renderList($setup.dataList, (item, index2) => {
  19637. return vue.openBlock(), vue.createElementBlock("view", {
  19638. key: index2,
  19639. class: "flex-a"
  19640. }, [
  19641. vue.createElementVNode(
  19642. "view",
  19643. { class: "text-item flex-1" },
  19644. vue.toDisplayString(item.date),
  19645. 1
  19646. /* TEXT */
  19647. ),
  19648. vue.createElementVNode(
  19649. "view",
  19650. { class: "text-item flex-1" },
  19651. vue.toDisplayString(item.orderNum),
  19652. 1
  19653. /* TEXT */
  19654. ),
  19655. vue.createElementVNode(
  19656. "view",
  19657. { class: "text-item flex-1" },
  19658. vue.toDisplayString(item.auditNum),
  19659. 1
  19660. /* TEXT */
  19661. ),
  19662. vue.createElementVNode(
  19663. "view",
  19664. { class: "text-item flex-1" },
  19665. vue.toDisplayString(item.trueNum),
  19666. 1
  19667. /* TEXT */
  19668. )
  19669. ]);
  19670. }),
  19671. 128
  19672. /* KEYED_FRAGMENT */
  19673. ))
  19674. ])
  19675. ]),
  19676. _: 1
  19677. /* STABLE */
  19678. }, 8, ["otherParams"])
  19679. ]);
  19680. }
  19681. const PagesIndexStatisticAudit = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$U], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/audit.vue"]]);
  19682. const icons = {
  19683. "id": "2852637",
  19684. "name": "uniui图标库",
  19685. "font_family": "uniicons",
  19686. "css_prefix_text": "uniui-",
  19687. "description": "",
  19688. "glyphs": [
  19689. {
  19690. "icon_id": "25027049",
  19691. "name": "yanse",
  19692. "font_class": "color",
  19693. "unicode": "e6cf",
  19694. "unicode_decimal": 59087
  19695. },
  19696. {
  19697. "icon_id": "25027048",
  19698. "name": "wallet",
  19699. "font_class": "wallet",
  19700. "unicode": "e6b1",
  19701. "unicode_decimal": 59057
  19702. },
  19703. {
  19704. "icon_id": "25015720",
  19705. "name": "settings-filled",
  19706. "font_class": "settings-filled",
  19707. "unicode": "e6ce",
  19708. "unicode_decimal": 59086
  19709. },
  19710. {
  19711. "icon_id": "25015434",
  19712. "name": "shimingrenzheng-filled",
  19713. "font_class": "auth-filled",
  19714. "unicode": "e6cc",
  19715. "unicode_decimal": 59084
  19716. },
  19717. {
  19718. "icon_id": "24934246",
  19719. "name": "shop-filled",
  19720. "font_class": "shop-filled",
  19721. "unicode": "e6cd",
  19722. "unicode_decimal": 59085
  19723. },
  19724. {
  19725. "icon_id": "24934159",
  19726. "name": "staff-filled-01",
  19727. "font_class": "staff-filled",
  19728. "unicode": "e6cb",
  19729. "unicode_decimal": 59083
  19730. },
  19731. {
  19732. "icon_id": "24932461",
  19733. "name": "VIP-filled",
  19734. "font_class": "vip-filled",
  19735. "unicode": "e6c6",
  19736. "unicode_decimal": 59078
  19737. },
  19738. {
  19739. "icon_id": "24932462",
  19740. "name": "plus_circle_fill",
  19741. "font_class": "plus-filled",
  19742. "unicode": "e6c7",
  19743. "unicode_decimal": 59079
  19744. },
  19745. {
  19746. "icon_id": "24932463",
  19747. "name": "folder_add-filled",
  19748. "font_class": "folder-add-filled",
  19749. "unicode": "e6c8",
  19750. "unicode_decimal": 59080
  19751. },
  19752. {
  19753. "icon_id": "24932464",
  19754. "name": "yanse-filled",
  19755. "font_class": "color-filled",
  19756. "unicode": "e6c9",
  19757. "unicode_decimal": 59081
  19758. },
  19759. {
  19760. "icon_id": "24932465",
  19761. "name": "tune-filled",
  19762. "font_class": "tune-filled",
  19763. "unicode": "e6ca",
  19764. "unicode_decimal": 59082
  19765. },
  19766. {
  19767. "icon_id": "24932455",
  19768. "name": "a-rilidaka-filled",
  19769. "font_class": "calendar-filled",
  19770. "unicode": "e6c0",
  19771. "unicode_decimal": 59072
  19772. },
  19773. {
  19774. "icon_id": "24932456",
  19775. "name": "notification-filled",
  19776. "font_class": "notification-filled",
  19777. "unicode": "e6c1",
  19778. "unicode_decimal": 59073
  19779. },
  19780. {
  19781. "icon_id": "24932457",
  19782. "name": "wallet-filled",
  19783. "font_class": "wallet-filled",
  19784. "unicode": "e6c2",
  19785. "unicode_decimal": 59074
  19786. },
  19787. {
  19788. "icon_id": "24932458",
  19789. "name": "paihangbang-filled",
  19790. "font_class": "medal-filled",
  19791. "unicode": "e6c3",
  19792. "unicode_decimal": 59075
  19793. },
  19794. {
  19795. "icon_id": "24932459",
  19796. "name": "gift-filled",
  19797. "font_class": "gift-filled",
  19798. "unicode": "e6c4",
  19799. "unicode_decimal": 59076
  19800. },
  19801. {
  19802. "icon_id": "24932460",
  19803. "name": "fire-filled",
  19804. "font_class": "fire-filled",
  19805. "unicode": "e6c5",
  19806. "unicode_decimal": 59077
  19807. },
  19808. {
  19809. "icon_id": "24928001",
  19810. "name": "refreshempty",
  19811. "font_class": "refreshempty",
  19812. "unicode": "e6bf",
  19813. "unicode_decimal": 59071
  19814. },
  19815. {
  19816. "icon_id": "24926853",
  19817. "name": "location-ellipse",
  19818. "font_class": "location-filled",
  19819. "unicode": "e6af",
  19820. "unicode_decimal": 59055
  19821. },
  19822. {
  19823. "icon_id": "24926735",
  19824. "name": "person-filled",
  19825. "font_class": "person-filled",
  19826. "unicode": "e69d",
  19827. "unicode_decimal": 59037
  19828. },
  19829. {
  19830. "icon_id": "24926703",
  19831. "name": "personadd-filled",
  19832. "font_class": "personadd-filled",
  19833. "unicode": "e698",
  19834. "unicode_decimal": 59032
  19835. },
  19836. {
  19837. "icon_id": "24923351",
  19838. "name": "back",
  19839. "font_class": "back",
  19840. "unicode": "e6b9",
  19841. "unicode_decimal": 59065
  19842. },
  19843. {
  19844. "icon_id": "24923352",
  19845. "name": "forward",
  19846. "font_class": "forward",
  19847. "unicode": "e6ba",
  19848. "unicode_decimal": 59066
  19849. },
  19850. {
  19851. "icon_id": "24923353",
  19852. "name": "arrowthinright",
  19853. "font_class": "arrow-right",
  19854. "unicode": "e6bb",
  19855. "unicode_decimal": 59067
  19856. },
  19857. {
  19858. "icon_id": "24923353",
  19859. "name": "arrowthinright",
  19860. "font_class": "arrowthinright",
  19861. "unicode": "e6bb",
  19862. "unicode_decimal": 59067
  19863. },
  19864. {
  19865. "icon_id": "24923354",
  19866. "name": "arrowthinleft",
  19867. "font_class": "arrow-left",
  19868. "unicode": "e6bc",
  19869. "unicode_decimal": 59068
  19870. },
  19871. {
  19872. "icon_id": "24923354",
  19873. "name": "arrowthinleft",
  19874. "font_class": "arrowthinleft",
  19875. "unicode": "e6bc",
  19876. "unicode_decimal": 59068
  19877. },
  19878. {
  19879. "icon_id": "24923355",
  19880. "name": "arrowthinup",
  19881. "font_class": "arrow-up",
  19882. "unicode": "e6bd",
  19883. "unicode_decimal": 59069
  19884. },
  19885. {
  19886. "icon_id": "24923355",
  19887. "name": "arrowthinup",
  19888. "font_class": "arrowthinup",
  19889. "unicode": "e6bd",
  19890. "unicode_decimal": 59069
  19891. },
  19892. {
  19893. "icon_id": "24923356",
  19894. "name": "arrowthindown",
  19895. "font_class": "arrow-down",
  19896. "unicode": "e6be",
  19897. "unicode_decimal": 59070
  19898. },
  19899. {
  19900. "icon_id": "24923356",
  19901. "name": "arrowthindown",
  19902. "font_class": "arrowthindown",
  19903. "unicode": "e6be",
  19904. "unicode_decimal": 59070
  19905. },
  19906. {
  19907. "icon_id": "24923349",
  19908. "name": "arrowdown",
  19909. "font_class": "bottom",
  19910. "unicode": "e6b8",
  19911. "unicode_decimal": 59064
  19912. },
  19913. {
  19914. "icon_id": "24923349",
  19915. "name": "arrowdown",
  19916. "font_class": "arrowdown",
  19917. "unicode": "e6b8",
  19918. "unicode_decimal": 59064
  19919. },
  19920. {
  19921. "icon_id": "24923346",
  19922. "name": "arrowright",
  19923. "font_class": "right",
  19924. "unicode": "e6b5",
  19925. "unicode_decimal": 59061
  19926. },
  19927. {
  19928. "icon_id": "24923346",
  19929. "name": "arrowright",
  19930. "font_class": "arrowright",
  19931. "unicode": "e6b5",
  19932. "unicode_decimal": 59061
  19933. },
  19934. {
  19935. "icon_id": "24923347",
  19936. "name": "arrowup",
  19937. "font_class": "top",
  19938. "unicode": "e6b6",
  19939. "unicode_decimal": 59062
  19940. },
  19941. {
  19942. "icon_id": "24923347",
  19943. "name": "arrowup",
  19944. "font_class": "arrowup",
  19945. "unicode": "e6b6",
  19946. "unicode_decimal": 59062
  19947. },
  19948. {
  19949. "icon_id": "24923348",
  19950. "name": "arrowleft",
  19951. "font_class": "left",
  19952. "unicode": "e6b7",
  19953. "unicode_decimal": 59063
  19954. },
  19955. {
  19956. "icon_id": "24923348",
  19957. "name": "arrowleft",
  19958. "font_class": "arrowleft",
  19959. "unicode": "e6b7",
  19960. "unicode_decimal": 59063
  19961. },
  19962. {
  19963. "icon_id": "24923334",
  19964. "name": "eye",
  19965. "font_class": "eye",
  19966. "unicode": "e651",
  19967. "unicode_decimal": 58961
  19968. },
  19969. {
  19970. "icon_id": "24923335",
  19971. "name": "eye-filled",
  19972. "font_class": "eye-filled",
  19973. "unicode": "e66a",
  19974. "unicode_decimal": 58986
  19975. },
  19976. {
  19977. "icon_id": "24923336",
  19978. "name": "eye-slash",
  19979. "font_class": "eye-slash",
  19980. "unicode": "e6b3",
  19981. "unicode_decimal": 59059
  19982. },
  19983. {
  19984. "icon_id": "24923337",
  19985. "name": "eye-slash-filled",
  19986. "font_class": "eye-slash-filled",
  19987. "unicode": "e6b4",
  19988. "unicode_decimal": 59060
  19989. },
  19990. {
  19991. "icon_id": "24923305",
  19992. "name": "info-filled",
  19993. "font_class": "info-filled",
  19994. "unicode": "e649",
  19995. "unicode_decimal": 58953
  19996. },
  19997. {
  19998. "icon_id": "24923299",
  19999. "name": "reload-01",
  20000. "font_class": "reload",
  20001. "unicode": "e6b2",
  20002. "unicode_decimal": 59058
  20003. },
  20004. {
  20005. "icon_id": "24923195",
  20006. "name": "mic_slash_fill",
  20007. "font_class": "micoff-filled",
  20008. "unicode": "e6b0",
  20009. "unicode_decimal": 59056
  20010. },
  20011. {
  20012. "icon_id": "24923165",
  20013. "name": "map-pin-ellipse",
  20014. "font_class": "map-pin-ellipse",
  20015. "unicode": "e6ac",
  20016. "unicode_decimal": 59052
  20017. },
  20018. {
  20019. "icon_id": "24923166",
  20020. "name": "map-pin",
  20021. "font_class": "map-pin",
  20022. "unicode": "e6ad",
  20023. "unicode_decimal": 59053
  20024. },
  20025. {
  20026. "icon_id": "24923167",
  20027. "name": "location",
  20028. "font_class": "location",
  20029. "unicode": "e6ae",
  20030. "unicode_decimal": 59054
  20031. },
  20032. {
  20033. "icon_id": "24923064",
  20034. "name": "starhalf",
  20035. "font_class": "starhalf",
  20036. "unicode": "e683",
  20037. "unicode_decimal": 59011
  20038. },
  20039. {
  20040. "icon_id": "24923065",
  20041. "name": "star",
  20042. "font_class": "star",
  20043. "unicode": "e688",
  20044. "unicode_decimal": 59016
  20045. },
  20046. {
  20047. "icon_id": "24923066",
  20048. "name": "star-filled",
  20049. "font_class": "star-filled",
  20050. "unicode": "e68f",
  20051. "unicode_decimal": 59023
  20052. },
  20053. {
  20054. "icon_id": "24899646",
  20055. "name": "a-rilidaka",
  20056. "font_class": "calendar",
  20057. "unicode": "e6a0",
  20058. "unicode_decimal": 59040
  20059. },
  20060. {
  20061. "icon_id": "24899647",
  20062. "name": "fire",
  20063. "font_class": "fire",
  20064. "unicode": "e6a1",
  20065. "unicode_decimal": 59041
  20066. },
  20067. {
  20068. "icon_id": "24899648",
  20069. "name": "paihangbang",
  20070. "font_class": "medal",
  20071. "unicode": "e6a2",
  20072. "unicode_decimal": 59042
  20073. },
  20074. {
  20075. "icon_id": "24899649",
  20076. "name": "font",
  20077. "font_class": "font",
  20078. "unicode": "e6a3",
  20079. "unicode_decimal": 59043
  20080. },
  20081. {
  20082. "icon_id": "24899650",
  20083. "name": "gift",
  20084. "font_class": "gift",
  20085. "unicode": "e6a4",
  20086. "unicode_decimal": 59044
  20087. },
  20088. {
  20089. "icon_id": "24899651",
  20090. "name": "link",
  20091. "font_class": "link",
  20092. "unicode": "e6a5",
  20093. "unicode_decimal": 59045
  20094. },
  20095. {
  20096. "icon_id": "24899652",
  20097. "name": "notification",
  20098. "font_class": "notification",
  20099. "unicode": "e6a6",
  20100. "unicode_decimal": 59046
  20101. },
  20102. {
  20103. "icon_id": "24899653",
  20104. "name": "staff",
  20105. "font_class": "staff",
  20106. "unicode": "e6a7",
  20107. "unicode_decimal": 59047
  20108. },
  20109. {
  20110. "icon_id": "24899654",
  20111. "name": "VIP",
  20112. "font_class": "vip",
  20113. "unicode": "e6a8",
  20114. "unicode_decimal": 59048
  20115. },
  20116. {
  20117. "icon_id": "24899655",
  20118. "name": "folder_add",
  20119. "font_class": "folder-add",
  20120. "unicode": "e6a9",
  20121. "unicode_decimal": 59049
  20122. },
  20123. {
  20124. "icon_id": "24899656",
  20125. "name": "tune",
  20126. "font_class": "tune",
  20127. "unicode": "e6aa",
  20128. "unicode_decimal": 59050
  20129. },
  20130. {
  20131. "icon_id": "24899657",
  20132. "name": "shimingrenzheng",
  20133. "font_class": "auth",
  20134. "unicode": "e6ab",
  20135. "unicode_decimal": 59051
  20136. },
  20137. {
  20138. "icon_id": "24899565",
  20139. "name": "person",
  20140. "font_class": "person",
  20141. "unicode": "e699",
  20142. "unicode_decimal": 59033
  20143. },
  20144. {
  20145. "icon_id": "24899566",
  20146. "name": "email-filled",
  20147. "font_class": "email-filled",
  20148. "unicode": "e69a",
  20149. "unicode_decimal": 59034
  20150. },
  20151. {
  20152. "icon_id": "24899567",
  20153. "name": "phone-filled",
  20154. "font_class": "phone-filled",
  20155. "unicode": "e69b",
  20156. "unicode_decimal": 59035
  20157. },
  20158. {
  20159. "icon_id": "24899568",
  20160. "name": "phone",
  20161. "font_class": "phone",
  20162. "unicode": "e69c",
  20163. "unicode_decimal": 59036
  20164. },
  20165. {
  20166. "icon_id": "24899570",
  20167. "name": "email",
  20168. "font_class": "email",
  20169. "unicode": "e69e",
  20170. "unicode_decimal": 59038
  20171. },
  20172. {
  20173. "icon_id": "24899571",
  20174. "name": "personadd",
  20175. "font_class": "personadd",
  20176. "unicode": "e69f",
  20177. "unicode_decimal": 59039
  20178. },
  20179. {
  20180. "icon_id": "24899558",
  20181. "name": "chatboxes-filled",
  20182. "font_class": "chatboxes-filled",
  20183. "unicode": "e692",
  20184. "unicode_decimal": 59026
  20185. },
  20186. {
  20187. "icon_id": "24899559",
  20188. "name": "contact",
  20189. "font_class": "contact",
  20190. "unicode": "e693",
  20191. "unicode_decimal": 59027
  20192. },
  20193. {
  20194. "icon_id": "24899560",
  20195. "name": "chatbubble-filled",
  20196. "font_class": "chatbubble-filled",
  20197. "unicode": "e694",
  20198. "unicode_decimal": 59028
  20199. },
  20200. {
  20201. "icon_id": "24899561",
  20202. "name": "contact-filled",
  20203. "font_class": "contact-filled",
  20204. "unicode": "e695",
  20205. "unicode_decimal": 59029
  20206. },
  20207. {
  20208. "icon_id": "24899562",
  20209. "name": "chatboxes",
  20210. "font_class": "chatboxes",
  20211. "unicode": "e696",
  20212. "unicode_decimal": 59030
  20213. },
  20214. {
  20215. "icon_id": "24899563",
  20216. "name": "chatbubble",
  20217. "font_class": "chatbubble",
  20218. "unicode": "e697",
  20219. "unicode_decimal": 59031
  20220. },
  20221. {
  20222. "icon_id": "24881290",
  20223. "name": "upload-filled",
  20224. "font_class": "upload-filled",
  20225. "unicode": "e68e",
  20226. "unicode_decimal": 59022
  20227. },
  20228. {
  20229. "icon_id": "24881292",
  20230. "name": "upload",
  20231. "font_class": "upload",
  20232. "unicode": "e690",
  20233. "unicode_decimal": 59024
  20234. },
  20235. {
  20236. "icon_id": "24881293",
  20237. "name": "weixin",
  20238. "font_class": "weixin",
  20239. "unicode": "e691",
  20240. "unicode_decimal": 59025
  20241. },
  20242. {
  20243. "icon_id": "24881274",
  20244. "name": "compose",
  20245. "font_class": "compose",
  20246. "unicode": "e67f",
  20247. "unicode_decimal": 59007
  20248. },
  20249. {
  20250. "icon_id": "24881275",
  20251. "name": "qq",
  20252. "font_class": "qq",
  20253. "unicode": "e680",
  20254. "unicode_decimal": 59008
  20255. },
  20256. {
  20257. "icon_id": "24881276",
  20258. "name": "download-filled",
  20259. "font_class": "download-filled",
  20260. "unicode": "e681",
  20261. "unicode_decimal": 59009
  20262. },
  20263. {
  20264. "icon_id": "24881277",
  20265. "name": "pengyouquan",
  20266. "font_class": "pyq",
  20267. "unicode": "e682",
  20268. "unicode_decimal": 59010
  20269. },
  20270. {
  20271. "icon_id": "24881279",
  20272. "name": "sound",
  20273. "font_class": "sound",
  20274. "unicode": "e684",
  20275. "unicode_decimal": 59012
  20276. },
  20277. {
  20278. "icon_id": "24881280",
  20279. "name": "trash-filled",
  20280. "font_class": "trash-filled",
  20281. "unicode": "e685",
  20282. "unicode_decimal": 59013
  20283. },
  20284. {
  20285. "icon_id": "24881281",
  20286. "name": "sound-filled",
  20287. "font_class": "sound-filled",
  20288. "unicode": "e686",
  20289. "unicode_decimal": 59014
  20290. },
  20291. {
  20292. "icon_id": "24881282",
  20293. "name": "trash",
  20294. "font_class": "trash",
  20295. "unicode": "e687",
  20296. "unicode_decimal": 59015
  20297. },
  20298. {
  20299. "icon_id": "24881284",
  20300. "name": "videocam-filled",
  20301. "font_class": "videocam-filled",
  20302. "unicode": "e689",
  20303. "unicode_decimal": 59017
  20304. },
  20305. {
  20306. "icon_id": "24881285",
  20307. "name": "spinner-cycle",
  20308. "font_class": "spinner-cycle",
  20309. "unicode": "e68a",
  20310. "unicode_decimal": 59018
  20311. },
  20312. {
  20313. "icon_id": "24881286",
  20314. "name": "weibo",
  20315. "font_class": "weibo",
  20316. "unicode": "e68b",
  20317. "unicode_decimal": 59019
  20318. },
  20319. {
  20320. "icon_id": "24881288",
  20321. "name": "videocam",
  20322. "font_class": "videocam",
  20323. "unicode": "e68c",
  20324. "unicode_decimal": 59020
  20325. },
  20326. {
  20327. "icon_id": "24881289",
  20328. "name": "download",
  20329. "font_class": "download",
  20330. "unicode": "e68d",
  20331. "unicode_decimal": 59021
  20332. },
  20333. {
  20334. "icon_id": "24879601",
  20335. "name": "help",
  20336. "font_class": "help",
  20337. "unicode": "e679",
  20338. "unicode_decimal": 59001
  20339. },
  20340. {
  20341. "icon_id": "24879602",
  20342. "name": "navigate-filled",
  20343. "font_class": "navigate-filled",
  20344. "unicode": "e67a",
  20345. "unicode_decimal": 59002
  20346. },
  20347. {
  20348. "icon_id": "24879603",
  20349. "name": "plusempty",
  20350. "font_class": "plusempty",
  20351. "unicode": "e67b",
  20352. "unicode_decimal": 59003
  20353. },
  20354. {
  20355. "icon_id": "24879604",
  20356. "name": "smallcircle",
  20357. "font_class": "smallcircle",
  20358. "unicode": "e67c",
  20359. "unicode_decimal": 59004
  20360. },
  20361. {
  20362. "icon_id": "24879605",
  20363. "name": "minus-filled",
  20364. "font_class": "minus-filled",
  20365. "unicode": "e67d",
  20366. "unicode_decimal": 59005
  20367. },
  20368. {
  20369. "icon_id": "24879606",
  20370. "name": "micoff",
  20371. "font_class": "micoff",
  20372. "unicode": "e67e",
  20373. "unicode_decimal": 59006
  20374. },
  20375. {
  20376. "icon_id": "24879588",
  20377. "name": "closeempty",
  20378. "font_class": "closeempty",
  20379. "unicode": "e66c",
  20380. "unicode_decimal": 58988
  20381. },
  20382. {
  20383. "icon_id": "24879589",
  20384. "name": "clear",
  20385. "font_class": "clear",
  20386. "unicode": "e66d",
  20387. "unicode_decimal": 58989
  20388. },
  20389. {
  20390. "icon_id": "24879590",
  20391. "name": "navigate",
  20392. "font_class": "navigate",
  20393. "unicode": "e66e",
  20394. "unicode_decimal": 58990
  20395. },
  20396. {
  20397. "icon_id": "24879591",
  20398. "name": "minus",
  20399. "font_class": "minus",
  20400. "unicode": "e66f",
  20401. "unicode_decimal": 58991
  20402. },
  20403. {
  20404. "icon_id": "24879592",
  20405. "name": "image",
  20406. "font_class": "image",
  20407. "unicode": "e670",
  20408. "unicode_decimal": 58992
  20409. },
  20410. {
  20411. "icon_id": "24879593",
  20412. "name": "mic",
  20413. "font_class": "mic",
  20414. "unicode": "e671",
  20415. "unicode_decimal": 58993
  20416. },
  20417. {
  20418. "icon_id": "24879594",
  20419. "name": "paperplane",
  20420. "font_class": "paperplane",
  20421. "unicode": "e672",
  20422. "unicode_decimal": 58994
  20423. },
  20424. {
  20425. "icon_id": "24879595",
  20426. "name": "close",
  20427. "font_class": "close",
  20428. "unicode": "e673",
  20429. "unicode_decimal": 58995
  20430. },
  20431. {
  20432. "icon_id": "24879596",
  20433. "name": "help-filled",
  20434. "font_class": "help-filled",
  20435. "unicode": "e674",
  20436. "unicode_decimal": 58996
  20437. },
  20438. {
  20439. "icon_id": "24879597",
  20440. "name": "plus-filled",
  20441. "font_class": "paperplane-filled",
  20442. "unicode": "e675",
  20443. "unicode_decimal": 58997
  20444. },
  20445. {
  20446. "icon_id": "24879598",
  20447. "name": "plus",
  20448. "font_class": "plus",
  20449. "unicode": "e676",
  20450. "unicode_decimal": 58998
  20451. },
  20452. {
  20453. "icon_id": "24879599",
  20454. "name": "mic-filled",
  20455. "font_class": "mic-filled",
  20456. "unicode": "e677",
  20457. "unicode_decimal": 58999
  20458. },
  20459. {
  20460. "icon_id": "24879600",
  20461. "name": "image-filled",
  20462. "font_class": "image-filled",
  20463. "unicode": "e678",
  20464. "unicode_decimal": 59e3
  20465. },
  20466. {
  20467. "icon_id": "24855900",
  20468. "name": "locked-filled",
  20469. "font_class": "locked-filled",
  20470. "unicode": "e668",
  20471. "unicode_decimal": 58984
  20472. },
  20473. {
  20474. "icon_id": "24855901",
  20475. "name": "info",
  20476. "font_class": "info",
  20477. "unicode": "e669",
  20478. "unicode_decimal": 58985
  20479. },
  20480. {
  20481. "icon_id": "24855903",
  20482. "name": "locked",
  20483. "font_class": "locked",
  20484. "unicode": "e66b",
  20485. "unicode_decimal": 58987
  20486. },
  20487. {
  20488. "icon_id": "24855884",
  20489. "name": "camera-filled",
  20490. "font_class": "camera-filled",
  20491. "unicode": "e658",
  20492. "unicode_decimal": 58968
  20493. },
  20494. {
  20495. "icon_id": "24855885",
  20496. "name": "chat-filled",
  20497. "font_class": "chat-filled",
  20498. "unicode": "e659",
  20499. "unicode_decimal": 58969
  20500. },
  20501. {
  20502. "icon_id": "24855886",
  20503. "name": "camera",
  20504. "font_class": "camera",
  20505. "unicode": "e65a",
  20506. "unicode_decimal": 58970
  20507. },
  20508. {
  20509. "icon_id": "24855887",
  20510. "name": "circle",
  20511. "font_class": "circle",
  20512. "unicode": "e65b",
  20513. "unicode_decimal": 58971
  20514. },
  20515. {
  20516. "icon_id": "24855888",
  20517. "name": "checkmarkempty",
  20518. "font_class": "checkmarkempty",
  20519. "unicode": "e65c",
  20520. "unicode_decimal": 58972
  20521. },
  20522. {
  20523. "icon_id": "24855889",
  20524. "name": "chat",
  20525. "font_class": "chat",
  20526. "unicode": "e65d",
  20527. "unicode_decimal": 58973
  20528. },
  20529. {
  20530. "icon_id": "24855890",
  20531. "name": "circle-filled",
  20532. "font_class": "circle-filled",
  20533. "unicode": "e65e",
  20534. "unicode_decimal": 58974
  20535. },
  20536. {
  20537. "icon_id": "24855891",
  20538. "name": "flag",
  20539. "font_class": "flag",
  20540. "unicode": "e65f",
  20541. "unicode_decimal": 58975
  20542. },
  20543. {
  20544. "icon_id": "24855892",
  20545. "name": "flag-filled",
  20546. "font_class": "flag-filled",
  20547. "unicode": "e660",
  20548. "unicode_decimal": 58976
  20549. },
  20550. {
  20551. "icon_id": "24855893",
  20552. "name": "gear-filled",
  20553. "font_class": "gear-filled",
  20554. "unicode": "e661",
  20555. "unicode_decimal": 58977
  20556. },
  20557. {
  20558. "icon_id": "24855894",
  20559. "name": "home",
  20560. "font_class": "home",
  20561. "unicode": "e662",
  20562. "unicode_decimal": 58978
  20563. },
  20564. {
  20565. "icon_id": "24855895",
  20566. "name": "home-filled",
  20567. "font_class": "home-filled",
  20568. "unicode": "e663",
  20569. "unicode_decimal": 58979
  20570. },
  20571. {
  20572. "icon_id": "24855896",
  20573. "name": "gear",
  20574. "font_class": "gear",
  20575. "unicode": "e664",
  20576. "unicode_decimal": 58980
  20577. },
  20578. {
  20579. "icon_id": "24855897",
  20580. "name": "smallcircle-filled",
  20581. "font_class": "smallcircle-filled",
  20582. "unicode": "e665",
  20583. "unicode_decimal": 58981
  20584. },
  20585. {
  20586. "icon_id": "24855898",
  20587. "name": "map-filled",
  20588. "font_class": "map-filled",
  20589. "unicode": "e666",
  20590. "unicode_decimal": 58982
  20591. },
  20592. {
  20593. "icon_id": "24855899",
  20594. "name": "map",
  20595. "font_class": "map",
  20596. "unicode": "e667",
  20597. "unicode_decimal": 58983
  20598. },
  20599. {
  20600. "icon_id": "24855825",
  20601. "name": "refresh-filled",
  20602. "font_class": "refresh-filled",
  20603. "unicode": "e656",
  20604. "unicode_decimal": 58966
  20605. },
  20606. {
  20607. "icon_id": "24855826",
  20608. "name": "refresh",
  20609. "font_class": "refresh",
  20610. "unicode": "e657",
  20611. "unicode_decimal": 58967
  20612. },
  20613. {
  20614. "icon_id": "24855808",
  20615. "name": "cloud-upload",
  20616. "font_class": "cloud-upload",
  20617. "unicode": "e645",
  20618. "unicode_decimal": 58949
  20619. },
  20620. {
  20621. "icon_id": "24855809",
  20622. "name": "cloud-download-filled",
  20623. "font_class": "cloud-download-filled",
  20624. "unicode": "e646",
  20625. "unicode_decimal": 58950
  20626. },
  20627. {
  20628. "icon_id": "24855810",
  20629. "name": "cloud-download",
  20630. "font_class": "cloud-download",
  20631. "unicode": "e647",
  20632. "unicode_decimal": 58951
  20633. },
  20634. {
  20635. "icon_id": "24855811",
  20636. "name": "cloud-upload-filled",
  20637. "font_class": "cloud-upload-filled",
  20638. "unicode": "e648",
  20639. "unicode_decimal": 58952
  20640. },
  20641. {
  20642. "icon_id": "24855813",
  20643. "name": "redo",
  20644. "font_class": "redo",
  20645. "unicode": "e64a",
  20646. "unicode_decimal": 58954
  20647. },
  20648. {
  20649. "icon_id": "24855814",
  20650. "name": "images-filled",
  20651. "font_class": "images-filled",
  20652. "unicode": "e64b",
  20653. "unicode_decimal": 58955
  20654. },
  20655. {
  20656. "icon_id": "24855815",
  20657. "name": "undo-filled",
  20658. "font_class": "undo-filled",
  20659. "unicode": "e64c",
  20660. "unicode_decimal": 58956
  20661. },
  20662. {
  20663. "icon_id": "24855816",
  20664. "name": "more",
  20665. "font_class": "more",
  20666. "unicode": "e64d",
  20667. "unicode_decimal": 58957
  20668. },
  20669. {
  20670. "icon_id": "24855817",
  20671. "name": "more-filled",
  20672. "font_class": "more-filled",
  20673. "unicode": "e64e",
  20674. "unicode_decimal": 58958
  20675. },
  20676. {
  20677. "icon_id": "24855818",
  20678. "name": "undo",
  20679. "font_class": "undo",
  20680. "unicode": "e64f",
  20681. "unicode_decimal": 58959
  20682. },
  20683. {
  20684. "icon_id": "24855819",
  20685. "name": "images",
  20686. "font_class": "images",
  20687. "unicode": "e650",
  20688. "unicode_decimal": 58960
  20689. },
  20690. {
  20691. "icon_id": "24855821",
  20692. "name": "paperclip",
  20693. "font_class": "paperclip",
  20694. "unicode": "e652",
  20695. "unicode_decimal": 58962
  20696. },
  20697. {
  20698. "icon_id": "24855822",
  20699. "name": "settings",
  20700. "font_class": "settings",
  20701. "unicode": "e653",
  20702. "unicode_decimal": 58963
  20703. },
  20704. {
  20705. "icon_id": "24855823",
  20706. "name": "search",
  20707. "font_class": "search",
  20708. "unicode": "e654",
  20709. "unicode_decimal": 58964
  20710. },
  20711. {
  20712. "icon_id": "24855824",
  20713. "name": "redo-filled",
  20714. "font_class": "redo-filled",
  20715. "unicode": "e655",
  20716. "unicode_decimal": 58965
  20717. },
  20718. {
  20719. "icon_id": "24841702",
  20720. "name": "list",
  20721. "font_class": "list",
  20722. "unicode": "e644",
  20723. "unicode_decimal": 58948
  20724. },
  20725. {
  20726. "icon_id": "24841489",
  20727. "name": "mail-open-filled",
  20728. "font_class": "mail-open-filled",
  20729. "unicode": "e63a",
  20730. "unicode_decimal": 58938
  20731. },
  20732. {
  20733. "icon_id": "24841491",
  20734. "name": "hand-thumbsdown-filled",
  20735. "font_class": "hand-down-filled",
  20736. "unicode": "e63c",
  20737. "unicode_decimal": 58940
  20738. },
  20739. {
  20740. "icon_id": "24841492",
  20741. "name": "hand-thumbsdown",
  20742. "font_class": "hand-down",
  20743. "unicode": "e63d",
  20744. "unicode_decimal": 58941
  20745. },
  20746. {
  20747. "icon_id": "24841493",
  20748. "name": "hand-thumbsup-filled",
  20749. "font_class": "hand-up-filled",
  20750. "unicode": "e63e",
  20751. "unicode_decimal": 58942
  20752. },
  20753. {
  20754. "icon_id": "24841494",
  20755. "name": "hand-thumbsup",
  20756. "font_class": "hand-up",
  20757. "unicode": "e63f",
  20758. "unicode_decimal": 58943
  20759. },
  20760. {
  20761. "icon_id": "24841496",
  20762. "name": "heart-filled",
  20763. "font_class": "heart-filled",
  20764. "unicode": "e641",
  20765. "unicode_decimal": 58945
  20766. },
  20767. {
  20768. "icon_id": "24841498",
  20769. "name": "mail-open",
  20770. "font_class": "mail-open",
  20771. "unicode": "e643",
  20772. "unicode_decimal": 58947
  20773. },
  20774. {
  20775. "icon_id": "24841488",
  20776. "name": "heart",
  20777. "font_class": "heart",
  20778. "unicode": "e639",
  20779. "unicode_decimal": 58937
  20780. },
  20781. {
  20782. "icon_id": "24839963",
  20783. "name": "loop",
  20784. "font_class": "loop",
  20785. "unicode": "e633",
  20786. "unicode_decimal": 58931
  20787. },
  20788. {
  20789. "icon_id": "24839866",
  20790. "name": "pulldown",
  20791. "font_class": "pulldown",
  20792. "unicode": "e632",
  20793. "unicode_decimal": 58930
  20794. },
  20795. {
  20796. "icon_id": "24813798",
  20797. "name": "scan",
  20798. "font_class": "scan",
  20799. "unicode": "e62a",
  20800. "unicode_decimal": 58922
  20801. },
  20802. {
  20803. "icon_id": "24813786",
  20804. "name": "bars",
  20805. "font_class": "bars",
  20806. "unicode": "e627",
  20807. "unicode_decimal": 58919
  20808. },
  20809. {
  20810. "icon_id": "24813788",
  20811. "name": "cart-filled",
  20812. "font_class": "cart-filled",
  20813. "unicode": "e629",
  20814. "unicode_decimal": 58921
  20815. },
  20816. {
  20817. "icon_id": "24813790",
  20818. "name": "checkbox",
  20819. "font_class": "checkbox",
  20820. "unicode": "e62b",
  20821. "unicode_decimal": 58923
  20822. },
  20823. {
  20824. "icon_id": "24813791",
  20825. "name": "checkbox-filled",
  20826. "font_class": "checkbox-filled",
  20827. "unicode": "e62c",
  20828. "unicode_decimal": 58924
  20829. },
  20830. {
  20831. "icon_id": "24813794",
  20832. "name": "shop",
  20833. "font_class": "shop",
  20834. "unicode": "e62f",
  20835. "unicode_decimal": 58927
  20836. },
  20837. {
  20838. "icon_id": "24813795",
  20839. "name": "headphones",
  20840. "font_class": "headphones",
  20841. "unicode": "e630",
  20842. "unicode_decimal": 58928
  20843. },
  20844. {
  20845. "icon_id": "24813796",
  20846. "name": "cart",
  20847. "font_class": "cart",
  20848. "unicode": "e631",
  20849. "unicode_decimal": 58929
  20850. }
  20851. ]
  20852. };
  20853. const getVal = (val) => {
  20854. const reg = /^[0-9]*$/g;
  20855. return typeof val === "number" || reg.test(val) ? val + "px" : val;
  20856. };
  20857. const _sfc_main$U = {
  20858. name: "UniIcons",
  20859. emits: ["click"],
  20860. props: {
  20861. type: {
  20862. type: String,
  20863. default: ""
  20864. },
  20865. color: {
  20866. type: String,
  20867. default: "#333333"
  20868. },
  20869. size: {
  20870. type: [Number, String],
  20871. default: 16
  20872. },
  20873. customPrefix: {
  20874. type: String,
  20875. default: ""
  20876. }
  20877. },
  20878. data() {
  20879. return {
  20880. icons: icons.glyphs
  20881. };
  20882. },
  20883. computed: {
  20884. unicode() {
  20885. let code2 = this.icons.find((v) => v.font_class === this.type);
  20886. if (code2) {
  20887. return unescape(`%u${code2.unicode}`);
  20888. }
  20889. return "";
  20890. },
  20891. iconSize() {
  20892. return getVal(this.size);
  20893. }
  20894. },
  20895. methods: {
  20896. _onClick() {
  20897. this.$emit("click");
  20898. }
  20899. }
  20900. };
  20901. function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
  20902. return vue.openBlock(), vue.createElementBlock(
  20903. "text",
  20904. {
  20905. style: vue.normalizeStyle({ color: $props.color, "font-size": $options.iconSize }),
  20906. class: vue.normalizeClass(["uni-icons", ["uniui-" + $props.type, $props.customPrefix, $props.customPrefix ? $props.type : ""]]),
  20907. onClick: _cache[0] || (_cache[0] = (...args) => $options._onClick && $options._onClick(...args))
  20908. },
  20909. null,
  20910. 6
  20911. /* CLASS, STYLE */
  20912. );
  20913. }
  20914. 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"]]);
  20915. let Calendar$1 = class Calendar {
  20916. constructor({
  20917. selected,
  20918. startDate,
  20919. endDate,
  20920. range: range2
  20921. } = {}) {
  20922. this.date = this.getDateObj(/* @__PURE__ */ new Date());
  20923. this.selected = selected || [];
  20924. this.startDate = startDate;
  20925. this.endDate = endDate;
  20926. this.range = range2;
  20927. this.cleanMultipleStatus();
  20928. this.weeks = {};
  20929. this.lastHover = false;
  20930. }
  20931. /**
  20932. * 设置日期
  20933. * @param {Object} date
  20934. */
  20935. setDate(date3) {
  20936. const selectDate = this.getDateObj(date3);
  20937. this.getWeeks(selectDate.fullDate);
  20938. }
  20939. /**
  20940. * 清理多选状态
  20941. */
  20942. cleanMultipleStatus() {
  20943. this.multipleStatus = {
  20944. before: "",
  20945. after: "",
  20946. data: []
  20947. };
  20948. }
  20949. setStartDate(startDate) {
  20950. this.startDate = startDate;
  20951. }
  20952. setEndDate(endDate) {
  20953. this.endDate = endDate;
  20954. }
  20955. getPreMonthObj(date3) {
  20956. date3 = fixIosDateFormat(date3);
  20957. date3 = new Date(date3);
  20958. const oldMonth = date3.getMonth();
  20959. date3.setMonth(oldMonth - 1);
  20960. const newMonth = date3.getMonth();
  20961. if (oldMonth !== 0 && newMonth - oldMonth === 0) {
  20962. date3.setMonth(newMonth - 1);
  20963. }
  20964. return this.getDateObj(date3);
  20965. }
  20966. getNextMonthObj(date3) {
  20967. date3 = fixIosDateFormat(date3);
  20968. date3 = new Date(date3);
  20969. const oldMonth = date3.getMonth();
  20970. date3.setMonth(oldMonth + 1);
  20971. const newMonth = date3.getMonth();
  20972. if (newMonth - oldMonth > 1) {
  20973. date3.setMonth(newMonth - 1);
  20974. }
  20975. return this.getDateObj(date3);
  20976. }
  20977. /**
  20978. * 获取指定格式Date对象
  20979. */
  20980. getDateObj(date3) {
  20981. date3 = fixIosDateFormat(date3);
  20982. date3 = new Date(date3);
  20983. return {
  20984. fullDate: getDate(date3),
  20985. year: date3.getFullYear(),
  20986. month: addZero(date3.getMonth() + 1),
  20987. date: addZero(date3.getDate()),
  20988. day: date3.getDay()
  20989. };
  20990. }
  20991. /**
  20992. * 获取上一个月日期集合
  20993. */
  20994. getPreMonthDays(amount2, dateObj) {
  20995. const result = [];
  20996. for (let i = amount2 - 1; i >= 0; i--) {
  20997. const month = dateObj.month > 1 ? dateObj.month - 1 : 12;
  20998. const year = month === 12 ? dateObj.year - 1 : dateObj.year;
  20999. const date3 = new Date(year, month, -i).getDate();
  21000. const fullDate = `${year}-${addZero(month)}-${addZero(date3)}`;
  21001. let multiples = this.multipleStatus.data;
  21002. let multiplesStatus = -1;
  21003. if (this.range && multiples) {
  21004. multiplesStatus = multiples.findIndex((item) => {
  21005. return this.dateEqual(item, fullDate);
  21006. });
  21007. }
  21008. const checked = multiplesStatus !== -1;
  21009. const extraInfo = this.selected && this.selected.find((item) => {
  21010. if (this.dateEqual(fullDate, item.date)) {
  21011. return item;
  21012. }
  21013. });
  21014. result.push({
  21015. fullDate,
  21016. year,
  21017. month,
  21018. date: date3,
  21019. multiple: this.range ? checked : false,
  21020. beforeMultiple: this.isLogicBefore(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  21021. afterMultiple: this.isLogicAfter(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  21022. disable: this.startDate && !dateCompare(this.startDate, fullDate) || this.endDate && !dateCompare(fullDate, this.endDate),
  21023. isToday: fullDate === this.date.fullDate,
  21024. userChecked: false,
  21025. extraInfo
  21026. });
  21027. }
  21028. return result;
  21029. }
  21030. /**
  21031. * 获取本月日期集合
  21032. */
  21033. getCurrentMonthDays(amount2, dateObj) {
  21034. const result = [];
  21035. const fullDate = this.date.fullDate;
  21036. for (let i = 1; i <= amount2; i++) {
  21037. const currentDate = `${dateObj.year}-${dateObj.month}-${addZero(i)}`;
  21038. const isToday = fullDate === currentDate;
  21039. const extraInfo = this.selected && this.selected.find((item) => {
  21040. if (this.dateEqual(currentDate, item.date)) {
  21041. return item;
  21042. }
  21043. });
  21044. if (this.startDate) {
  21045. dateCompare(this.startDate, currentDate);
  21046. }
  21047. if (this.endDate) {
  21048. dateCompare(currentDate, this.endDate);
  21049. }
  21050. let multiples = this.multipleStatus.data;
  21051. let multiplesStatus = -1;
  21052. if (this.range && multiples) {
  21053. multiplesStatus = multiples.findIndex((item) => {
  21054. return this.dateEqual(item, currentDate);
  21055. });
  21056. }
  21057. const checked = multiplesStatus !== -1;
  21058. result.push({
  21059. fullDate: currentDate,
  21060. year: dateObj.year,
  21061. month: dateObj.month,
  21062. date: i,
  21063. multiple: this.range ? checked : false,
  21064. beforeMultiple: this.isLogicBefore(currentDate, this.multipleStatus.before, this.multipleStatus.after),
  21065. afterMultiple: this.isLogicAfter(currentDate, this.multipleStatus.before, this.multipleStatus.after),
  21066. disable: this.startDate && !dateCompare(this.startDate, currentDate) || this.endDate && !dateCompare(currentDate, this.endDate),
  21067. isToday,
  21068. userChecked: false,
  21069. extraInfo
  21070. });
  21071. }
  21072. return result;
  21073. }
  21074. /**
  21075. * 获取下一个月日期集合
  21076. */
  21077. _getNextMonthDays(amount2, dateObj) {
  21078. const result = [];
  21079. dateObj.month + 1;
  21080. for (let i = 1; i <= amount2; i++) {
  21081. const month = dateObj.month === 12 ? 1 : dateObj.month * 1 + 1;
  21082. const year = month === 1 ? dateObj.year + 1 : dateObj.year;
  21083. const fullDate = `${year}-${addZero(month)}-${addZero(i)}`;
  21084. let multiples = this.multipleStatus.data;
  21085. let multiplesStatus = -1;
  21086. if (this.range && multiples) {
  21087. multiplesStatus = multiples.findIndex((item) => {
  21088. return this.dateEqual(item, fullDate);
  21089. });
  21090. }
  21091. const checked = multiplesStatus !== -1;
  21092. const extraInfo = this.selected && this.selected.find((item) => {
  21093. if (this.dateEqual(fullDate, item.date)) {
  21094. return item;
  21095. }
  21096. });
  21097. result.push({
  21098. fullDate,
  21099. year,
  21100. date: i,
  21101. month,
  21102. multiple: this.range ? checked : false,
  21103. beforeMultiple: this.isLogicBefore(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  21104. afterMultiple: this.isLogicAfter(fullDate, this.multipleStatus.before, this.multipleStatus.after),
  21105. disable: this.startDate && !dateCompare(this.startDate, fullDate) || this.endDate && !dateCompare(fullDate, this.endDate),
  21106. isToday: fullDate === this.date.fullDate,
  21107. userChecked: false,
  21108. extraInfo
  21109. });
  21110. }
  21111. return result;
  21112. }
  21113. /**
  21114. * 获取当前日期详情
  21115. * @param {Object} date
  21116. */
  21117. getInfo(date3) {
  21118. if (!date3) {
  21119. date3 = /* @__PURE__ */ new Date();
  21120. }
  21121. return this.calendar.find((item) => item.fullDate === this.getDateObj(date3).fullDate);
  21122. }
  21123. /**
  21124. * 比较时间是否相等
  21125. */
  21126. dateEqual(before, after) {
  21127. before = new Date(fixIosDateFormat(before));
  21128. after = new Date(fixIosDateFormat(after));
  21129. return before.valueOf() === after.valueOf();
  21130. }
  21131. /**
  21132. * 比较真实起始日期
  21133. */
  21134. isLogicBefore(currentDate, before, after) {
  21135. let logicBefore = before;
  21136. if (before && after) {
  21137. logicBefore = dateCompare(before, after) ? before : after;
  21138. }
  21139. return this.dateEqual(logicBefore, currentDate);
  21140. }
  21141. isLogicAfter(currentDate, before, after) {
  21142. let logicAfter = after;
  21143. if (before && after) {
  21144. logicAfter = dateCompare(before, after) ? after : before;
  21145. }
  21146. return this.dateEqual(logicAfter, currentDate);
  21147. }
  21148. /**
  21149. * 获取日期范围内所有日期
  21150. * @param {Object} begin
  21151. * @param {Object} end
  21152. */
  21153. geDateAll(begin, end) {
  21154. var arr = [];
  21155. var ab = begin.split("-");
  21156. var ae = end.split("-");
  21157. var db = /* @__PURE__ */ new Date();
  21158. db.setFullYear(ab[0], ab[1] - 1, ab[2]);
  21159. var de = /* @__PURE__ */ new Date();
  21160. de.setFullYear(ae[0], ae[1] - 1, ae[2]);
  21161. var unixDb = db.getTime() - 24 * 60 * 60 * 1e3;
  21162. var unixDe = de.getTime() - 24 * 60 * 60 * 1e3;
  21163. for (var k = unixDb; k <= unixDe; ) {
  21164. k = k + 24 * 60 * 60 * 1e3;
  21165. arr.push(this.getDateObj(new Date(parseInt(k))).fullDate);
  21166. }
  21167. return arr;
  21168. }
  21169. /**
  21170. * 获取多选状态
  21171. */
  21172. setMultiple(fullDate) {
  21173. if (!this.range)
  21174. return;
  21175. let {
  21176. before,
  21177. after
  21178. } = this.multipleStatus;
  21179. if (before && after) {
  21180. if (!this.lastHover) {
  21181. this.lastHover = true;
  21182. return;
  21183. }
  21184. this.multipleStatus.before = fullDate;
  21185. this.multipleStatus.after = "";
  21186. this.multipleStatus.data = [];
  21187. this.multipleStatus.fulldate = "";
  21188. this.lastHover = false;
  21189. } else {
  21190. if (!before) {
  21191. this.multipleStatus.before = fullDate;
  21192. this.lastHover = false;
  21193. } else {
  21194. this.multipleStatus.after = fullDate;
  21195. if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
  21196. this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
  21197. } else {
  21198. this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
  21199. }
  21200. this.lastHover = true;
  21201. }
  21202. }
  21203. this.getWeeks(fullDate);
  21204. }
  21205. /**
  21206. * 鼠标 hover 更新多选状态
  21207. */
  21208. setHoverMultiple(fullDate) {
  21209. if (!this.range || this.lastHover)
  21210. return;
  21211. const { before } = this.multipleStatus;
  21212. if (!before) {
  21213. this.multipleStatus.before = fullDate;
  21214. } else {
  21215. this.multipleStatus.after = fullDate;
  21216. if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
  21217. this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
  21218. } else {
  21219. this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
  21220. }
  21221. }
  21222. this.getWeeks(fullDate);
  21223. }
  21224. /**
  21225. * 更新默认值多选状态
  21226. */
  21227. setDefaultMultiple(before, after) {
  21228. this.multipleStatus.before = before;
  21229. this.multipleStatus.after = after;
  21230. if (before && after) {
  21231. if (dateCompare(before, after)) {
  21232. this.multipleStatus.data = this.geDateAll(before, after);
  21233. this.getWeeks(after);
  21234. } else {
  21235. this.multipleStatus.data = this.geDateAll(after, before);
  21236. this.getWeeks(before);
  21237. }
  21238. }
  21239. }
  21240. /**
  21241. * 获取每周数据
  21242. * @param {Object} dateData
  21243. */
  21244. getWeeks(dateData) {
  21245. const {
  21246. year,
  21247. month
  21248. } = this.getDateObj(dateData);
  21249. const preMonthDayAmount = new Date(year, month - 1, 1).getDay();
  21250. const preMonthDays = this.getPreMonthDays(preMonthDayAmount, this.getDateObj(dateData));
  21251. const currentMonthDayAmount = new Date(year, month, 0).getDate();
  21252. const currentMonthDays = this.getCurrentMonthDays(currentMonthDayAmount, this.getDateObj(dateData));
  21253. const nextMonthDayAmount = 42 - preMonthDayAmount - currentMonthDayAmount;
  21254. const nextMonthDays = this._getNextMonthDays(nextMonthDayAmount, this.getDateObj(dateData));
  21255. const calendarDays = [...preMonthDays, ...currentMonthDays, ...nextMonthDays];
  21256. const weeks = new Array(6);
  21257. for (let i = 0; i < calendarDays.length; i++) {
  21258. const index2 = Math.floor(i / 7);
  21259. if (!weeks[index2]) {
  21260. weeks[index2] = new Array(7);
  21261. }
  21262. weeks[index2][i % 7] = calendarDays[i];
  21263. }
  21264. this.calendar = calendarDays;
  21265. this.weeks = weeks;
  21266. }
  21267. };
  21268. function getDateTime(date3, hideSecond) {
  21269. return `${getDate(date3)} ${getTime(date3, hideSecond)}`;
  21270. }
  21271. function getDate(date3) {
  21272. date3 = fixIosDateFormat(date3);
  21273. date3 = new Date(date3);
  21274. const year = date3.getFullYear();
  21275. const month = date3.getMonth() + 1;
  21276. const day = date3.getDate();
  21277. return `${year}-${addZero(month)}-${addZero(day)}`;
  21278. }
  21279. function getTime(date3, hideSecond) {
  21280. date3 = fixIosDateFormat(date3);
  21281. date3 = new Date(date3);
  21282. const hour = date3.getHours();
  21283. const minute = date3.getMinutes();
  21284. const second = date3.getSeconds();
  21285. return hideSecond ? `${addZero(hour)}:${addZero(minute)}` : `${addZero(hour)}:${addZero(minute)}:${addZero(second)}`;
  21286. }
  21287. function addZero(num) {
  21288. if (num < 10) {
  21289. num = `0${num}`;
  21290. }
  21291. return num;
  21292. }
  21293. function getDefaultSecond(hideSecond) {
  21294. return hideSecond ? "00:00" : "00:00:00";
  21295. }
  21296. function dateCompare(startDate, endDate) {
  21297. startDate = new Date(fixIosDateFormat(startDate));
  21298. endDate = new Date(fixIosDateFormat(endDate));
  21299. return startDate <= endDate;
  21300. }
  21301. function checkDate(date3) {
  21302. const dateReg = /((19|20)\d{2})(-|\/)\d{1,2}(-|\/)\d{1,2}/g;
  21303. return date3.match(dateReg);
  21304. }
  21305. 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])?$/;
  21306. function fixIosDateFormat(value2) {
  21307. if (typeof value2 === "string" && dateTimeReg.test(value2)) {
  21308. value2 = value2.replace(/-/g, "/");
  21309. }
  21310. return value2;
  21311. }
  21312. const _sfc_main$T = {
  21313. props: {
  21314. weeks: {
  21315. type: Object,
  21316. default() {
  21317. return {};
  21318. }
  21319. },
  21320. calendar: {
  21321. type: Object,
  21322. default: () => {
  21323. return {};
  21324. }
  21325. },
  21326. selected: {
  21327. type: Array,
  21328. default: () => {
  21329. return [];
  21330. }
  21331. },
  21332. checkHover: {
  21333. type: Boolean,
  21334. default: false
  21335. }
  21336. },
  21337. methods: {
  21338. choiceDate(weeks) {
  21339. this.$emit("change", weeks);
  21340. },
  21341. handleMousemove(weeks) {
  21342. this.$emit("handleMouse", weeks);
  21343. }
  21344. }
  21345. };
  21346. function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
  21347. return vue.openBlock(), vue.createElementBlock(
  21348. "view",
  21349. {
  21350. class: vue.normalizeClass(["uni-calendar-item__weeks-box", {
  21351. "uni-calendar-item--disable": $props.weeks.disable,
  21352. "uni-calendar-item--before-checked-x": $props.weeks.beforeMultiple,
  21353. "uni-calendar-item--multiple": $props.weeks.multiple,
  21354. "uni-calendar-item--after-checked-x": $props.weeks.afterMultiple
  21355. }]),
  21356. onClick: _cache[0] || (_cache[0] = ($event) => $options.choiceDate($props.weeks)),
  21357. onMouseenter: _cache[1] || (_cache[1] = ($event) => $options.handleMousemove($props.weeks))
  21358. },
  21359. [
  21360. vue.createElementVNode(
  21361. "view",
  21362. {
  21363. class: vue.normalizeClass(["uni-calendar-item__weeks-box-item", {
  21364. "uni-calendar-item--checked": $props.calendar.fullDate === $props.weeks.fullDate && ($props.calendar.userChecked || !$props.checkHover),
  21365. "uni-calendar-item--checked-range-text": $props.checkHover,
  21366. "uni-calendar-item--before-checked": $props.weeks.beforeMultiple,
  21367. "uni-calendar-item--multiple": $props.weeks.multiple,
  21368. "uni-calendar-item--after-checked": $props.weeks.afterMultiple,
  21369. "uni-calendar-item--disable": $props.weeks.disable
  21370. }])
  21371. },
  21372. [
  21373. $props.selected && $props.weeks.extraInfo ? (vue.openBlock(), vue.createElementBlock("text", {
  21374. key: 0,
  21375. class: "uni-calendar-item__weeks-box-circle"
  21376. })) : vue.createCommentVNode("v-if", true),
  21377. vue.createElementVNode(
  21378. "text",
  21379. { class: "uni-calendar-item__weeks-box-text uni-calendar-item__weeks-box-text-disable uni-calendar-item--checked-text" },
  21380. vue.toDisplayString($props.weeks.date),
  21381. 1
  21382. /* TEXT */
  21383. )
  21384. ],
  21385. 2
  21386. /* CLASS */
  21387. ),
  21388. vue.createElementVNode(
  21389. "view",
  21390. {
  21391. class: vue.normalizeClass({ "uni-calendar-item--today": $props.weeks.isToday })
  21392. },
  21393. null,
  21394. 2
  21395. /* CLASS */
  21396. )
  21397. ],
  21398. 34
  21399. /* CLASS, NEED_HYDRATION */
  21400. );
  21401. }
  21402. 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"]]);
  21403. const isObject$1 = (val) => val !== null && typeof val === "object";
  21404. const defaultDelimiters = ["{", "}"];
  21405. class BaseFormatter {
  21406. constructor() {
  21407. this._caches = /* @__PURE__ */ Object.create(null);
  21408. }
  21409. interpolate(message, values, delimiters = defaultDelimiters) {
  21410. if (!values) {
  21411. return [message];
  21412. }
  21413. let tokens = this._caches[message];
  21414. if (!tokens) {
  21415. tokens = parse(message, delimiters);
  21416. this._caches[message] = tokens;
  21417. }
  21418. return compile(tokens, values);
  21419. }
  21420. }
  21421. const RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  21422. const RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  21423. function parse(format2, [startDelimiter, endDelimiter]) {
  21424. const tokens = [];
  21425. let position = 0;
  21426. let text = "";
  21427. while (position < format2.length) {
  21428. let char = format2[position++];
  21429. if (char === startDelimiter) {
  21430. if (text) {
  21431. tokens.push({ type: "text", value: text });
  21432. }
  21433. text = "";
  21434. let sub = "";
  21435. char = format2[position++];
  21436. while (char !== void 0 && char !== endDelimiter) {
  21437. sub += char;
  21438. char = format2[position++];
  21439. }
  21440. const isClosed = char === endDelimiter;
  21441. const type2 = RE_TOKEN_LIST_VALUE.test(sub) ? "list" : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? "named" : "unknown";
  21442. tokens.push({ value: sub, type: type2 });
  21443. } else {
  21444. text += char;
  21445. }
  21446. }
  21447. text && tokens.push({ type: "text", value: text });
  21448. return tokens;
  21449. }
  21450. function compile(tokens, values) {
  21451. const compiled = [];
  21452. let index2 = 0;
  21453. const mode = Array.isArray(values) ? "list" : isObject$1(values) ? "named" : "unknown";
  21454. if (mode === "unknown") {
  21455. return compiled;
  21456. }
  21457. while (index2 < tokens.length) {
  21458. const token = tokens[index2];
  21459. switch (token.type) {
  21460. case "text":
  21461. compiled.push(token.value);
  21462. break;
  21463. case "list":
  21464. compiled.push(values[parseInt(token.value, 10)]);
  21465. break;
  21466. case "named":
  21467. if (mode === "named") {
  21468. compiled.push(values[token.value]);
  21469. } else {
  21470. {
  21471. console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`);
  21472. }
  21473. }
  21474. break;
  21475. case "unknown":
  21476. {
  21477. console.warn(`Detect 'unknown' type of token!`);
  21478. }
  21479. break;
  21480. }
  21481. index2++;
  21482. }
  21483. return compiled;
  21484. }
  21485. const LOCALE_ZH_HANS = "zh-Hans";
  21486. const LOCALE_ZH_HANT = "zh-Hant";
  21487. const LOCALE_EN = "en";
  21488. const LOCALE_FR = "fr";
  21489. const LOCALE_ES = "es";
  21490. const hasOwnProperty = Object.prototype.hasOwnProperty;
  21491. const hasOwn = (val, key) => hasOwnProperty.call(val, key);
  21492. const defaultFormatter = new BaseFormatter();
  21493. function include(str, parts) {
  21494. return !!parts.find((part) => str.indexOf(part) !== -1);
  21495. }
  21496. function startsWith(str, parts) {
  21497. return parts.find((part) => str.indexOf(part) === 0);
  21498. }
  21499. function normalizeLocale(locale, messages2) {
  21500. if (!locale) {
  21501. return;
  21502. }
  21503. locale = locale.trim().replace(/_/g, "-");
  21504. if (messages2 && messages2[locale]) {
  21505. return locale;
  21506. }
  21507. locale = locale.toLowerCase();
  21508. if (locale === "chinese") {
  21509. return LOCALE_ZH_HANS;
  21510. }
  21511. if (locale.indexOf("zh") === 0) {
  21512. if (locale.indexOf("-hans") > -1) {
  21513. return LOCALE_ZH_HANS;
  21514. }
  21515. if (locale.indexOf("-hant") > -1) {
  21516. return LOCALE_ZH_HANT;
  21517. }
  21518. if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) {
  21519. return LOCALE_ZH_HANT;
  21520. }
  21521. return LOCALE_ZH_HANS;
  21522. }
  21523. let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  21524. if (messages2 && Object.keys(messages2).length > 0) {
  21525. locales = Object.keys(messages2);
  21526. }
  21527. const lang = startsWith(locale, locales);
  21528. if (lang) {
  21529. return lang;
  21530. }
  21531. }
  21532. class I18n {
  21533. constructor({ locale, fallbackLocale, messages: messages2, watcher, formater: formater2 }) {
  21534. this.locale = LOCALE_EN;
  21535. this.fallbackLocale = LOCALE_EN;
  21536. this.message = {};
  21537. this.messages = {};
  21538. this.watchers = [];
  21539. if (fallbackLocale) {
  21540. this.fallbackLocale = fallbackLocale;
  21541. }
  21542. this.formater = formater2 || defaultFormatter;
  21543. this.messages = messages2 || {};
  21544. this.setLocale(locale || LOCALE_EN);
  21545. if (watcher) {
  21546. this.watchLocale(watcher);
  21547. }
  21548. }
  21549. setLocale(locale) {
  21550. const oldLocale = this.locale;
  21551. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  21552. if (!this.messages[this.locale]) {
  21553. this.messages[this.locale] = {};
  21554. }
  21555. this.message = this.messages[this.locale];
  21556. if (oldLocale !== this.locale) {
  21557. this.watchers.forEach((watcher) => {
  21558. watcher(this.locale, oldLocale);
  21559. });
  21560. }
  21561. }
  21562. getLocale() {
  21563. return this.locale;
  21564. }
  21565. watchLocale(fn) {
  21566. const index2 = this.watchers.push(fn) - 1;
  21567. return () => {
  21568. this.watchers.splice(index2, 1);
  21569. };
  21570. }
  21571. add(locale, message, override = true) {
  21572. const curMessages = this.messages[locale];
  21573. if (curMessages) {
  21574. if (override) {
  21575. Object.assign(curMessages, message);
  21576. } else {
  21577. Object.keys(message).forEach((key) => {
  21578. if (!hasOwn(curMessages, key)) {
  21579. curMessages[key] = message[key];
  21580. }
  21581. });
  21582. }
  21583. } else {
  21584. this.messages[locale] = message;
  21585. }
  21586. }
  21587. f(message, values, delimiters) {
  21588. return this.formater.interpolate(message, values, delimiters).join("");
  21589. }
  21590. t(key, locale, values) {
  21591. let message = this.message;
  21592. if (typeof locale === "string") {
  21593. locale = normalizeLocale(locale, this.messages);
  21594. locale && (message = this.messages[locale]);
  21595. } else {
  21596. values = locale;
  21597. }
  21598. if (!hasOwn(message, key)) {
  21599. console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`);
  21600. return key;
  21601. }
  21602. return this.formater.interpolate(message[key], values).join("");
  21603. }
  21604. }
  21605. function watchAppLocale(appVm, i18n) {
  21606. if (appVm.$watchLocale) {
  21607. appVm.$watchLocale((newLocale) => {
  21608. i18n.setLocale(newLocale);
  21609. });
  21610. } else {
  21611. appVm.$watch(() => appVm.$locale, (newLocale) => {
  21612. i18n.setLocale(newLocale);
  21613. });
  21614. }
  21615. }
  21616. function getDefaultLocale() {
  21617. if (typeof uni !== "undefined" && uni.getLocale) {
  21618. return uni.getLocale();
  21619. }
  21620. if (typeof global !== "undefined" && global.getLocale) {
  21621. return global.getLocale();
  21622. }
  21623. return LOCALE_EN;
  21624. }
  21625. function initVueI18n(locale, messages2 = {}, fallbackLocale, watcher) {
  21626. if (typeof locale !== "string") {
  21627. const options = [
  21628. messages2,
  21629. locale
  21630. ];
  21631. locale = options[0];
  21632. messages2 = options[1];
  21633. }
  21634. if (typeof locale !== "string") {
  21635. locale = getDefaultLocale();
  21636. }
  21637. if (typeof fallbackLocale !== "string") {
  21638. fallbackLocale = typeof __uniConfig !== "undefined" && __uniConfig.fallbackLocale || LOCALE_EN;
  21639. }
  21640. const i18n = new I18n({
  21641. locale,
  21642. fallbackLocale,
  21643. messages: messages2,
  21644. watcher
  21645. });
  21646. let t2 = (key, values) => {
  21647. if (typeof getApp !== "function") {
  21648. t2 = function(key2, values2) {
  21649. return i18n.t(key2, values2);
  21650. };
  21651. } else {
  21652. let isWatchedAppLocale = false;
  21653. t2 = function(key2, values2) {
  21654. const appVm = getApp().$vm;
  21655. if (appVm) {
  21656. appVm.$locale;
  21657. if (!isWatchedAppLocale) {
  21658. isWatchedAppLocale = true;
  21659. watchAppLocale(appVm, i18n);
  21660. }
  21661. }
  21662. return i18n.t(key2, values2);
  21663. };
  21664. }
  21665. return t2(key, values);
  21666. };
  21667. return {
  21668. i18n,
  21669. f(message, values, delimiters) {
  21670. return i18n.f(message, values, delimiters);
  21671. },
  21672. t(key, values) {
  21673. return t2(key, values);
  21674. },
  21675. add(locale2, message, override = true) {
  21676. return i18n.add(locale2, message, override);
  21677. },
  21678. watch(fn) {
  21679. return i18n.watchLocale(fn);
  21680. },
  21681. getLocale() {
  21682. return i18n.getLocale();
  21683. },
  21684. setLocale(newLocale) {
  21685. return i18n.setLocale(newLocale);
  21686. }
  21687. };
  21688. }
  21689. const en = {
  21690. "uni-datetime-picker.selectDate": "select date",
  21691. "uni-datetime-picker.selectTime": "select time",
  21692. "uni-datetime-picker.selectDateTime": "select date and time",
  21693. "uni-datetime-picker.startDate": "start date",
  21694. "uni-datetime-picker.endDate": "end date",
  21695. "uni-datetime-picker.startTime": "start time",
  21696. "uni-datetime-picker.endTime": "end time",
  21697. "uni-datetime-picker.ok": "ok",
  21698. "uni-datetime-picker.clear": "clear",
  21699. "uni-datetime-picker.cancel": "cancel",
  21700. "uni-datetime-picker.year": "-",
  21701. "uni-datetime-picker.month": "",
  21702. "uni-calender.MON": "MON",
  21703. "uni-calender.TUE": "TUE",
  21704. "uni-calender.WED": "WED",
  21705. "uni-calender.THU": "THU",
  21706. "uni-calender.FRI": "FRI",
  21707. "uni-calender.SAT": "SAT",
  21708. "uni-calender.SUN": "SUN",
  21709. "uni-calender.confirm": "confirm"
  21710. };
  21711. const zhHans = {
  21712. "uni-datetime-picker.selectDate": "选择日期",
  21713. "uni-datetime-picker.selectTime": "选择时间",
  21714. "uni-datetime-picker.selectDateTime": "选择日期时间",
  21715. "uni-datetime-picker.startDate": "开始日期",
  21716. "uni-datetime-picker.endDate": "结束日期",
  21717. "uni-datetime-picker.startTime": "开始时间",
  21718. "uni-datetime-picker.endTime": "结束时间",
  21719. "uni-datetime-picker.ok": "确定",
  21720. "uni-datetime-picker.clear": "清除",
  21721. "uni-datetime-picker.cancel": "取消",
  21722. "uni-datetime-picker.year": "年",
  21723. "uni-datetime-picker.month": "月",
  21724. "uni-calender.SUN": "日",
  21725. "uni-calender.MON": "一",
  21726. "uni-calender.TUE": "二",
  21727. "uni-calender.WED": "三",
  21728. "uni-calender.THU": "四",
  21729. "uni-calender.FRI": "五",
  21730. "uni-calender.SAT": "六",
  21731. "uni-calender.confirm": "确认"
  21732. };
  21733. const zhHant = {
  21734. "uni-datetime-picker.selectDate": "選擇日期",
  21735. "uni-datetime-picker.selectTime": "選擇時間",
  21736. "uni-datetime-picker.selectDateTime": "選擇日期時間",
  21737. "uni-datetime-picker.startDate": "開始日期",
  21738. "uni-datetime-picker.endDate": "結束日期",
  21739. "uni-datetime-picker.startTime": "開始时间",
  21740. "uni-datetime-picker.endTime": "結束时间",
  21741. "uni-datetime-picker.ok": "確定",
  21742. "uni-datetime-picker.clear": "清除",
  21743. "uni-datetime-picker.cancel": "取消",
  21744. "uni-datetime-picker.year": "年",
  21745. "uni-datetime-picker.month": "月",
  21746. "uni-calender.SUN": "日",
  21747. "uni-calender.MON": "一",
  21748. "uni-calender.TUE": "二",
  21749. "uni-calender.WED": "三",
  21750. "uni-calender.THU": "四",
  21751. "uni-calender.FRI": "五",
  21752. "uni-calender.SAT": "六",
  21753. "uni-calender.confirm": "確認"
  21754. };
  21755. const i18nMessages = {
  21756. en,
  21757. "zh-Hans": zhHans,
  21758. "zh-Hant": zhHant
  21759. };
  21760. const { t: t$1 } = initVueI18n(i18nMessages);
  21761. const _sfc_main$S = {
  21762. name: "UniDatetimePicker",
  21763. data() {
  21764. return {
  21765. indicatorStyle: `height: 50px;`,
  21766. visible: false,
  21767. fixNvueBug: {},
  21768. dateShow: true,
  21769. timeShow: true,
  21770. title: "日期和时间",
  21771. // 输入框当前时间
  21772. time: "",
  21773. // 当前的年月日时分秒
  21774. year: 1920,
  21775. month: 0,
  21776. day: 0,
  21777. hour: 0,
  21778. minute: 0,
  21779. second: 0,
  21780. // 起始时间
  21781. startYear: 1920,
  21782. startMonth: 1,
  21783. startDay: 1,
  21784. startHour: 0,
  21785. startMinute: 0,
  21786. startSecond: 0,
  21787. // 结束时间
  21788. endYear: 2120,
  21789. endMonth: 12,
  21790. endDay: 31,
  21791. endHour: 23,
  21792. endMinute: 59,
  21793. endSecond: 59
  21794. };
  21795. },
  21796. props: {
  21797. type: {
  21798. type: String,
  21799. default: "datetime"
  21800. },
  21801. value: {
  21802. type: [String, Number],
  21803. default: ""
  21804. },
  21805. modelValue: {
  21806. type: [String, Number],
  21807. default: ""
  21808. },
  21809. start: {
  21810. type: [Number, String],
  21811. default: ""
  21812. },
  21813. end: {
  21814. type: [Number, String],
  21815. default: ""
  21816. },
  21817. returnType: {
  21818. type: String,
  21819. default: "string"
  21820. },
  21821. disabled: {
  21822. type: [Boolean, String],
  21823. default: false
  21824. },
  21825. border: {
  21826. type: [Boolean, String],
  21827. default: true
  21828. },
  21829. hideSecond: {
  21830. type: [Boolean, String],
  21831. default: false
  21832. }
  21833. },
  21834. watch: {
  21835. modelValue: {
  21836. handler(newVal) {
  21837. if (newVal) {
  21838. this.parseValue(fixIosDateFormat(newVal));
  21839. this.initTime(false);
  21840. } else {
  21841. this.time = "";
  21842. this.parseValue(Date.now());
  21843. }
  21844. },
  21845. immediate: true
  21846. },
  21847. type: {
  21848. handler(newValue) {
  21849. if (newValue === "date") {
  21850. this.dateShow = true;
  21851. this.timeShow = false;
  21852. this.title = "日期";
  21853. } else if (newValue === "time") {
  21854. this.dateShow = false;
  21855. this.timeShow = true;
  21856. this.title = "时间";
  21857. } else {
  21858. this.dateShow = true;
  21859. this.timeShow = true;
  21860. this.title = "日期和时间";
  21861. }
  21862. },
  21863. immediate: true
  21864. },
  21865. start: {
  21866. handler(newVal) {
  21867. this.parseDatetimeRange(fixIosDateFormat(newVal), "start");
  21868. },
  21869. immediate: true
  21870. },
  21871. end: {
  21872. handler(newVal) {
  21873. this.parseDatetimeRange(fixIosDateFormat(newVal), "end");
  21874. },
  21875. immediate: true
  21876. },
  21877. // 月、日、时、分、秒可选范围变化后,检查当前值是否在范围内,不在则当前值重置为可选范围第一项
  21878. months(newVal) {
  21879. this.checkValue("month", this.month, newVal);
  21880. },
  21881. days(newVal) {
  21882. this.checkValue("day", this.day, newVal);
  21883. },
  21884. hours(newVal) {
  21885. this.checkValue("hour", this.hour, newVal);
  21886. },
  21887. minutes(newVal) {
  21888. this.checkValue("minute", this.minute, newVal);
  21889. },
  21890. seconds(newVal) {
  21891. this.checkValue("second", this.second, newVal);
  21892. }
  21893. },
  21894. computed: {
  21895. // 当前年、月、日、时、分、秒选择范围
  21896. years() {
  21897. return this.getCurrentRange("year");
  21898. },
  21899. months() {
  21900. return this.getCurrentRange("month");
  21901. },
  21902. days() {
  21903. return this.getCurrentRange("day");
  21904. },
  21905. hours() {
  21906. return this.getCurrentRange("hour");
  21907. },
  21908. minutes() {
  21909. return this.getCurrentRange("minute");
  21910. },
  21911. seconds() {
  21912. return this.getCurrentRange("second");
  21913. },
  21914. // picker 当前值数组
  21915. ymd() {
  21916. return [this.year - this.minYear, this.month - this.minMonth, this.day - this.minDay];
  21917. },
  21918. hms() {
  21919. return [this.hour - this.minHour, this.minute - this.minMinute, this.second - this.minSecond];
  21920. },
  21921. // 当前 date 是 start
  21922. currentDateIsStart() {
  21923. return this.year === this.startYear && this.month === this.startMonth && this.day === this.startDay;
  21924. },
  21925. // 当前 date 是 end
  21926. currentDateIsEnd() {
  21927. return this.year === this.endYear && this.month === this.endMonth && this.day === this.endDay;
  21928. },
  21929. // 当前年、月、日、时、分、秒的最小值和最大值
  21930. minYear() {
  21931. return this.startYear;
  21932. },
  21933. maxYear() {
  21934. return this.endYear;
  21935. },
  21936. minMonth() {
  21937. if (this.year === this.startYear) {
  21938. return this.startMonth;
  21939. } else {
  21940. return 1;
  21941. }
  21942. },
  21943. maxMonth() {
  21944. if (this.year === this.endYear) {
  21945. return this.endMonth;
  21946. } else {
  21947. return 12;
  21948. }
  21949. },
  21950. minDay() {
  21951. if (this.year === this.startYear && this.month === this.startMonth) {
  21952. return this.startDay;
  21953. } else {
  21954. return 1;
  21955. }
  21956. },
  21957. maxDay() {
  21958. if (this.year === this.endYear && this.month === this.endMonth) {
  21959. return this.endDay;
  21960. } else {
  21961. return this.daysInMonth(this.year, this.month);
  21962. }
  21963. },
  21964. minHour() {
  21965. if (this.type === "datetime") {
  21966. if (this.currentDateIsStart) {
  21967. return this.startHour;
  21968. } else {
  21969. return 0;
  21970. }
  21971. }
  21972. if (this.type === "time") {
  21973. return this.startHour;
  21974. }
  21975. },
  21976. maxHour() {
  21977. if (this.type === "datetime") {
  21978. if (this.currentDateIsEnd) {
  21979. return this.endHour;
  21980. } else {
  21981. return 23;
  21982. }
  21983. }
  21984. if (this.type === "time") {
  21985. return this.endHour;
  21986. }
  21987. },
  21988. minMinute() {
  21989. if (this.type === "datetime") {
  21990. if (this.currentDateIsStart && this.hour === this.startHour) {
  21991. return this.startMinute;
  21992. } else {
  21993. return 0;
  21994. }
  21995. }
  21996. if (this.type === "time") {
  21997. if (this.hour === this.startHour) {
  21998. return this.startMinute;
  21999. } else {
  22000. return 0;
  22001. }
  22002. }
  22003. },
  22004. maxMinute() {
  22005. if (this.type === "datetime") {
  22006. if (this.currentDateIsEnd && this.hour === this.endHour) {
  22007. return this.endMinute;
  22008. } else {
  22009. return 59;
  22010. }
  22011. }
  22012. if (this.type === "time") {
  22013. if (this.hour === this.endHour) {
  22014. return this.endMinute;
  22015. } else {
  22016. return 59;
  22017. }
  22018. }
  22019. },
  22020. minSecond() {
  22021. if (this.type === "datetime") {
  22022. if (this.currentDateIsStart && this.hour === this.startHour && this.minute === this.startMinute) {
  22023. return this.startSecond;
  22024. } else {
  22025. return 0;
  22026. }
  22027. }
  22028. if (this.type === "time") {
  22029. if (this.hour === this.startHour && this.minute === this.startMinute) {
  22030. return this.startSecond;
  22031. } else {
  22032. return 0;
  22033. }
  22034. }
  22035. },
  22036. maxSecond() {
  22037. if (this.type === "datetime") {
  22038. if (this.currentDateIsEnd && this.hour === this.endHour && this.minute === this.endMinute) {
  22039. return this.endSecond;
  22040. } else {
  22041. return 59;
  22042. }
  22043. }
  22044. if (this.type === "time") {
  22045. if (this.hour === this.endHour && this.minute === this.endMinute) {
  22046. return this.endSecond;
  22047. } else {
  22048. return 59;
  22049. }
  22050. }
  22051. },
  22052. /**
  22053. * for i18n
  22054. */
  22055. selectTimeText() {
  22056. return t$1("uni-datetime-picker.selectTime");
  22057. },
  22058. okText() {
  22059. return t$1("uni-datetime-picker.ok");
  22060. },
  22061. clearText() {
  22062. return t$1("uni-datetime-picker.clear");
  22063. },
  22064. cancelText() {
  22065. return t$1("uni-datetime-picker.cancel");
  22066. }
  22067. },
  22068. mounted() {
  22069. },
  22070. methods: {
  22071. /**
  22072. * @param {Object} item
  22073. * 小于 10 在前面加个 0
  22074. */
  22075. lessThanTen(item) {
  22076. return item < 10 ? "0" + item : item;
  22077. },
  22078. /**
  22079. * 解析时分秒字符串,例如:00:00:00
  22080. * @param {String} timeString
  22081. */
  22082. parseTimeType(timeString) {
  22083. if (timeString) {
  22084. let timeArr = timeString.split(":");
  22085. this.hour = Number(timeArr[0]);
  22086. this.minute = Number(timeArr[1]);
  22087. this.second = Number(timeArr[2]);
  22088. }
  22089. },
  22090. /**
  22091. * 解析选择器初始值,类型可以是字符串、时间戳,例如:2000-10-02、'08:30:00'、 1610695109000
  22092. * @param {String | Number} datetime
  22093. */
  22094. initPickerValue(datetime) {
  22095. let defaultValue = null;
  22096. if (datetime) {
  22097. defaultValue = this.compareValueWithStartAndEnd(datetime, this.start, this.end);
  22098. } else {
  22099. defaultValue = Date.now();
  22100. defaultValue = this.compareValueWithStartAndEnd(defaultValue, this.start, this.end);
  22101. }
  22102. this.parseValue(defaultValue);
  22103. },
  22104. /**
  22105. * 初始值规则:
  22106. * - 用户设置初始值 value
  22107. * - 设置了起始时间 start、终止时间 end,并 start < value < end,初始值为 value, 否则初始值为 start
  22108. * - 只设置了起始时间 start,并 start < value,初始值为 value,否则初始值为 start
  22109. * - 只设置了终止时间 end,并 value < end,初始值为 value,否则初始值为 end
  22110. * - 无起始终止时间,则初始值为 value
  22111. * - 无初始值 value,则初始值为当前本地时间 Date.now()
  22112. * @param {Object} value
  22113. * @param {Object} dateBase
  22114. */
  22115. compareValueWithStartAndEnd(value2, start, end) {
  22116. let winner = null;
  22117. value2 = this.superTimeStamp(value2);
  22118. start = this.superTimeStamp(start);
  22119. end = this.superTimeStamp(end);
  22120. if (start && end) {
  22121. if (value2 < start) {
  22122. winner = new Date(start);
  22123. } else if (value2 > end) {
  22124. winner = new Date(end);
  22125. } else {
  22126. winner = new Date(value2);
  22127. }
  22128. } else if (start && !end) {
  22129. winner = start <= value2 ? new Date(value2) : new Date(start);
  22130. } else if (!start && end) {
  22131. winner = value2 <= end ? new Date(value2) : new Date(end);
  22132. } else {
  22133. winner = new Date(value2);
  22134. }
  22135. return winner;
  22136. },
  22137. /**
  22138. * 转换为可比较的时间戳,接受日期、时分秒、时间戳
  22139. * @param {Object} value
  22140. */
  22141. superTimeStamp(value2) {
  22142. let dateBase = "";
  22143. if (this.type === "time" && value2 && typeof value2 === "string") {
  22144. const now2 = /* @__PURE__ */ new Date();
  22145. const year = now2.getFullYear();
  22146. const month = now2.getMonth() + 1;
  22147. const day = now2.getDate();
  22148. dateBase = year + "/" + month + "/" + day + " ";
  22149. }
  22150. if (Number(value2)) {
  22151. value2 = parseInt(value2);
  22152. dateBase = 0;
  22153. }
  22154. return this.createTimeStamp(dateBase + value2);
  22155. },
  22156. /**
  22157. * 解析默认值 value,字符串、时间戳
  22158. * @param {Object} defaultTime
  22159. */
  22160. parseValue(value2) {
  22161. if (!value2) {
  22162. return;
  22163. }
  22164. if (this.type === "time" && typeof value2 === "string") {
  22165. this.parseTimeType(value2);
  22166. } else {
  22167. let defaultDate = null;
  22168. defaultDate = new Date(value2);
  22169. if (this.type !== "time") {
  22170. this.year = defaultDate.getFullYear();
  22171. this.month = defaultDate.getMonth() + 1;
  22172. this.day = defaultDate.getDate();
  22173. }
  22174. if (this.type !== "date") {
  22175. this.hour = defaultDate.getHours();
  22176. this.minute = defaultDate.getMinutes();
  22177. this.second = defaultDate.getSeconds();
  22178. }
  22179. }
  22180. if (this.hideSecond) {
  22181. this.second = 0;
  22182. }
  22183. },
  22184. /**
  22185. * 解析可选择时间范围 start、end,年月日字符串、时间戳
  22186. * @param {Object} defaultTime
  22187. */
  22188. parseDatetimeRange(point, pointType) {
  22189. if (!point) {
  22190. if (pointType === "start") {
  22191. this.startYear = 1920;
  22192. this.startMonth = 1;
  22193. this.startDay = 1;
  22194. this.startHour = 0;
  22195. this.startMinute = 0;
  22196. this.startSecond = 0;
  22197. }
  22198. if (pointType === "end") {
  22199. this.endYear = 2120;
  22200. this.endMonth = 12;
  22201. this.endDay = 31;
  22202. this.endHour = 23;
  22203. this.endMinute = 59;
  22204. this.endSecond = 59;
  22205. }
  22206. return;
  22207. }
  22208. if (this.type === "time") {
  22209. const pointArr = point.split(":");
  22210. this[pointType + "Hour"] = Number(pointArr[0]);
  22211. this[pointType + "Minute"] = Number(pointArr[1]);
  22212. this[pointType + "Second"] = Number(pointArr[2]);
  22213. } else {
  22214. if (!point) {
  22215. pointType === "start" ? this.startYear = this.year - 60 : this.endYear = this.year + 60;
  22216. return;
  22217. }
  22218. if (Number(point)) {
  22219. point = parseInt(point);
  22220. }
  22221. const hasTime = /[0-9]:[0-9]/;
  22222. if (this.type === "datetime" && pointType === "end" && typeof point === "string" && !hasTime.test(
  22223. point
  22224. )) {
  22225. point = point + " 23:59:59";
  22226. }
  22227. const pointDate = new Date(point);
  22228. this[pointType + "Year"] = pointDate.getFullYear();
  22229. this[pointType + "Month"] = pointDate.getMonth() + 1;
  22230. this[pointType + "Day"] = pointDate.getDate();
  22231. if (this.type === "datetime") {
  22232. this[pointType + "Hour"] = pointDate.getHours();
  22233. this[pointType + "Minute"] = pointDate.getMinutes();
  22234. this[pointType + "Second"] = pointDate.getSeconds();
  22235. }
  22236. }
  22237. },
  22238. // 获取 年、月、日、时、分、秒 当前可选范围
  22239. getCurrentRange(value2) {
  22240. const range2 = [];
  22241. for (let i = this["min" + this.capitalize(value2)]; i <= this["max" + this.capitalize(value2)]; i++) {
  22242. range2.push(i);
  22243. }
  22244. return range2;
  22245. },
  22246. // 字符串首字母大写
  22247. capitalize(str) {
  22248. return str.charAt(0).toUpperCase() + str.slice(1);
  22249. },
  22250. // 检查当前值是否在范围内,不在则当前值重置为可选范围第一项
  22251. checkValue(name, value2, values) {
  22252. if (values.indexOf(value2) === -1) {
  22253. this[name] = values[0];
  22254. }
  22255. },
  22256. // 每个月的实际天数
  22257. daysInMonth(year, month) {
  22258. return new Date(year, month, 0).getDate();
  22259. },
  22260. //兼容 iOS、safari 日期格式
  22261. fixIosDateFormat(value2) {
  22262. if (typeof value2 === "string") {
  22263. value2 = value2.replace(/-/g, "/");
  22264. }
  22265. return value2;
  22266. },
  22267. /**
  22268. * 生成时间戳
  22269. * @param {Object} time
  22270. */
  22271. createTimeStamp(time) {
  22272. if (!time)
  22273. return;
  22274. if (typeof time === "number") {
  22275. return time;
  22276. } else {
  22277. time = time.replace(/-/g, "/");
  22278. if (this.type === "date") {
  22279. time = time + " 00:00:00";
  22280. }
  22281. return Date.parse(time);
  22282. }
  22283. },
  22284. /**
  22285. * 生成日期或时间的字符串
  22286. */
  22287. createDomSting() {
  22288. const yymmdd = this.year + "-" + this.lessThanTen(this.month) + "-" + this.lessThanTen(this.day);
  22289. let hhmmss = this.lessThanTen(this.hour) + ":" + this.lessThanTen(this.minute);
  22290. if (!this.hideSecond) {
  22291. hhmmss = hhmmss + ":" + this.lessThanTen(this.second);
  22292. }
  22293. if (this.type === "date") {
  22294. return yymmdd;
  22295. } else if (this.type === "time") {
  22296. return hhmmss;
  22297. } else {
  22298. return yymmdd + " " + hhmmss;
  22299. }
  22300. },
  22301. /**
  22302. * 初始化返回值,并抛出 change 事件
  22303. */
  22304. initTime(emit2 = true) {
  22305. this.time = this.createDomSting();
  22306. if (!emit2)
  22307. return;
  22308. if (this.returnType === "timestamp" && this.type !== "time") {
  22309. this.$emit("change", this.createTimeStamp(this.time));
  22310. this.$emit("input", this.createTimeStamp(this.time));
  22311. this.$emit("update:modelValue", this.createTimeStamp(this.time));
  22312. } else {
  22313. this.$emit("change", this.time);
  22314. this.$emit("input", this.time);
  22315. this.$emit("update:modelValue", this.time);
  22316. }
  22317. },
  22318. /**
  22319. * 用户选择日期或时间更新 data
  22320. * @param {Object} e
  22321. */
  22322. bindDateChange(e) {
  22323. const val = e.detail.value;
  22324. this.year = this.years[val[0]];
  22325. this.month = this.months[val[1]];
  22326. this.day = this.days[val[2]];
  22327. },
  22328. bindTimeChange(e) {
  22329. const val = e.detail.value;
  22330. this.hour = this.hours[val[0]];
  22331. this.minute = this.minutes[val[1]];
  22332. this.second = this.seconds[val[2]];
  22333. },
  22334. /**
  22335. * 初始化弹出层
  22336. */
  22337. initTimePicker() {
  22338. if (this.disabled)
  22339. return;
  22340. const value2 = fixIosDateFormat(this.time);
  22341. this.initPickerValue(value2);
  22342. this.visible = !this.visible;
  22343. },
  22344. /**
  22345. * 触发或关闭弹框
  22346. */
  22347. tiggerTimePicker(e) {
  22348. this.visible = !this.visible;
  22349. },
  22350. /**
  22351. * 用户点击“清空”按钮,清空当前值
  22352. */
  22353. clearTime() {
  22354. this.time = "";
  22355. this.$emit("change", this.time);
  22356. this.$emit("input", this.time);
  22357. this.$emit("update:modelValue", this.time);
  22358. this.tiggerTimePicker();
  22359. },
  22360. /**
  22361. * 用户点击“确定”按钮
  22362. */
  22363. setTime() {
  22364. this.initTime();
  22365. this.tiggerTimePicker();
  22366. }
  22367. }
  22368. };
  22369. function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
  22370. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker" }, [
  22371. vue.createElementVNode("view", {
  22372. onClick: _cache[0] || (_cache[0] = (...args) => $options.initTimePicker && $options.initTimePicker(...args))
  22373. }, [
  22374. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  22375. vue.createElementVNode(
  22376. "view",
  22377. {
  22378. class: vue.normalizeClass(["uni-datetime-picker-timebox-pointer", { "uni-datetime-picker-disabled": $props.disabled, "uni-datetime-picker-timebox": $props.border }])
  22379. },
  22380. [
  22381. vue.createElementVNode(
  22382. "text",
  22383. { class: "uni-datetime-picker-text" },
  22384. vue.toDisplayString($data.time),
  22385. 1
  22386. /* TEXT */
  22387. ),
  22388. !$data.time ? (vue.openBlock(), vue.createElementBlock("view", {
  22389. key: 0,
  22390. class: "uni-datetime-picker-time"
  22391. }, [
  22392. vue.createElementVNode(
  22393. "text",
  22394. { class: "uni-datetime-picker-text" },
  22395. vue.toDisplayString($options.selectTimeText),
  22396. 1
  22397. /* TEXT */
  22398. )
  22399. ])) : vue.createCommentVNode("v-if", true)
  22400. ],
  22401. 2
  22402. /* CLASS */
  22403. )
  22404. ], true)
  22405. ]),
  22406. $data.visible ? (vue.openBlock(), vue.createElementBlock("view", {
  22407. key: 0,
  22408. id: "mask",
  22409. class: "uni-datetime-picker-mask",
  22410. onClick: _cache[1] || (_cache[1] = (...args) => $options.tiggerTimePicker && $options.tiggerTimePicker(...args))
  22411. })) : vue.createCommentVNode("v-if", true),
  22412. $data.visible ? (vue.openBlock(), vue.createElementBlock(
  22413. "view",
  22414. {
  22415. key: 1,
  22416. class: vue.normalizeClass(["uni-datetime-picker-popup", [$data.dateShow && $data.timeShow ? "" : "fix-nvue-height"]]),
  22417. style: vue.normalizeStyle($data.fixNvueBug)
  22418. },
  22419. [
  22420. vue.createElementVNode("view", { class: "uni-title" }, [
  22421. vue.createElementVNode(
  22422. "text",
  22423. { class: "uni-datetime-picker-text" },
  22424. vue.toDisplayString($options.selectTimeText),
  22425. 1
  22426. /* TEXT */
  22427. )
  22428. ]),
  22429. $data.dateShow ? (vue.openBlock(), vue.createElementBlock("view", {
  22430. key: 0,
  22431. class: "uni-datetime-picker__container-box"
  22432. }, [
  22433. vue.createElementVNode("picker-view", {
  22434. class: "uni-datetime-picker-view",
  22435. "indicator-style": $data.indicatorStyle,
  22436. value: $options.ymd,
  22437. onChange: _cache[2] || (_cache[2] = (...args) => $options.bindDateChange && $options.bindDateChange(...args))
  22438. }, [
  22439. vue.createElementVNode("picker-view-column", null, [
  22440. (vue.openBlock(true), vue.createElementBlock(
  22441. vue.Fragment,
  22442. null,
  22443. vue.renderList($options.years, (item, index2) => {
  22444. return vue.openBlock(), vue.createElementBlock("view", {
  22445. class: "uni-datetime-picker-item",
  22446. key: index2
  22447. }, [
  22448. vue.createElementVNode(
  22449. "text",
  22450. { class: "uni-datetime-picker-item" },
  22451. vue.toDisplayString($options.lessThanTen(item)),
  22452. 1
  22453. /* TEXT */
  22454. )
  22455. ]);
  22456. }),
  22457. 128
  22458. /* KEYED_FRAGMENT */
  22459. ))
  22460. ]),
  22461. vue.createElementVNode("picker-view-column", null, [
  22462. (vue.openBlock(true), vue.createElementBlock(
  22463. vue.Fragment,
  22464. null,
  22465. vue.renderList($options.months, (item, index2) => {
  22466. return vue.openBlock(), vue.createElementBlock("view", {
  22467. class: "uni-datetime-picker-item",
  22468. key: index2
  22469. }, [
  22470. vue.createElementVNode(
  22471. "text",
  22472. { class: "uni-datetime-picker-item" },
  22473. vue.toDisplayString($options.lessThanTen(item)),
  22474. 1
  22475. /* TEXT */
  22476. )
  22477. ]);
  22478. }),
  22479. 128
  22480. /* KEYED_FRAGMENT */
  22481. ))
  22482. ]),
  22483. vue.createElementVNode("picker-view-column", null, [
  22484. (vue.openBlock(true), vue.createElementBlock(
  22485. vue.Fragment,
  22486. null,
  22487. vue.renderList($options.days, (item, index2) => {
  22488. return vue.openBlock(), vue.createElementBlock("view", {
  22489. class: "uni-datetime-picker-item",
  22490. key: index2
  22491. }, [
  22492. vue.createElementVNode(
  22493. "text",
  22494. { class: "uni-datetime-picker-item" },
  22495. vue.toDisplayString($options.lessThanTen(item)),
  22496. 1
  22497. /* TEXT */
  22498. )
  22499. ]);
  22500. }),
  22501. 128
  22502. /* KEYED_FRAGMENT */
  22503. ))
  22504. ])
  22505. ], 40, ["indicator-style", "value"]),
  22506. vue.createCommentVNode(" 兼容 nvue 不支持伪类 "),
  22507. vue.createElementVNode("text", { class: "uni-datetime-picker-sign sign-left" }, "-"),
  22508. vue.createElementVNode("text", { class: "uni-datetime-picker-sign sign-right" }, "-")
  22509. ])) : vue.createCommentVNode("v-if", true),
  22510. $data.timeShow ? (vue.openBlock(), vue.createElementBlock("view", {
  22511. key: 1,
  22512. class: "uni-datetime-picker__container-box"
  22513. }, [
  22514. vue.createElementVNode("picker-view", {
  22515. class: vue.normalizeClass(["uni-datetime-picker-view", [$props.hideSecond ? "time-hide-second" : ""]]),
  22516. "indicator-style": $data.indicatorStyle,
  22517. value: $options.hms,
  22518. onChange: _cache[3] || (_cache[3] = (...args) => $options.bindTimeChange && $options.bindTimeChange(...args))
  22519. }, [
  22520. vue.createElementVNode("picker-view-column", null, [
  22521. (vue.openBlock(true), vue.createElementBlock(
  22522. vue.Fragment,
  22523. null,
  22524. vue.renderList($options.hours, (item, index2) => {
  22525. return vue.openBlock(), vue.createElementBlock("view", {
  22526. class: "uni-datetime-picker-item",
  22527. key: index2
  22528. }, [
  22529. vue.createElementVNode(
  22530. "text",
  22531. { class: "uni-datetime-picker-item" },
  22532. vue.toDisplayString($options.lessThanTen(item)),
  22533. 1
  22534. /* TEXT */
  22535. )
  22536. ]);
  22537. }),
  22538. 128
  22539. /* KEYED_FRAGMENT */
  22540. ))
  22541. ]),
  22542. vue.createElementVNode("picker-view-column", null, [
  22543. (vue.openBlock(true), vue.createElementBlock(
  22544. vue.Fragment,
  22545. null,
  22546. vue.renderList($options.minutes, (item, index2) => {
  22547. return vue.openBlock(), vue.createElementBlock("view", {
  22548. class: "uni-datetime-picker-item",
  22549. key: index2
  22550. }, [
  22551. vue.createElementVNode(
  22552. "text",
  22553. { class: "uni-datetime-picker-item" },
  22554. vue.toDisplayString($options.lessThanTen(item)),
  22555. 1
  22556. /* TEXT */
  22557. )
  22558. ]);
  22559. }),
  22560. 128
  22561. /* KEYED_FRAGMENT */
  22562. ))
  22563. ]),
  22564. !$props.hideSecond ? (vue.openBlock(), vue.createElementBlock("picker-view-column", { key: 0 }, [
  22565. (vue.openBlock(true), vue.createElementBlock(
  22566. vue.Fragment,
  22567. null,
  22568. vue.renderList($options.seconds, (item, index2) => {
  22569. return vue.openBlock(), vue.createElementBlock("view", {
  22570. class: "uni-datetime-picker-item",
  22571. key: index2
  22572. }, [
  22573. vue.createElementVNode(
  22574. "text",
  22575. { class: "uni-datetime-picker-item" },
  22576. vue.toDisplayString($options.lessThanTen(item)),
  22577. 1
  22578. /* TEXT */
  22579. )
  22580. ]);
  22581. }),
  22582. 128
  22583. /* KEYED_FRAGMENT */
  22584. ))
  22585. ])) : vue.createCommentVNode("v-if", true)
  22586. ], 42, ["indicator-style", "value"]),
  22587. vue.createCommentVNode(" 兼容 nvue 不支持伪类 "),
  22588. vue.createElementVNode(
  22589. "text",
  22590. {
  22591. class: vue.normalizeClass(["uni-datetime-picker-sign", [$props.hideSecond ? "sign-center" : "sign-left"]])
  22592. },
  22593. ":",
  22594. 2
  22595. /* CLASS */
  22596. ),
  22597. !$props.hideSecond ? (vue.openBlock(), vue.createElementBlock("text", {
  22598. key: 0,
  22599. class: "uni-datetime-picker-sign sign-right"
  22600. }, ":")) : vue.createCommentVNode("v-if", true)
  22601. ])) : vue.createCommentVNode("v-if", true),
  22602. vue.createElementVNode("view", { class: "uni-datetime-picker-btn" }, [
  22603. vue.createElementVNode("view", {
  22604. onClick: _cache[4] || (_cache[4] = (...args) => $options.clearTime && $options.clearTime(...args))
  22605. }, [
  22606. vue.createElementVNode(
  22607. "text",
  22608. { class: "uni-datetime-picker-btn-text" },
  22609. vue.toDisplayString($options.clearText),
  22610. 1
  22611. /* TEXT */
  22612. )
  22613. ]),
  22614. vue.createElementVNode("view", { class: "uni-datetime-picker-btn-group" }, [
  22615. vue.createElementVNode("view", {
  22616. class: "uni-datetime-picker-cancel",
  22617. onClick: _cache[5] || (_cache[5] = (...args) => $options.tiggerTimePicker && $options.tiggerTimePicker(...args))
  22618. }, [
  22619. vue.createElementVNode(
  22620. "text",
  22621. { class: "uni-datetime-picker-btn-text" },
  22622. vue.toDisplayString($options.cancelText),
  22623. 1
  22624. /* TEXT */
  22625. )
  22626. ]),
  22627. vue.createElementVNode("view", {
  22628. onClick: _cache[6] || (_cache[6] = (...args) => $options.setTime && $options.setTime(...args))
  22629. }, [
  22630. vue.createElementVNode(
  22631. "text",
  22632. { class: "uni-datetime-picker-btn-text" },
  22633. vue.toDisplayString($options.okText),
  22634. 1
  22635. /* TEXT */
  22636. )
  22637. ])
  22638. ])
  22639. ])
  22640. ],
  22641. 6
  22642. /* CLASS, STYLE */
  22643. )) : vue.createCommentVNode("v-if", true)
  22644. ]);
  22645. }
  22646. 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"]]);
  22647. const { t } = initVueI18n(i18nMessages);
  22648. const _sfc_main$R = {
  22649. components: {
  22650. calendarItem,
  22651. timePicker: TimePicker
  22652. },
  22653. props: {
  22654. date: {
  22655. type: String,
  22656. default: ""
  22657. },
  22658. defTime: {
  22659. type: [String, Object],
  22660. default: ""
  22661. },
  22662. selectableTimes: {
  22663. type: [Object],
  22664. default() {
  22665. return {};
  22666. }
  22667. },
  22668. selected: {
  22669. type: Array,
  22670. default() {
  22671. return [];
  22672. }
  22673. },
  22674. startDate: {
  22675. type: String,
  22676. default: ""
  22677. },
  22678. endDate: {
  22679. type: String,
  22680. default: ""
  22681. },
  22682. startPlaceholder: {
  22683. type: String,
  22684. default: ""
  22685. },
  22686. endPlaceholder: {
  22687. type: String,
  22688. default: ""
  22689. },
  22690. range: {
  22691. type: Boolean,
  22692. default: false
  22693. },
  22694. hasTime: {
  22695. type: Boolean,
  22696. default: false
  22697. },
  22698. insert: {
  22699. type: Boolean,
  22700. default: true
  22701. },
  22702. showMonth: {
  22703. type: Boolean,
  22704. default: true
  22705. },
  22706. clearDate: {
  22707. type: Boolean,
  22708. default: true
  22709. },
  22710. checkHover: {
  22711. type: Boolean,
  22712. default: true
  22713. },
  22714. hideSecond: {
  22715. type: [Boolean],
  22716. default: false
  22717. },
  22718. pleStatus: {
  22719. type: Object,
  22720. default() {
  22721. return {
  22722. before: "",
  22723. after: "",
  22724. data: [],
  22725. fulldate: ""
  22726. };
  22727. }
  22728. },
  22729. defaultValue: {
  22730. type: [String, Object, Array],
  22731. default: ""
  22732. }
  22733. },
  22734. data() {
  22735. return {
  22736. show: false,
  22737. weeks: [],
  22738. calendar: {},
  22739. nowDate: {},
  22740. aniMaskShow: false,
  22741. firstEnter: true,
  22742. time: "",
  22743. timeRange: {
  22744. startTime: "",
  22745. endTime: ""
  22746. },
  22747. tempSingleDate: "",
  22748. tempRange: {
  22749. before: "",
  22750. after: ""
  22751. }
  22752. };
  22753. },
  22754. watch: {
  22755. date: {
  22756. immediate: true,
  22757. handler(newVal) {
  22758. if (!this.range) {
  22759. this.tempSingleDate = newVal;
  22760. setTimeout(() => {
  22761. this.init(newVal);
  22762. }, 100);
  22763. }
  22764. }
  22765. },
  22766. defTime: {
  22767. immediate: true,
  22768. handler(newVal) {
  22769. if (!this.range) {
  22770. this.time = newVal;
  22771. } else {
  22772. this.timeRange.startTime = newVal.start;
  22773. this.timeRange.endTime = newVal.end;
  22774. }
  22775. }
  22776. },
  22777. startDate(val) {
  22778. if (!this.cale) {
  22779. return;
  22780. }
  22781. this.cale.setStartDate(val);
  22782. this.cale.setDate(this.nowDate.fullDate);
  22783. this.weeks = this.cale.weeks;
  22784. },
  22785. endDate(val) {
  22786. if (!this.cale) {
  22787. return;
  22788. }
  22789. this.cale.setEndDate(val);
  22790. this.cale.setDate(this.nowDate.fullDate);
  22791. this.weeks = this.cale.weeks;
  22792. },
  22793. selected(newVal) {
  22794. if (!this.cale) {
  22795. return;
  22796. }
  22797. this.cale.setSelectInfo(this.nowDate.fullDate, newVal);
  22798. this.weeks = this.cale.weeks;
  22799. },
  22800. pleStatus: {
  22801. immediate: true,
  22802. handler(newVal) {
  22803. const {
  22804. before,
  22805. after,
  22806. fulldate,
  22807. which
  22808. } = newVal;
  22809. this.tempRange.before = before;
  22810. this.tempRange.after = after;
  22811. setTimeout(() => {
  22812. if (fulldate) {
  22813. this.cale.setHoverMultiple(fulldate);
  22814. if (before && after) {
  22815. this.cale.lastHover = true;
  22816. if (this.rangeWithinMonth(after, before))
  22817. return;
  22818. this.setDate(before);
  22819. } else {
  22820. this.cale.setMultiple(fulldate);
  22821. this.setDate(this.nowDate.fullDate);
  22822. this.calendar.fullDate = "";
  22823. this.cale.lastHover = false;
  22824. }
  22825. } else {
  22826. if (!this.cale) {
  22827. return;
  22828. }
  22829. this.cale.setDefaultMultiple(before, after);
  22830. if (which === "left" && before) {
  22831. this.setDate(before);
  22832. this.weeks = this.cale.weeks;
  22833. } else if (after) {
  22834. this.setDate(after);
  22835. this.weeks = this.cale.weeks;
  22836. }
  22837. this.cale.lastHover = true;
  22838. }
  22839. }, 16);
  22840. }
  22841. }
  22842. },
  22843. computed: {
  22844. timepickerStartTime() {
  22845. const activeDate = this.range ? this.tempRange.before : this.calendar.fullDate;
  22846. return activeDate === this.startDate ? this.selectableTimes.start : "";
  22847. },
  22848. timepickerEndTime() {
  22849. const activeDate = this.range ? this.tempRange.after : this.calendar.fullDate;
  22850. return activeDate === this.endDate ? this.selectableTimes.end : "";
  22851. },
  22852. /**
  22853. * for i18n
  22854. */
  22855. selectDateText() {
  22856. return t("uni-datetime-picker.selectDate");
  22857. },
  22858. startDateText() {
  22859. return this.startPlaceholder || t("uni-datetime-picker.startDate");
  22860. },
  22861. endDateText() {
  22862. return this.endPlaceholder || t("uni-datetime-picker.endDate");
  22863. },
  22864. okText() {
  22865. return t("uni-datetime-picker.ok");
  22866. },
  22867. yearText() {
  22868. return t("uni-datetime-picker.year");
  22869. },
  22870. monthText() {
  22871. return t("uni-datetime-picker.month");
  22872. },
  22873. MONText() {
  22874. return t("uni-calender.MON");
  22875. },
  22876. TUEText() {
  22877. return t("uni-calender.TUE");
  22878. },
  22879. WEDText() {
  22880. return t("uni-calender.WED");
  22881. },
  22882. THUText() {
  22883. return t("uni-calender.THU");
  22884. },
  22885. FRIText() {
  22886. return t("uni-calender.FRI");
  22887. },
  22888. SATText() {
  22889. return t("uni-calender.SAT");
  22890. },
  22891. SUNText() {
  22892. return t("uni-calender.SUN");
  22893. },
  22894. confirmText() {
  22895. return t("uni-calender.confirm");
  22896. }
  22897. },
  22898. created() {
  22899. this.cale = new Calendar$1({
  22900. selected: this.selected,
  22901. startDate: this.startDate,
  22902. endDate: this.endDate,
  22903. range: this.range
  22904. });
  22905. this.init(this.date);
  22906. },
  22907. methods: {
  22908. leaveCale() {
  22909. this.firstEnter = true;
  22910. },
  22911. handleMouse(weeks) {
  22912. if (weeks.disable)
  22913. return;
  22914. if (this.cale.lastHover)
  22915. return;
  22916. let {
  22917. before,
  22918. after
  22919. } = this.cale.multipleStatus;
  22920. if (!before)
  22921. return;
  22922. this.calendar = weeks;
  22923. this.cale.setHoverMultiple(this.calendar.fullDate);
  22924. this.weeks = this.cale.weeks;
  22925. if (this.firstEnter) {
  22926. this.$emit("firstEnterCale", this.cale.multipleStatus);
  22927. this.firstEnter = false;
  22928. }
  22929. },
  22930. rangeWithinMonth(A, B) {
  22931. const [yearA, monthA] = A.split("-");
  22932. const [yearB, monthB] = B.split("-");
  22933. return yearA === yearB && monthA === monthB;
  22934. },
  22935. // 蒙版点击事件
  22936. maskClick() {
  22937. this.close();
  22938. this.$emit("maskClose");
  22939. },
  22940. clearCalender() {
  22941. if (this.range) {
  22942. this.timeRange.startTime = "";
  22943. this.timeRange.endTime = "";
  22944. this.tempRange.before = "";
  22945. this.tempRange.after = "";
  22946. this.cale.multipleStatus.before = "";
  22947. this.cale.multipleStatus.after = "";
  22948. this.cale.multipleStatus.data = [];
  22949. this.cale.lastHover = false;
  22950. } else {
  22951. this.time = "";
  22952. this.tempSingleDate = "";
  22953. }
  22954. this.calendar.fullDate = "";
  22955. this.setDate(/* @__PURE__ */ new Date());
  22956. },
  22957. bindDateChange(e) {
  22958. const value2 = e.detail.value + "-1";
  22959. this.setDate(value2);
  22960. },
  22961. /**
  22962. * 初始化日期显示
  22963. * @param {Object} date
  22964. */
  22965. init(date3) {
  22966. if (!this.cale) {
  22967. return;
  22968. }
  22969. this.cale.setDate(date3 || /* @__PURE__ */ new Date());
  22970. this.weeks = this.cale.weeks;
  22971. this.nowDate = this.cale.getInfo(date3);
  22972. this.calendar = { ...this.nowDate };
  22973. if (!date3) {
  22974. this.calendar.fullDate = "";
  22975. if (this.defaultValue && !this.range) {
  22976. const defaultDate = new Date(this.defaultValue);
  22977. const fullDate = getDate(defaultDate);
  22978. const year = defaultDate.getFullYear();
  22979. const month = defaultDate.getMonth() + 1;
  22980. const date4 = defaultDate.getDate();
  22981. const day = defaultDate.getDay();
  22982. this.calendar = {
  22983. fullDate,
  22984. year,
  22985. month,
  22986. date: date4,
  22987. day
  22988. }, this.tempSingleDate = fullDate;
  22989. this.time = getTime(defaultDate, this.hideSecond);
  22990. }
  22991. }
  22992. },
  22993. /**
  22994. * 打开日历弹窗
  22995. */
  22996. open() {
  22997. if (this.clearDate && !this.insert) {
  22998. this.cale.cleanMultipleStatus();
  22999. this.init(this.date);
  23000. }
  23001. this.show = true;
  23002. this.$nextTick(() => {
  23003. setTimeout(() => {
  23004. this.aniMaskShow = true;
  23005. }, 50);
  23006. });
  23007. },
  23008. /**
  23009. * 关闭日历弹窗
  23010. */
  23011. close() {
  23012. this.aniMaskShow = false;
  23013. this.$nextTick(() => {
  23014. setTimeout(() => {
  23015. this.show = false;
  23016. this.$emit("close");
  23017. }, 300);
  23018. });
  23019. },
  23020. /**
  23021. * 确认按钮
  23022. */
  23023. confirm() {
  23024. this.setEmit("confirm");
  23025. this.close();
  23026. },
  23027. /**
  23028. * 变化触发
  23029. */
  23030. change() {
  23031. if (!this.insert)
  23032. return;
  23033. this.setEmit("change");
  23034. },
  23035. /**
  23036. * 选择月份触发
  23037. */
  23038. monthSwitch() {
  23039. let {
  23040. year,
  23041. month
  23042. } = this.nowDate;
  23043. this.$emit("monthSwitch", {
  23044. year,
  23045. month: Number(month)
  23046. });
  23047. },
  23048. /**
  23049. * 派发事件
  23050. * @param {Object} name
  23051. */
  23052. setEmit(name) {
  23053. if (!this.range) {
  23054. if (!this.calendar.fullDate) {
  23055. this.calendar = this.cale.getInfo(/* @__PURE__ */ new Date());
  23056. this.tempSingleDate = this.calendar.fullDate;
  23057. }
  23058. if (this.hasTime && !this.time) {
  23059. this.time = getTime(/* @__PURE__ */ new Date(), this.hideSecond);
  23060. }
  23061. }
  23062. let {
  23063. year,
  23064. month,
  23065. date: date3,
  23066. fullDate,
  23067. extraInfo
  23068. } = this.calendar;
  23069. this.$emit(name, {
  23070. range: this.cale.multipleStatus,
  23071. year,
  23072. month,
  23073. date: date3,
  23074. time: this.time,
  23075. timeRange: this.timeRange,
  23076. fulldate: fullDate,
  23077. extraInfo: extraInfo || {}
  23078. });
  23079. },
  23080. /**
  23081. * 选择天触发
  23082. * @param {Object} weeks
  23083. */
  23084. choiceDate(weeks) {
  23085. if (weeks.disable)
  23086. return;
  23087. this.calendar = weeks;
  23088. this.calendar.userChecked = true;
  23089. this.cale.setMultiple(this.calendar.fullDate, true);
  23090. this.weeks = this.cale.weeks;
  23091. this.tempSingleDate = this.calendar.fullDate;
  23092. const beforeDate = new Date(this.cale.multipleStatus.before).getTime();
  23093. const afterDate = new Date(this.cale.multipleStatus.after).getTime();
  23094. if (beforeDate > afterDate && afterDate) {
  23095. this.tempRange.before = this.cale.multipleStatus.after;
  23096. this.tempRange.after = this.cale.multipleStatus.before;
  23097. } else {
  23098. this.tempRange.before = this.cale.multipleStatus.before;
  23099. this.tempRange.after = this.cale.multipleStatus.after;
  23100. }
  23101. this.change();
  23102. },
  23103. changeMonth(type2) {
  23104. let newDate;
  23105. if (type2 === "pre") {
  23106. newDate = this.cale.getPreMonthObj(this.nowDate.fullDate).fullDate;
  23107. } else if (type2 === "next") {
  23108. newDate = this.cale.getNextMonthObj(this.nowDate.fullDate).fullDate;
  23109. }
  23110. this.setDate(newDate);
  23111. this.monthSwitch();
  23112. },
  23113. /**
  23114. * 设置日期
  23115. * @param {Object} date
  23116. */
  23117. setDate(date3) {
  23118. this.cale.setDate(date3);
  23119. this.weeks = this.cale.weeks;
  23120. this.nowDate = this.cale.getInfo(date3);
  23121. }
  23122. }
  23123. };
  23124. function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
  23125. const _component_calendar_item = vue.resolveComponent("calendar-item");
  23126. const _component_time_picker = vue.resolveComponent("time-picker");
  23127. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$3);
  23128. return vue.openBlock(), vue.createElementBlock(
  23129. "view",
  23130. {
  23131. class: "uni-calendar",
  23132. onMouseleave: _cache[9] || (_cache[9] = (...args) => $options.leaveCale && $options.leaveCale(...args))
  23133. },
  23134. [
  23135. !$props.insert && $data.show ? (vue.openBlock(), vue.createElementBlock(
  23136. "view",
  23137. {
  23138. key: 0,
  23139. class: vue.normalizeClass(["uni-calendar__mask", { "uni-calendar--mask-show": $data.aniMaskShow }]),
  23140. onClick: _cache[0] || (_cache[0] = (...args) => $options.maskClick && $options.maskClick(...args))
  23141. },
  23142. null,
  23143. 2
  23144. /* CLASS */
  23145. )) : vue.createCommentVNode("v-if", true),
  23146. $props.insert || $data.show ? (vue.openBlock(), vue.createElementBlock(
  23147. "view",
  23148. {
  23149. key: 1,
  23150. class: vue.normalizeClass(["uni-calendar__content", { "uni-calendar--fixed": !$props.insert, "uni-calendar--ani-show": $data.aniMaskShow, "uni-calendar__content-mobile": $data.aniMaskShow }])
  23151. },
  23152. [
  23153. vue.createElementVNode(
  23154. "view",
  23155. {
  23156. class: vue.normalizeClass(["uni-calendar__header", { "uni-calendar__header-mobile": !$props.insert }])
  23157. },
  23158. [
  23159. vue.createElementVNode("view", {
  23160. class: "uni-calendar__header-btn-box",
  23161. onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.changeMonth("pre"), ["stop"]))
  23162. }, [
  23163. vue.createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--left" })
  23164. ]),
  23165. vue.createElementVNode("picker", {
  23166. mode: "date",
  23167. value: $props.date,
  23168. fields: "month",
  23169. onChange: _cache[2] || (_cache[2] = (...args) => $options.bindDateChange && $options.bindDateChange(...args))
  23170. }, [
  23171. vue.createElementVNode(
  23172. "text",
  23173. { class: "uni-calendar__header-text" },
  23174. vue.toDisplayString(($data.nowDate.year || "") + $options.yearText + ($data.nowDate.month || "") + $options.monthText),
  23175. 1
  23176. /* TEXT */
  23177. )
  23178. ], 40, ["value"]),
  23179. vue.createElementVNode("view", {
  23180. class: "uni-calendar__header-btn-box",
  23181. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.changeMonth("next"), ["stop"]))
  23182. }, [
  23183. vue.createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--right" })
  23184. ]),
  23185. !$props.insert ? (vue.openBlock(), vue.createElementBlock("view", {
  23186. key: 0,
  23187. class: "dialog-close",
  23188. onClick: _cache[4] || (_cache[4] = (...args) => $options.close && $options.close(...args))
  23189. }, [
  23190. vue.createElementVNode("view", {
  23191. class: "dialog-close-plus",
  23192. "data-id": "close"
  23193. }),
  23194. vue.createElementVNode("view", {
  23195. class: "dialog-close-plus dialog-close-rotate",
  23196. "data-id": "close"
  23197. })
  23198. ])) : vue.createCommentVNode("v-if", true)
  23199. ],
  23200. 2
  23201. /* CLASS */
  23202. ),
  23203. vue.createElementVNode("view", { class: "uni-calendar__box" }, [
  23204. $props.showMonth ? (vue.openBlock(), vue.createElementBlock("view", {
  23205. key: 0,
  23206. class: "uni-calendar__box-bg"
  23207. }, [
  23208. vue.createElementVNode(
  23209. "text",
  23210. { class: "uni-calendar__box-bg-text" },
  23211. vue.toDisplayString($data.nowDate.month),
  23212. 1
  23213. /* TEXT */
  23214. )
  23215. ])) : vue.createCommentVNode("v-if", true),
  23216. vue.createElementVNode("view", {
  23217. class: "uni-calendar__weeks",
  23218. style: { "padding-bottom": "7px" }
  23219. }, [
  23220. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23221. vue.createElementVNode(
  23222. "text",
  23223. { class: "uni-calendar__weeks-day-text" },
  23224. vue.toDisplayString($options.SUNText),
  23225. 1
  23226. /* TEXT */
  23227. )
  23228. ]),
  23229. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23230. vue.createElementVNode(
  23231. "text",
  23232. { class: "uni-calendar__weeks-day-text" },
  23233. vue.toDisplayString($options.MONText),
  23234. 1
  23235. /* TEXT */
  23236. )
  23237. ]),
  23238. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23239. vue.createElementVNode(
  23240. "text",
  23241. { class: "uni-calendar__weeks-day-text" },
  23242. vue.toDisplayString($options.TUEText),
  23243. 1
  23244. /* TEXT */
  23245. )
  23246. ]),
  23247. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23248. vue.createElementVNode(
  23249. "text",
  23250. { class: "uni-calendar__weeks-day-text" },
  23251. vue.toDisplayString($options.WEDText),
  23252. 1
  23253. /* TEXT */
  23254. )
  23255. ]),
  23256. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23257. vue.createElementVNode(
  23258. "text",
  23259. { class: "uni-calendar__weeks-day-text" },
  23260. vue.toDisplayString($options.THUText),
  23261. 1
  23262. /* TEXT */
  23263. )
  23264. ]),
  23265. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23266. vue.createElementVNode(
  23267. "text",
  23268. { class: "uni-calendar__weeks-day-text" },
  23269. vue.toDisplayString($options.FRIText),
  23270. 1
  23271. /* TEXT */
  23272. )
  23273. ]),
  23274. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  23275. vue.createElementVNode(
  23276. "text",
  23277. { class: "uni-calendar__weeks-day-text" },
  23278. vue.toDisplayString($options.SATText),
  23279. 1
  23280. /* TEXT */
  23281. )
  23282. ])
  23283. ]),
  23284. (vue.openBlock(true), vue.createElementBlock(
  23285. vue.Fragment,
  23286. null,
  23287. vue.renderList($data.weeks, (item, weekIndex) => {
  23288. return vue.openBlock(), vue.createElementBlock("view", {
  23289. class: "uni-calendar__weeks",
  23290. key: weekIndex
  23291. }, [
  23292. (vue.openBlock(true), vue.createElementBlock(
  23293. vue.Fragment,
  23294. null,
  23295. vue.renderList(item, (weeks, weeksIndex) => {
  23296. return vue.openBlock(), vue.createElementBlock("view", {
  23297. class: "uni-calendar__weeks-item",
  23298. key: weeksIndex
  23299. }, [
  23300. vue.createVNode(_component_calendar_item, {
  23301. class: "uni-calendar-item--hook",
  23302. weeks,
  23303. calendar: $data.calendar,
  23304. selected: $props.selected,
  23305. checkHover: $props.range,
  23306. onChange: $options.choiceDate,
  23307. onHandleMouse: $options.handleMouse
  23308. }, null, 8, ["weeks", "calendar", "selected", "checkHover", "onChange", "onHandleMouse"])
  23309. ]);
  23310. }),
  23311. 128
  23312. /* KEYED_FRAGMENT */
  23313. ))
  23314. ]);
  23315. }),
  23316. 128
  23317. /* KEYED_FRAGMENT */
  23318. ))
  23319. ]),
  23320. !$props.insert && !$props.range && $props.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  23321. key: 0,
  23322. class: "uni-date-changed uni-calendar--fixed-top",
  23323. style: { "padding": "0 80px" }
  23324. }, [
  23325. vue.createElementVNode(
  23326. "view",
  23327. { class: "uni-date-changed--time-date" },
  23328. vue.toDisplayString($data.tempSingleDate ? $data.tempSingleDate : $options.selectDateText),
  23329. 1
  23330. /* TEXT */
  23331. ),
  23332. vue.createVNode(_component_time_picker, {
  23333. type: "time",
  23334. start: $options.timepickerStartTime,
  23335. end: $options.timepickerEndTime,
  23336. modelValue: $data.time,
  23337. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.time = $event),
  23338. disabled: !$data.tempSingleDate,
  23339. border: false,
  23340. "hide-second": $props.hideSecond,
  23341. class: "time-picker-style"
  23342. }, null, 8, ["start", "end", "modelValue", "disabled", "hide-second"])
  23343. ])) : vue.createCommentVNode("v-if", true),
  23344. !$props.insert && $props.range && $props.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  23345. key: 1,
  23346. class: "uni-date-changed uni-calendar--fixed-top"
  23347. }, [
  23348. vue.createElementVNode("view", { class: "uni-date-changed--time-start" }, [
  23349. vue.createElementVNode(
  23350. "view",
  23351. { class: "uni-date-changed--time-date" },
  23352. vue.toDisplayString($data.tempRange.before ? $data.tempRange.before : $options.startDateText),
  23353. 1
  23354. /* TEXT */
  23355. ),
  23356. vue.createVNode(_component_time_picker, {
  23357. type: "time",
  23358. start: $options.timepickerStartTime,
  23359. modelValue: $data.timeRange.startTime,
  23360. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.timeRange.startTime = $event),
  23361. border: false,
  23362. "hide-second": $props.hideSecond,
  23363. disabled: !$data.tempRange.before,
  23364. class: "time-picker-style"
  23365. }, null, 8, ["start", "modelValue", "hide-second", "disabled"])
  23366. ]),
  23367. vue.createElementVNode("view", { style: { "line-height": "50px" } }, [
  23368. vue.createVNode(_component_uni_icons, {
  23369. type: "arrowthinright",
  23370. color: "#999"
  23371. })
  23372. ]),
  23373. vue.createElementVNode("view", { class: "uni-date-changed--time-end" }, [
  23374. vue.createElementVNode(
  23375. "view",
  23376. { class: "uni-date-changed--time-date" },
  23377. vue.toDisplayString($data.tempRange.after ? $data.tempRange.after : $options.endDateText),
  23378. 1
  23379. /* TEXT */
  23380. ),
  23381. vue.createVNode(_component_time_picker, {
  23382. type: "time",
  23383. end: $options.timepickerEndTime,
  23384. modelValue: $data.timeRange.endTime,
  23385. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.timeRange.endTime = $event),
  23386. border: false,
  23387. "hide-second": $props.hideSecond,
  23388. disabled: !$data.tempRange.after,
  23389. class: "time-picker-style"
  23390. }, null, 8, ["end", "modelValue", "hide-second", "disabled"])
  23391. ])
  23392. ])) : vue.createCommentVNode("v-if", true),
  23393. !$props.insert ? (vue.openBlock(), vue.createElementBlock("view", {
  23394. key: 2,
  23395. class: "uni-date-changed uni-date-btn--ok"
  23396. }, [
  23397. vue.createElementVNode(
  23398. "view",
  23399. {
  23400. class: "uni-datetime-picker--btn",
  23401. onClick: _cache[8] || (_cache[8] = (...args) => $options.confirm && $options.confirm(...args))
  23402. },
  23403. vue.toDisplayString($options.confirmText),
  23404. 1
  23405. /* TEXT */
  23406. )
  23407. ])) : vue.createCommentVNode("v-if", true)
  23408. ],
  23409. 2
  23410. /* CLASS */
  23411. )) : vue.createCommentVNode("v-if", true)
  23412. ],
  23413. 32
  23414. /* NEED_HYDRATION */
  23415. );
  23416. }
  23417. 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"]]);
  23418. const _sfc_main$Q = {
  23419. name: "UniDatetimePicker",
  23420. options: {
  23421. virtualHost: true
  23422. },
  23423. components: {
  23424. Calendar,
  23425. TimePicker
  23426. },
  23427. data() {
  23428. return {
  23429. isRange: false,
  23430. hasTime: false,
  23431. displayValue: "",
  23432. inputDate: "",
  23433. calendarDate: "",
  23434. pickerTime: "",
  23435. calendarRange: {
  23436. startDate: "",
  23437. startTime: "",
  23438. endDate: "",
  23439. endTime: ""
  23440. },
  23441. displayRangeValue: {
  23442. startDate: "",
  23443. endDate: ""
  23444. },
  23445. tempRange: {
  23446. startDate: "",
  23447. startTime: "",
  23448. endDate: "",
  23449. endTime: ""
  23450. },
  23451. // 左右日历同步数据
  23452. startMultipleStatus: {
  23453. before: "",
  23454. after: "",
  23455. data: [],
  23456. fulldate: ""
  23457. },
  23458. endMultipleStatus: {
  23459. before: "",
  23460. after: "",
  23461. data: [],
  23462. fulldate: ""
  23463. },
  23464. pickerVisible: false,
  23465. pickerPositionStyle: null,
  23466. isEmitValue: false,
  23467. isPhone: false,
  23468. isFirstShow: true,
  23469. i18nT: () => {
  23470. }
  23471. };
  23472. },
  23473. props: {
  23474. type: {
  23475. type: String,
  23476. default: "datetime"
  23477. },
  23478. value: {
  23479. type: [String, Number, Array, Date],
  23480. default: ""
  23481. },
  23482. modelValue: {
  23483. type: [String, Number, Array, Date],
  23484. default: ""
  23485. },
  23486. start: {
  23487. type: [Number, String],
  23488. default: ""
  23489. },
  23490. end: {
  23491. type: [Number, String],
  23492. default: ""
  23493. },
  23494. returnType: {
  23495. type: String,
  23496. default: "string"
  23497. },
  23498. placeholder: {
  23499. type: String,
  23500. default: ""
  23501. },
  23502. startPlaceholder: {
  23503. type: String,
  23504. default: ""
  23505. },
  23506. endPlaceholder: {
  23507. type: String,
  23508. default: ""
  23509. },
  23510. rangeSeparator: {
  23511. type: String,
  23512. default: "-"
  23513. },
  23514. border: {
  23515. type: [Boolean],
  23516. default: true
  23517. },
  23518. disabled: {
  23519. type: [Boolean],
  23520. default: false
  23521. },
  23522. clearIcon: {
  23523. type: [Boolean],
  23524. default: true
  23525. },
  23526. hideSecond: {
  23527. type: [Boolean],
  23528. default: false
  23529. },
  23530. defaultValue: {
  23531. type: [String, Object, Array],
  23532. default: ""
  23533. }
  23534. },
  23535. watch: {
  23536. type: {
  23537. immediate: true,
  23538. handler(newVal) {
  23539. this.hasTime = newVal.indexOf("time") !== -1;
  23540. this.isRange = newVal.indexOf("range") !== -1;
  23541. }
  23542. },
  23543. modelValue: {
  23544. immediate: true,
  23545. handler(newVal) {
  23546. if (this.isEmitValue) {
  23547. this.isEmitValue = false;
  23548. return;
  23549. }
  23550. this.initPicker(newVal);
  23551. }
  23552. },
  23553. start: {
  23554. immediate: true,
  23555. handler(newVal) {
  23556. if (!newVal)
  23557. return;
  23558. this.calendarRange.startDate = getDate(newVal);
  23559. if (this.hasTime) {
  23560. this.calendarRange.startTime = getTime(newVal);
  23561. }
  23562. }
  23563. },
  23564. end: {
  23565. immediate: true,
  23566. handler(newVal) {
  23567. if (!newVal)
  23568. return;
  23569. this.calendarRange.endDate = getDate(newVal);
  23570. if (this.hasTime) {
  23571. this.calendarRange.endTime = getTime(newVal, this.hideSecond);
  23572. }
  23573. }
  23574. }
  23575. },
  23576. computed: {
  23577. timepickerStartTime() {
  23578. const activeDate = this.isRange ? this.tempRange.startDate : this.inputDate;
  23579. return activeDate === this.calendarRange.startDate ? this.calendarRange.startTime : "";
  23580. },
  23581. timepickerEndTime() {
  23582. const activeDate = this.isRange ? this.tempRange.endDate : this.inputDate;
  23583. return activeDate === this.calendarRange.endDate ? this.calendarRange.endTime : "";
  23584. },
  23585. mobileCalendarTime() {
  23586. const timeRange = {
  23587. start: this.tempRange.startTime,
  23588. end: this.tempRange.endTime
  23589. };
  23590. return this.isRange ? timeRange : this.pickerTime;
  23591. },
  23592. mobSelectableTime() {
  23593. return {
  23594. start: this.calendarRange.startTime,
  23595. end: this.calendarRange.endTime
  23596. };
  23597. },
  23598. datePopupWidth() {
  23599. return this.isRange ? 653 : 301;
  23600. },
  23601. /**
  23602. * for i18n
  23603. */
  23604. singlePlaceholderText() {
  23605. return this.placeholder || (this.type === "date" ? this.selectDateText : this.selectDateTimeText);
  23606. },
  23607. startPlaceholderText() {
  23608. return this.startPlaceholder || this.startDateText;
  23609. },
  23610. endPlaceholderText() {
  23611. return this.endPlaceholder || this.endDateText;
  23612. },
  23613. selectDateText() {
  23614. return this.i18nT("uni-datetime-picker.selectDate");
  23615. },
  23616. selectDateTimeText() {
  23617. return this.i18nT("uni-datetime-picker.selectDateTime");
  23618. },
  23619. selectTimeText() {
  23620. return this.i18nT("uni-datetime-picker.selectTime");
  23621. },
  23622. startDateText() {
  23623. return this.startPlaceholder || this.i18nT("uni-datetime-picker.startDate");
  23624. },
  23625. startTimeText() {
  23626. return this.i18nT("uni-datetime-picker.startTime");
  23627. },
  23628. endDateText() {
  23629. return this.endPlaceholder || this.i18nT("uni-datetime-picker.endDate");
  23630. },
  23631. endTimeText() {
  23632. return this.i18nT("uni-datetime-picker.endTime");
  23633. },
  23634. okText() {
  23635. return this.i18nT("uni-datetime-picker.ok");
  23636. },
  23637. clearText() {
  23638. return this.i18nT("uni-datetime-picker.clear");
  23639. },
  23640. showClearIcon() {
  23641. return this.clearIcon && !this.disabled && (this.displayValue || this.displayRangeValue.startDate && this.displayRangeValue.endDate);
  23642. }
  23643. },
  23644. created() {
  23645. this.initI18nT();
  23646. this.platform();
  23647. },
  23648. methods: {
  23649. initI18nT() {
  23650. const vueI18n = initVueI18n(i18nMessages);
  23651. this.i18nT = vueI18n.t;
  23652. },
  23653. initPicker(newVal) {
  23654. if (!newVal && !this.defaultValue || Array.isArray(newVal) && !newVal.length) {
  23655. this.$nextTick(() => {
  23656. this.clear(false);
  23657. });
  23658. return;
  23659. }
  23660. if (!Array.isArray(newVal) && !this.isRange) {
  23661. if (newVal) {
  23662. this.displayValue = this.inputDate = this.calendarDate = getDate(newVal);
  23663. if (this.hasTime) {
  23664. this.pickerTime = getTime(newVal, this.hideSecond);
  23665. this.displayValue = `${this.displayValue} ${this.pickerTime}`;
  23666. }
  23667. } else if (this.defaultValue) {
  23668. this.inputDate = this.calendarDate = getDate(this.defaultValue);
  23669. if (this.hasTime) {
  23670. this.pickerTime = getTime(this.defaultValue, this.hideSecond);
  23671. }
  23672. }
  23673. } else {
  23674. const [before, after] = newVal;
  23675. if (!before && !after)
  23676. return;
  23677. const beforeDate = getDate(before);
  23678. const beforeTime = getTime(before, this.hideSecond);
  23679. const afterDate = getDate(after);
  23680. const afterTime = getTime(after, this.hideSecond);
  23681. const startDate = beforeDate;
  23682. const endDate = afterDate;
  23683. this.displayRangeValue.startDate = this.tempRange.startDate = startDate;
  23684. this.displayRangeValue.endDate = this.tempRange.endDate = endDate;
  23685. if (this.hasTime) {
  23686. this.displayRangeValue.startDate = `${beforeDate} ${beforeTime}`;
  23687. this.displayRangeValue.endDate = `${afterDate} ${afterTime}`;
  23688. this.tempRange.startTime = beforeTime;
  23689. this.tempRange.endTime = afterTime;
  23690. }
  23691. const defaultRange = {
  23692. before: beforeDate,
  23693. after: afterDate
  23694. };
  23695. this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, defaultRange, {
  23696. which: "right"
  23697. });
  23698. this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, defaultRange, {
  23699. which: "left"
  23700. });
  23701. }
  23702. },
  23703. updateLeftCale(e) {
  23704. const left = this.$refs.left;
  23705. left.cale.setHoverMultiple(e.after);
  23706. left.setDate(this.$refs.left.nowDate.fullDate);
  23707. },
  23708. updateRightCale(e) {
  23709. const right = this.$refs.right;
  23710. right.cale.setHoverMultiple(e.after);
  23711. right.setDate(this.$refs.right.nowDate.fullDate);
  23712. },
  23713. platform() {
  23714. if (typeof navigator !== "undefined") {
  23715. this.isPhone = navigator.userAgent.toLowerCase().indexOf("mobile") !== -1;
  23716. return;
  23717. }
  23718. const { windowWidth } = uni.getSystemInfoSync();
  23719. this.isPhone = windowWidth <= 500;
  23720. this.windowWidth = windowWidth;
  23721. },
  23722. show() {
  23723. if (this.disabled) {
  23724. return;
  23725. }
  23726. this.platform();
  23727. if (this.isPhone) {
  23728. setTimeout(() => {
  23729. this.$refs.mobile.open();
  23730. }, 0);
  23731. return;
  23732. }
  23733. this.pickerPositionStyle = {
  23734. top: "10px"
  23735. };
  23736. const dateEditor = uni.createSelectorQuery().in(this).select(".uni-date-editor");
  23737. dateEditor.boundingClientRect((rect) => {
  23738. if (this.windowWidth - rect.left < this.datePopupWidth) {
  23739. this.pickerPositionStyle.right = 0;
  23740. }
  23741. }).exec();
  23742. setTimeout(() => {
  23743. this.pickerVisible = !this.pickerVisible;
  23744. if (!this.isPhone && this.isRange && this.isFirstShow) {
  23745. this.isFirstShow = false;
  23746. const {
  23747. startDate,
  23748. endDate
  23749. } = this.calendarRange;
  23750. if (startDate && endDate) {
  23751. if (this.diffDate(startDate, endDate) < 30) {
  23752. this.$refs.right.changeMonth("pre");
  23753. }
  23754. } else {
  23755. this.$refs.right.changeMonth("next");
  23756. this.$refs.right.cale.lastHover = false;
  23757. }
  23758. }
  23759. }, 50);
  23760. },
  23761. close() {
  23762. setTimeout(() => {
  23763. this.pickerVisible = false;
  23764. this.$emit("maskClick", this.value);
  23765. this.$refs.mobile && this.$refs.mobile.close();
  23766. }, 20);
  23767. },
  23768. setEmit(value2) {
  23769. if (this.returnType === "timestamp" || this.returnType === "date") {
  23770. if (!Array.isArray(value2)) {
  23771. if (!this.hasTime) {
  23772. value2 = value2 + " 00:00:00";
  23773. }
  23774. value2 = this.createTimestamp(value2);
  23775. if (this.returnType === "date") {
  23776. value2 = new Date(value2);
  23777. }
  23778. } else {
  23779. if (!this.hasTime) {
  23780. value2[0] = value2[0] + " 00:00:00";
  23781. value2[1] = value2[1] + " 00:00:00";
  23782. }
  23783. value2[0] = this.createTimestamp(value2[0]);
  23784. value2[1] = this.createTimestamp(value2[1]);
  23785. if (this.returnType === "date") {
  23786. value2[0] = new Date(value2[0]);
  23787. value2[1] = new Date(value2[1]);
  23788. }
  23789. }
  23790. }
  23791. this.$emit("update:modelValue", value2);
  23792. this.$emit("input", value2);
  23793. this.$emit("change", value2);
  23794. this.isEmitValue = true;
  23795. },
  23796. createTimestamp(date3) {
  23797. date3 = fixIosDateFormat(date3);
  23798. return Date.parse(new Date(date3));
  23799. },
  23800. singleChange(e) {
  23801. this.calendarDate = this.inputDate = e.fulldate;
  23802. if (this.hasTime)
  23803. return;
  23804. this.confirmSingleChange();
  23805. },
  23806. confirmSingleChange() {
  23807. if (!checkDate(this.inputDate)) {
  23808. const now2 = /* @__PURE__ */ new Date();
  23809. this.calendarDate = this.inputDate = getDate(now2);
  23810. this.pickerTime = getTime(now2, this.hideSecond);
  23811. }
  23812. let startLaterInputDate = false;
  23813. let startDate, startTime;
  23814. if (this.start) {
  23815. let startString = this.start;
  23816. if (typeof this.start === "number") {
  23817. startString = getDateTime(this.start, this.hideSecond);
  23818. }
  23819. [startDate, startTime] = startString.split(" ");
  23820. if (this.start && !dateCompare(startDate, this.inputDate)) {
  23821. startLaterInputDate = true;
  23822. this.inputDate = startDate;
  23823. }
  23824. }
  23825. let endEarlierInputDate = false;
  23826. let endDate, endTime;
  23827. if (this.end) {
  23828. let endString = this.end;
  23829. if (typeof this.end === "number") {
  23830. endString = getDateTime(this.end, this.hideSecond);
  23831. }
  23832. [endDate, endTime] = endString.split(" ");
  23833. if (this.end && !dateCompare(this.inputDate, endDate)) {
  23834. endEarlierInputDate = true;
  23835. this.inputDate = endDate;
  23836. }
  23837. }
  23838. if (this.hasTime) {
  23839. if (startLaterInputDate) {
  23840. this.pickerTime = startTime || getDefaultSecond(this.hideSecond);
  23841. }
  23842. if (endEarlierInputDate) {
  23843. this.pickerTime = endTime || getDefaultSecond(this.hideSecond);
  23844. }
  23845. if (!this.pickerTime) {
  23846. this.pickerTime = getTime(Date.now(), this.hideSecond);
  23847. }
  23848. this.displayValue = `${this.inputDate} ${this.pickerTime}`;
  23849. } else {
  23850. this.displayValue = this.inputDate;
  23851. }
  23852. this.setEmit(this.displayValue);
  23853. this.pickerVisible = false;
  23854. },
  23855. leftChange(e) {
  23856. const {
  23857. before,
  23858. after
  23859. } = e.range;
  23860. this.rangeChange(before, after);
  23861. const obj = {
  23862. before: e.range.before,
  23863. after: e.range.after,
  23864. data: e.range.data,
  23865. fulldate: e.fulldate
  23866. };
  23867. this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, obj);
  23868. },
  23869. rightChange(e) {
  23870. const {
  23871. before,
  23872. after
  23873. } = e.range;
  23874. this.rangeChange(before, after);
  23875. const obj = {
  23876. before: e.range.before,
  23877. after: e.range.after,
  23878. data: e.range.data,
  23879. fulldate: e.fulldate
  23880. };
  23881. this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, obj);
  23882. },
  23883. mobileChange(e) {
  23884. if (this.isRange) {
  23885. const { before, after } = e.range;
  23886. if (!before || !after) {
  23887. return;
  23888. }
  23889. this.handleStartAndEnd(before, after, true);
  23890. if (this.hasTime) {
  23891. const {
  23892. startTime,
  23893. endTime
  23894. } = e.timeRange;
  23895. this.tempRange.startTime = startTime;
  23896. this.tempRange.endTime = endTime;
  23897. }
  23898. this.confirmRangeChange();
  23899. } else {
  23900. if (this.hasTime) {
  23901. this.displayValue = e.fulldate + " " + e.time;
  23902. } else {
  23903. this.displayValue = e.fulldate;
  23904. }
  23905. this.setEmit(this.displayValue);
  23906. }
  23907. this.$refs.mobile.close();
  23908. },
  23909. rangeChange(before, after) {
  23910. if (!(before && after))
  23911. return;
  23912. this.handleStartAndEnd(before, after, true);
  23913. if (this.hasTime)
  23914. return;
  23915. this.confirmRangeChange();
  23916. },
  23917. confirmRangeChange() {
  23918. if (!this.tempRange.startDate || !this.tempRange.endDate) {
  23919. this.pickerVisible = false;
  23920. return;
  23921. }
  23922. if (!checkDate(this.tempRange.startDate)) {
  23923. this.tempRange.startDate = getDate(Date.now());
  23924. }
  23925. if (!checkDate(this.tempRange.endDate)) {
  23926. this.tempRange.endDate = getDate(Date.now());
  23927. }
  23928. let start, end;
  23929. let startDateLaterRangeStartDate = false;
  23930. let startDateLaterRangeEndDate = false;
  23931. let startDate, startTime;
  23932. if (this.start) {
  23933. let startString = this.start;
  23934. if (typeof this.start === "number") {
  23935. startString = getDateTime(this.start, this.hideSecond);
  23936. }
  23937. [startDate, startTime] = startString.split(" ");
  23938. if (this.start && !dateCompare(this.start, this.tempRange.startDate)) {
  23939. startDateLaterRangeStartDate = true;
  23940. this.tempRange.startDate = startDate;
  23941. }
  23942. if (this.start && !dateCompare(this.start, this.tempRange.endDate)) {
  23943. startDateLaterRangeEndDate = true;
  23944. this.tempRange.endDate = startDate;
  23945. }
  23946. }
  23947. let endDateEarlierRangeStartDate = false;
  23948. let endDateEarlierRangeEndDate = false;
  23949. let endDate, endTime;
  23950. if (this.end) {
  23951. let endString = this.end;
  23952. if (typeof this.end === "number") {
  23953. endString = getDateTime(this.end, this.hideSecond);
  23954. }
  23955. [endDate, endTime] = endString.split(" ");
  23956. if (this.end && !dateCompare(this.tempRange.startDate, this.end)) {
  23957. endDateEarlierRangeStartDate = true;
  23958. this.tempRange.startDate = endDate;
  23959. }
  23960. if (this.end && !dateCompare(this.tempRange.endDate, this.end)) {
  23961. endDateEarlierRangeEndDate = true;
  23962. this.tempRange.endDate = endDate;
  23963. }
  23964. }
  23965. if (!this.hasTime) {
  23966. start = this.displayRangeValue.startDate = this.tempRange.startDate;
  23967. end = this.displayRangeValue.endDate = this.tempRange.endDate;
  23968. } else {
  23969. if (startDateLaterRangeStartDate) {
  23970. this.tempRange.startTime = startTime || getDefaultSecond(this.hideSecond);
  23971. } else if (endDateEarlierRangeStartDate) {
  23972. this.tempRange.startTime = endTime || getDefaultSecond(this.hideSecond);
  23973. }
  23974. if (!this.tempRange.startTime) {
  23975. this.tempRange.startTime = getTime(Date.now(), this.hideSecond);
  23976. }
  23977. if (startDateLaterRangeEndDate) {
  23978. this.tempRange.endTime = startTime || getDefaultSecond(this.hideSecond);
  23979. } else if (endDateEarlierRangeEndDate) {
  23980. this.tempRange.endTime = endTime || getDefaultSecond(this.hideSecond);
  23981. }
  23982. if (!this.tempRange.endTime) {
  23983. this.tempRange.endTime = getTime(Date.now(), this.hideSecond);
  23984. }
  23985. start = this.displayRangeValue.startDate = `${this.tempRange.startDate} ${this.tempRange.startTime}`;
  23986. end = this.displayRangeValue.endDate = `${this.tempRange.endDate} ${this.tempRange.endTime}`;
  23987. }
  23988. if (!dateCompare(start, end)) {
  23989. [start, end] = [end, start];
  23990. }
  23991. this.displayRangeValue.startDate = start;
  23992. this.displayRangeValue.endDate = end;
  23993. const displayRange = [start, end];
  23994. this.setEmit(displayRange);
  23995. this.pickerVisible = false;
  23996. },
  23997. handleStartAndEnd(before, after, temp = false) {
  23998. if (!(before && after))
  23999. return;
  24000. const type2 = temp ? "tempRange" : "range";
  24001. const isStartEarlierEnd = dateCompare(before, after);
  24002. this[type2].startDate = isStartEarlierEnd ? before : after;
  24003. this[type2].endDate = isStartEarlierEnd ? after : before;
  24004. },
  24005. /**
  24006. * 比较时间大小
  24007. */
  24008. dateCompare(startDate, endDate) {
  24009. startDate = new Date(startDate.replace("-", "/").replace("-", "/"));
  24010. endDate = new Date(endDate.replace("-", "/").replace("-", "/"));
  24011. return startDate <= endDate;
  24012. },
  24013. /**
  24014. * 比较时间差
  24015. */
  24016. diffDate(startDate, endDate) {
  24017. startDate = new Date(startDate.replace("-", "/").replace("-", "/"));
  24018. endDate = new Date(endDate.replace("-", "/").replace("-", "/"));
  24019. const diff = (endDate - startDate) / (24 * 60 * 60 * 1e3);
  24020. return Math.abs(diff);
  24021. },
  24022. clear(needEmit = true) {
  24023. if (!this.isRange) {
  24024. this.displayValue = "";
  24025. this.inputDate = "";
  24026. this.pickerTime = "";
  24027. if (this.isPhone) {
  24028. this.$refs.mobile && this.$refs.mobile.clearCalender();
  24029. } else {
  24030. this.$refs.pcSingle && this.$refs.pcSingle.clearCalender();
  24031. }
  24032. if (needEmit) {
  24033. this.$emit("change", "");
  24034. this.$emit("input", "");
  24035. this.$emit("update:modelValue", "");
  24036. }
  24037. } else {
  24038. this.displayRangeValue.startDate = "";
  24039. this.displayRangeValue.endDate = "";
  24040. this.tempRange.startDate = "";
  24041. this.tempRange.startTime = "";
  24042. this.tempRange.endDate = "";
  24043. this.tempRange.endTime = "";
  24044. if (this.isPhone) {
  24045. this.$refs.mobile && this.$refs.mobile.clearCalender();
  24046. } else {
  24047. this.$refs.left && this.$refs.left.clearCalender();
  24048. this.$refs.right && this.$refs.right.clearCalender();
  24049. this.$refs.right && this.$refs.right.changeMonth("next");
  24050. }
  24051. if (needEmit) {
  24052. this.$emit("change", []);
  24053. this.$emit("input", []);
  24054. this.$emit("update:modelValue", []);
  24055. }
  24056. }
  24057. }
  24058. }
  24059. };
  24060. function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
  24061. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$3);
  24062. const _component_time_picker = vue.resolveComponent("time-picker");
  24063. const _component_Calendar = vue.resolveComponent("Calendar");
  24064. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-date" }, [
  24065. vue.createElementVNode("view", {
  24066. class: "uni-date-editor",
  24067. onClick: _cache[1] || (_cache[1] = (...args) => $options.show && $options.show(...args))
  24068. }, [
  24069. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  24070. vue.createElementVNode(
  24071. "view",
  24072. {
  24073. class: vue.normalizeClass(["uni-date-editor--x", { "uni-date-editor--x__disabled": $props.disabled, "uni-date-x--border": $props.border }])
  24074. },
  24075. [
  24076. !$data.isRange ? (vue.openBlock(), vue.createElementBlock("view", {
  24077. key: 0,
  24078. class: "uni-date-x uni-date-single"
  24079. }, [
  24080. vue.createVNode(_component_uni_icons, {
  24081. class: "icon-calendar",
  24082. type: "calendar",
  24083. color: "#c0c4cc",
  24084. size: "22"
  24085. }),
  24086. vue.createElementVNode(
  24087. "view",
  24088. { class: "uni-date__x-input" },
  24089. vue.toDisplayString($data.displayValue || $options.singlePlaceholderText),
  24090. 1
  24091. /* TEXT */
  24092. )
  24093. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  24094. key: 1,
  24095. class: "uni-date-x uni-date-range"
  24096. }, [
  24097. vue.createVNode(_component_uni_icons, {
  24098. class: "icon-calendar",
  24099. type: "calendar",
  24100. color: "#c0c4cc",
  24101. size: "22"
  24102. }),
  24103. vue.createElementVNode(
  24104. "view",
  24105. { class: "uni-date__x-input text-center" },
  24106. vue.toDisplayString($data.displayRangeValue.startDate || $options.startPlaceholderText),
  24107. 1
  24108. /* TEXT */
  24109. ),
  24110. vue.createElementVNode(
  24111. "view",
  24112. { class: "range-separator" },
  24113. vue.toDisplayString($props.rangeSeparator),
  24114. 1
  24115. /* TEXT */
  24116. ),
  24117. vue.createElementVNode(
  24118. "view",
  24119. { class: "uni-date__x-input text-center" },
  24120. vue.toDisplayString($data.displayRangeValue.endDate || $options.endPlaceholderText),
  24121. 1
  24122. /* TEXT */
  24123. )
  24124. ])),
  24125. $options.showClearIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  24126. key: 2,
  24127. class: "uni-date__icon-clear",
  24128. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clear && $options.clear(...args), ["stop"]))
  24129. }, [
  24130. vue.createVNode(_component_uni_icons, {
  24131. type: "clear",
  24132. color: "#c0c4cc",
  24133. size: "22"
  24134. })
  24135. ])) : vue.createCommentVNode("v-if", true)
  24136. ],
  24137. 2
  24138. /* CLASS */
  24139. )
  24140. ], true)
  24141. ]),
  24142. vue.withDirectives(vue.createElementVNode(
  24143. "view",
  24144. {
  24145. class: "uni-date-mask--pc",
  24146. onClick: _cache[2] || (_cache[2] = (...args) => $options.close && $options.close(...args))
  24147. },
  24148. null,
  24149. 512
  24150. /* NEED_PATCH */
  24151. ), [
  24152. [vue.vShow, $data.pickerVisible]
  24153. ]),
  24154. !$data.isPhone ? vue.withDirectives((vue.openBlock(), vue.createElementBlock(
  24155. "view",
  24156. {
  24157. key: 0,
  24158. ref: "datePicker",
  24159. class: "uni-date-picker__container"
  24160. },
  24161. [
  24162. !$data.isRange ? (vue.openBlock(), vue.createElementBlock(
  24163. "view",
  24164. {
  24165. key: 0,
  24166. class: "uni-date-single--x",
  24167. style: vue.normalizeStyle($data.pickerPositionStyle)
  24168. },
  24169. [
  24170. vue.createElementVNode("view", { class: "uni-popper__arrow" }),
  24171. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24172. key: 0,
  24173. class: "uni-date-changed popup-x-header"
  24174. }, [
  24175. vue.withDirectives(vue.createElementVNode("input", {
  24176. class: "uni-date__input text-center",
  24177. type: "text",
  24178. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.inputDate = $event),
  24179. placeholder: $options.selectDateText
  24180. }, null, 8, ["placeholder"]), [
  24181. [vue.vModelText, $data.inputDate]
  24182. ]),
  24183. vue.createVNode(_component_time_picker, {
  24184. type: "time",
  24185. modelValue: $data.pickerTime,
  24186. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.pickerTime = $event),
  24187. border: false,
  24188. disabled: !$data.inputDate,
  24189. start: $options.timepickerStartTime,
  24190. end: $options.timepickerEndTime,
  24191. hideSecond: $props.hideSecond,
  24192. style: { "width": "100%" }
  24193. }, {
  24194. default: vue.withCtx(() => [
  24195. vue.withDirectives(vue.createElementVNode("input", {
  24196. class: "uni-date__input text-center",
  24197. type: "text",
  24198. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.pickerTime = $event),
  24199. placeholder: $options.selectTimeText,
  24200. disabled: !$data.inputDate
  24201. }, null, 8, ["placeholder", "disabled"]), [
  24202. [vue.vModelText, $data.pickerTime]
  24203. ])
  24204. ]),
  24205. _: 1
  24206. /* STABLE */
  24207. }, 8, ["modelValue", "disabled", "start", "end", "hideSecond"])
  24208. ])) : vue.createCommentVNode("v-if", true),
  24209. vue.createVNode(_component_Calendar, {
  24210. ref: "pcSingle",
  24211. showMonth: false,
  24212. "start-date": $data.calendarRange.startDate,
  24213. "end-date": $data.calendarRange.endDate,
  24214. date: $data.calendarDate,
  24215. onChange: $options.singleChange,
  24216. "default-value": $props.defaultValue,
  24217. style: { "padding": "0 8px" }
  24218. }, null, 8, ["start-date", "end-date", "date", "onChange", "default-value"]),
  24219. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24220. key: 1,
  24221. class: "popup-x-footer"
  24222. }, [
  24223. vue.createElementVNode(
  24224. "text",
  24225. {
  24226. class: "confirm-text",
  24227. onClick: _cache[6] || (_cache[6] = (...args) => $options.confirmSingleChange && $options.confirmSingleChange(...args))
  24228. },
  24229. vue.toDisplayString($options.okText),
  24230. 1
  24231. /* TEXT */
  24232. )
  24233. ])) : vue.createCommentVNode("v-if", true)
  24234. ],
  24235. 4
  24236. /* STYLE */
  24237. )) : (vue.openBlock(), vue.createElementBlock(
  24238. "view",
  24239. {
  24240. key: 1,
  24241. class: "uni-date-range--x",
  24242. style: vue.normalizeStyle($data.pickerPositionStyle)
  24243. },
  24244. [
  24245. vue.createElementVNode("view", { class: "uni-popper__arrow" }),
  24246. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24247. key: 0,
  24248. class: "popup-x-header uni-date-changed"
  24249. }, [
  24250. vue.createElementVNode("view", { class: "popup-x-header--datetime" }, [
  24251. vue.withDirectives(vue.createElementVNode("input", {
  24252. class: "uni-date__input uni-date-range__input",
  24253. type: "text",
  24254. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.tempRange.startDate = $event),
  24255. placeholder: $options.startDateText
  24256. }, null, 8, ["placeholder"]), [
  24257. [vue.vModelText, $data.tempRange.startDate]
  24258. ]),
  24259. vue.createVNode(_component_time_picker, {
  24260. type: "time",
  24261. modelValue: $data.tempRange.startTime,
  24262. "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $data.tempRange.startTime = $event),
  24263. start: $options.timepickerStartTime,
  24264. border: false,
  24265. disabled: !$data.tempRange.startDate,
  24266. hideSecond: $props.hideSecond
  24267. }, {
  24268. default: vue.withCtx(() => [
  24269. vue.withDirectives(vue.createElementVNode("input", {
  24270. class: "uni-date__input uni-date-range__input",
  24271. type: "text",
  24272. "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.tempRange.startTime = $event),
  24273. placeholder: $options.startTimeText,
  24274. disabled: !$data.tempRange.startDate
  24275. }, null, 8, ["placeholder", "disabled"]), [
  24276. [vue.vModelText, $data.tempRange.startTime]
  24277. ])
  24278. ]),
  24279. _: 1
  24280. /* STABLE */
  24281. }, 8, ["modelValue", "start", "disabled", "hideSecond"])
  24282. ]),
  24283. vue.createVNode(_component_uni_icons, {
  24284. type: "arrowthinright",
  24285. color: "#999",
  24286. style: { "line-height": "40px" }
  24287. }),
  24288. vue.createElementVNode("view", { class: "popup-x-header--datetime" }, [
  24289. vue.withDirectives(vue.createElementVNode("input", {
  24290. class: "uni-date__input uni-date-range__input",
  24291. type: "text",
  24292. "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $data.tempRange.endDate = $event),
  24293. placeholder: $options.endDateText
  24294. }, null, 8, ["placeholder"]), [
  24295. [vue.vModelText, $data.tempRange.endDate]
  24296. ]),
  24297. vue.createVNode(_component_time_picker, {
  24298. type: "time",
  24299. modelValue: $data.tempRange.endTime,
  24300. "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $data.tempRange.endTime = $event),
  24301. end: $options.timepickerEndTime,
  24302. border: false,
  24303. disabled: !$data.tempRange.endDate,
  24304. hideSecond: $props.hideSecond
  24305. }, {
  24306. default: vue.withCtx(() => [
  24307. vue.withDirectives(vue.createElementVNode("input", {
  24308. class: "uni-date__input uni-date-range__input",
  24309. type: "text",
  24310. "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.tempRange.endTime = $event),
  24311. placeholder: $options.endTimeText,
  24312. disabled: !$data.tempRange.endDate
  24313. }, null, 8, ["placeholder", "disabled"]), [
  24314. [vue.vModelText, $data.tempRange.endTime]
  24315. ])
  24316. ]),
  24317. _: 1
  24318. /* STABLE */
  24319. }, 8, ["modelValue", "end", "disabled", "hideSecond"])
  24320. ])
  24321. ])) : vue.createCommentVNode("v-if", true),
  24322. vue.createElementVNode("view", { class: "popup-x-body" }, [
  24323. vue.createVNode(_component_Calendar, {
  24324. ref: "left",
  24325. showMonth: false,
  24326. "start-date": $data.calendarRange.startDate,
  24327. "end-date": $data.calendarRange.endDate,
  24328. range: true,
  24329. pleStatus: $data.endMultipleStatus,
  24330. onChange: $options.leftChange,
  24331. onFirstEnterCale: $options.updateRightCale,
  24332. style: { "padding": "0 8px" }
  24333. }, null, 8, ["start-date", "end-date", "pleStatus", "onChange", "onFirstEnterCale"]),
  24334. vue.createVNode(_component_Calendar, {
  24335. ref: "right",
  24336. showMonth: false,
  24337. "start-date": $data.calendarRange.startDate,
  24338. "end-date": $data.calendarRange.endDate,
  24339. range: true,
  24340. onChange: $options.rightChange,
  24341. pleStatus: $data.startMultipleStatus,
  24342. onFirstEnterCale: $options.updateLeftCale,
  24343. style: { "padding": "0 8px", "border-left": "1px solid #F1F1F1" }
  24344. }, null, 8, ["start-date", "end-date", "onChange", "pleStatus", "onFirstEnterCale"])
  24345. ]),
  24346. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  24347. key: 1,
  24348. class: "popup-x-footer"
  24349. }, [
  24350. vue.createElementVNode(
  24351. "text",
  24352. {
  24353. onClick: _cache[13] || (_cache[13] = (...args) => $options.clear && $options.clear(...args))
  24354. },
  24355. vue.toDisplayString($options.clearText),
  24356. 1
  24357. /* TEXT */
  24358. ),
  24359. vue.createElementVNode(
  24360. "text",
  24361. {
  24362. class: "confirm-text",
  24363. onClick: _cache[14] || (_cache[14] = (...args) => $options.confirmRangeChange && $options.confirmRangeChange(...args))
  24364. },
  24365. vue.toDisplayString($options.okText),
  24366. 1
  24367. /* TEXT */
  24368. )
  24369. ])) : vue.createCommentVNode("v-if", true)
  24370. ],
  24371. 4
  24372. /* STYLE */
  24373. ))
  24374. ],
  24375. 512
  24376. /* NEED_PATCH */
  24377. )), [
  24378. [vue.vShow, $data.pickerVisible]
  24379. ]) : vue.createCommentVNode("v-if", true),
  24380. $data.isPhone ? (vue.openBlock(), vue.createBlock(_component_Calendar, {
  24381. key: 1,
  24382. ref: "mobile",
  24383. clearDate: false,
  24384. date: $data.calendarDate,
  24385. defTime: $options.mobileCalendarTime,
  24386. "start-date": $data.calendarRange.startDate,
  24387. "end-date": $data.calendarRange.endDate,
  24388. selectableTimes: $options.mobSelectableTime,
  24389. startPlaceholder: $props.startPlaceholder,
  24390. endPlaceholder: $props.endPlaceholder,
  24391. "default-value": $props.defaultValue,
  24392. pleStatus: $data.endMultipleStatus,
  24393. showMonth: false,
  24394. range: $data.isRange,
  24395. hasTime: $data.hasTime,
  24396. insert: false,
  24397. hideSecond: $props.hideSecond,
  24398. onConfirm: $options.mobileChange,
  24399. onMaskClose: $options.close
  24400. }, null, 8, ["date", "defTime", "start-date", "end-date", "selectableTimes", "startPlaceholder", "endPlaceholder", "default-value", "pleStatus", "range", "hasTime", "hideSecond", "onConfirm", "onMaskClose"])) : vue.createCommentVNode("v-if", true)
  24401. ]);
  24402. }
  24403. 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"]]);
  24404. const _sfc_main$P = {
  24405. __name: "after-sale",
  24406. setup(__props, { expose: __expose }) {
  24407. __expose();
  24408. const otherParams = vue.ref({
  24409. sender: ""
  24410. });
  24411. const scrollRef = vue.ref(null);
  24412. const refreshList = () => {
  24413. var _a;
  24414. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  24415. };
  24416. let dataList = vue.ref([{
  24417. date: "2024-10-24",
  24418. orderNum: 423,
  24419. auditNum: 293,
  24420. trueNum: 323
  24421. }, {
  24422. date: "2024-10-24",
  24423. orderNum: 423,
  24424. auditNum: 293,
  24425. trueNum: 323
  24426. }, {
  24427. date: "2024-10-24",
  24428. orderNum: 423,
  24429. auditNum: 293,
  24430. trueNum: 323
  24431. }]);
  24432. const updateList = (data) => {
  24433. dataList.value = data;
  24434. };
  24435. const form = vue.reactive({
  24436. startTime: "",
  24437. endTime: ""
  24438. });
  24439. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  24440. return dataList;
  24441. }, set dataList(v) {
  24442. dataList = v;
  24443. }, updateList, form, reactive: vue.reactive, PageScroll, ref: vue.ref, get onLoad() {
  24444. return onLoad;
  24445. } };
  24446. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  24447. return __returned__;
  24448. }
  24449. };
  24450. function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
  24451. const _component_uni_datetime_picker = resolveEasycom(vue.resolveDynamicComponent("uni-datetime-picker"), __easycom_0$2);
  24452. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  24453. const _component_u_divider = resolveEasycom(vue.resolveDynamicComponent("u-divider"), __easycom_2$3);
  24454. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$3);
  24455. return vue.openBlock(), vue.createElementBlock("view", {
  24456. class: "common-page",
  24457. style: { "padding": "0" }
  24458. }, [
  24459. vue.createVNode($setup["PageScroll"], {
  24460. requestStr: "/team/token/shop/invite/page",
  24461. onUpdateList: $setup.updateList,
  24462. ref: "scrollRef",
  24463. otherParams: $setup.otherParams
  24464. }, {
  24465. default: vue.withCtx(() => [
  24466. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  24467. default: vue.withCtx(() => [
  24468. vue.createElementVNode("view", { class: "search-area flex-d" }, [
  24469. vue.createElementVNode("view", { class: "flex-a mb-12" }, [
  24470. vue.createElementVNode("text", { class: "font-13 mr-10" }, "开始时间:"),
  24471. vue.createVNode(_component_uni_datetime_picker, {
  24472. type: "datetime",
  24473. modelValue: $setup.form.startTime,
  24474. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.startTime = $event)
  24475. }, null, 8, ["modelValue"])
  24476. ]),
  24477. vue.createElementVNode("view", { class: "flex-a" }, [
  24478. vue.createElementVNode("text", { class: "font-13 mr-10" }, "结束时间:"),
  24479. vue.createVNode(_component_uni_datetime_picker, {
  24480. type: "datetime",
  24481. modelValue: $setup.form.endTime,
  24482. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.endTime = $event)
  24483. }, null, 8, ["modelValue"]),
  24484. vue.createVNode(_component_u_button, {
  24485. type: "primary",
  24486. "custom-style": "width:160rpx;height:72rpx;margin-left:10px"
  24487. }, {
  24488. default: vue.withCtx(() => [
  24489. vue.createTextVNode("查询")
  24490. ]),
  24491. _: 1
  24492. /* STABLE */
  24493. })
  24494. ]),
  24495. vue.createVNode(_component_u_divider),
  24496. vue.createElementVNode("view", { class: "flex-a" }, [
  24497. vue.createElementVNode("view", { class: "text-item flex-1" }, "审核日期"),
  24498. vue.createElementVNode("view", { class: "text-item flex-1" }, "订单数量"),
  24499. vue.createElementVNode("view", { class: "text-item flex-1" }, "审书数量"),
  24500. vue.createElementVNode("view", { class: "text-item flex-1" }, "实际回收")
  24501. ])
  24502. ])
  24503. ]),
  24504. _: 1
  24505. /* STABLE */
  24506. }),
  24507. vue.createElementVNode("view", { class: "list-con" }, [
  24508. (vue.openBlock(true), vue.createElementBlock(
  24509. vue.Fragment,
  24510. null,
  24511. vue.renderList($setup.dataList, (item, index2) => {
  24512. return vue.openBlock(), vue.createElementBlock("view", {
  24513. key: index2,
  24514. class: "flex-a"
  24515. }, [
  24516. vue.createElementVNode(
  24517. "view",
  24518. { class: "text-item flex-1" },
  24519. vue.toDisplayString(item.date),
  24520. 1
  24521. /* TEXT */
  24522. ),
  24523. vue.createElementVNode(
  24524. "view",
  24525. { class: "text-item flex-1" },
  24526. vue.toDisplayString(item.orderNum),
  24527. 1
  24528. /* TEXT */
  24529. ),
  24530. vue.createElementVNode(
  24531. "view",
  24532. { class: "text-item flex-1" },
  24533. vue.toDisplayString(item.auditNum),
  24534. 1
  24535. /* TEXT */
  24536. ),
  24537. vue.createElementVNode(
  24538. "view",
  24539. { class: "text-item flex-1" },
  24540. vue.toDisplayString(item.trueNum),
  24541. 1
  24542. /* TEXT */
  24543. )
  24544. ]);
  24545. }),
  24546. 128
  24547. /* KEYED_FRAGMENT */
  24548. ))
  24549. ])
  24550. ]),
  24551. _: 1
  24552. /* STABLE */
  24553. }, 8, ["otherParams"])
  24554. ]);
  24555. }
  24556. const PagesIndexStatisticAfterSale = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$O], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/after-sale.vue"]]);
  24557. const _sfc_main$O = {
  24558. __name: "package",
  24559. setup(__props, { expose: __expose }) {
  24560. __expose();
  24561. const otherParams = vue.ref({
  24562. sender: ""
  24563. });
  24564. const scrollRef = vue.ref(null);
  24565. const refreshList = () => {
  24566. var _a;
  24567. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  24568. };
  24569. let dataList = vue.ref([{
  24570. date: "2024-10-24",
  24571. orderNum: 423
  24572. }, {
  24573. date: "2024-10-24",
  24574. orderNum: 423
  24575. }, {
  24576. date: "2024-10-24",
  24577. orderNum: 423
  24578. }]);
  24579. const updateList = (data) => {
  24580. dataList.value = data;
  24581. };
  24582. const __returned__ = { otherParams, scrollRef, refreshList, get dataList() {
  24583. return dataList;
  24584. }, set dataList(v) {
  24585. dataList = v;
  24586. }, updateList, reactive: vue.reactive, PageScroll, ref: vue.ref, get onLoad() {
  24587. return onLoad;
  24588. } };
  24589. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  24590. return __returned__;
  24591. }
  24592. };
  24593. function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
  24594. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$3);
  24595. return vue.openBlock(), vue.createElementBlock("view", {
  24596. class: "common-page",
  24597. style: { "padding": "0" }
  24598. }, [
  24599. vue.createVNode($setup["PageScroll"], {
  24600. requestStr: "/team/token/shop/invite/page",
  24601. onUpdateList: $setup.updateList,
  24602. ref: "scrollRef",
  24603. otherParams: $setup.otherParams
  24604. }, {
  24605. default: vue.withCtx(() => [
  24606. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  24607. default: vue.withCtx(() => [
  24608. vue.createElementVNode("view", { class: "search-area flex-a" }, [
  24609. vue.createElementVNode("view", { class: "text-item flex-1" }, "审核日期"),
  24610. vue.createElementVNode("view", { class: "text-item flex-1" }, "数量")
  24611. ])
  24612. ]),
  24613. _: 1
  24614. /* STABLE */
  24615. }),
  24616. vue.createElementVNode("view", { class: "list-con" }, [
  24617. (vue.openBlock(true), vue.createElementBlock(
  24618. vue.Fragment,
  24619. null,
  24620. vue.renderList($setup.dataList, (item, index2) => {
  24621. return vue.openBlock(), vue.createElementBlock("view", {
  24622. key: index2,
  24623. class: "flex-a"
  24624. }, [
  24625. vue.createElementVNode(
  24626. "view",
  24627. { class: "text-item flex-1" },
  24628. vue.toDisplayString(item.date),
  24629. 1
  24630. /* TEXT */
  24631. ),
  24632. vue.createElementVNode(
  24633. "view",
  24634. { class: "text-item flex-1" },
  24635. vue.toDisplayString(item.orderNum),
  24636. 1
  24637. /* TEXT */
  24638. )
  24639. ]);
  24640. }),
  24641. 128
  24642. /* KEYED_FRAGMENT */
  24643. ))
  24644. ])
  24645. ]),
  24646. _: 1
  24647. /* STABLE */
  24648. }, 8, ["otherParams"])
  24649. ]);
  24650. }
  24651. const PagesIndexStatisticPackage = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$N], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/statistic/package.vue"]]);
  24652. const _sfc_main$N = {
  24653. name: "GoodIn"
  24654. };
  24655. function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
  24656. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  24657. vue.createCommentVNode(" 开发中提示 "),
  24658. vue.createElementVNode("view", { class: "developing" }, [
  24659. vue.createElementVNode("text", null, "开发中")
  24660. ])
  24661. ]);
  24662. }
  24663. 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"]]);
  24664. const _sfc_main$M = {
  24665. name: "GoodIn"
  24666. };
  24667. function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
  24668. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  24669. vue.createCommentVNode(" 开发中提示 "),
  24670. vue.createElementVNode("view", { class: "developing" }, [
  24671. vue.createElementVNode("text", null, "开发中")
  24672. ])
  24673. ]);
  24674. }
  24675. 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"]]);
  24676. const _sfc_main$L = {
  24677. name: "GoodIn"
  24678. };
  24679. function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
  24680. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  24681. vue.createCommentVNode(" 开发中提示 "),
  24682. vue.createElementVNode("view", { class: "developing" }, [
  24683. vue.createElementVNode("text", null, "开发中")
  24684. ])
  24685. ]);
  24686. }
  24687. 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"]]);
  24688. const MIN_DISTANCE = 10;
  24689. function getDirection(x, y) {
  24690. if (x > y && x > MIN_DISTANCE) {
  24691. return "horizontal";
  24692. }
  24693. if (y > x && y > MIN_DISTANCE) {
  24694. return "vertical";
  24695. }
  24696. return "";
  24697. }
  24698. const touch = {
  24699. methods: {
  24700. getTouchPoint(e) {
  24701. if (!e) {
  24702. return {
  24703. x: 0,
  24704. y: 0
  24705. };
  24706. }
  24707. if (e.touches && e.touches[0]) {
  24708. return {
  24709. x: e.touches[0].pageX,
  24710. y: e.touches[0].pageY
  24711. };
  24712. }
  24713. if (e.changedTouches && e.changedTouches[0]) {
  24714. return {
  24715. x: e.changedTouches[0].pageX,
  24716. y: e.changedTouches[0].pageY
  24717. };
  24718. }
  24719. return {
  24720. x: e.clientX || 0,
  24721. y: e.clientY || 0
  24722. };
  24723. },
  24724. resetTouchStatus() {
  24725. this.direction = "";
  24726. this.deltaX = 0;
  24727. this.deltaY = 0;
  24728. this.offsetX = 0;
  24729. this.offsetY = 0;
  24730. },
  24731. touchStart(event) {
  24732. this.resetTouchStatus();
  24733. const touch2 = this.getTouchPoint(event);
  24734. this.startX = touch2.x;
  24735. this.startY = touch2.y;
  24736. },
  24737. touchMove(event) {
  24738. const touch2 = this.getTouchPoint(event);
  24739. this.deltaX = touch2.x - this.startX;
  24740. this.deltaY = touch2.y - this.startY;
  24741. this.offsetX = Math.abs(this.deltaX);
  24742. this.offsetY = Math.abs(this.deltaY);
  24743. this.direction = this.direction || getDirection(this.offsetX, this.offsetY);
  24744. }
  24745. }
  24746. };
  24747. const props$7 = {
  24748. props: {
  24749. // 控制打开或者关闭
  24750. show: {
  24751. type: Boolean,
  24752. default: props$E.swipeActionItem.show
  24753. },
  24754. // 标识符,如果是v-for,可用index索引值
  24755. name: {
  24756. type: [String, Number],
  24757. default: props$E.swipeActionItem.name
  24758. },
  24759. // 是否禁用
  24760. disabled: {
  24761. type: Boolean,
  24762. default: props$E.swipeActionItem.disabled
  24763. },
  24764. // 是否自动关闭其他swipe按钮组
  24765. autoClose: {
  24766. type: Boolean,
  24767. default: props$E.swipeActionItem.autoClose
  24768. },
  24769. // 滑动距离阈值,只有大于此值,才被认为是要打开菜单
  24770. threshold: {
  24771. type: Number,
  24772. default: props$E.swipeActionItem.threshold
  24773. },
  24774. // 右侧按钮内容
  24775. options: {
  24776. type: Array,
  24777. default() {
  24778. return uni.$u.props.swipeActionItem.rightOptions;
  24779. }
  24780. },
  24781. // 动画过渡时间,单位ms
  24782. duration: {
  24783. type: [String, Number],
  24784. default: props$E.swipeActionItem.duration
  24785. }
  24786. }
  24787. };
  24788. const wxs = {
  24789. methods: {
  24790. // 关闭时执行
  24791. closeHandler() {
  24792. this.status = "close";
  24793. },
  24794. setState(status) {
  24795. this.status = status;
  24796. },
  24797. closeOther() {
  24798. this.parent && this.parent.closeOther(this);
  24799. }
  24800. }
  24801. };
  24802. const block0 = (Comp) => {
  24803. (Comp.$wxs || (Comp.$wxs = [])).push("wxs");
  24804. (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxs"] = "f1d6d7d8";
  24805. };
  24806. const _sfc_main$K = {
  24807. name: "u-swipe-action-item",
  24808. emits: ["click"],
  24809. mixins: [mpMixin, mixin, props$7, touch],
  24810. mixins: [mpMixin, mixin, props$7, touch, wxs],
  24811. data() {
  24812. return {
  24813. // 按钮的尺寸信息
  24814. size: {},
  24815. // 父组件u-swipe-action的参数
  24816. parentData: {
  24817. autoClose: true
  24818. },
  24819. // 当前状态,open-打开,close-关闭
  24820. status: "close"
  24821. };
  24822. },
  24823. watch: {
  24824. // 由于wxs无法直接读取外部的值,需要在外部值变化时,重新执行赋值逻辑
  24825. wxsInit(newValue, oldValue) {
  24826. this.queryRect();
  24827. }
  24828. },
  24829. computed: {
  24830. wxsInit() {
  24831. return [this.disabled, this.autoClose, this.threshold, this.options, this.duration];
  24832. }
  24833. },
  24834. mounted() {
  24835. this.init();
  24836. },
  24837. methods: {
  24838. init() {
  24839. this.updateParentData();
  24840. uni.$u.sleep().then(() => {
  24841. this.queryRect();
  24842. });
  24843. },
  24844. updateParentData() {
  24845. this.getParentData("u-swipe-action");
  24846. },
  24847. // 查询节点
  24848. queryRect() {
  24849. this.$uGetRect(".u-swipe-action-item__right__button", true).then((buttons) => {
  24850. this.size = {
  24851. buttons,
  24852. show: this.show,
  24853. disabled: this.disabled,
  24854. threshold: this.threshold,
  24855. duration: this.duration
  24856. };
  24857. });
  24858. },
  24859. // 按钮被点击
  24860. buttonClickHandler(item, index2) {
  24861. this.$emit("click", {
  24862. index: index2,
  24863. name: this.name
  24864. });
  24865. }
  24866. }
  24867. };
  24868. function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
  24869. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  24870. return vue.openBlock(), vue.createElementBlock(
  24871. "view",
  24872. {
  24873. class: "u-swipe-action-item",
  24874. ref: "u-swipe-action-item"
  24875. },
  24876. [
  24877. vue.createElementVNode("view", { class: "u-swipe-action-item__right" }, [
  24878. vue.renderSlot(_ctx.$slots, "button", {}, () => [
  24879. (vue.openBlock(true), vue.createElementBlock(
  24880. vue.Fragment,
  24881. null,
  24882. vue.renderList(_ctx.options, (item, index2) => {
  24883. return vue.openBlock(), vue.createElementBlock("view", {
  24884. key: index2,
  24885. class: "u-swipe-action-item__right__button",
  24886. ref_for: true,
  24887. ref: `u-swipe-action-item__right__button-${index2}`,
  24888. style: vue.normalizeStyle([{
  24889. alignItems: item.style && item.style.borderRadius ? "center" : "stretch"
  24890. }]),
  24891. onClick: ($event) => $options.buttonClickHandler(item, index2)
  24892. }, [
  24893. vue.createElementVNode(
  24894. "view",
  24895. {
  24896. class: "u-swipe-action-item__right__button__wrapper",
  24897. style: vue.normalizeStyle([{
  24898. backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : "#C7C6CD",
  24899. borderRadius: item.style && item.style.borderRadius ? item.style.borderRadius : "0",
  24900. padding: item.style && item.style.borderRadius ? "0" : "0 15px"
  24901. }, item.style])
  24902. },
  24903. [
  24904. item.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  24905. key: 0,
  24906. name: item.icon,
  24907. color: item.style && item.style.color ? item.style.color : "#ffffff",
  24908. size: item.iconSize ? _ctx.$u.addUnit(item.iconSize) : item.style && item.style.fontSize ? _ctx.$u.getPx(item.style.fontSize) * 1.2 : 17,
  24909. customStyle: {
  24910. marginRight: item.text ? "2px" : 0
  24911. }
  24912. }, null, 8, ["name", "color", "size", "customStyle"])) : vue.createCommentVNode("v-if", true),
  24913. item.text ? (vue.openBlock(), vue.createElementBlock(
  24914. "text",
  24915. {
  24916. key: 1,
  24917. class: "u-swipe-action-item__right__button__wrapper__text u-line-1",
  24918. style: vue.normalizeStyle([{
  24919. color: item.style && item.style.color ? item.style.color : "#ffffff",
  24920. fontSize: item.style && item.style.fontSize ? item.style.fontSize : "16px",
  24921. lineHeight: item.style && item.style.fontSize ? item.style.fontSize : "16px"
  24922. }])
  24923. },
  24924. vue.toDisplayString(item.text),
  24925. 5
  24926. /* TEXT, STYLE */
  24927. )) : vue.createCommentVNode("v-if", true)
  24928. ],
  24929. 4
  24930. /* STYLE */
  24931. )
  24932. ], 12, ["onClick"]);
  24933. }),
  24934. 128
  24935. /* KEYED_FRAGMENT */
  24936. ))
  24937. ], true)
  24938. ]),
  24939. vue.createElementVNode("view", {
  24940. class: "u-swipe-action-item__content",
  24941. onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.wxs.touchstart && _ctx.wxs.touchstart(...args)),
  24942. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.wxs.touchmove && _ctx.wxs.touchmove(...args)),
  24943. onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.wxs.touchend && _ctx.wxs.touchend(...args)),
  24944. status: vue.wp($data.status),
  24945. "change:status": _ctx.wxs.statusChange,
  24946. size: vue.wp($data.size),
  24947. "change:size": _ctx.wxs.sizeChange
  24948. }, [
  24949. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  24950. ], 40, ["status", "change:status", "size", "change:size"])
  24951. ],
  24952. 512
  24953. /* NEED_PATCH */
  24954. );
  24955. }
  24956. if (typeof block0 === "function")
  24957. block0(_sfc_main$K);
  24958. 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"]]);
  24959. const props$6 = {
  24960. props: {
  24961. // 是否自动关闭其他swipe按钮组
  24962. autoClose: {
  24963. type: Boolean,
  24964. default: props$E.swipeAction.autoClose
  24965. }
  24966. }
  24967. };
  24968. const _sfc_main$J = {
  24969. name: "u-swipe-action",
  24970. mixins: [mpMixin, mixin, props$6],
  24971. data() {
  24972. return {};
  24973. },
  24974. provide() {
  24975. return {
  24976. swipeAction: this
  24977. };
  24978. },
  24979. computed: {
  24980. // 这里computed的变量,都是子组件u-swipe-action-item需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
  24981. // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-swipe-action-item)
  24982. // 拉取父组件新的变化后的参数
  24983. parentData() {
  24984. return [this.autoClose];
  24985. }
  24986. },
  24987. watch: {
  24988. // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
  24989. parentData() {
  24990. if (this.children.length) {
  24991. this.children.map((child) => {
  24992. typeof child.updateParentData === "function" && child.updateParentData();
  24993. });
  24994. }
  24995. }
  24996. },
  24997. created() {
  24998. this.children = [];
  24999. },
  25000. methods: {
  25001. closeOther(child) {
  25002. if (this.autoClose) {
  25003. this.children.map((item, index2) => {
  25004. if (child !== item) {
  25005. item.closeHandler();
  25006. }
  25007. });
  25008. }
  25009. }
  25010. }
  25011. };
  25012. function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
  25013. return vue.openBlock(), vue.createElementBlock("view", { class: "u-swipe-action" }, [
  25014. vue.renderSlot(_ctx.$slots, "default")
  25015. ]);
  25016. }
  25017. 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"]]);
  25018. const _sfc_main$I = {
  25019. __name: "BadItem",
  25020. props: {
  25021. data: {
  25022. type: Object,
  25023. required: true,
  25024. default: () => ({
  25025. orderNo: "",
  25026. badCount: "",
  25027. logisticsNo: "",
  25028. checkDate: "",
  25029. operator: ""
  25030. })
  25031. }
  25032. },
  25033. emits: ["delete", "edit"],
  25034. setup(__props, { expose: __expose, emit: __emit }) {
  25035. __expose();
  25036. const props2 = __props;
  25037. const emit2 = __emit;
  25038. const options = vue.ref([
  25039. {
  25040. text: "删除",
  25041. style: {
  25042. backgroundColor: "#ff4444"
  25043. }
  25044. }
  25045. ]);
  25046. const handleAction = (e) => {
  25047. if (e.index === 0) {
  25048. uni.showModal({
  25049. title: "提示",
  25050. content: "确定要删除该订单吗?",
  25051. success: (res2) => {
  25052. if (res2.confirm) {
  25053. emit2("delete");
  25054. }
  25055. }
  25056. });
  25057. }
  25058. };
  25059. const __returned__ = { props: props2, emit: emit2, options, handleAction, ref: vue.ref };
  25060. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25061. return __returned__;
  25062. }
  25063. };
  25064. function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
  25065. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  25066. const _component_u_swipe_action_item = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action-item"), __easycom_1);
  25067. const _component_u_swipe_action = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action"), __easycom_2);
  25068. return vue.openBlock(), vue.createElementBlock("view", { class: "bad-item" }, [
  25069. vue.createVNode(_component_u_swipe_action, null, {
  25070. default: vue.withCtx(() => [
  25071. vue.createVNode(_component_u_swipe_action_item, {
  25072. options: $setup.options,
  25073. onClick: $setup.handleAction
  25074. }, {
  25075. default: vue.withCtx(() => [
  25076. vue.createElementVNode("view", { class: "item-content" }, [
  25077. vue.createElementVNode("view", { class: "item-row" }, [
  25078. vue.createElementVNode("text", { class: "label" }, "订单编号:"),
  25079. vue.createElementVNode(
  25080. "text",
  25081. { class: "value" },
  25082. vue.toDisplayString($props.data.orderId),
  25083. 1
  25084. /* TEXT */
  25085. ),
  25086. vue.createVNode(_component_u_icon, {
  25087. name: "edit-pen",
  25088. color: "#4CAF50",
  25089. size: "20",
  25090. class: "edit-icon",
  25091. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("edit"))
  25092. })
  25093. ]),
  25094. vue.createElementVNode("view", { class: "item-row" }, [
  25095. vue.createElementVNode("text", { class: "label" }, "不良数量:"),
  25096. vue.createElementVNode(
  25097. "text",
  25098. { class: "value" },
  25099. vue.toDisplayString($props.data.badNum),
  25100. 1
  25101. /* TEXT */
  25102. )
  25103. ]),
  25104. vue.createElementVNode("view", { class: "item-row" }, [
  25105. vue.createElementVNode("text", { class: "label" }, "物流单号:"),
  25106. vue.createElementVNode(
  25107. "text",
  25108. { class: "value" },
  25109. vue.toDisplayString($props.data.waybillCode),
  25110. 1
  25111. /* TEXT */
  25112. )
  25113. ]),
  25114. vue.createElementVNode("view", { class: "item-row" }, [
  25115. vue.createElementVNode("text", { class: "label" }, "验货完成日期:"),
  25116. vue.createElementVNode(
  25117. "text",
  25118. { class: "value" },
  25119. vue.toDisplayString($props.data.auditFinishTime),
  25120. 1
  25121. /* TEXT */
  25122. )
  25123. ]),
  25124. vue.createElementVNode("view", { class: "item-row" }, [
  25125. vue.createElementVNode("text", { class: "label" }, "录入人:"),
  25126. vue.createElementVNode(
  25127. "text",
  25128. { class: "value" },
  25129. vue.toDisplayString($props.data.auditUserName),
  25130. 1
  25131. /* TEXT */
  25132. )
  25133. ])
  25134. ])
  25135. ]),
  25136. _: 1
  25137. /* STABLE */
  25138. }, 8, ["options"])
  25139. ]),
  25140. _: 1
  25141. /* STABLE */
  25142. })
  25143. ]);
  25144. }
  25145. 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"]]);
  25146. class VolumeTTS {
  25147. constructor(opts) {
  25148. __publicField(this, "ttsParams", {
  25149. lang: "zh-CN",
  25150. speed: 1,
  25151. // 将 0-10 转换为 0-1
  25152. pitch: 1,
  25153. // 将 0-10 转换为 0-1
  25154. volume: 1
  25155. });
  25156. __publicField(this, "TTSModule");
  25157. __publicField(this, "platform", uni.getSystemInfoSync().platform);
  25158. if (opts)
  25159. this.ttsParams = opts;
  25160. this.init();
  25161. }
  25162. init() {
  25163. this.TTSModule = requireNativePlugin("nrb-tts-plugin");
  25164. this.TTSModule && this.TTSModule.init({
  25165. "lang": "ZH",
  25166. "country": "CN"
  25167. }, (res2) => {
  25168. if (res2.success == 0) {
  25169. formatAppLog("log", "at utils/VolumeTTS.js:27", "TTS初始化成功");
  25170. }
  25171. });
  25172. }
  25173. speak(text) {
  25174. formatAppLog("log", "at utils/VolumeTTS.js:45", this.platform, "dsad");
  25175. let opts = this.platform == "ios" ? {
  25176. "rate": this.ttsParams.speed,
  25177. "lang": "zh-CN",
  25178. "volume": 1
  25179. } : {
  25180. "pitch": this.ttsParams.pitch,
  25181. "speechRate": this.ttsParams.speed,
  25182. "queueMode": 1
  25183. };
  25184. formatAppLog("log", "at utils/VolumeTTS.js:57", this.TTSModule, "this.TTSModule");
  25185. this.TTSModule.speak(text, opts, (e) => {
  25186. formatAppLog("log", "at utils/VolumeTTS.js:59", e, "读取成功");
  25187. });
  25188. }
  25189. stop() {
  25190. if (this.TTSModule) {
  25191. this.TTSModule.stop();
  25192. }
  25193. }
  25194. }
  25195. const _sfc_main$H = {
  25196. __name: "RemarkDialog",
  25197. props: {
  25198. visible: {
  25199. type: Boolean,
  25200. default: false
  25201. },
  25202. initialValue: {
  25203. type: String,
  25204. default: ""
  25205. }
  25206. },
  25207. emits: ["update:visible", "confirm"],
  25208. setup(__props, { expose: __expose, emit: __emit }) {
  25209. __expose();
  25210. const props2 = __props;
  25211. const emit2 = __emit;
  25212. const remarkText = vue.ref("");
  25213. const quickTags = vue.ref(["少书", "多书", "子母件", "书单不符"]);
  25214. vue.watch(() => props2.visible, (newVal) => {
  25215. if (newVal) {
  25216. remarkText.value = props2.initialValue;
  25217. }
  25218. });
  25219. const appendTag = (tag) => {
  25220. remarkText.value += remarkText.value ? " " + tag : tag;
  25221. };
  25222. const onClose = () => {
  25223. emit2("update:visible", false);
  25224. };
  25225. const onConfirm = () => {
  25226. emit2("confirm", remarkText.value);
  25227. onClose();
  25228. };
  25229. const __returned__ = { props: props2, emit: emit2, remarkText, quickTags, appendTag, onClose, onConfirm, ref: vue.ref, watch: vue.watch };
  25230. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25231. return __returned__;
  25232. }
  25233. };
  25234. function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
  25235. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$2);
  25236. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$4);
  25237. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  25238. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_3$4);
  25239. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  25240. show: $props.visible,
  25241. onClose: $setup.onClose,
  25242. mode: "center",
  25243. round: "10",
  25244. closeOnClickOverlay: false
  25245. }, {
  25246. default: vue.withCtx(() => [
  25247. vue.createElementVNode("view", { class: "remark-dialog" }, [
  25248. vue.createElementVNode("view", { class: "dialog-title" }, "编辑备注"),
  25249. vue.createCommentVNode(" 备注输入框 "),
  25250. vue.createElementVNode("view", { class: "dialog-content mb-30" }, [
  25251. vue.createVNode(_component_u_textarea, {
  25252. modelValue: $setup.remarkText,
  25253. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.remarkText = $event),
  25254. placeholder: "请输入",
  25255. maxlength: 200,
  25256. height: "100",
  25257. count: ""
  25258. }, null, 8, ["modelValue"]),
  25259. vue.createCommentVNode(" 快速输入标签 "),
  25260. vue.createElementVNode("view", { class: "quick-tags mt-10" }, [
  25261. vue.createElementVNode("text", { class: "common-title" }, "快速填入"),
  25262. vue.createElementVNode("view", { class: "tags-container flex-w mt-20" }, [
  25263. (vue.openBlock(true), vue.createElementBlock(
  25264. vue.Fragment,
  25265. null,
  25266. vue.renderList($setup.quickTags, (tag, index2) => {
  25267. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  25268. key: index2,
  25269. text: tag,
  25270. plain: "",
  25271. size: "mini",
  25272. type: "primary",
  25273. onClick: ($event) => $setup.appendTag(tag),
  25274. class: "tag-item"
  25275. }, null, 8, ["text", "onClick"]);
  25276. }),
  25277. 128
  25278. /* KEYED_FRAGMENT */
  25279. ))
  25280. ])
  25281. ])
  25282. ]),
  25283. vue.createCommentVNode(" 底部按钮 "),
  25284. vue.createElementVNode("view", { class: "dialog-footer" }, [
  25285. vue.createVNode(_component_u_button, {
  25286. plain: "",
  25287. onClick: $setup.onClose,
  25288. class: "footer-btn"
  25289. }, {
  25290. default: vue.withCtx(() => [
  25291. vue.createTextVNode("取消")
  25292. ]),
  25293. _: 1
  25294. /* STABLE */
  25295. }),
  25296. vue.createVNode(_component_u_button, {
  25297. type: "primary",
  25298. onClick: $setup.onConfirm,
  25299. class: "footer-btn"
  25300. }, {
  25301. default: vue.withCtx(() => [
  25302. vue.createTextVNode("确定")
  25303. ]),
  25304. _: 1
  25305. /* STABLE */
  25306. })
  25307. ])
  25308. ])
  25309. ]),
  25310. _: 1
  25311. /* STABLE */
  25312. }, 8, ["show"]);
  25313. }
  25314. 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"]]);
  25315. const _sfc_main$G = {
  25316. __name: "bad-in",
  25317. setup(__props, { expose: __expose }) {
  25318. __expose();
  25319. const waybillCode = vue.ref();
  25320. const formData = vue.reactive({
  25321. godownName: "",
  25322. godownId: "",
  25323. positionCode: ""
  25324. });
  25325. const ordersMap = vue.ref([]);
  25326. const codeMap = vue.ref([]);
  25327. function getDetailByCode2(code2) {
  25328. if (codeMap.value.includes(code2)) {
  25329. uni.$u.ttsModule.speak("重复扫描");
  25330. return;
  25331. }
  25332. uni.$u.http.get("/app/stock/searchOrder?waybillCode=" + code2).then((res2) => {
  25333. if (res2.code == 200) {
  25334. ordersMap.value.unshift(res2.data);
  25335. codeMap.value.push(code2);
  25336. } else if (res2.code == 601) {
  25337. uni.$u.ttsModule.speak(res2.msg);
  25338. uni.showModal({
  25339. title: "提示",
  25340. content: res2.msg,
  25341. showCancel: false
  25342. });
  25343. } else {
  25344. uni.$u.toast(res2.msg);
  25345. }
  25346. });
  25347. }
  25348. const remarkVisible = vue.ref(false);
  25349. const currentRemark = vue.ref("");
  25350. const currentEditIndex = vue.ref(-1);
  25351. const goBack = () => {
  25352. if (ordersMap.value.length > 0) {
  25353. uni.showModal({
  25354. title: "退出确认",
  25355. content: "是否确认放弃本次入库?",
  25356. success: (res2) => {
  25357. if (res2.confirm) {
  25358. uni.navigateBack();
  25359. }
  25360. }
  25361. });
  25362. } else {
  25363. uni.navigateBack();
  25364. }
  25365. };
  25366. const onSubmit = () => {
  25367. if (!formData.godownId || !formData.positionCode) {
  25368. uni.$u.toast("请先选择仓库和库位");
  25369. uni.$u.ttsModule.speak("请先选择仓库和库位");
  25370. return;
  25371. }
  25372. uni.showModal({
  25373. title: "提交确认",
  25374. content: "是否确认提交本次入库?",
  25375. success: (res2) => {
  25376. if (res2.confirm) {
  25377. handleSubmitConfirm();
  25378. }
  25379. }
  25380. });
  25381. };
  25382. const handleSubmitConfirm = async () => {
  25383. uni.showLoading({
  25384. title: "提交中..."
  25385. });
  25386. let orderInfo = ordersMap.value.map((item) => {
  25387. return {
  25388. orderId: item.orderId,
  25389. waybillCode: item.waybillCode,
  25390. bookNum: item.badNum,
  25391. remark: item.remark
  25392. };
  25393. });
  25394. if (orderInfo.length == 0) {
  25395. uni.hideLoading();
  25396. uni.$u.ttsModule.speak("请添加订单数据");
  25397. return;
  25398. }
  25399. uni.$u.http.post("/app/stock/addBatch", {
  25400. godownId: formData.godownId,
  25401. positionCode: formData.positionCode,
  25402. orderInfo
  25403. }).then((res2) => {
  25404. if (res2.code == 200) {
  25405. uni.$u.toast("入库成功");
  25406. uni.$u.ttsModule.speak("入库成功");
  25407. clearData();
  25408. } else {
  25409. uni.$u.toast(res2.msg);
  25410. }
  25411. }).finally(() => {
  25412. uni.hideLoading();
  25413. });
  25414. };
  25415. const clearData = () => {
  25416. ordersMap.value.length = 0;
  25417. waybillCode.value = "";
  25418. formData.godownName = "";
  25419. formData.positionCode = "";
  25420. formData.godownId = "";
  25421. };
  25422. const editOrder = (index2) => {
  25423. openRemarkDialog(index2);
  25424. };
  25425. const openScan = () => {
  25426. uni.scanCode({
  25427. success: (res2) => {
  25428. waybillCode.value = res2.result;
  25429. getDetailByCode2(res2.result);
  25430. },
  25431. fail: (err) => {
  25432. uni.showToast({
  25433. title: "扫码失败",
  25434. icon: "error"
  25435. });
  25436. }
  25437. });
  25438. };
  25439. function selectLocation() {
  25440. if (!formData.godownId) {
  25441. uni.$u.toast("请先选择仓库");
  25442. uni.$u.ttsModule.speak("请先选择仓库");
  25443. return;
  25444. }
  25445. uni.navigateTo({
  25446. url: "/pages/index/wms/location-select?godownId=" + formData.godownId + "&positionCode=" + formData.positionCode
  25447. });
  25448. }
  25449. const deleteOrder = (index2) => {
  25450. ordersMap.value.splice(index2, 1);
  25451. };
  25452. vue.onMounted(() => {
  25453. uni.$u.useGlobalEvent((e) => {
  25454. if (e.barcode) {
  25455. waybillCode.value = e.barcode;
  25456. getDetailByCode2(e.barcode);
  25457. }
  25458. });
  25459. uni.$on("updateLocation", (locationCode) => {
  25460. formData.positionCode = locationCode;
  25461. });
  25462. uni.$on("updateWarehouse", (data) => {
  25463. formData.godownName = data.godownName;
  25464. formData.godownId = data.id;
  25465. });
  25466. });
  25467. vue.onUnmounted(() => {
  25468. uni.$off("updateLocation");
  25469. uni.$off("updateWarehouse");
  25470. });
  25471. const openRemarkDialog = (index2, remark = "") => {
  25472. currentEditIndex.value = index2;
  25473. currentRemark.value = remark;
  25474. remarkVisible.value = true;
  25475. };
  25476. const handleRemarkConfirm = (remark) => {
  25477. if (currentEditIndex.value >= 0) {
  25478. ordersMap.value[currentEditIndex.value].remark = remark;
  25479. }
  25480. currentEditIndex.value = -1;
  25481. currentRemark.value = "";
  25482. };
  25483. const selectWarehouse = () => {
  25484. uni.navigateTo({
  25485. url: "/pages/index/wms/warehouse-select?godownId=" + formData.godownId
  25486. });
  25487. };
  25488. 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() {
  25489. return VolumeTTS;
  25490. }, RemarkDialog };
  25491. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25492. return __returned__;
  25493. }
  25494. };
  25495. function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
  25496. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  25497. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$8);
  25498. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_2$2);
  25499. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$a);
  25500. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  25501. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$7);
  25502. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  25503. return vue.openBlock(), vue.createElementBlock("view", {
  25504. class: "common-page",
  25505. style: { "padding": "0" }
  25506. }, [
  25507. vue.createCommentVNode(" 顶部导航栏 "),
  25508. vue.createElementVNode("view", { class: "header" }, [
  25509. vue.createVNode(_component_u_navbar, {
  25510. title: "不良入库",
  25511. border: false,
  25512. fixed: "",
  25513. "safe-area-inset-top": ""
  25514. }, {
  25515. left: vue.withCtx(() => [
  25516. vue.createVNode(_component_u_icon, {
  25517. name: "arrow-left",
  25518. color: "#333333",
  25519. size: "20",
  25520. onClick: $setup.goBack
  25521. })
  25522. ]),
  25523. right: vue.withCtx(() => [
  25524. vue.createVNode(_component_u_text, {
  25525. type: "primary",
  25526. text: "提交",
  25527. onClick: $setup.onSubmit
  25528. })
  25529. ]),
  25530. _: 1
  25531. /* STABLE */
  25532. })
  25533. ]),
  25534. vue.createCommentVNode(" 主要内容区域 "),
  25535. vue.createElementVNode("view", { class: "content" }, [
  25536. vue.createCommentVNode(" 订单基本信息 "),
  25537. vue.createElementVNode("view", { class: "info-section" }, [
  25538. vue.createVNode(_component_u_form, {
  25539. model: $setup.formData,
  25540. ref: "formRef",
  25541. "label-width": "80px",
  25542. "label-position": "left"
  25543. }, {
  25544. default: vue.withCtx(() => [
  25545. vue.createVNode(_component_u_form_item, {
  25546. label: "订单总数",
  25547. required: ""
  25548. }, {
  25549. default: vue.withCtx(() => [
  25550. vue.createElementVNode(
  25551. "span",
  25552. null,
  25553. vue.toDisplayString($setup.ordersMap.length),
  25554. 1
  25555. /* TEXT */
  25556. )
  25557. ]),
  25558. _: 1
  25559. /* STABLE */
  25560. }),
  25561. vue.createVNode(_component_u_form_item, {
  25562. label: "仓库",
  25563. required: ""
  25564. }, {
  25565. default: vue.withCtx(() => [
  25566. vue.createElementVNode("view", {
  25567. onClick: $setup.selectWarehouse,
  25568. style: { "width": "100%" }
  25569. }, [
  25570. vue.createVNode(_component_u_input, {
  25571. modelValue: $setup.formData.godownName,
  25572. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.godownName = $event),
  25573. readonly: "",
  25574. "custom-style": "font-size:32rpx",
  25575. placeholder: "请选择仓库",
  25576. suffixIcon: "arrow-right"
  25577. }, null, 8, ["modelValue"])
  25578. ])
  25579. ]),
  25580. _: 1
  25581. /* STABLE */
  25582. }),
  25583. vue.createVNode(_component_u_form_item, {
  25584. label: "库位",
  25585. required: ""
  25586. }, {
  25587. default: vue.withCtx(() => [
  25588. vue.createElementVNode("view", {
  25589. onClick: $setup.selectLocation,
  25590. style: { "width": "100%" }
  25591. }, [
  25592. vue.createVNode(_component_u_input, {
  25593. modelValue: $setup.formData.positionCode,
  25594. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.positionCode = $event),
  25595. readonly: "",
  25596. "custom-style": "font-size:32rpx",
  25597. placeholder: "请选择库位",
  25598. suffixIcon: "arrow-right"
  25599. }, null, 8, ["modelValue"])
  25600. ])
  25601. ]),
  25602. _: 1
  25603. /* STABLE */
  25604. })
  25605. ]),
  25606. _: 1
  25607. /* STABLE */
  25608. }, 8, ["model"])
  25609. ]),
  25610. vue.createCommentVNode(" 订单列表 "),
  25611. vue.createElementVNode("view", { class: "order-list" }, [
  25612. (vue.openBlock(true), vue.createElementBlock(
  25613. vue.Fragment,
  25614. null,
  25615. vue.renderList($setup.ordersMap, (order, index2) => {
  25616. return vue.openBlock(), vue.createBlock($setup["BadItem"], {
  25617. key: index2,
  25618. data: order,
  25619. onDelete: ($event) => $setup.deleteOrder(index2),
  25620. onEdit: ($event) => $setup.editOrder(index2)
  25621. }, null, 8, ["data", "onDelete", "onEdit"]);
  25622. }),
  25623. 128
  25624. /* KEYED_FRAGMENT */
  25625. ))
  25626. ]),
  25627. vue.createCommentVNode(" 底部扫码输入框 "),
  25628. vue.createElementVNode("view", {
  25629. class: "fixed-bottom pad-20",
  25630. style: { "background": "#ffffff" }
  25631. }, [
  25632. vue.createVNode(_component_u_search, {
  25633. placeholder: "请输入物流单号",
  25634. searchIconSize: 24,
  25635. bgColor: "#f6f7f6",
  25636. onSearch: _cache[2] || (_cache[2] = ($event) => $setup.getDetailByCode($setup.waybillCode)),
  25637. modelValue: $setup.waybillCode,
  25638. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.waybillCode = $event),
  25639. "custom-style": "font-size:32rpx",
  25640. "placeholder-style": "font-size:32rpx",
  25641. clearabled: true,
  25642. focus: false,
  25643. showAction: false,
  25644. height: 42
  25645. }, null, 8, ["modelValue"]),
  25646. vue.createVNode(_component_u_icon, {
  25647. name: "scan",
  25648. size: "32",
  25649. color: "#19be6b",
  25650. onClick: $setup.openScan
  25651. })
  25652. ])
  25653. ]),
  25654. vue.createCommentVNode(" 备注弹窗 "),
  25655. vue.createVNode($setup["RemarkDialog"], {
  25656. visible: $setup.remarkVisible,
  25657. "onUpdate:visible": _cache[4] || (_cache[4] = ($event) => $setup.remarkVisible = $event),
  25658. "initial-value": $setup.currentRemark,
  25659. onConfirm: $setup.handleRemarkConfirm
  25660. }, null, 8, ["visible", "initial-value"])
  25661. ]);
  25662. }
  25663. 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"]]);
  25664. const _sfc_main$F = {
  25665. __name: "bad-out",
  25666. setup(__props, { expose: __expose }) {
  25667. __expose();
  25668. const searchText = vue.ref("");
  25669. const onSearch = () => {
  25670. uni.navigateTo({
  25671. url: `/pages/index/wms/bad-out-order?searchText=${searchText.value}`
  25672. });
  25673. };
  25674. const openScan = () => {
  25675. uni.scanCode({
  25676. success: (res2) => {
  25677. searchText.value = res2.result;
  25678. onSearch();
  25679. },
  25680. fail: (err) => {
  25681. uni.showToast({
  25682. title: "扫码失败",
  25683. icon: "error"
  25684. });
  25685. }
  25686. });
  25687. };
  25688. const __returned__ = { searchText, onSearch, openScan, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted };
  25689. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25690. return __returned__;
  25691. }
  25692. };
  25693. function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
  25694. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  25695. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  25696. return vue.openBlock(), vue.createElementBlock("view", { class: "container flex-d h100" }, [
  25697. vue.createCommentVNode(" 库位列表 "),
  25698. vue.createElementVNode("view", { class: "location-list flex-1" }, [
  25699. vue.createElementVNode("view", { class: "no-data flex-c mt-60" }, "请输入快递单号/订单编号")
  25700. ]),
  25701. vue.createCommentVNode(" 底部搜索框 "),
  25702. vue.createElementVNode("view", {
  25703. class: "pad-20 flex-a",
  25704. style: { "background": "#ffffff" }
  25705. }, [
  25706. vue.createVNode(_component_u_search, {
  25707. modelValue: $setup.searchText,
  25708. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  25709. placeholder: "请输入快递单号/订单编号",
  25710. "show-action": false,
  25711. clearabled: true,
  25712. onChange: $setup.onSearch,
  25713. height: "40",
  25714. onClick: _cache[1] || (_cache[1] = ($event) => $setup.searchText = "")
  25715. }, null, 8, ["modelValue"]),
  25716. vue.createVNode(_component_u_icon, {
  25717. name: "scan",
  25718. size: "28",
  25719. color: "#19be6b",
  25720. onClick: $setup.openScan
  25721. })
  25722. ])
  25723. ]);
  25724. }
  25725. const PagesIndexWmsBadOut = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$E], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/wms/bad-out.vue"]]);
  25726. const _sfc_main$E = {
  25727. __name: "BadOutCard",
  25728. props: {
  25729. item: Object
  25730. },
  25731. setup(__props, { expose: __expose }) {
  25732. __expose();
  25733. const props2 = __props;
  25734. const __returned__ = { props: props2 };
  25735. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25736. return __returned__;
  25737. }
  25738. };
  25739. function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
  25740. var _a;
  25741. return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [
  25742. vue.createElementVNode("view", { class: "flex w100" }, [
  25743. vue.createElementVNode("view", { class: "flex-d" }, [
  25744. vue.createElementVNode("image", {
  25745. style: { "width": "80px", "height": "100px" },
  25746. src: $props.item.cover,
  25747. mode: "aspectFill"
  25748. }, null, 8, ["src"]),
  25749. vue.createElementVNode(
  25750. "view",
  25751. { class: "quantity mt-20" },
  25752. "数量: " + vue.toDisplayString($props.item.num),
  25753. 1
  25754. /* TEXT */
  25755. )
  25756. ]),
  25757. vue.createElementVNode("view", { class: "book-info ml-20 flex-1" }, [
  25758. vue.createElementVNode(
  25759. "view",
  25760. { class: "common-title mb-20" },
  25761. vue.toDisplayString($props.item.title),
  25762. 1
  25763. /* TEXT */
  25764. ),
  25765. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  25766. vue.createElementVNode(
  25767. "view",
  25768. { class: "isbn" },
  25769. "ISBN: " + vue.toDisplayString($props.item.isbn),
  25770. 1
  25771. /* TEXT */
  25772. ),
  25773. vue.createElementVNode(
  25774. "view",
  25775. { class: "set" },
  25776. "套装: " + vue.toDisplayString($props.item.suit == 1 ? "是" : "否"),
  25777. 1
  25778. /* TEXT */
  25779. )
  25780. ]),
  25781. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  25782. vue.createElementVNode(
  25783. "view",
  25784. { class: "discount" },
  25785. "回收折扣: " + vue.toDisplayString($props.item.recycleDiscount),
  25786. 1
  25787. /* TEXT */
  25788. ),
  25789. vue.createElementVNode(
  25790. "view",
  25791. { class: "review" },
  25792. "审核金额: " + vue.toDisplayString($props.item.finalMoney),
  25793. 1
  25794. /* TEXT */
  25795. )
  25796. ]),
  25797. vue.createElementVNode("view", { class: "flex flex-j-b mb-10" }, [
  25798. vue.createElementVNode(
  25799. "view",
  25800. { class: "price" },
  25801. "定价: " + vue.toDisplayString($props.item.bookPrice),
  25802. 1
  25803. /* TEXT */
  25804. ),
  25805. vue.createElementVNode(
  25806. "view",
  25807. { class: "estimate" },
  25808. "预估单价: " + vue.toDisplayString($props.item.expectMoney),
  25809. 1
  25810. /* TEXT */
  25811. )
  25812. ]),
  25813. vue.createElementVNode(
  25814. "view",
  25815. { class: "quality mb-10" },
  25816. " 品相: 良好(" + vue.toDisplayString($props.item.goodNum) + ") 、 一般(" + vue.toDisplayString($props.item.generalNum) + ") 、 极差(" + vue.toDisplayString($props.item.badNum) + ") ",
  25817. 1
  25818. /* TEXT */
  25819. ),
  25820. vue.createElementVNode(
  25821. "view",
  25822. { class: "reason color-red" },
  25823. "原因: " + vue.toDisplayString((_a = $props.item.auditCommentList) == null ? void 0 : _a.filter((item) => item.sts == 3).map((item) => item.com).join(";")),
  25824. 1
  25825. /* TEXT */
  25826. )
  25827. ])
  25828. ])
  25829. ]);
  25830. }
  25831. 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"]]);
  25832. const _sfc_main$D = {
  25833. __name: "bad-out-order",
  25834. setup(__props, { expose: __expose }) {
  25835. __expose();
  25836. const ttsModule2 = vue.ref(null);
  25837. const searchText = vue.ref("");
  25838. const errorMsg = vue.ref("");
  25839. const hasData = vue.ref(false);
  25840. const locationInfo = vue.ref({
  25841. positionCode: "",
  25842. waybillCode: "",
  25843. orderId: "",
  25844. badNum: "",
  25845. remark: ""
  25846. });
  25847. const badList = vue.ref([]);
  25848. onLoad((options) => {
  25849. if (options.searchText) {
  25850. searchText.value = options.searchText;
  25851. onSearch();
  25852. }
  25853. ttsModule2.value = new VolumeTTS();
  25854. });
  25855. const getSearchType = (text) => {
  25856. return /^[0-9]+$/.test(text) ? 1 : 2;
  25857. };
  25858. const onSearch = async () => {
  25859. if (!searchText.value) {
  25860. errorMsg.value = "请输入运单号或订单编号";
  25861. hasData.value = false;
  25862. return;
  25863. }
  25864. try {
  25865. const searchType = getSearchType(searchText.value);
  25866. const res2 = await uni.$u.http.post("/app/stock/findOrderOutStock", {
  25867. search: searchText.value,
  25868. searchType
  25869. });
  25870. if (res2.code == 200) {
  25871. const data = res2.data;
  25872. errorMsg.value = "";
  25873. hasData.value = true;
  25874. locationInfo.value = {
  25875. positionCode: data.positionCode || "",
  25876. waybillCode: data.waybillCode || "",
  25877. orderId: data.orderId || "",
  25878. badNum: data.badNum || "",
  25879. remark: data.remark || ""
  25880. };
  25881. badList.value = data.detailVoList || [];
  25882. } else {
  25883. errorMsg.value = res2.msg || "未找到相关数据";
  25884. hasData.value = false;
  25885. return;
  25886. }
  25887. } catch (error2) {
  25888. errorMsg.value = error2.message || "获取数据失败";
  25889. hasData.value = false;
  25890. uni.showToast({
  25891. title: "获取数据失败",
  25892. icon: "none"
  25893. });
  25894. }
  25895. };
  25896. const openScan = () => {
  25897. uni.scanCode({
  25898. success: (res2) => {
  25899. searchText.value = res2.result;
  25900. onSearch();
  25901. },
  25902. fail: (err) => {
  25903. uni.showToast({
  25904. title: "扫码失败",
  25905. icon: "error"
  25906. });
  25907. }
  25908. });
  25909. };
  25910. const onConfirm = () => {
  25911. uni.showModal({
  25912. title: "确认提示",
  25913. content: "是否确认出库?",
  25914. success: async (res2) => {
  25915. if (res2.confirm) {
  25916. try {
  25917. await uni.$u.http.post("/app/stock/outStock", {
  25918. orderId: locationInfo.value.orderId,
  25919. positionCode: locationInfo.value.positionCode,
  25920. outputRemark: locationInfo.value.remark
  25921. });
  25922. uni.showToast({
  25923. title: "出库成功",
  25924. icon: "success"
  25925. });
  25926. ttsModule2.value.speak("出库成功");
  25927. searchText.value = "";
  25928. locationInfo.value = {
  25929. positionCode: "",
  25930. waybillCode: "",
  25931. orderId: "",
  25932. badNum: "",
  25933. remark: ""
  25934. };
  25935. badList.value = [];
  25936. } catch (error2) {
  25937. uni.showToast({
  25938. title: "出库失败",
  25939. icon: "none"
  25940. });
  25941. }
  25942. }
  25943. }
  25944. });
  25945. };
  25946. const remarkVisible = vue.ref(false);
  25947. const currentRemark = vue.ref("");
  25948. const currentEditIndex = vue.ref(-1);
  25949. const openRemarkDialog = (index2, remark = "") => {
  25950. currentEditIndex.value = index2;
  25951. currentRemark.value = remark;
  25952. remarkVisible.value = true;
  25953. };
  25954. const handleRemarkConfirm = (remark) => {
  25955. if (currentEditIndex.value >= 0) {
  25956. orders.value[currentEditIndex.value].remark = remark;
  25957. }
  25958. currentEditIndex.value = -1;
  25959. currentRemark.value = "";
  25960. };
  25961. const __returned__ = { ttsModule: ttsModule2, searchText, errorMsg, hasData, locationInfo, badList, getSearchType, onSearch, openScan, onConfirm, remarkVisible, currentRemark, currentEditIndex, openRemarkDialog, handleRemarkConfirm, ref: vue.ref, onMounted: vue.onMounted, BadOutCard, RemarkDialog, get VolumeTTS() {
  25962. return VolumeTTS;
  25963. }, get onLoad() {
  25964. return onLoad;
  25965. } };
  25966. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25967. return __returned__;
  25968. }
  25969. };
  25970. function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
  25971. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  25972. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  25973. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$3);
  25974. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  25975. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  25976. vue.createCommentVNode(" 搜索框 "),
  25977. vue.createVNode(_component_u_sticky, null, {
  25978. default: vue.withCtx(() => [
  25979. vue.createElementVNode("view", { class: "search-area flex-c mb-20" }, [
  25980. vue.createVNode(_component_u_search, {
  25981. modelValue: $setup.searchText,
  25982. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  25983. placeholder: "请输入运单号/订单编号",
  25984. "show-action": false,
  25985. clearabled: true,
  25986. onChange: $setup.onSearch,
  25987. height: "40"
  25988. }, null, 8, ["modelValue"]),
  25989. vue.createVNode(_component_u_icon, {
  25990. name: "scan",
  25991. size: "28",
  25992. color: "#19be6b",
  25993. onClick: $setup.openScan
  25994. })
  25995. ])
  25996. ]),
  25997. _: 1
  25998. /* STABLE */
  25999. }),
  26000. vue.createElementVNode("view", { class: "content" }, [
  26001. vue.createCommentVNode(" 错误提示 "),
  26002. $setup.errorMsg ? (vue.openBlock(), vue.createElementBlock("view", {
  26003. key: 0,
  26004. class: "error-section"
  26005. }, [
  26006. vue.createVNode(_component_u_icon, {
  26007. name: "info-circle",
  26008. color: "#fa3534",
  26009. size: "20"
  26010. }),
  26011. vue.createElementVNode(
  26012. "text",
  26013. { class: "error-text" },
  26014. vue.toDisplayString($setup.errorMsg),
  26015. 1
  26016. /* TEXT */
  26017. )
  26018. ])) : vue.createCommentVNode("v-if", true),
  26019. vue.createCommentVNode(" 基本信息 "),
  26020. $setup.hasData ? (vue.openBlock(), vue.createElementBlock(
  26021. vue.Fragment,
  26022. { key: 1 },
  26023. [
  26024. vue.createElementVNode("view", { class: "info-section" }, [
  26025. vue.createElementVNode(
  26026. "view",
  26027. { class: "info-item" },
  26028. "库位:" + vue.toDisplayString($setup.locationInfo.positionCode),
  26029. 1
  26030. /* TEXT */
  26031. ),
  26032. vue.createElementVNode(
  26033. "view",
  26034. { class: "info-item" },
  26035. "物流单号:" + vue.toDisplayString($setup.locationInfo.waybillCode || "-"),
  26036. 1
  26037. /* TEXT */
  26038. ),
  26039. vue.createElementVNode(
  26040. "view",
  26041. { class: "info-item" },
  26042. "订单编号:" + vue.toDisplayString($setup.locationInfo.orderId),
  26043. 1
  26044. /* TEXT */
  26045. ),
  26046. vue.createElementVNode(
  26047. "view",
  26048. { class: "info-item" },
  26049. "订单商品:" + vue.toDisplayString($setup.locationInfo.badNum),
  26050. 1
  26051. /* TEXT */
  26052. ),
  26053. vue.createElementVNode(
  26054. "view",
  26055. { class: "info-item" },
  26056. "备注信息:" + vue.toDisplayString($setup.locationInfo.remark || "-"),
  26057. 1
  26058. /* TEXT */
  26059. )
  26060. ]),
  26061. vue.createCommentVNode(" 极差商品列表 "),
  26062. vue.createElementVNode("view", { class: "bad-list" }, [
  26063. vue.createElementVNode("view", { class: "list-title mb-6" }, "极差"),
  26064. (vue.openBlock(true), vue.createElementBlock(
  26065. vue.Fragment,
  26066. null,
  26067. vue.renderList($setup.badList, (item, index2) => {
  26068. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  26069. vue.createVNode($setup["BadOutCard"], {
  26070. item,
  26071. index: index2
  26072. }, null, 8, ["item", "index"])
  26073. ]);
  26074. }),
  26075. 128
  26076. /* KEYED_FRAGMENT */
  26077. ))
  26078. ])
  26079. ],
  26080. 64
  26081. /* STABLE_FRAGMENT */
  26082. )) : vue.createCommentVNode("v-if", true)
  26083. ]),
  26084. vue.createCommentVNode(" 底部按钮 "),
  26085. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  26086. vue.createVNode(_component_u_button, {
  26087. size: "large",
  26088. type: "warning",
  26089. text: "反馈",
  26090. onClick: $setup.openRemarkDialog
  26091. }),
  26092. vue.createVNode(_component_u_button, {
  26093. size: "large",
  26094. type: "primary",
  26095. text: "确定出库",
  26096. onClick: $setup.onConfirm
  26097. })
  26098. ]),
  26099. vue.createCommentVNode(" 备注弹窗 "),
  26100. vue.createVNode($setup["RemarkDialog"], {
  26101. visible: $setup.remarkVisible,
  26102. "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => $setup.remarkVisible = $event),
  26103. "initial-value": $setup.currentRemark,
  26104. onConfirm: $setup.handleRemarkConfirm
  26105. }, null, 8, ["visible", "initial-value"])
  26106. ]);
  26107. }
  26108. 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"]]);
  26109. const _sfc_main$C = {
  26110. __name: "bad-off",
  26111. setup(__props, { expose: __expose }) {
  26112. __expose();
  26113. const searchText = vue.ref("");
  26114. const taskList = vue.ref([]);
  26115. const loading = vue.ref(false);
  26116. const taskStatusEnum = {
  26117. 1: "待作业",
  26118. 2: "作业中",
  26119. 3: "已完成",
  26120. 4: "已关闭"
  26121. };
  26122. const getTaskStatusText = (status) => {
  26123. return taskStatusEnum[status] || "未知状态";
  26124. };
  26125. const fetchTaskList = async () => {
  26126. loading.value = true;
  26127. try {
  26128. const response = await uni.$u.http.post("/app/appstock/getNeedStockList");
  26129. formatAppLog("log", "at pages/index/wms/bad-off.vue:77", response);
  26130. taskList.value = response;
  26131. if (response.code === 200) {
  26132. taskList.value = response.data || [];
  26133. } else {
  26134. uni.showToast({
  26135. title: response.msg || "获取任务列表失败",
  26136. icon: "none"
  26137. });
  26138. }
  26139. } catch (error2) {
  26140. uni.showToast({
  26141. title: "获取任务列表失败",
  26142. icon: "none"
  26143. });
  26144. } finally {
  26145. loading.value = false;
  26146. }
  26147. };
  26148. const onSearch = () => {
  26149. fetchTaskList();
  26150. };
  26151. const openScan = () => {
  26152. uni.scanCode({
  26153. success: (res2) => {
  26154. searchText.value = res2.result;
  26155. onSearch();
  26156. },
  26157. fail: (err) => {
  26158. uni.showToast({
  26159. title: "扫码失败",
  26160. icon: "error"
  26161. });
  26162. }
  26163. });
  26164. };
  26165. const handleTaskClick = (task) => {
  26166. uni.showModal({
  26167. title: "领取确认",
  26168. content: "是否确认领取下架任务?",
  26169. cancelText: "取消",
  26170. confirmText: "确认",
  26171. success: async (res2) => {
  26172. if (res2.confirm) {
  26173. try {
  26174. const response = await uni.$u.http.post(`/app/appstock/lockStockTask?taskCode=${task.taskCode}`);
  26175. if (response.code === 200) {
  26176. uni.navigateTo({
  26177. url: `/pages/index/wms/task-detail?taskCode=${task.taskCode}`
  26178. });
  26179. } else {
  26180. uni.showToast({
  26181. title: response.msg || "任务锁定失败",
  26182. icon: "none"
  26183. });
  26184. }
  26185. } catch (error2) {
  26186. uni.showToast({
  26187. title: error2,
  26188. icon: "none"
  26189. });
  26190. }
  26191. }
  26192. }
  26193. });
  26194. };
  26195. vue.onMounted(() => {
  26196. fetchTaskList();
  26197. });
  26198. const __returned__ = { searchText, taskList, loading, taskStatusEnum, getTaskStatusText, fetchTaskList, onSearch, openScan, handleTaskClick, ref: vue.ref, onMounted: vue.onMounted };
  26199. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26200. return __returned__;
  26201. }
  26202. };
  26203. function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
  26204. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  26205. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  26206. vue.createCommentVNode(" 任务列表 "),
  26207. vue.createElementVNode("view", { class: "task-list" }, [
  26208. !$setup.loading ? (vue.openBlock(), vue.createElementBlock(
  26209. vue.Fragment,
  26210. { key: 0 },
  26211. [
  26212. $setup.taskList.length > 0 ? (vue.openBlock(true), vue.createElementBlock(
  26213. vue.Fragment,
  26214. { key: 0 },
  26215. vue.renderList($setup.taskList, (item, index2) => {
  26216. return vue.openBlock(), vue.createElementBlock("view", {
  26217. key: index2,
  26218. class: "task-card",
  26219. onClick: ($event) => $setup.handleTaskClick(item)
  26220. }, [
  26221. vue.createElementVNode("view", { class: "task-header" }, [
  26222. vue.createElementVNode(
  26223. "text",
  26224. { class: "task-no" },
  26225. "作业单号:" + vue.toDisplayString(item.taskCode),
  26226. 1
  26227. /* TEXT */
  26228. )
  26229. ]),
  26230. vue.createElementVNode("view", { class: "task-content" }, [
  26231. vue.createElementVNode("view", { class: "flex-a mb-10" }, [
  26232. vue.createElementVNode("text", { class: "label" }, "仓库:"),
  26233. vue.createElementVNode(
  26234. "text",
  26235. { class: "value" },
  26236. vue.toDisplayString(item.godownName),
  26237. 1
  26238. /* TEXT */
  26239. )
  26240. ]),
  26241. vue.createElementVNode("view", { class: "flex-a mb-10" }, [
  26242. vue.createElementVNode("text", { class: "label" }, "订单数量:"),
  26243. vue.createElementVNode(
  26244. "text",
  26245. { class: "value" },
  26246. vue.toDisplayString(item.orderNum),
  26247. 1
  26248. /* TEXT */
  26249. )
  26250. ]),
  26251. vue.createElementVNode("view", { class: "flex-a mb-10" }, [
  26252. vue.createElementVNode("text", { class: "label" }, "创建时间:"),
  26253. vue.createElementVNode(
  26254. "text",
  26255. { class: "value" },
  26256. vue.toDisplayString(item.createTime),
  26257. 1
  26258. /* TEXT */
  26259. )
  26260. ]),
  26261. vue.createElementVNode("view", { class: "flex-a" }, [
  26262. vue.createElementVNode("text", { class: "label" }, "作业状态:"),
  26263. vue.createElementVNode(
  26264. "text",
  26265. { class: "value" },
  26266. vue.toDisplayString($setup.getTaskStatusText(item.taskStatus)),
  26267. 1
  26268. /* TEXT */
  26269. )
  26270. ])
  26271. ])
  26272. ], 8, ["onClick"]);
  26273. }),
  26274. 128
  26275. /* KEYED_FRAGMENT */
  26276. )) : (vue.openBlock(), vue.createElementBlock("view", {
  26277. key: 1,
  26278. class: "empty-state"
  26279. }, [
  26280. vue.createElementVNode("text", null, "暂无任务数据")
  26281. ]))
  26282. ],
  26283. 64
  26284. /* STABLE_FRAGMENT */
  26285. )) : (vue.openBlock(), vue.createElementBlock("view", {
  26286. key: 1,
  26287. class: "loading-state"
  26288. }, [
  26289. vue.createVNode(_component_u_loading_icon),
  26290. vue.createElementVNode("text", null, "加载中...")
  26291. ]))
  26292. ])
  26293. ]);
  26294. }
  26295. 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"]]);
  26296. const _sfc_main$B = {
  26297. __name: "order-query",
  26298. setup(__props, { expose: __expose }) {
  26299. __expose();
  26300. const query = vue.reactive({
  26301. searchType: 2,
  26302. search: ""
  26303. });
  26304. const orderQuery = () => {
  26305. if (!query.search) {
  26306. uni.$u.toast("请输入快递单号/订单编号");
  26307. return;
  26308. }
  26309. uni.navigateTo({
  26310. url: `/pages/index/wms/order-query-list?id=${query.search}`
  26311. });
  26312. };
  26313. function openScan() {
  26314. uni.scanCode({
  26315. success: (res2) => {
  26316. query.search = res2.result;
  26317. orderQuery();
  26318. }
  26319. });
  26320. }
  26321. onLoad(() => {
  26322. uni.$u.useGlobalEvent((e) => {
  26323. if (e.barcode) {
  26324. query.search = e.barcode;
  26325. orderQuery();
  26326. }
  26327. });
  26328. });
  26329. const __returned__ = { query, orderQuery, openScan, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  26330. return onLoad;
  26331. } };
  26332. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26333. return __returned__;
  26334. }
  26335. };
  26336. function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
  26337. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  26338. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  26339. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  26340. vue.createCommentVNode(" 底部扫码输入框 "),
  26341. vue.createElementVNode("view", {
  26342. class: "fixed-bottom pad-20",
  26343. style: { "background": "#ffffff" }
  26344. }, [
  26345. vue.createVNode(_component_u_search, {
  26346. placeholder: "请输入快递单号/订单编号",
  26347. searchIconSize: 24,
  26348. bgColor: "#f6f7f6",
  26349. onSearch: $setup.orderQuery,
  26350. modelValue: $setup.query.search,
  26351. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.query.search = $event),
  26352. "custom-style": "font-size:32rpx",
  26353. "placeholder-style": "font-size:32rpx",
  26354. clearabled: true,
  26355. focus: false,
  26356. showAction: false,
  26357. height: 42
  26358. }, null, 8, ["modelValue"]),
  26359. vue.createVNode(_component_u_icon, {
  26360. name: "scan",
  26361. size: "34",
  26362. color: "#19be6b",
  26363. onClick: $setup.openScan
  26364. })
  26365. ])
  26366. ]);
  26367. }
  26368. 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"]]);
  26369. const props$5 = {
  26370. props: {
  26371. // 是否显示圆点
  26372. isDot: {
  26373. type: Boolean,
  26374. default: props$E.badge.isDot
  26375. },
  26376. // 显示的内容
  26377. value: {
  26378. type: [Number, String],
  26379. default: props$E.badge.value
  26380. },
  26381. // 显示的内容
  26382. modelValue: {
  26383. type: [Number, String],
  26384. default: props$E.badge.modelValue
  26385. },
  26386. // 是否显示
  26387. show: {
  26388. type: Boolean,
  26389. default: props$E.badge.show
  26390. },
  26391. // 最大值,超过最大值会显示 '{max}+'
  26392. max: {
  26393. type: [Number, String],
  26394. default: props$E.badge.max
  26395. },
  26396. // 主题类型,error|warning|success|primary
  26397. type: {
  26398. type: String,
  26399. default: props$E.badge.type
  26400. },
  26401. // 当数值为 0 时,是否展示 Badge
  26402. showZero: {
  26403. type: Boolean,
  26404. default: props$E.badge.showZero
  26405. },
  26406. // 背景颜色,优先级比type高,如设置,type参数会失效
  26407. bgColor: {
  26408. type: [String, null],
  26409. default: props$E.badge.bgColor
  26410. },
  26411. // 字体颜色
  26412. color: {
  26413. type: [String, null],
  26414. default: props$E.badge.color
  26415. },
  26416. // 徽标形状,circle-四角均为圆角,horn-左下角为直角
  26417. shape: {
  26418. type: String,
  26419. default: props$E.badge.shape
  26420. },
  26421. // 设置数字的显示方式,overflow|ellipsis|limit
  26422. // overflow会根据max字段判断,超出显示`${max}+`
  26423. // ellipsis会根据max判断,超出显示`${max}...`
  26424. // limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数
  26425. numberType: {
  26426. type: String,
  26427. default: props$E.badge.numberType
  26428. },
  26429. // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
  26430. offset: {
  26431. type: Array,
  26432. default: props$E.badge.offset
  26433. },
  26434. // 是否反转背景和字体颜色
  26435. inverted: {
  26436. type: Boolean,
  26437. default: props$E.badge.inverted
  26438. },
  26439. // 是否绝对定位
  26440. absolute: {
  26441. type: Boolean,
  26442. default: props$E.badge.absolute
  26443. }
  26444. }
  26445. };
  26446. const _sfc_main$A = {
  26447. name: "u-badge",
  26448. mixins: [mpMixin, props$5, mixin],
  26449. computed: {
  26450. // 是否将badge中心与父组件右上角重合
  26451. boxStyle() {
  26452. let style = {};
  26453. return style;
  26454. },
  26455. // 整个组件的样式
  26456. badgeStyle() {
  26457. const style = {};
  26458. if (this.color) {
  26459. style.color = this.color;
  26460. }
  26461. if (this.bgColor && !this.inverted) {
  26462. style.backgroundColor = this.bgColor;
  26463. }
  26464. if (this.absolute) {
  26465. style.position = "absolute";
  26466. if (this.offset.length) {
  26467. const top = this.offset[0];
  26468. const right = this.offset[1] || top;
  26469. style.top = uni.$u.addUnit(top);
  26470. style.right = uni.$u.addUnit(right);
  26471. }
  26472. }
  26473. return style;
  26474. },
  26475. showValue() {
  26476. switch (this.numberType) {
  26477. case "overflow":
  26478. return Number(this.value) > Number(this.max) ? this.max + "+" : this.value;
  26479. case "ellipsis":
  26480. return Number(this.value) > Number(this.max) ? "..." : this.value;
  26481. case "limit":
  26482. 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;
  26483. default:
  26484. return Number(this.value);
  26485. }
  26486. }
  26487. }
  26488. };
  26489. function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
  26490. return _ctx.show && ((Number(_ctx.value) === 0 ? _ctx.showZero : true) || _ctx.isDot) ? (vue.openBlock(), vue.createElementBlock(
  26491. "text",
  26492. {
  26493. key: 0,
  26494. 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"]),
  26495. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), $options.badgeStyle])
  26496. },
  26497. vue.toDisplayString(_ctx.isDot ? "" : $options.showValue),
  26498. 7
  26499. /* TEXT, CLASS, STYLE */
  26500. )) : vue.createCommentVNode("v-if", true);
  26501. }
  26502. 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"]]);
  26503. const props$4 = {
  26504. props: {
  26505. // 滑块的移动过渡时间,单位ms
  26506. duration: {
  26507. type: Number,
  26508. default: props$E.tabs.duration
  26509. },
  26510. // tabs标签数组
  26511. list: {
  26512. type: Array,
  26513. default: props$E.tabs.list
  26514. },
  26515. // 滑块颜色
  26516. lineColor: {
  26517. type: String,
  26518. default: props$E.tabs.lineColor
  26519. },
  26520. // 菜单选择中时的样式
  26521. activeStyle: {
  26522. type: [String, Object],
  26523. default: props$E.tabs.activeStyle
  26524. },
  26525. // 菜单非选中时的样式
  26526. inactiveStyle: {
  26527. type: [String, Object],
  26528. default: props$E.tabs.inactiveStyle
  26529. },
  26530. // 滑块长度
  26531. lineWidth: {
  26532. type: [String, Number],
  26533. default: props$E.tabs.lineWidth
  26534. },
  26535. // 滑块高度
  26536. lineHeight: {
  26537. type: [String, Number],
  26538. default: props$E.tabs.lineHeight
  26539. },
  26540. // 滑块背景显示大小,当滑块背景设置为图片时使用
  26541. lineBgSize: {
  26542. type: String,
  26543. default: props$E.tabs.lineBgSize
  26544. },
  26545. // 菜单item的样式
  26546. itemStyle: {
  26547. type: [String, Object],
  26548. default: props$E.tabs.itemStyle
  26549. },
  26550. // 菜单是否可滚动
  26551. scrollable: {
  26552. type: Boolean,
  26553. default: props$E.tabs.scrollable
  26554. },
  26555. // 当前选中标签的索引
  26556. current: {
  26557. type: [Number, String],
  26558. default: props$E.tabs.current
  26559. },
  26560. // 默认读取的键名
  26561. keyName: {
  26562. type: String,
  26563. default: props$E.tabs.keyName
  26564. }
  26565. }
  26566. };
  26567. const _sfc_main$z = {
  26568. name: "u-tabs",
  26569. mixins: [mpMixin, mixin, props$4],
  26570. data() {
  26571. return {
  26572. firstTime: true,
  26573. scrollLeft: 0,
  26574. scrollViewWidth: 0,
  26575. lineOffsetLeft: 0,
  26576. tabsRect: {
  26577. left: 0
  26578. },
  26579. innerCurrent: 0,
  26580. moving: false
  26581. };
  26582. },
  26583. watch: {
  26584. current: {
  26585. immediate: true,
  26586. handler(newValue, oldValue) {
  26587. if (newValue !== this.innerCurrent) {
  26588. this.innerCurrent = newValue;
  26589. this.$nextTick(() => {
  26590. this.resize();
  26591. });
  26592. }
  26593. }
  26594. },
  26595. // list变化时,重新渲染list各项信息
  26596. list() {
  26597. this.$nextTick(() => {
  26598. this.resize();
  26599. });
  26600. }
  26601. },
  26602. computed: {
  26603. textStyle() {
  26604. return (index2) => {
  26605. const style = {};
  26606. const customeStyle = index2 === this.innerCurrent ? uni.$u.addStyle(this.activeStyle) : uni.$u.addStyle(
  26607. this.inactiveStyle
  26608. );
  26609. if (this.list[index2].disabled) {
  26610. style.color = "#c8c9cc";
  26611. }
  26612. return uni.$u.deepMerge(customeStyle, style);
  26613. };
  26614. },
  26615. propsBadge() {
  26616. return uni.$u.props.badge;
  26617. }
  26618. },
  26619. async mounted() {
  26620. this.init();
  26621. },
  26622. emits: ["click", "change"],
  26623. methods: {
  26624. setLineLeft() {
  26625. const tabItem = this.list[this.innerCurrent];
  26626. if (!tabItem) {
  26627. return;
  26628. }
  26629. let lineOffsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => total + curr.rect.width, 0);
  26630. const lineWidth = uni.$u.getPx(this.lineWidth);
  26631. this.lineOffsetLeft = lineOffsetLeft + (tabItem.rect.width - lineWidth) / 2;
  26632. if (this.firstTime) {
  26633. setTimeout(() => {
  26634. this.firstTime = false;
  26635. }, 10);
  26636. }
  26637. },
  26638. // nvue下设置滑块的位置
  26639. animation(x, duration = 0) {
  26640. },
  26641. // 点击某一个标签
  26642. clickHandler(item, index2) {
  26643. this.$emit("click", {
  26644. ...item,
  26645. index: index2
  26646. });
  26647. if (item.disabled)
  26648. return;
  26649. this.innerCurrent = index2;
  26650. this.resize();
  26651. this.$emit("change", {
  26652. ...item,
  26653. index: index2
  26654. });
  26655. },
  26656. init() {
  26657. uni.$u.sleep().then(() => {
  26658. this.resize();
  26659. });
  26660. },
  26661. setScrollLeft() {
  26662. const tabRect = this.list[this.innerCurrent];
  26663. const offsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => {
  26664. return total + curr.rect.width;
  26665. }, 0);
  26666. const windowWidth = uni.$u.sys().windowWidth;
  26667. let scrollLeft = offsetLeft - (this.tabsRect.width - tabRect.rect.width) / 2 - (windowWidth - this.tabsRect.right) / 2 + this.tabsRect.left / 2;
  26668. scrollLeft = Math.min(scrollLeft, this.scrollViewWidth - this.tabsRect.width);
  26669. this.scrollLeft = Math.max(0, scrollLeft);
  26670. },
  26671. // 获取所有标签的尺寸
  26672. resize() {
  26673. if (this.list.length === 0) {
  26674. return;
  26675. }
  26676. Promise.all([this.getTabsRect(), this.getAllItemRect()]).then(([tabsRect, itemRect = []]) => {
  26677. this.tabsRect = tabsRect;
  26678. this.scrollViewWidth = 0;
  26679. itemRect.map((item, index2) => {
  26680. this.scrollViewWidth += item.width;
  26681. this.list[index2].rect = item;
  26682. });
  26683. this.setLineLeft();
  26684. this.setScrollLeft();
  26685. });
  26686. },
  26687. // 获取导航菜单的尺寸
  26688. getTabsRect() {
  26689. return new Promise((resolve) => {
  26690. this.queryRect("u-tabs__wrapper__scroll-view").then((size) => resolve(size));
  26691. });
  26692. },
  26693. // 获取所有标签的尺寸
  26694. getAllItemRect() {
  26695. return new Promise((resolve) => {
  26696. const promiseAllArr = this.list.map((item, index2) => this.queryRect(
  26697. `u-tabs__wrapper__nav__item-${index2}`,
  26698. true
  26699. ));
  26700. Promise.all(promiseAllArr).then((sizes) => resolve(sizes));
  26701. });
  26702. },
  26703. // 获取各个标签的尺寸
  26704. queryRect(el, item) {
  26705. return new Promise((resolve) => {
  26706. this.$uGetRect(`.${el}`).then((size) => {
  26707. resolve(size);
  26708. });
  26709. });
  26710. }
  26711. }
  26712. };
  26713. function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
  26714. const _component_u_badge = resolveEasycom(vue.resolveDynamicComponent("u-badge"), __easycom_0$1);
  26715. return vue.openBlock(), vue.createElementBlock("view", { class: "u-tabs" }, [
  26716. vue.createElementVNode("view", { class: "u-tabs__wrapper" }, [
  26717. vue.renderSlot(_ctx.$slots, "left", {}, void 0, true),
  26718. vue.createElementVNode("view", { class: "u-tabs__wrapper__scroll-view-wrapper" }, [
  26719. vue.createElementVNode("scroll-view", {
  26720. "scroll-x": _ctx.scrollable,
  26721. "scroll-left": $data.scrollLeft,
  26722. "scroll-with-animation": "",
  26723. class: "u-tabs__wrapper__scroll-view",
  26724. "show-scrollbar": false,
  26725. ref: "u-tabs__wrapper__scroll-view"
  26726. }, [
  26727. vue.createElementVNode(
  26728. "view",
  26729. {
  26730. class: "u-tabs__wrapper__nav",
  26731. ref: "u-tabs__wrapper__nav"
  26732. },
  26733. [
  26734. (vue.openBlock(true), vue.createElementBlock(
  26735. vue.Fragment,
  26736. null,
  26737. vue.renderList(_ctx.list, (item, index2) => {
  26738. return vue.openBlock(), vue.createElementBlock("view", {
  26739. class: vue.normalizeClass(["u-tabs__wrapper__nav__item", [`u-tabs__wrapper__nav__item-${index2}`, item.disabled && "u-tabs__wrapper__nav__item--disabled"]]),
  26740. key: index2,
  26741. onClick: ($event) => $options.clickHandler(item, index2),
  26742. ref_for: true,
  26743. ref: `u-tabs__wrapper__nav__item-${index2}`,
  26744. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.itemStyle), { flex: _ctx.scrollable ? "" : 1 }])
  26745. }, [
  26746. vue.createElementVNode(
  26747. "text",
  26748. {
  26749. class: vue.normalizeClass([[item.disabled && "u-tabs__wrapper__nav__item__text--disabled"], "u-tabs__wrapper__nav__item__text"]),
  26750. style: vue.normalizeStyle([$options.textStyle(index2)])
  26751. },
  26752. vue.toDisplayString(item[_ctx.keyName]),
  26753. 7
  26754. /* TEXT, CLASS, STYLE */
  26755. ),
  26756. vue.createVNode(_component_u_badge, {
  26757. show: !!(item.badge && (item.badge.show || item.badge.isDot || item.badge.value)),
  26758. isDot: item.badge && item.badge.isDot || $options.propsBadge.isDot,
  26759. value: item.badge && item.badge.value || $options.propsBadge.value,
  26760. max: item.badge && item.badge.max || $options.propsBadge.max,
  26761. type: item.badge && item.badge.type || $options.propsBadge.type,
  26762. showZero: item.badge && item.badge.showZero || $options.propsBadge.showZero,
  26763. bgColor: item.badge && item.badge.bgColor || $options.propsBadge.bgColor,
  26764. color: item.badge && item.badge.color || $options.propsBadge.color,
  26765. shape: item.badge && item.badge.shape || $options.propsBadge.shape,
  26766. numberType: item.badge && item.badge.numberType || $options.propsBadge.numberType,
  26767. inverted: item.badge && item.badge.inverted || $options.propsBadge.inverted,
  26768. customStyle: "margin-left: 4px;"
  26769. }, null, 8, ["show", "isDot", "value", "max", "type", "showZero", "bgColor", "color", "shape", "numberType", "inverted"])
  26770. ], 14, ["onClick"]);
  26771. }),
  26772. 128
  26773. /* KEYED_FRAGMENT */
  26774. )),
  26775. vue.createElementVNode(
  26776. "view",
  26777. {
  26778. class: "u-tabs__wrapper__nav__line",
  26779. ref: "u-tabs__wrapper__nav__line",
  26780. style: vue.normalizeStyle([{
  26781. width: _ctx.$u.addUnit(_ctx.lineWidth),
  26782. transform: `translate(${$data.lineOffsetLeft}px)`,
  26783. transitionDuration: `${$data.firstTime ? 0 : _ctx.duration}ms`,
  26784. height: _ctx.$u.addUnit(_ctx.lineHeight),
  26785. background: _ctx.lineColor,
  26786. backgroundSize: _ctx.lineBgSize
  26787. }])
  26788. },
  26789. null,
  26790. 4
  26791. /* STYLE */
  26792. )
  26793. ],
  26794. 512
  26795. /* NEED_PATCH */
  26796. )
  26797. ], 8, ["scroll-x", "scroll-left"])
  26798. ]),
  26799. vue.renderSlot(_ctx.$slots, "right", {}, void 0, true)
  26800. ])
  26801. ]);
  26802. }
  26803. 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"]]);
  26804. const _sfc_main$y = {
  26805. __name: "order-query-list",
  26806. setup(__props, { expose: __expose }) {
  26807. __expose();
  26808. const list1 = vue.reactive([{
  26809. name: "商品明细"
  26810. }, {
  26811. name: "操作记录"
  26812. }]);
  26813. const activeTab = vue.ref(0);
  26814. const query = vue.reactive({
  26815. searchType: 2,
  26816. search: ""
  26817. });
  26818. const determineSearchType = (search) => {
  26819. const isNumberString = /^\d+$/.test(search.toString());
  26820. return isNumberString ? 1 : 2;
  26821. };
  26822. const detail = vue.ref({});
  26823. const orderQuery = () => {
  26824. if (!query.search) {
  26825. uni.$u.toast("请输入快递单号/订单编号");
  26826. uni.$u.ttsModule.speak("请输入快递单号/订单编号");
  26827. return;
  26828. }
  26829. query.searchType = determineSearchType(query.search);
  26830. uni.$u.http.get("/app/stock/findOrder", { params: query }).then((res2) => {
  26831. if (res2.code == 200) {
  26832. detail.value = res2.data;
  26833. uni.$u.ttsModule.speak("查询成功");
  26834. getOperationLogs(res2.data.orderId);
  26835. } else {
  26836. uni.$u.toast(res2.msg);
  26837. uni.$u.ttsModule.speak(res2.msg);
  26838. }
  26839. });
  26840. };
  26841. const operationLogs = vue.ref([]);
  26842. const getOperationLogs = (orderId) => {
  26843. uni.$u.http.get("/app/stock/getGodownStocklog", { params: { orderId } }).then((res2) => {
  26844. if (res2.code == 200) {
  26845. operationLogs.value = res2.data;
  26846. }
  26847. });
  26848. };
  26849. function handleTabChange(tab) {
  26850. activeTab.value = tab.index;
  26851. }
  26852. function openScan() {
  26853. uni.scanCode({
  26854. success: (res2) => {
  26855. query.search = res2.result;
  26856. orderQuery();
  26857. }
  26858. });
  26859. }
  26860. onLoad((options) => {
  26861. if (options.id) {
  26862. query.search = options.id;
  26863. orderQuery();
  26864. }
  26865. uni.$u.useGlobalEvent((e) => {
  26866. if (e.barcode) {
  26867. getDetailByCode(e.barcode);
  26868. }
  26869. });
  26870. });
  26871. const __returned__ = { list1, activeTab, query, determineSearchType, detail, orderQuery, operationLogs, getOperationLogs, handleTabChange, openScan, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  26872. return onLoad;
  26873. }, BookInfo };
  26874. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  26875. return __returned__;
  26876. }
  26877. };
  26878. function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
  26879. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_4$1);
  26880. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  26881. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  26882. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  26883. $setup.detail.orderId ? (vue.openBlock(), vue.createElementBlock("view", {
  26884. key: 0,
  26885. class: "header"
  26886. }, [
  26887. vue.createElementVNode("view", { class: "flex-d" }, [
  26888. vue.createElementVNode(
  26889. "text",
  26890. null,
  26891. "订单编号: " + vue.toDisplayString($setup.detail.orderId),
  26892. 1
  26893. /* TEXT */
  26894. ),
  26895. vue.createElementVNode(
  26896. "text",
  26897. { class: "mt-16" },
  26898. "库位: " + vue.toDisplayString($setup.detail.positionCode),
  26899. 1
  26900. /* TEXT */
  26901. )
  26902. ]),
  26903. vue.createElementVNode("view", { class: "status" }, [
  26904. vue.createElementVNode(
  26905. "text",
  26906. null,
  26907. vue.toDisplayString($setup.detail.stockStatus == 1 ? "已入库" : "已出库"),
  26908. 1
  26909. /* TEXT */
  26910. )
  26911. ])
  26912. ])) : vue.createCommentVNode("v-if", true),
  26913. $setup.detail.orderId ? (vue.openBlock(), vue.createElementBlock("view", {
  26914. key: 1,
  26915. style: { "background-color": "#ffffff" },
  26916. class: "pad-5 mt-20 content-info"
  26917. }, [
  26918. vue.createVNode(_component_u_tabs, {
  26919. list: $setup.list1,
  26920. modelValue: $setup.activeTab,
  26921. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.activeTab = $event),
  26922. itemStyle: { height: "44px", width: "48%" },
  26923. onChange: $setup.handleTabChange
  26924. }, null, 8, ["list", "modelValue"]),
  26925. $setup.activeTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  26926. key: 0,
  26927. class: "product-details"
  26928. }, [
  26929. vue.createVNode($setup["BookInfo"], {
  26930. bookList: $setup.detail.detailVoList,
  26931. detail: $setup.detail,
  26932. isShow: false
  26933. }, null, 8, ["bookList", "detail"])
  26934. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  26935. key: 1,
  26936. class: "operation-logs mt-20"
  26937. }, [
  26938. (vue.openBlock(true), vue.createElementBlock(
  26939. vue.Fragment,
  26940. null,
  26941. vue.renderList($setup.operationLogs, (log, index2) => {
  26942. return vue.openBlock(), vue.createElementBlock("view", {
  26943. key: index2,
  26944. class: "log-item"
  26945. }, [
  26946. vue.createElementVNode(
  26947. "text",
  26948. null,
  26949. vue.toDisplayString(log.createTime),
  26950. 1
  26951. /* TEXT */
  26952. ),
  26953. vue.createElementVNode(
  26954. "text",
  26955. null,
  26956. vue.toDisplayString(log.createName),
  26957. 1
  26958. /* TEXT */
  26959. ),
  26960. vue.createElementVNode(
  26961. "text",
  26962. null,
  26963. vue.toDisplayString(log.content),
  26964. 1
  26965. /* TEXT */
  26966. )
  26967. ]);
  26968. }),
  26969. 128
  26970. /* KEYED_FRAGMENT */
  26971. ))
  26972. ]))
  26973. ])) : vue.createCommentVNode("v-if", true),
  26974. vue.createCommentVNode(" 底部扫码输入框 "),
  26975. vue.createElementVNode("view", {
  26976. class: "fixed-bottom pad-20",
  26977. style: { "background": "#ffffff" }
  26978. }, [
  26979. vue.createVNode(_component_u_search, {
  26980. placeholder: "请输入快递单号/订单编号",
  26981. searchIconSize: 24,
  26982. bgColor: "#f6f7f6",
  26983. onSearch: $setup.orderQuery,
  26984. modelValue: $setup.query.search,
  26985. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.query.search = $event),
  26986. "custom-style": "font-size:32rpx",
  26987. "placeholder-style": "font-size:32rpx",
  26988. clearabled: true,
  26989. focus: false,
  26990. showAction: false,
  26991. height: 42
  26992. }, null, 8, ["modelValue"]),
  26993. vue.createVNode(_component_u_icon, {
  26994. name: "scan",
  26995. size: "34",
  26996. color: "#19be6b",
  26997. onClick: $setup.openScan
  26998. })
  26999. ])
  27000. ]);
  27001. }
  27002. 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"]]);
  27003. const _sfc_main$x = {
  27004. __name: "location-order",
  27005. setup(__props, { expose: __expose }) {
  27006. __expose();
  27007. const positionCode = vue.ref("");
  27008. const onSearch = () => {
  27009. if (positionCode.value) {
  27010. uni.navigateTo({
  27011. url: "/pages/index/wms/location-order-list?positionCode=" + positionCode.value
  27012. });
  27013. } else {
  27014. uni.$u.toast("请输入库位编号");
  27015. }
  27016. };
  27017. function openScan() {
  27018. uni.scanCode({
  27019. success: (res2) => {
  27020. positionCode.value = res2.result;
  27021. onSearch();
  27022. }
  27023. });
  27024. }
  27025. onLoad(() => {
  27026. uni.$u.useGlobalEvent((e) => {
  27027. if (e.barcode) {
  27028. positionCode.value = e.barcode;
  27029. onSearch();
  27030. }
  27031. });
  27032. });
  27033. const __returned__ = { positionCode, onSearch, openScan, ref: vue.ref, get onLoad() {
  27034. return onLoad;
  27035. } };
  27036. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27037. return __returned__;
  27038. }
  27039. };
  27040. function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
  27041. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27042. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27043. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27044. vue.createCommentVNode(" 底部扫码输入框 "),
  27045. vue.createElementVNode("view", {
  27046. class: "fixed-bottom pad-20",
  27047. style: { "background": "#ffffff" }
  27048. }, [
  27049. vue.createVNode(_component_u_search, {
  27050. placeholder: "请输入库位编号",
  27051. searchIconSize: 24,
  27052. bgColor: "#f6f7f6",
  27053. onSearch: $setup.onSearch,
  27054. modelValue: $setup.positionCode,
  27055. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.positionCode = $event),
  27056. clearabled: true,
  27057. focus: false,
  27058. showAction: false,
  27059. height: 42
  27060. }, null, 8, ["modelValue"]),
  27061. vue.createVNode(_component_u_icon, {
  27062. name: "scan",
  27063. size: "32",
  27064. color: "#19be6b",
  27065. onClick: $setup.openScan
  27066. })
  27067. ])
  27068. ]);
  27069. }
  27070. 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"]]);
  27071. const _imports_0 = "/static/img/share.png";
  27072. const _sfc_main$w = {
  27073. __name: "LocationOrderItem",
  27074. props: {
  27075. item: {
  27076. type: Object,
  27077. required: true
  27078. },
  27079. isCheck: {
  27080. type: Boolean,
  27081. default: false
  27082. }
  27083. },
  27084. emits: ["select"],
  27085. setup(__props, { expose: __expose, emit: __emit }) {
  27086. __expose();
  27087. const props2 = __props;
  27088. const emit2 = __emit;
  27089. const toggleSelect = () => {
  27090. emit2("select", props2.item);
  27091. };
  27092. const handleQuickJump = () => {
  27093. uni.navigateTo({
  27094. url: `/pages/index/wms/order-query-list?id=${props2.item.orderId}`
  27095. });
  27096. };
  27097. const __returned__ = { props: props2, emit: emit2, toggleSelect, handleQuickJump };
  27098. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27099. return __returned__;
  27100. }
  27101. };
  27102. function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
  27103. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27104. return vue.openBlock(), vue.createElementBlock("view", { class: "order-item" }, [
  27105. vue.createElementVNode("view", { class: "order-header" }, [
  27106. vue.createElementVNode("view", { class: "order-info" }, [
  27107. vue.createElementVNode("view", { class: "info-row" }, [
  27108. vue.createElementVNode("text", { class: "label" }, "订单编号:"),
  27109. vue.createElementVNode(
  27110. "text",
  27111. { class: "value" },
  27112. vue.toDisplayString($props.item.orderId),
  27113. 1
  27114. /* TEXT */
  27115. )
  27116. ]),
  27117. vue.createElementVNode("view", { class: "info-row" }, [
  27118. vue.createElementVNode("text", { class: "label" }, "不良数量:"),
  27119. vue.createElementVNode(
  27120. "text",
  27121. { class: "value" },
  27122. vue.toDisplayString($props.item.badNum),
  27123. 1
  27124. /* TEXT */
  27125. )
  27126. ]),
  27127. vue.createElementVNode("view", { class: "info-row" }, [
  27128. vue.createElementVNode("text", { class: "label" }, "物流单号:"),
  27129. vue.createElementVNode(
  27130. "text",
  27131. { class: "value" },
  27132. vue.toDisplayString($props.item.waybillCode),
  27133. 1
  27134. /* TEXT */
  27135. )
  27136. ]),
  27137. vue.createElementVNode("view", { class: "info-row" }, [
  27138. vue.createElementVNode("text", { class: "label" }, "验货完成日期:"),
  27139. vue.createElementVNode(
  27140. "text",
  27141. { class: "value" },
  27142. vue.toDisplayString($props.item.auditFinishTime),
  27143. 1
  27144. /* TEXT */
  27145. )
  27146. ]),
  27147. vue.createElementVNode("view", { class: "info-row" }, [
  27148. vue.createElementVNode("text", { class: "label" }, "录入人:"),
  27149. vue.createElementVNode(
  27150. "text",
  27151. { class: "value" },
  27152. vue.toDisplayString($props.item.auditUserName),
  27153. 1
  27154. /* TEXT */
  27155. )
  27156. ])
  27157. ]),
  27158. $props.isCheck ? (vue.openBlock(), vue.createElementBlock("view", {
  27159. key: 0,
  27160. class: "check-icon"
  27161. }, [
  27162. vue.createVNode(_component_u_icon, {
  27163. name: $props.item.checked ? "checkmark-circle-fill" : "checkmark-circle",
  27164. color: $props.item.checked ? "#19be6b" : "#c8c9cc",
  27165. size: "28",
  27166. onClick: $setup.toggleSelect
  27167. }, null, 8, ["name", "color"])
  27168. ])) : vue.createCommentVNode("v-if", true),
  27169. vue.createElementVNode("view", {
  27170. class: "flex flex-d flex-a-c flex-j-c quick-jump",
  27171. onClick: $setup.handleQuickJump
  27172. }, [
  27173. vue.createElementVNode("image", {
  27174. src: _imports_0,
  27175. mode: "widthFix",
  27176. style: { "width": "30px" }
  27177. }),
  27178. vue.createElementVNode("text", { style: { "font-size": "28rpx", "color": "#19be6b" } }, "快速跳转")
  27179. ])
  27180. ])
  27181. ]);
  27182. }
  27183. 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"]]);
  27184. const _sfc_main$v = {
  27185. __name: "location-order-list",
  27186. setup(__props, { expose: __expose }) {
  27187. __expose();
  27188. const orderCode = vue.ref("");
  27189. const originList = vue.ref([]);
  27190. const orderList = vue.ref([]);
  27191. const detail = vue.ref({});
  27192. const getOrderListByPositionCode = (positionCode) => {
  27193. uni.$u.http.get("/app/stock/getOrderByPositionCode?positionCode=" + positionCode).then((res2) => {
  27194. if (res2.code == 200) {
  27195. detail.value = res2.data;
  27196. orderList.value = res2.data.godownStockLogResults;
  27197. originList.value = res2.data.godownStockLogResults;
  27198. if (originList.value.length > 0) {
  27199. uni.$u.ttsModule.speak("查询到" + originList.value.length + "条订单");
  27200. } else {
  27201. uni.$u.toast("暂无订单");
  27202. uni.$u.ttsModule.speak("暂无订单");
  27203. }
  27204. } else {
  27205. uni.$u.toast(res2.msg);
  27206. uni.$u.ttsModule.speak(res2.msg);
  27207. }
  27208. });
  27209. };
  27210. const onSearch = () => {
  27211. if (!orderCode.value) {
  27212. orderList.value = originList.value;
  27213. uni.$u.toast("请输入订单号或物流单号");
  27214. return;
  27215. }
  27216. const searchValue = String(orderCode.value).trim();
  27217. const isNumeric = /^[0-9]+$/.test(searchValue);
  27218. const result = originList.value.filter((item) => {
  27219. if (isNumeric) {
  27220. return item.orderId === orderCode.value;
  27221. } else {
  27222. return item.waybillCode === orderCode.value;
  27223. }
  27224. });
  27225. orderList.value = result;
  27226. };
  27227. function openScan() {
  27228. uni.scanCode({
  27229. success: (res2) => {
  27230. orderCode.value = res2.result;
  27231. onSearch();
  27232. }
  27233. });
  27234. }
  27235. onLoad((options) => {
  27236. if (options.positionCode) {
  27237. getOrderListByPositionCode(options.positionCode);
  27238. }
  27239. uni.$u.useGlobalEvent((e) => {
  27240. if (e.barcode) {
  27241. orderCode.value = res.result;
  27242. onSearch();
  27243. }
  27244. });
  27245. });
  27246. const __returned__ = { orderCode, originList, orderList, detail, getOrderListByPositionCode, onSearch, openScan, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  27247. return onLoad;
  27248. }, LocationOrderItem };
  27249. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27250. return __returned__;
  27251. }
  27252. };
  27253. function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
  27254. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27255. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27256. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27257. vue.createElementVNode("view", { class: "header" }, [
  27258. vue.createElementVNode("view", { class: "flex-d" }, [
  27259. vue.createElementVNode(
  27260. "text",
  27261. null,
  27262. "仓库: " + vue.toDisplayString($setup.detail.godownName),
  27263. 1
  27264. /* TEXT */
  27265. ),
  27266. vue.createElementVNode(
  27267. "text",
  27268. { class: "mt-16" },
  27269. "库位编号: " + vue.toDisplayString($setup.detail.positionCode),
  27270. 1
  27271. /* TEXT */
  27272. ),
  27273. vue.createElementVNode(
  27274. "text",
  27275. { class: "mt-16" },
  27276. "订单数量: " + vue.toDisplayString($setup.originList.length),
  27277. 1
  27278. /* TEXT */
  27279. )
  27280. ])
  27281. ]),
  27282. vue.createElementVNode("view", { class: "product-details" }, [
  27283. (vue.openBlock(true), vue.createElementBlock(
  27284. vue.Fragment,
  27285. null,
  27286. vue.renderList($setup.orderList, (item, index2) => {
  27287. return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
  27288. key: index2,
  27289. item
  27290. }, null, 8, ["item"]);
  27291. }),
  27292. 128
  27293. /* KEYED_FRAGMENT */
  27294. ))
  27295. ]),
  27296. vue.createCommentVNode(" 底部扫码输入框 "),
  27297. vue.createElementVNode("view", {
  27298. class: "fixed-bottom pad-20",
  27299. style: { "background": "#ffffff" }
  27300. }, [
  27301. vue.createVNode(_component_u_search, {
  27302. placeholder: "请输入快递单号/订单编号",
  27303. searchIconSize: 24,
  27304. bgColor: "#f6f7f6",
  27305. onSearch: $setup.onSearch,
  27306. modelValue: $setup.orderCode,
  27307. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.orderCode = $event),
  27308. clearabled: true,
  27309. focus: false,
  27310. showAction: false,
  27311. height: 42
  27312. }, null, 8, ["modelValue"]),
  27313. vue.createVNode(_component_u_icon, {
  27314. name: "scan",
  27315. size: "36",
  27316. color: "#19be6b",
  27317. onClick: $setup.openScan
  27318. })
  27319. ])
  27320. ]);
  27321. }
  27322. 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"]]);
  27323. const _sfc_main$u = {
  27324. __name: "location-select",
  27325. setup(__props, { expose: __expose }) {
  27326. __expose();
  27327. const searchText = vue.ref("");
  27328. const locations = vue.ref([]);
  27329. function getLocationListByGodownId(godownId2, code2 = "") {
  27330. uni.$u.http.get("/app/stock/getGodownPosition?godownId=" + godownId2 + "&code=" + code2).then((res2) => {
  27331. if (res2.code == 200) {
  27332. locations.value = res2.data;
  27333. }
  27334. });
  27335. }
  27336. const scrollHeight = vue.ref(0);
  27337. const onSearch = () => {
  27338. getLocationListByGodownId(godownId.value, searchText.value);
  27339. };
  27340. const openScan = () => {
  27341. uni.scanCode({
  27342. success: (res2) => {
  27343. searchText.value = res2.result;
  27344. onSearch();
  27345. },
  27346. fail: (err) => {
  27347. uni.showToast({
  27348. title: "扫码失败",
  27349. icon: "error"
  27350. });
  27351. }
  27352. });
  27353. };
  27354. const selectLocation = (item) => {
  27355. uni.$emit("updateLocation", item);
  27356. uni.navigateBack();
  27357. };
  27358. const godownId = vue.ref("");
  27359. const positionCode = vue.ref("");
  27360. onLoad((opts) => {
  27361. godownId.value = opts.godownId;
  27362. positionCode.value = opts.positionCode;
  27363. getLocationListByGodownId(godownId.value);
  27364. scrollHeight.value = uni.getSystemInfoSync().windowHeight - 44 - 60;
  27365. uni.$u.useGlobalEvent((e) => {
  27366. if (e.barcode) {
  27367. searchText.value = e.barcode;
  27368. getLocationListByGodownId(godownId.value, e.barcode);
  27369. }
  27370. });
  27371. });
  27372. const __returned__ = { searchText, locations, getLocationListByGodownId, scrollHeight, onSearch, openScan, selectLocation, godownId, positionCode, ref: vue.ref, computed: vue.computed, onMounted: vue.onMounted, get onLoad() {
  27373. return onLoad;
  27374. } };
  27375. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27376. return __returned__;
  27377. }
  27378. };
  27379. function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
  27380. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27381. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27382. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27383. vue.createCommentVNode(" 库位列表 "),
  27384. vue.createElementVNode(
  27385. "scroll-view",
  27386. {
  27387. "scroll-y": "",
  27388. class: "location-list",
  27389. style: vue.normalizeStyle({ height: $setup.scrollHeight + "px" })
  27390. },
  27391. [
  27392. (vue.openBlock(true), vue.createElementBlock(
  27393. vue.Fragment,
  27394. null,
  27395. vue.renderList($setup.locations, (item, index2) => {
  27396. return vue.openBlock(), vue.createElementBlock("view", {
  27397. key: index2,
  27398. class: vue.normalizeClass(["location-item", item === $setup.positionCode ? "location-item-selected" : ""]),
  27399. "hover-class": "location-item-hover",
  27400. onClick: ($event) => $setup.selectLocation(item)
  27401. }, [
  27402. vue.createElementVNode(
  27403. "text",
  27404. null,
  27405. vue.toDisplayString(item),
  27406. 1
  27407. /* TEXT */
  27408. )
  27409. ], 10, ["onClick"]);
  27410. }),
  27411. 128
  27412. /* KEYED_FRAGMENT */
  27413. ))
  27414. ],
  27415. 4
  27416. /* STYLE */
  27417. ),
  27418. vue.createCommentVNode(" 底部搜索框 "),
  27419. vue.createElementVNode("view", {
  27420. class: "fixed-bottom pad-20",
  27421. style: { "background": "#ffffff" }
  27422. }, [
  27423. vue.createVNode(_component_u_search, {
  27424. modelValue: $setup.searchText,
  27425. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  27426. placeholder: "请输入库位条码",
  27427. "show-action": false,
  27428. clearabled: true,
  27429. onChange: $setup.onSearch,
  27430. height: "40",
  27431. disabled: true,
  27432. onClick: _cache[1] || (_cache[1] = ($event) => $setup.searchText = "")
  27433. }, null, 8, ["modelValue"]),
  27434. vue.createVNode(_component_u_icon, {
  27435. name: "scan",
  27436. size: "28",
  27437. color: "#19be6b",
  27438. onClick: $setup.openScan
  27439. })
  27440. ])
  27441. ]);
  27442. }
  27443. 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"]]);
  27444. const _sfc_main$t = {
  27445. __name: "warehouse-select",
  27446. setup(__props, { expose: __expose }) {
  27447. __expose();
  27448. const searchText = vue.ref("");
  27449. const warehouses = vue.ref([]);
  27450. function getGodownListByName(name = "") {
  27451. uni.$u.http.post("/app/appUser/searchGodown?name=" + name).then((res2) => {
  27452. if (res2.code == 200) {
  27453. warehouses.value = res2.data;
  27454. }
  27455. });
  27456. }
  27457. getGodownListByName();
  27458. const onSearch = () => {
  27459. getGodownListByName(searchText.value);
  27460. };
  27461. const selectWarehouse = (item) => {
  27462. uni.$emit("updateWarehouse", item);
  27463. uni.navigateBack();
  27464. };
  27465. const selectedId = vue.ref();
  27466. onLoad((options) => {
  27467. if (options.godownId) {
  27468. selectedId.value = options.godownId;
  27469. }
  27470. });
  27471. const __returned__ = { searchText, warehouses, getGodownListByName, onSearch, selectWarehouse, selectedId, ref: vue.ref, computed: vue.computed, get onLoad() {
  27472. return onLoad;
  27473. } };
  27474. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27475. return __returned__;
  27476. }
  27477. };
  27478. function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
  27479. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27480. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27481. vue.createCommentVNode(" 搜索框 "),
  27482. vue.createElementVNode("view", { class: "search-area" }, [
  27483. vue.createVNode(_component_u_search, {
  27484. modelValue: $setup.searchText,
  27485. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  27486. placeholder: "请输入仓库名称",
  27487. "show-action": false,
  27488. clearabled: true,
  27489. onChange: $setup.onSearch,
  27490. height: "40",
  27491. "placeholder-style": "font-size:16px"
  27492. }, null, 8, ["modelValue"])
  27493. ]),
  27494. vue.createCommentVNode(" 仓库列表 "),
  27495. vue.createElementVNode("view", { class: "warehouse-list" }, [
  27496. (vue.openBlock(true), vue.createElementBlock(
  27497. vue.Fragment,
  27498. null,
  27499. vue.renderList($setup.warehouses, (item, index2) => {
  27500. return vue.openBlock(), vue.createElementBlock("view", {
  27501. key: index2,
  27502. class: vue.normalizeClass(["warehouse-item", { "warehouse-item-active": item.id == $setup.selectedId }]),
  27503. "hover-class": "warehouse-item-hover",
  27504. onClick: ($event) => $setup.selectWarehouse(item)
  27505. }, [
  27506. vue.createElementVNode(
  27507. "text",
  27508. null,
  27509. vue.toDisplayString(index2 + 1) + "." + vue.toDisplayString(item.godownName),
  27510. 1
  27511. /* TEXT */
  27512. )
  27513. ], 10, ["onClick"]);
  27514. }),
  27515. 128
  27516. /* KEYED_FRAGMENT */
  27517. ))
  27518. ])
  27519. ]);
  27520. }
  27521. 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"]]);
  27522. const _sfc_main$s = {
  27523. __name: "speedy-check",
  27524. setup(__props, { expose: __expose }) {
  27525. __expose();
  27526. const showCheckMethodPicker = vue.ref(false);
  27527. const checkMethod = vue.ref("实际数量");
  27528. const checkMethodOptions = ["实际数量", "增加数量", "减少数量"];
  27529. const location2 = vue.ref("k01-01-4A");
  27530. const searchValue = vue.ref("");
  27531. const products = vue.ref([]);
  27532. const onCheckMethodConfirm = (e) => {
  27533. checkMethod.value = e.value[0];
  27534. showCheckMethodPicker.value = false;
  27535. };
  27536. const handleLocationSelect = () => {
  27537. uni.navigateTo({
  27538. url: "/pages/location-select/index"
  27539. });
  27540. };
  27541. const onSearch = () => {
  27542. };
  27543. const openScan = () => {
  27544. };
  27545. function handleAdd() {
  27546. uni.navigateTo({
  27547. url: "/pages/index/wms/speedy-check-add"
  27548. });
  27549. }
  27550. const __returned__ = { showCheckMethodPicker, checkMethod, checkMethodOptions, location: location2, searchValue, products, onCheckMethodConfirm, handleLocationSelect, onSearch, openScan, handleAdd, reactive: vue.reactive, ref: vue.ref, LocationOrderItem };
  27551. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27552. return __returned__;
  27553. }
  27554. };
  27555. function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
  27556. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27557. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$8);
  27558. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_2$2);
  27559. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$6);
  27560. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$5);
  27561. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$1);
  27562. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  27563. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27564. vue.createVNode(_component_u_navbar, {
  27565. title: "快速盘点",
  27566. border: false,
  27567. fixed: "",
  27568. "safe-area-inset-top": ""
  27569. }, {
  27570. left: vue.withCtx(() => [
  27571. vue.createVNode(_component_u_icon, {
  27572. name: "arrow-left",
  27573. color: "#333333",
  27574. size: "20",
  27575. onClick: _ctx.goBack
  27576. }, null, 8, ["onClick"])
  27577. ]),
  27578. right: vue.withCtx(() => [
  27579. vue.createVNode(_component_u_text, {
  27580. type: "primary",
  27581. text: "提交",
  27582. onClick: _ctx.onSubmit
  27583. }, null, 8, ["onClick"])
  27584. ]),
  27585. _: 1
  27586. /* STABLE */
  27587. }),
  27588. vue.createCommentVNode(" 盘点信息选择区域 "),
  27589. vue.createElementVNode("view", {
  27590. class: "select-area",
  27591. style: { "margin-top": "44px" }
  27592. }, [
  27593. vue.createVNode(_component_u_cell_group, null, {
  27594. default: vue.withCtx(() => [
  27595. vue.createVNode(_component_u_cell, {
  27596. title: "盘点方式",
  27597. value: $setup.checkMethod,
  27598. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showCheckMethodPicker = true),
  27599. isLink: ""
  27600. }, null, 8, ["value"]),
  27601. vue.createVNode(_component_u_cell, {
  27602. title: "目标库位",
  27603. value: $setup.location,
  27604. onClick: $setup.handleLocationSelect,
  27605. isLink: ""
  27606. }, null, 8, ["value"])
  27607. ]),
  27608. _: 1
  27609. /* STABLE */
  27610. })
  27611. ]),
  27612. vue.createCommentVNode(" 盘点方式选择器 "),
  27613. vue.createVNode(_component_u_picker, {
  27614. show: $setup.showCheckMethodPicker,
  27615. columns: [$setup.checkMethodOptions],
  27616. onConfirm: $setup.onCheckMethodConfirm,
  27617. onCancel: _cache[1] || (_cache[1] = ($event) => $setup.showCheckMethodPicker = false)
  27618. }, null, 8, ["show", "columns"]),
  27619. vue.createCommentVNode(" 订单列表 "),
  27620. vue.createElementVNode("view", { class: "product-details" }, [
  27621. (vue.openBlock(true), vue.createElementBlock(
  27622. vue.Fragment,
  27623. null,
  27624. vue.renderList($setup.products, (item, index2) => {
  27625. return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
  27626. key: index2,
  27627. item
  27628. }, null, 8, ["item"]);
  27629. }),
  27630. 128
  27631. /* KEYED_FRAGMENT */
  27632. ))
  27633. ]),
  27634. vue.createElementVNode("view", {
  27635. class: "add-btn",
  27636. onClick: $setup.handleAdd
  27637. }, [
  27638. vue.createVNode(_component_u_icon, {
  27639. name: "plus-circle",
  27640. size: "40",
  27641. color: "#19be6b",
  27642. onClick: $setup.openScan
  27643. })
  27644. ]),
  27645. vue.createCommentVNode(" 底部扫码输入框 "),
  27646. vue.createElementVNode("view", {
  27647. class: "fixed-bottom pad-20",
  27648. style: { "background": "#ffffff" }
  27649. }, [
  27650. vue.createVNode(_component_u_search, {
  27651. placeholder: "请输入快递单号/订单编号",
  27652. modelValue: $setup.searchValue,
  27653. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.searchValue = $event),
  27654. onConfirm: $setup.onSearch,
  27655. "show-action": false,
  27656. "custom-style": "margin-right:10px"
  27657. }, null, 8, ["modelValue"]),
  27658. vue.createVNode(_component_u_icon, {
  27659. name: "scan",
  27660. size: "28",
  27661. color: "#19be6b",
  27662. onClick: $setup.openScan
  27663. })
  27664. ])
  27665. ]);
  27666. }
  27667. 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"]]);
  27668. const _sfc_main$r = {
  27669. __name: "BookItemOrder",
  27670. props: {
  27671. book: Object,
  27672. index: Number
  27673. },
  27674. emits: ["remove"],
  27675. setup(__props, { expose: __expose, emit: __emit }) {
  27676. __expose();
  27677. const props2 = __props;
  27678. const emit2 = __emit;
  27679. const removeBook = () => {
  27680. emit2("remove", { book: props2.book, index: props2.index });
  27681. };
  27682. const __returned__ = { props: props2, emit: emit2, removeBook };
  27683. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27684. return __returned__;
  27685. }
  27686. };
  27687. function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
  27688. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  27689. return vue.openBlock(), vue.createElementBlock("view", { class: "book-item" }, [
  27690. vue.createElementVNode("image", {
  27691. class: "book-image",
  27692. src: $props.book.cover,
  27693. mode: "aspectFill"
  27694. }, null, 8, ["src"]),
  27695. vue.createElementVNode("view", { class: "book-info" }, [
  27696. vue.createElementVNode("view", { class: "book-title" }, [
  27697. vue.createElementVNode(
  27698. "text",
  27699. null,
  27700. vue.toDisplayString($props.book.bookName),
  27701. 1
  27702. /* TEXT */
  27703. ),
  27704. vue.createVNode(_component_u_icon, {
  27705. name: "close",
  27706. size: "18",
  27707. onClick: $setup.removeBook
  27708. })
  27709. ]),
  27710. vue.createElementVNode("view", { class: "flex-a flex-1" }, [
  27711. vue.createElementVNode("view", { class: "book-details flex-d" }, [
  27712. vue.createElementVNode(
  27713. "text",
  27714. null,
  27715. "ISBN: " + vue.toDisplayString($props.book.isbn),
  27716. 1
  27717. /* TEXT */
  27718. ),
  27719. vue.createElementVNode(
  27720. "text",
  27721. null,
  27722. "定价: " + vue.toDisplayString($props.book.price),
  27723. 1
  27724. /* TEXT */
  27725. ),
  27726. vue.createElementVNode(
  27727. "text",
  27728. null,
  27729. "折扣: " + vue.toDisplayString($props.book.recycleDiscount),
  27730. 1
  27731. /* TEXT */
  27732. )
  27733. ]),
  27734. vue.createElementVNode("view", { class: "book-stats flex-d ml-20" }, [
  27735. vue.createElementVNode(
  27736. "text",
  27737. null,
  27738. "数量: " + vue.toDisplayString($props.book.quantity),
  27739. 1
  27740. /* TEXT */
  27741. ),
  27742. vue.createElementVNode(
  27743. "text",
  27744. null,
  27745. "预估单价: " + vue.toDisplayString($props.book.expectPrice),
  27746. 1
  27747. /* TEXT */
  27748. ),
  27749. vue.createElementVNode(
  27750. "text",
  27751. { style: { "color": "#ff0000" } },
  27752. "审核金额: " + vue.toDisplayString($props.book.auditPrice),
  27753. 1
  27754. /* TEXT */
  27755. )
  27756. ])
  27757. ])
  27758. ])
  27759. ]);
  27760. }
  27761. 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"]]);
  27762. const _sfc_main$q = {
  27763. __name: "check-order",
  27764. setup(__props, { expose: __expose }) {
  27765. __expose();
  27766. const bookList = vue.ref([]);
  27767. const totalBooks = vue.computed(() => bookList.value.length);
  27768. const totalPrice = vue.computed(() => bookList.value.reduce((sum, book) => sum + parseFloat(book.auditPrice), 0).toFixed(2));
  27769. const removeBook = ({ book, index: index2 }) => {
  27770. bookList.value.splice(index2, 1);
  27771. };
  27772. const handleSubmit = () => {
  27773. if (bookList.value.length === 0) {
  27774. uni.$u.toast("请先添加书籍");
  27775. return;
  27776. }
  27777. uni.$u.http.post("/app/offlineorder/submitOfflineOrder", bookList.value).then((res2) => {
  27778. if (res2.code == 200) {
  27779. uni.$u.toast("提交成功");
  27780. bookList.value.length = 0;
  27781. }
  27782. });
  27783. };
  27784. const handleScan = () => {
  27785. uni.scanCode({
  27786. success: (res2) => {
  27787. handleBarcode(res2.result);
  27788. formatAppLog("log", "at pages/index/offline/check-order.vue:51", "扫码结果:", res2.result);
  27789. },
  27790. fail: (res2) => {
  27791. formatAppLog("log", "at pages/index/offline/check-order.vue:55", "扫码失败:", res2);
  27792. uni.$u.toast("扫码失败");
  27793. }
  27794. });
  27795. };
  27796. const handleBarcode = (barcode) => {
  27797. formatAppLog("log", "at pages/index/offline/check-order.vue:62", "扫码结果:", barcode);
  27798. uni.$u.http.get(`/app/offlineorder/getBookInfo/${barcode}`).then((res2) => {
  27799. if (res2.code == 200) {
  27800. res2.data.quantity = 1;
  27801. let item = bookList.value.find((item2) => item2.isbn === res2.data.isbn);
  27802. if (item) {
  27803. item.quantity += 1;
  27804. item.auditPrice = (item.expectPrice * item.quantity).toFixed(2);
  27805. return;
  27806. } else {
  27807. res2.data.auditPrice = (res2.data.expectPrice * res2.data.quantity).toFixed(2);
  27808. bookList.value.push(res2.data);
  27809. }
  27810. }
  27811. });
  27812. };
  27813. onLoad(() => {
  27814. uni.$u.useGlobalEvent((e) => {
  27815. handleBarcode(e.barcode);
  27816. });
  27817. });
  27818. const __returned__ = { bookList, totalBooks, totalPrice, removeBook, handleSubmit, handleScan, handleBarcode, ref: vue.ref, computed: vue.computed, get onLoad() {
  27819. return onLoad;
  27820. }, BookItem };
  27821. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27822. return __returned__;
  27823. }
  27824. };
  27825. function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
  27826. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  27827. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  27828. vue.createElementVNode("view", { class: "book-list" }, [
  27829. (vue.openBlock(true), vue.createElementBlock(
  27830. vue.Fragment,
  27831. null,
  27832. vue.renderList($setup.bookList, (book, index2) => {
  27833. return vue.openBlock(), vue.createBlock($setup["BookItem"], {
  27834. key: index2,
  27835. book,
  27836. onRemove: $setup.removeBook
  27837. }, null, 8, ["book"]);
  27838. }),
  27839. 128
  27840. /* KEYED_FRAGMENT */
  27841. ))
  27842. ]),
  27843. vue.createCommentVNode(" 底部信息和按钮 "),
  27844. vue.createElementVNode("view", {
  27845. class: "footer fixed-bottom flex-d",
  27846. style: { "padding-top": "10rpx" }
  27847. }, [
  27848. $setup.bookList.length > 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  27849. key: 0,
  27850. class: "pad-10"
  27851. }, [
  27852. vue.createTextVNode("共 "),
  27853. vue.createElementVNode(
  27854. "text",
  27855. { style: { "color": "#ff0000" } },
  27856. vue.toDisplayString($setup.totalBooks),
  27857. 1
  27858. /* TEXT */
  27859. ),
  27860. vue.createTextVNode(" 本,预估回收价 "),
  27861. vue.createElementVNode(
  27862. "text",
  27863. { style: { "color": "#ff0000" } },
  27864. "¥" + vue.toDisplayString($setup.totalPrice),
  27865. 1
  27866. /* TEXT */
  27867. )
  27868. ])) : vue.createCommentVNode("v-if", true),
  27869. vue.createElementVNode("view", { class: "flex-a mt-12" }, [
  27870. vue.createVNode(_component_u_button, {
  27871. size: "large",
  27872. type: "primary",
  27873. text: "提交",
  27874. onClick: $setup.handleSubmit
  27875. }),
  27876. vue.createVNode(_component_u_button, {
  27877. size: "large",
  27878. type: "warning",
  27879. text: "扫码",
  27880. onClick: $setup.handleScan
  27881. })
  27882. ])
  27883. ])
  27884. ]);
  27885. }
  27886. 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"]]);
  27887. const _sfc_main$p = {
  27888. __name: "check-record",
  27889. setup(__props, { expose: __expose }) {
  27890. __expose();
  27891. const scrollRef = vue.ref(null);
  27892. const refreshList = () => {
  27893. var _a;
  27894. (_a = scrollRef.value) == null ? void 0 : _a.resetUpScroll();
  27895. };
  27896. let dataList = vue.ref([]);
  27897. const updateList = (data) => {
  27898. dataList.value = data;
  27899. };
  27900. const __returned__ = { scrollRef, refreshList, get dataList() {
  27901. return dataList;
  27902. }, set dataList(v) {
  27903. dataList = v;
  27904. }, updateList, PageScroll, ref: vue.ref };
  27905. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  27906. return __returned__;
  27907. }
  27908. };
  27909. function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
  27910. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$3);
  27911. return vue.openBlock(), vue.createElementBlock("view", {
  27912. class: "common-page",
  27913. style: { "padding": "0" }
  27914. }, [
  27915. vue.createVNode(
  27916. $setup["PageScroll"],
  27917. {
  27918. requestStr: "/app/offlineorder/getUserStat",
  27919. onUpdateList: $setup.updateList,
  27920. ref: "scrollRef"
  27921. },
  27922. {
  27923. default: vue.withCtx(() => [
  27924. vue.createVNode(_component_u_sticky, { customNavHeight: 0 }, {
  27925. default: vue.withCtx(() => [
  27926. vue.createElementVNode("view", { class: "search-area flex-a" }, [
  27927. vue.createElementVNode("view", { class: "text-item flex-1" }, "核单时间"),
  27928. vue.createElementVNode("view", { class: "text-item flex-1" }, "核单数量"),
  27929. vue.createElementVNode("view", { class: "text-item flex-1" }, "核单本数"),
  27930. vue.createElementVNode("view", { class: "text-item flex-1" }, "预估金额")
  27931. ])
  27932. ]),
  27933. _: 1
  27934. /* STABLE */
  27935. }),
  27936. vue.createElementVNode("view", { class: "list-con" }, [
  27937. (vue.openBlock(true), vue.createElementBlock(
  27938. vue.Fragment,
  27939. null,
  27940. vue.renderList($setup.dataList, (item, index2) => {
  27941. return vue.openBlock(), vue.createElementBlock("view", {
  27942. key: index2,
  27943. class: "flex-a"
  27944. }, [
  27945. vue.createElementVNode(
  27946. "view",
  27947. { class: "text-item flex-1" },
  27948. vue.toDisplayString(item.statDate),
  27949. 1
  27950. /* TEXT */
  27951. ),
  27952. vue.createElementVNode(
  27953. "view",
  27954. { class: "text-item flex-1" },
  27955. vue.toDisplayString(item.totalNum),
  27956. 1
  27957. /* TEXT */
  27958. ),
  27959. vue.createElementVNode(
  27960. "view",
  27961. { class: "text-item flex-1" },
  27962. vue.toDisplayString(item.bookNum),
  27963. 1
  27964. /* TEXT */
  27965. ),
  27966. vue.createElementVNode(
  27967. "view",
  27968. { class: "text-item flex-1" },
  27969. vue.toDisplayString(item.expectAmount),
  27970. 1
  27971. /* TEXT */
  27972. )
  27973. ]);
  27974. }),
  27975. 128
  27976. /* KEYED_FRAGMENT */
  27977. ))
  27978. ])
  27979. ]),
  27980. _: 1
  27981. /* STABLE */
  27982. },
  27983. 512
  27984. /* NEED_PATCH */
  27985. )
  27986. ]);
  27987. }
  27988. const PagesIndexOfflineCheckRecord = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/offline/check-record.vue"]]);
  27989. const props$3 = {
  27990. props: {
  27991. // 内置图标名称,或图片路径,建议绝对路径
  27992. icon: {
  27993. type: String,
  27994. default: props$E.empty.icon
  27995. },
  27996. // 提示文字
  27997. text: {
  27998. type: String,
  27999. default: props$E.empty.text
  28000. },
  28001. // 文字颜色
  28002. textColor: {
  28003. type: String,
  28004. default: props$E.empty.textColor
  28005. },
  28006. // 文字大小
  28007. textSize: {
  28008. type: [String, Number],
  28009. default: props$E.empty.textSize
  28010. },
  28011. // 图标的颜色
  28012. iconColor: {
  28013. type: String,
  28014. default: props$E.empty.iconColor
  28015. },
  28016. // 图标的大小
  28017. iconSize: {
  28018. type: [String, Number],
  28019. default: props$E.empty.iconSize
  28020. },
  28021. // 选择预置的图标类型
  28022. mode: {
  28023. type: String,
  28024. default: props$E.empty.mode
  28025. },
  28026. // 图标宽度,单位px
  28027. width: {
  28028. type: [String, Number],
  28029. default: props$E.empty.width
  28030. },
  28031. // 图标高度,单位px
  28032. height: {
  28033. type: [String, Number],
  28034. default: props$E.empty.height
  28035. },
  28036. // 是否显示组件
  28037. show: {
  28038. type: Boolean,
  28039. default: props$E.empty.show
  28040. },
  28041. // 组件距离上一个元素之间的距离,默认px单位
  28042. marginTop: {
  28043. type: [String, Number],
  28044. default: props$E.empty.marginTop
  28045. }
  28046. }
  28047. };
  28048. const _sfc_main$o = {
  28049. name: "u-empty",
  28050. mixins: [mpMixin, mixin, props$3],
  28051. data() {
  28052. return {
  28053. icons: {
  28054. car: "购物车为空",
  28055. page: "页面不存在",
  28056. search: "没有搜索结果",
  28057. address: "没有收货地址",
  28058. wifi: "没有WiFi",
  28059. order: "订单为空",
  28060. coupon: "没有优惠券",
  28061. favor: "暂无收藏",
  28062. permission: "无权限",
  28063. history: "无历史记录",
  28064. news: "无新闻列表",
  28065. message: "消息列表为空",
  28066. list: "列表为空",
  28067. data: "数据为空",
  28068. comment: "暂无评论"
  28069. }
  28070. };
  28071. },
  28072. computed: {
  28073. // 组件样式
  28074. emptyStyle() {
  28075. const style = {};
  28076. style.marginTop = uni.$u.addUnit(this.marginTop);
  28077. return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style);
  28078. },
  28079. // 文本样式
  28080. textStyle() {
  28081. const style = {};
  28082. style.color = this.textColor;
  28083. style.fontSize = uni.$u.addUnit(this.textSize);
  28084. return style;
  28085. },
  28086. // 判断icon是否图片路径
  28087. isSrc() {
  28088. return this.icon.indexOf("/") >= 0;
  28089. }
  28090. }
  28091. };
  28092. function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
  28093. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28094. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  28095. "view",
  28096. {
  28097. key: 0,
  28098. class: "u-empty",
  28099. style: vue.normalizeStyle([$options.emptyStyle])
  28100. },
  28101. [
  28102. !$options.isSrc ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  28103. key: 0,
  28104. name: _ctx.mode === "message" ? "chat" : `empty-${_ctx.mode}`,
  28105. size: _ctx.iconSize,
  28106. color: _ctx.iconColor,
  28107. "margin-top": "14"
  28108. }, null, 8, ["name", "size", "color"])) : (vue.openBlock(), vue.createElementBlock("image", {
  28109. key: 1,
  28110. style: vue.normalizeStyle({
  28111. width: _ctx.$u.addUnit(_ctx.width),
  28112. height: _ctx.$u.addUnit(_ctx.height)
  28113. }),
  28114. src: _ctx.icon,
  28115. mode: "widthFix"
  28116. }, null, 12, ["src"])),
  28117. vue.createElementVNode(
  28118. "text",
  28119. {
  28120. class: "u-empty__text",
  28121. style: vue.normalizeStyle([$options.textStyle])
  28122. },
  28123. vue.toDisplayString(_ctx.text ? _ctx.text : $data.icons[_ctx.mode]),
  28124. 5
  28125. /* TEXT, STYLE */
  28126. ),
  28127. _ctx.$slots.default || _ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock("view", {
  28128. key: 2,
  28129. class: "u-empty__wrap"
  28130. }, [
  28131. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  28132. ])) : vue.createCommentVNode("v-if", true)
  28133. ],
  28134. 4
  28135. /* STYLE */
  28136. )) : vue.createCommentVNode("v-if", true);
  28137. }
  28138. 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"]]);
  28139. const _sfc_main$n = {
  28140. __name: "scan-book",
  28141. setup(__props, { expose: __expose }) {
  28142. __expose();
  28143. const searchValue = vue.ref("");
  28144. const scannedISBN = vue.ref("");
  28145. const currentTab = vue.ref(0);
  28146. const tabsList = [
  28147. {
  28148. name: "简介"
  28149. },
  28150. {
  28151. name: "轨迹"
  28152. }
  28153. ];
  28154. const bookInfo = vue.ref(null);
  28155. const handleSearch = () => {
  28156. if (!searchValue.value)
  28157. return;
  28158. loadBookInfo(searchValue.value);
  28159. };
  28160. const handleScan = () => {
  28161. uni.scanCode({
  28162. success: (res2) => {
  28163. searchValue.value = res2.result;
  28164. scannedISBN.value = res2.result;
  28165. loadBookInfo(res2.result);
  28166. }
  28167. });
  28168. };
  28169. const loadBookInfo = (isbn) => {
  28170. uni.$u.http.get(`/app/book/getBookByIsbn/${isbn}`).then((res2) => {
  28171. if (res2.code == 200) {
  28172. bookInfo.value = res2.data;
  28173. }
  28174. });
  28175. };
  28176. const __returned__ = { searchValue, scannedISBN, currentTab, tabsList, bookInfo, handleSearch, handleScan, loadBookInfo, ref: vue.ref };
  28177. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28178. return __returned__;
  28179. }
  28180. };
  28181. function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
  28182. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28183. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  28184. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$3);
  28185. const _component_u_empty = resolveEasycom(vue.resolveDynamicComponent("u-empty"), __easycom_3$1);
  28186. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_4$1);
  28187. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  28188. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  28189. vue.createCommentVNode(" 顶部搜索框 "),
  28190. vue.createVNode(_component_u_sticky, null, {
  28191. default: vue.withCtx(() => [
  28192. vue.createElementVNode("view", { class: "search-area" }, [
  28193. vue.createVNode(_component_u_search, {
  28194. modelValue: $setup.searchValue,
  28195. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.searchValue = $event),
  28196. placeholder: "扫描/输入ISBN或SH码",
  28197. "show-action": true,
  28198. actionText: "查询",
  28199. onSearch: $setup.handleSearch,
  28200. onCustom: $setup.handleSearch
  28201. }, {
  28202. suffixIcon: vue.withCtx(() => [
  28203. $setup.searchValue ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  28204. key: 0,
  28205. name: "close",
  28206. size: "20",
  28207. onClick: _cache[0] || (_cache[0] = ($event) => $setup.searchValue = "")
  28208. })) : vue.createCommentVNode("v-if", true)
  28209. ]),
  28210. _: 1
  28211. /* STABLE */
  28212. }, 8, ["modelValue"])
  28213. ])
  28214. ]),
  28215. _: 1
  28216. /* STABLE */
  28217. }),
  28218. vue.createCommentVNode(" 已扫描ISBN显示 "),
  28219. $setup.scannedISBN ? (vue.openBlock(), vue.createElementBlock("view", {
  28220. key: 0,
  28221. class: "isbn-display"
  28222. }, [
  28223. vue.createElementVNode(
  28224. "text",
  28225. null,
  28226. "已查询ISBN:" + vue.toDisplayString($setup.scannedISBN),
  28227. 1
  28228. /* TEXT */
  28229. )
  28230. ])) : vue.createCommentVNode("v-if", true),
  28231. vue.createCommentVNode(" 内容区域 "),
  28232. vue.createElementVNode("view", { class: "content" }, [
  28233. vue.createCommentVNode(" 空状态 "),
  28234. !$setup.bookInfo ? (vue.openBlock(), vue.createElementBlock("view", {
  28235. key: 0,
  28236. class: "empty-state"
  28237. }, [
  28238. vue.createVNode(_component_u_empty, {
  28239. mode: "data",
  28240. text: "暂无扫描数据",
  28241. "margin-top": "100"
  28242. })
  28243. ])) : (vue.openBlock(), vue.createElementBlock(
  28244. vue.Fragment,
  28245. { key: 1 },
  28246. [
  28247. vue.createCommentVNode(" 书籍详情 "),
  28248. vue.createElementVNode("view", { class: "book-detail" }, [
  28249. vue.createElementVNode("view", { class: "common-card mb-20" }, [
  28250. vue.createElementVNode("view", { class: "flex flex-d flex-a-c" }, [
  28251. vue.createElementVNode("image", {
  28252. class: "book-image",
  28253. src: $setup.bookInfo.cover,
  28254. mode: "heightFix"
  28255. }, null, 8, ["src"]),
  28256. vue.createElementVNode(
  28257. "text",
  28258. { class: "ml-20 font-15" },
  28259. vue.toDisplayString($setup.bookInfo.bookName),
  28260. 1
  28261. /* TEXT */
  28262. )
  28263. ]),
  28264. vue.createElementVNode("view", { class: "book-status" }, [
  28265. vue.createElementVNode(
  28266. "text",
  28267. { class: "status-text" },
  28268. "状态:" + vue.toDisplayString($setup.bookInfo.recycleStatus ? "已加入回收书单" : "未加入回收书单"),
  28269. 1
  28270. /* TEXT */
  28271. ),
  28272. $setup.bookInfo.recycleTime ? (vue.openBlock(), vue.createElementBlock(
  28273. "text",
  28274. {
  28275. key: 0,
  28276. class: "time-text"
  28277. },
  28278. "加入时间:" + vue.toDisplayString($setup.bookInfo.recycleTime),
  28279. 1
  28280. /* TEXT */
  28281. )) : vue.createCommentVNode("v-if", true)
  28282. ])
  28283. ]),
  28284. vue.createCommentVNode(" 基本信息 "),
  28285. vue.createElementVNode("view", { class: "common-card info-section mb-20" }, [
  28286. vue.createElementVNode("view", { class: "price-info" }, [
  28287. vue.createElementVNode("text", { class: "label" }, "定价:"),
  28288. vue.createElementVNode(
  28289. "text",
  28290. { class: "price" },
  28291. "¥" + vue.toDisplayString($setup.bookInfo.price),
  28292. 1
  28293. /* TEXT */
  28294. ),
  28295. vue.createElementVNode(
  28296. "text",
  28297. { class: "recycle-price" },
  28298. "回收价:¥" + vue.toDisplayString($setup.bookInfo.expectPrice),
  28299. 1
  28300. /* TEXT */
  28301. )
  28302. ]),
  28303. vue.createElementVNode("view", { class: "book-info" }, [
  28304. vue.createElementVNode("view", { class: "info-item" }, [
  28305. vue.createElementVNode("text", { class: "label" }, "ISBN:"),
  28306. vue.createElementVNode(
  28307. "text",
  28308. null,
  28309. vue.toDisplayString($setup.bookInfo.isbn),
  28310. 1
  28311. /* TEXT */
  28312. )
  28313. ]),
  28314. vue.createElementVNode("view", { class: "info-item" }, [
  28315. vue.createElementVNode("text", { class: "label" }, "语言:"),
  28316. vue.createElementVNode(
  28317. "text",
  28318. null,
  28319. vue.toDisplayString($setup.bookInfo.lang || "-"),
  28320. 1
  28321. /* TEXT */
  28322. )
  28323. ]),
  28324. vue.createElementVNode("view", { class: "info-item" }, [
  28325. vue.createElementVNode("text", { class: "label" }, "作者:"),
  28326. vue.createElementVNode(
  28327. "text",
  28328. null,
  28329. vue.toDisplayString($setup.bookInfo.author),
  28330. 1
  28331. /* TEXT */
  28332. )
  28333. ]),
  28334. vue.createElementVNode("view", { class: "info-item" }, [
  28335. vue.createElementVNode("text", { class: "label" }, "出版社:"),
  28336. vue.createElementVNode(
  28337. "text",
  28338. null,
  28339. vue.toDisplayString($setup.bookInfo.publish),
  28340. 1
  28341. /* TEXT */
  28342. )
  28343. ]),
  28344. vue.createElementVNode("view", { class: "info-item" }, [
  28345. vue.createElementVNode("text", { class: "label" }, "出版时间:"),
  28346. vue.createElementVNode(
  28347. "text",
  28348. null,
  28349. vue.toDisplayString($setup.bookInfo.pubDate),
  28350. 1
  28351. /* TEXT */
  28352. )
  28353. ])
  28354. ])
  28355. ]),
  28356. vue.createCommentVNode(" 简介和轨迹 "),
  28357. vue.createElementVNode("view", {
  28358. class: "common-card tabs-section",
  28359. style: { "padding": "0" }
  28360. }, [
  28361. vue.createVNode(_component_u_tabs, {
  28362. list: $setup.tabsList,
  28363. modelValue: $setup.currentTab,
  28364. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.currentTab = $event),
  28365. lineColor: "#19be6b"
  28366. }, null, 8, ["modelValue"]),
  28367. vue.createElementVNode("view", { class: "tab-content" }, [
  28368. $setup.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  28369. key: 0,
  28370. class: "intro-content"
  28371. }, [
  28372. vue.createElementVNode("text", { class: "section-title" }, "内容简介:"),
  28373. vue.createElementVNode(
  28374. "text",
  28375. { class: "content-text" },
  28376. vue.toDisplayString($setup.bookInfo.contentBlurb),
  28377. 1
  28378. /* TEXT */
  28379. ),
  28380. vue.createElementVNode("text", { class: "section-title" }, "作者简介:"),
  28381. vue.createElementVNode(
  28382. "text",
  28383. { class: "content-text" },
  28384. vue.toDisplayString($setup.bookInfo.anthorBlurb),
  28385. 1
  28386. /* TEXT */
  28387. ),
  28388. vue.createElementVNode(
  28389. "text",
  28390. { class: "content-text" },
  28391. vue.toDisplayString($setup.bookInfo.catalog),
  28392. 1
  28393. /* TEXT */
  28394. )
  28395. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  28396. key: 1,
  28397. class: "track-content"
  28398. }, [
  28399. vue.createElementVNode(
  28400. "text",
  28401. null,
  28402. vue.toDisplayString($setup.bookInfo.track),
  28403. 1
  28404. /* TEXT */
  28405. )
  28406. ]))
  28407. ])
  28408. ])
  28409. ])
  28410. ],
  28411. 2112
  28412. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  28413. ))
  28414. ]),
  28415. vue.createCommentVNode(" 底部扫描按钮 "),
  28416. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  28417. vue.createVNode(_component_u_button, {
  28418. size: "large",
  28419. type: "primary",
  28420. text: "扫码(ISBN或SH码)",
  28421. onClick: $setup.handleScan
  28422. })
  28423. ])
  28424. ]);
  28425. }
  28426. 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"]]);
  28427. const _sfc_main$m = {
  28428. __name: "book-weight",
  28429. setup(__props, { expose: __expose }) {
  28430. __expose();
  28431. const customStyle = {
  28432. height: "100rpx",
  28433. fontSize: "32rpx"
  28434. };
  28435. const labelStyle = {
  28436. fontSize: "32rpx"
  28437. };
  28438. const placeholderStyle2 = vue.ref("fontSize: 32rpx");
  28439. const form = vue.ref({
  28440. weight: "",
  28441. isbn: ""
  28442. });
  28443. const rules2 = {
  28444. weight: [
  28445. {
  28446. required: true,
  28447. message: "请输入重量",
  28448. trigger: "blur"
  28449. },
  28450. {
  28451. type: "number",
  28452. message: "重量必须是数字",
  28453. trigger: "blur"
  28454. }
  28455. ],
  28456. isbn: [{
  28457. required: true,
  28458. message: "请输入ISBN",
  28459. trigger: "blur"
  28460. }]
  28461. };
  28462. function handleScan() {
  28463. uni.scanCode({
  28464. success: (res2) => {
  28465. form.value.isbn = res2.result;
  28466. }
  28467. });
  28468. }
  28469. const formRef = vue.ref(null);
  28470. const submitForm = () => {
  28471. formRef.value.validate().then((valid) => {
  28472. if (valid) {
  28473. uni.$u.http.post("/app/weighChangeLog/add", form.value).then((res2) => {
  28474. if (res2.code == 200) {
  28475. uni.$u.toast("修改成功");
  28476. form.value.isbn = "";
  28477. form.value.weight = "";
  28478. } else {
  28479. uni.$u.toast(res2.msg);
  28480. }
  28481. });
  28482. }
  28483. });
  28484. };
  28485. onLoad(() => {
  28486. uni.$u.useGlobalEvent((e) => {
  28487. form.value.isbn = e.barcode;
  28488. });
  28489. });
  28490. const __returned__ = { customStyle, labelStyle, placeholderStyle: placeholderStyle2, form, rules: rules2, handleScan, formRef, submitForm, ref: vue.ref, get onLoad() {
  28491. return onLoad;
  28492. } };
  28493. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28494. return __returned__;
  28495. }
  28496. };
  28497. function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
  28498. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  28499. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$a);
  28500. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$7);
  28501. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  28502. return vue.openBlock(), vue.createElementBlock("view", { class: "common-page" }, [
  28503. vue.createVNode(_component_u_form, {
  28504. model: $setup.form,
  28505. rules: $setup.rules,
  28506. ref: "formRef",
  28507. labelWidth: "90px",
  28508. errorType: "toast",
  28509. labelStyle: $setup.labelStyle
  28510. }, {
  28511. default: vue.withCtx(() => [
  28512. vue.createVNode(_component_u_form_item, {
  28513. label: "重量(克)",
  28514. prop: "weight",
  28515. required: ""
  28516. }, {
  28517. default: vue.withCtx(() => [
  28518. vue.createVNode(_component_u_input, {
  28519. placeholderStyle: $setup.placeholderStyle,
  28520. customStyle: $setup.customStyle,
  28521. modelValue: $setup.form.weight,
  28522. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form.weight = $event),
  28523. placeholder: "请输入数值",
  28524. clearable: ""
  28525. }, null, 8, ["placeholderStyle", "modelValue"])
  28526. ]),
  28527. _: 1
  28528. /* STABLE */
  28529. }),
  28530. vue.createVNode(_component_u_form_item, {
  28531. label: "ISBN",
  28532. prop: "isbn",
  28533. required: ""
  28534. }, {
  28535. default: vue.withCtx(() => [
  28536. vue.createVNode(_component_u_input, {
  28537. placeholderStyle: $setup.placeholderStyle,
  28538. customStyle: $setup.customStyle,
  28539. modelValue: $setup.form.isbn,
  28540. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.form.isbn = $event),
  28541. placeholder: "请输入编码",
  28542. clearable: ""
  28543. }, null, 8, ["placeholderStyle", "modelValue"])
  28544. ]),
  28545. _: 1
  28546. /* STABLE */
  28547. })
  28548. ]),
  28549. _: 1
  28550. /* STABLE */
  28551. }, 8, ["model"]),
  28552. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  28553. vue.createVNode(_component_u_button, {
  28554. size: "large",
  28555. type: "warning",
  28556. text: "扫码",
  28557. onClick: $setup.handleScan
  28558. }),
  28559. vue.createVNode(_component_u_button, {
  28560. size: "large",
  28561. type: "success",
  28562. text: "提交",
  28563. onClick: $setup.submitForm
  28564. })
  28565. ])
  28566. ]);
  28567. }
  28568. const PagesIndexEntryBookWeight = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/index/entry/book-weight.vue"]]);
  28569. const props$2 = {
  28570. props: {
  28571. // 显示文字
  28572. title: {
  28573. type: String,
  28574. default: props$E.alert.title
  28575. },
  28576. // 主题,success/warning/info/error
  28577. type: {
  28578. type: String,
  28579. default: props$E.alert.type
  28580. },
  28581. // 辅助性文字
  28582. description: {
  28583. type: String,
  28584. default: props$E.alert.description
  28585. },
  28586. // 是否可关闭
  28587. closable: {
  28588. type: Boolean,
  28589. default: props$E.alert.closable
  28590. },
  28591. // 是否显示图标
  28592. showIcon: {
  28593. type: Boolean,
  28594. default: props$E.alert.showIcon
  28595. },
  28596. // 浅或深色调,light-浅色,dark-深色
  28597. effect: {
  28598. type: String,
  28599. default: props$E.alert.effect
  28600. },
  28601. // 文字是否居中
  28602. center: {
  28603. type: Boolean,
  28604. default: props$E.alert.center
  28605. },
  28606. // 字体大小
  28607. fontSize: {
  28608. type: [String, Number],
  28609. default: props$E.alert.fontSize
  28610. }
  28611. }
  28612. };
  28613. const _sfc_main$l = {
  28614. name: "u-alert",
  28615. mixins: [mpMixin, mixin, props$2],
  28616. data() {
  28617. return {
  28618. show: true
  28619. };
  28620. },
  28621. computed: {
  28622. iconColor() {
  28623. return this.effect === "light" ? this.type : "#fff";
  28624. },
  28625. // 不同主题对应不同的图标
  28626. iconName() {
  28627. switch (this.type) {
  28628. case "success":
  28629. return "checkmark-circle-fill";
  28630. case "error":
  28631. return "close-circle-fill";
  28632. case "warning":
  28633. return "error-circle-fill";
  28634. case "info":
  28635. return "info-circle-fill";
  28636. case "primary":
  28637. return "more-circle-fill";
  28638. default:
  28639. return "error-circle-fill";
  28640. }
  28641. }
  28642. },
  28643. methods: {
  28644. // 点击内容
  28645. clickHandler() {
  28646. this.$emit("click");
  28647. },
  28648. // 点击关闭按钮
  28649. closeHandler() {
  28650. this.show = false;
  28651. }
  28652. }
  28653. };
  28654. function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
  28655. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28656. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$5);
  28657. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  28658. mode: "fade",
  28659. show: $data.show
  28660. }, {
  28661. default: vue.withCtx(() => [
  28662. vue.createElementVNode(
  28663. "view",
  28664. {
  28665. class: vue.normalizeClass(["u-alert", [`u-alert--${_ctx.type}--${_ctx.effect}`]]),
  28666. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
  28667. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  28668. },
  28669. [
  28670. _ctx.showIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  28671. key: 0,
  28672. class: "u-alert__icon"
  28673. }, [
  28674. vue.createVNode(_component_u_icon, {
  28675. name: $options.iconName,
  28676. size: "18",
  28677. color: $options.iconColor
  28678. }, null, 8, ["name", "color"])
  28679. ])) : vue.createCommentVNode("v-if", true),
  28680. vue.createElementVNode(
  28681. "view",
  28682. {
  28683. class: "u-alert__content",
  28684. style: vue.normalizeStyle([{
  28685. paddingRight: _ctx.closable ? "20px" : 0
  28686. }])
  28687. },
  28688. [
  28689. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  28690. "text",
  28691. {
  28692. key: 0,
  28693. class: vue.normalizeClass(["u-alert__content__title", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
  28694. style: vue.normalizeStyle([{
  28695. fontSize: _ctx.$u.addUnit(_ctx.fontSize),
  28696. textAlign: _ctx.center ? "center" : "left"
  28697. }])
  28698. },
  28699. vue.toDisplayString(_ctx.title),
  28700. 7
  28701. /* TEXT, CLASS, STYLE */
  28702. )) : vue.createCommentVNode("v-if", true),
  28703. _ctx.description ? (vue.openBlock(), vue.createElementBlock(
  28704. "text",
  28705. {
  28706. key: 1,
  28707. class: vue.normalizeClass(["u-alert__content__desc", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
  28708. style: vue.normalizeStyle([{
  28709. fontSize: _ctx.$u.addUnit(_ctx.fontSize),
  28710. textAlign: _ctx.center ? "center" : "left"
  28711. }])
  28712. },
  28713. vue.toDisplayString(_ctx.description),
  28714. 7
  28715. /* TEXT, CLASS, STYLE */
  28716. )) : vue.createCommentVNode("v-if", true)
  28717. ],
  28718. 4
  28719. /* STYLE */
  28720. ),
  28721. _ctx.closable ? (vue.openBlock(), vue.createElementBlock("view", {
  28722. key: 1,
  28723. class: "u-alert__close",
  28724. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"]))
  28725. }, [
  28726. vue.createVNode(_component_u_icon, {
  28727. name: "close",
  28728. color: $options.iconColor,
  28729. size: "15"
  28730. }, null, 8, ["color"])
  28731. ])) : vue.createCommentVNode("v-if", true)
  28732. ],
  28733. 6
  28734. /* CLASS, STYLE */
  28735. )
  28736. ]),
  28737. _: 1
  28738. /* STABLE */
  28739. }, 8, ["show"]);
  28740. }
  28741. 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"]]);
  28742. const _sfc_main$k = {
  28743. __name: "logistics-detail",
  28744. setup(__props, { expose: __expose }) {
  28745. __expose();
  28746. const logisticsInfo = vue.ref([]);
  28747. function getLogisticsDetail(orderId) {
  28748. uni.$u.http.get(`/app/orderinfo/getOrderExpressList?orderId=${orderId}`).then((res2) => {
  28749. if (res2.code == 200) {
  28750. logisticsInfo.value = res2.data;
  28751. }
  28752. });
  28753. }
  28754. function handleButtonClick(status, reason) {
  28755. uni.$u.http.post("/app/orderexception/update", {
  28756. id: id.value,
  28757. checkStatus: status,
  28758. refusalReason: reason
  28759. }).then((res2) => {
  28760. if (res2.code == 200) {
  28761. checkStatus.value = status;
  28762. uni.$u.toast("操作成功");
  28763. emit("refresh");
  28764. } else {
  28765. uni.$u.toast(res2.msg);
  28766. }
  28767. });
  28768. }
  28769. const checkStatus = vue.ref(0);
  28770. const id = vue.ref(0);
  28771. onLoad((e) => {
  28772. checkStatus.value = e.status;
  28773. id.value = e.id;
  28774. getLogisticsDetail(e.orderId);
  28775. });
  28776. const __returned__ = { logisticsInfo, getLogisticsDetail, handleButtonClick, checkStatus, id, ref: vue.ref, get onLoad() {
  28777. return onLoad;
  28778. }, ApproveButton, RejectButton };
  28779. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28780. return __returned__;
  28781. }
  28782. };
  28783. function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
  28784. const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_3);
  28785. const _component_u_sticky = resolveEasycom(vue.resolveDynamicComponent("u-sticky"), __easycom_1$3);
  28786. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28787. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  28788. vue.createCommentVNode(" 物流公司信息 "),
  28789. vue.createVNode(_component_u_sticky, null, {
  28790. default: vue.withCtx(() => [
  28791. vue.createVNode(_component_u_alert, {
  28792. title: `物流公司:京东快递`,
  28793. type: "warning"
  28794. })
  28795. ]),
  28796. _: 1
  28797. /* STABLE */
  28798. }),
  28799. vue.createCommentVNode(" 自定义物流轨迹时间轴 "),
  28800. vue.createElementVNode("scroll-view", {
  28801. "scroll-y": "",
  28802. class: "timeline-container"
  28803. }, [
  28804. (vue.openBlock(true), vue.createElementBlock(
  28805. vue.Fragment,
  28806. null,
  28807. vue.renderList($setup.logisticsInfo, (item, index2) => {
  28808. return vue.openBlock(), vue.createElementBlock("view", {
  28809. key: index2,
  28810. class: "timeline-item"
  28811. }, [
  28812. vue.createElementVNode("view", { class: "timeline-icon" }, [
  28813. vue.createVNode(_component_u_icon, {
  28814. name: "map-fill",
  28815. color: "#19be6b",
  28816. size: "16"
  28817. })
  28818. ]),
  28819. vue.createElementVNode("view", { class: "timeline-content" }, [
  28820. vue.createElementVNode(
  28821. "text",
  28822. { class: "title" },
  28823. vue.toDisplayString(item.title),
  28824. 1
  28825. /* TEXT */
  28826. ),
  28827. vue.createElementVNode(
  28828. "text",
  28829. { class: "desc" },
  28830. vue.toDisplayString(item.description),
  28831. 1
  28832. /* TEXT */
  28833. ),
  28834. vue.createElementVNode(
  28835. "text",
  28836. { class: "time" },
  28837. vue.toDisplayString(item.time),
  28838. 1
  28839. /* TEXT */
  28840. )
  28841. ]),
  28842. index2 < $setup.logisticsInfo.length - 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  28843. key: 0,
  28844. class: "timeline-line"
  28845. })) : vue.createCommentVNode("v-if", true)
  28846. ]);
  28847. }),
  28848. 128
  28849. /* KEYED_FRAGMENT */
  28850. ))
  28851. ]),
  28852. vue.createCommentVNode(" 底部操作按钮 "),
  28853. $setup.checkStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  28854. key: 0,
  28855. class: "fixed-bottom"
  28856. }, [
  28857. vue.createVNode($setup["RejectButton"], {
  28858. size: "large",
  28859. onReject: _cache[0] || (_cache[0] = (reason) => $setup.handleButtonClick(3, reason))
  28860. }),
  28861. vue.createVNode($setup["ApproveButton"], {
  28862. size: "large",
  28863. onApprove: _cache[1] || (_cache[1] = ($event) => $setup.handleButtonClick(2))
  28864. })
  28865. ])) : vue.createCommentVNode("v-if", true)
  28866. ]);
  28867. }
  28868. 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"]]);
  28869. const _sfc_main$j = {
  28870. __name: "task-detail",
  28871. setup(__props, { expose: __expose }) {
  28872. __expose();
  28873. const currentTask = vue.ref(0);
  28874. const totalTasks = vue.ref(0);
  28875. const curTaskInfo = vue.ref({});
  28876. const nextLocation = vue.ref("K01-02-4A");
  28877. const orderList = vue.ref([]);
  28878. const ttsModule2 = vue.ref(null);
  28879. const taskCode = vue.ref("");
  28880. onLoad((opts) => {
  28881. taskCode.value = opts.taskCode;
  28882. onSearch();
  28883. ttsModule2.value = new VolumeTTS();
  28884. });
  28885. onUnload(() => {
  28886. ttsModule2.value.stop();
  28887. });
  28888. const searchText = vue.ref("");
  28889. const badList = vue.ref([]);
  28890. const handleNextTask = () => {
  28891. if (currentTask.value < totalTasks.value) {
  28892. currentTask.value++;
  28893. curTaskInfo.value = orderList.value[currentTask.value];
  28894. badList.value = curTaskInfo.value.detailVoList || [];
  28895. VolumeTTS.speak(nextLocation.value);
  28896. }
  28897. };
  28898. const onSearch = () => {
  28899. uni.$u.http.get(`/app/appstock/getStockTaskDetail?taskCode=${taskCode.value}`).then((res2) => {
  28900. if (res2.code == 200) {
  28901. orderList.value = res2.data;
  28902. totalTasks.value = res2.data.length;
  28903. curTaskInfo.value = res2.data[currentTask.value].orderInfoList;
  28904. badList.value = curTaskInfo.value.detailVoList || [];
  28905. formatAppLog("log", "at pages/index/wms/task-detail.vue:127", totalTasks.value, curTaskInfo.value, badList.value, "xxx");
  28906. }
  28907. });
  28908. };
  28909. const confirmStockTask = () => {
  28910. const params = {
  28911. positionCode: nextLocation.value,
  28912. orderId: curTaskInfo.value.orderId
  28913. };
  28914. uni.$u.http.post("/app/appstock/setStockTask", params).then((res2) => {
  28915. if (res2.code === 200) {
  28916. uni.showToast({
  28917. title: "提交成功",
  28918. icon: "success"
  28919. });
  28920. ttsModule2.value.speak("任务已提交");
  28921. } else {
  28922. uni.showToast({
  28923. title: res2.msg || "提交失败",
  28924. icon: "error"
  28925. });
  28926. }
  28927. });
  28928. };
  28929. const unlockTask = () => {
  28930. uni.$u.http.post("/app/appstock/unlockStockTask?taskCode=" + taskCode.value).then((res2) => {
  28931. if (res2.code == 200) {
  28932. uni.showToast({
  28933. title: "解锁成功",
  28934. icon: "success"
  28935. });
  28936. } else {
  28937. uni.showToast({
  28938. title: res2.msg || "解锁失败",
  28939. icon: "error"
  28940. });
  28941. }
  28942. });
  28943. };
  28944. const onSubmit = () => {
  28945. uni.showModal({
  28946. title: "确认提示",
  28947. content: "是否确认提交本次下架?",
  28948. success: (res2) => {
  28949. if (res2.confirm) {
  28950. confirmStockTask();
  28951. }
  28952. }
  28953. });
  28954. };
  28955. function goBack() {
  28956. uni.showModal({
  28957. title: "确认提示",
  28958. content: "是否确认放弃本次下架?",
  28959. success: (res2) => {
  28960. if (res2.confirm) {
  28961. uni.navigateBack();
  28962. ttsModule2.value.speak("任务已放弃");
  28963. unlockTask();
  28964. }
  28965. }
  28966. });
  28967. }
  28968. const openScan = () => {
  28969. uni.scanCode({
  28970. success: (res2) => {
  28971. searchText.value = res2.result;
  28972. onSearch();
  28973. },
  28974. fail: (err) => {
  28975. uni.showToast({
  28976. title: "扫码失败",
  28977. icon: "error"
  28978. });
  28979. }
  28980. });
  28981. };
  28982. const __returned__ = { currentTask, totalTasks, curTaskInfo, nextLocation, orderList, ttsModule: ttsModule2, taskCode, searchText, badList, handleNextTask, onSearch, confirmStockTask, unlockTask, onSubmit, goBack, openScan, ref: vue.ref, onMounted: vue.onMounted, BadOutCard, get VolumeTTS() {
  28983. return VolumeTTS;
  28984. }, get onLoad() {
  28985. return onLoad;
  28986. }, get onUnload() {
  28987. return onUnload;
  28988. } };
  28989. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28990. return __returned__;
  28991. }
  28992. };
  28993. function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
  28994. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  28995. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$8);
  28996. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_2$2);
  28997. const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_3);
  28998. const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_4$2);
  28999. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  29000. vue.createCommentVNode(" 顶部导航栏 "),
  29001. vue.createVNode(_component_u_navbar, {
  29002. title: "下架任务",
  29003. border: false,
  29004. fixed: "",
  29005. "safe-area-inset-top": ""
  29006. }, {
  29007. left: vue.withCtx(() => [
  29008. vue.createVNode(_component_u_icon, {
  29009. name: "arrow-left",
  29010. color: "#333333",
  29011. size: "20",
  29012. onClick: $setup.goBack
  29013. })
  29014. ]),
  29015. right: vue.withCtx(() => [
  29016. vue.createVNode(_component_u_text, {
  29017. type: "primary",
  29018. text: "提交",
  29019. onClick: $setup.onSubmit
  29020. })
  29021. ]),
  29022. _: 1
  29023. /* STABLE */
  29024. }),
  29025. vue.createCommentVNode(" 任务进度 "),
  29026. vue.createElementVNode("view", { class: "progress-section" }, [
  29027. vue.createVNode(_component_u_alert, {
  29028. title: "当前任务",
  29029. type: "info",
  29030. center: ""
  29031. }),
  29032. vue.createElementVNode("view", {
  29033. class: "flex flex-j-b pad-10",
  29034. style: { "padding-right": "40rpx" }
  29035. }, [
  29036. vue.createElementVNode("view", {
  29037. class: "next-task",
  29038. onClick: $setup.handleNextTask
  29039. }, [
  29040. vue.createElementVNode("text", null, "上一个")
  29041. ]),
  29042. vue.createElementVNode("view", { class: "flex-c" }, [
  29043. vue.createElementVNode("text", null, [
  29044. vue.createTextVNode(
  29045. vue.toDisplayString($setup.currentTask),
  29046. 1
  29047. /* TEXT */
  29048. ),
  29049. vue.createElementVNode(
  29050. "text",
  29051. { class: "progress-text font-18 color-green" },
  29052. "/" + vue.toDisplayString($setup.totalTasks),
  29053. 1
  29054. /* TEXT */
  29055. )
  29056. ])
  29057. ]),
  29058. vue.createElementVNode("view", {
  29059. class: "color-green",
  29060. onClick: $setup.handleNextTask
  29061. }, [
  29062. vue.createElementVNode("text", null, "下一个")
  29063. ])
  29064. ])
  29065. ]),
  29066. vue.createCommentVNode(" 库位信息 "),
  29067. vue.createElementVNode("view", {
  29068. class: "flex flex-j-b pad-10 next-location",
  29069. style: { "padding-right": "40rpx", "align-items": "center" }
  29070. }, [
  29071. vue.createElementVNode(
  29072. "view",
  29073. { class: "font-14 mb-20" },
  29074. vue.toDisplayString($setup.currentTask) + "/" + vue.toDisplayString($setup.totalTasks),
  29075. 1
  29076. /* TEXT */
  29077. ),
  29078. vue.createElementVNode("view", { class: "flex-d" }, [
  29079. vue.createElementVNode(
  29080. "view",
  29081. { class: "font-20 text-center" },
  29082. vue.toDisplayString($setup.nextLocation),
  29083. 1
  29084. /* TEXT */
  29085. ),
  29086. vue.createElementVNode(
  29087. "view",
  29088. { class: "location-detail font-13 mt-10" },
  29089. "下一库位 " + vue.toDisplayString($setup.nextLocation),
  29090. 1
  29091. /* TEXT */
  29092. )
  29093. ]),
  29094. vue.createVNode(_component_u_icon, {
  29095. name: "attach",
  29096. size: "28"
  29097. })
  29098. ]),
  29099. vue.createCommentVNode(" 订单信息 "),
  29100. vue.createElementVNode("view", { class: "order-info" }, [
  29101. vue.createElementVNode(
  29102. "view",
  29103. { class: "info-item" },
  29104. "订单编号:" + vue.toDisplayString($setup.curTaskInfo.orderId),
  29105. 1
  29106. /* TEXT */
  29107. ),
  29108. vue.createElementVNode(
  29109. "view",
  29110. { class: "info-item" },
  29111. "物流单号:" + vue.toDisplayString($setup.curTaskInfo.waybillCode),
  29112. 1
  29113. /* TEXT */
  29114. ),
  29115. vue.createElementVNode(
  29116. "view",
  29117. { class: "info-item" },
  29118. "不良数量:" + vue.toDisplayString($setup.curTaskInfo.badNum),
  29119. 1
  29120. /* TEXT */
  29121. )
  29122. ]),
  29123. vue.createCommentVNode(" 极差商品列表 "),
  29124. vue.createElementVNode("view", { class: "bad-list" }, [
  29125. vue.createElementVNode("view", { class: "list-title mb-6 mt-20" }, "极差"),
  29126. (vue.openBlock(true), vue.createElementBlock(
  29127. vue.Fragment,
  29128. null,
  29129. vue.renderList($setup.badList, (item, index2) => {
  29130. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  29131. vue.createVNode($setup["BadOutCard"], { item }, null, 8, ["item"])
  29132. ]);
  29133. }),
  29134. 128
  29135. /* KEYED_FRAGMENT */
  29136. ))
  29137. ]),
  29138. vue.createCommentVNode(" 底部搜索框 "),
  29139. vue.createElementVNode("view", {
  29140. class: "fixed-bottom pad-20",
  29141. style: { "background": "#ffffff" }
  29142. }, [
  29143. vue.createVNode(_component_u_search, {
  29144. modelValue: $setup.searchText,
  29145. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.searchText = $event),
  29146. placeholder: "请输入订单编号",
  29147. "show-action": false,
  29148. clearabled: true,
  29149. onChange: $setup.onSearch,
  29150. height: "40"
  29151. }, null, 8, ["modelValue"]),
  29152. vue.createVNode(_component_u_icon, {
  29153. name: "scan",
  29154. size: "28",
  29155. color: "#19be6b",
  29156. onClick: $setup.openScan
  29157. })
  29158. ])
  29159. ]);
  29160. }
  29161. 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"]]);
  29162. const _sfc_main$i = {
  29163. __name: "speedy-check-add",
  29164. setup(__props, { expose: __expose }) {
  29165. __expose();
  29166. const location2 = vue.ref("k01-01-4A");
  29167. const searchValue = vue.ref("");
  29168. const products = vue.ref([
  29169. {
  29170. orderNo: "4846464",
  29171. logisticsNo: "DPK2023497491611",
  29172. inspectionDate: "2024-11-14",
  29173. badCount: 5,
  29174. operator: "李程雪",
  29175. checked: false
  29176. },
  29177. {
  29178. orderNo: "4846464",
  29179. logisticsNo: "DPK2023497491611",
  29180. inspectionDate: "2024-11-14",
  29181. badCount: 5,
  29182. operator: "李程雪",
  29183. checked: false
  29184. }
  29185. ]);
  29186. const isAllSelected = vue.computed(() => {
  29187. return products.value.length > 0 && products.value.every((item) => item.checked);
  29188. });
  29189. const toggleItemSelect = (item) => {
  29190. item.checked = !item.checked;
  29191. };
  29192. const toggleSelectAll = () => {
  29193. const newState = !isAllSelected.value;
  29194. products.value.forEach((item) => {
  29195. item.checked = newState;
  29196. });
  29197. };
  29198. const onSubmit = () => {
  29199. const selectedItems = products.value.filter((item) => item.checked);
  29200. uni.$emit("selectedProducts", selectedItems);
  29201. uni.navigateBack();
  29202. };
  29203. const goBack = () => {
  29204. uni.navigateBack();
  29205. };
  29206. const __returned__ = { location: location2, searchValue, products, isAllSelected, toggleItemSelect, toggleSelectAll, onSubmit, goBack, ref: vue.ref, computed: vue.computed, LocationOrderItem };
  29207. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29208. return __returned__;
  29209. }
  29210. };
  29211. function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
  29212. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  29213. const _component_u_text = resolveEasycom(vue.resolveDynamicComponent("u-text"), __easycom_1$8);
  29214. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_2$2);
  29215. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  29216. vue.createVNode(_component_u_navbar, {
  29217. title: "选择商品",
  29218. border: false,
  29219. fixed: "",
  29220. "safe-area-inset-top": ""
  29221. }, {
  29222. left: vue.withCtx(() => [
  29223. vue.createVNode(_component_u_icon, {
  29224. name: "arrow-left",
  29225. color: "#333333",
  29226. size: "20",
  29227. onClick: $setup.goBack
  29228. })
  29229. ]),
  29230. right: vue.withCtx(() => [
  29231. vue.createVNode(_component_u_text, {
  29232. type: "primary",
  29233. text: "确定",
  29234. onClick: $setup.onSubmit
  29235. })
  29236. ]),
  29237. _: 1
  29238. /* STABLE */
  29239. }),
  29240. vue.createCommentVNode(" 库位显示 "),
  29241. vue.createElementVNode("view", { class: "location-info" }, [
  29242. vue.createElementVNode(
  29243. "text",
  29244. null,
  29245. vue.toDisplayString($setup.location),
  29246. 1
  29247. /* TEXT */
  29248. )
  29249. ]),
  29250. vue.createCommentVNode(" 订单列表 "),
  29251. vue.createElementVNode("view", { class: "product-details" }, [
  29252. (vue.openBlock(true), vue.createElementBlock(
  29253. vue.Fragment,
  29254. null,
  29255. vue.renderList($setup.products, (item, index2) => {
  29256. return vue.openBlock(), vue.createBlock($setup["LocationOrderItem"], {
  29257. isCheck: "",
  29258. key: index2,
  29259. item,
  29260. onSelect: $setup.toggleItemSelect
  29261. }, null, 8, ["item"]);
  29262. }),
  29263. 128
  29264. /* KEYED_FRAGMENT */
  29265. ))
  29266. ]),
  29267. vue.createCommentVNode(" 底部全选栏 "),
  29268. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  29269. vue.createElementVNode("view", {
  29270. class: "select-all",
  29271. onClick: $setup.toggleSelectAll
  29272. }, [
  29273. vue.createVNode(_component_u_icon, {
  29274. name: $setup.isAllSelected ? "checkmark-circle-fill" : "checkmark-circle",
  29275. color: $setup.isAllSelected ? "#19be6b" : "#c8c9cc",
  29276. size: "28"
  29277. }, null, 8, ["name", "color"]),
  29278. vue.createElementVNode("text", { class: "select-text" }, "全选")
  29279. ]),
  29280. vue.createElementVNode(
  29281. "text",
  29282. { class: "order-count" },
  29283. "订单总数: " + vue.toDisplayString($setup.products.length),
  29284. 1
  29285. /* TEXT */
  29286. )
  29287. ])
  29288. ]);
  29289. }
  29290. 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"]]);
  29291. const _sfc_main$h = {
  29292. __name: "user-info",
  29293. setup(__props, { expose: __expose }) {
  29294. __expose();
  29295. const userInfo = vue.ref({
  29296. avatar: "/static/images/avatar.jpg",
  29297. name: "无",
  29298. gender: "无",
  29299. birthday: "无",
  29300. education: "无",
  29301. school: "无",
  29302. username: "用户账号",
  29303. account: "fxt",
  29304. createTime: "2024-06-12 12:00:00",
  29305. lastLogin: "",
  29306. company: "无",
  29307. employeeId: "无",
  29308. position: "无",
  29309. phone: "18888888888",
  29310. email: "无",
  29311. address: "无"
  29312. });
  29313. function getUserInfo() {
  29314. uni.$u.http.get("/app/appUser/getUserInfoById").then((res2) => {
  29315. if (res2.code == 200) {
  29316. userInfo.value = res2.data;
  29317. }
  29318. });
  29319. }
  29320. getUserInfo();
  29321. function setAvatar(avatarfile) {
  29322. uni.$u.http.post("/app/appUser/setAvatar", { avatarfile }).then((res2) => {
  29323. if (res2.code == 200) {
  29324. userInfo.value.avatar = avatarfile;
  29325. uni.showToast({
  29326. title: "头像设置成功",
  29327. icon: "success"
  29328. });
  29329. }
  29330. });
  29331. }
  29332. const handleEditAvatar = () => {
  29333. const token = uni.getStorageSync("token");
  29334. uni.chooseImage({
  29335. count: 1,
  29336. success: (res2) => {
  29337. const filePath = res2.tempFilePaths[0];
  29338. uni.uploadFile({
  29339. url: `${baseUrl}/common/upload`,
  29340. filePath,
  29341. name: "file",
  29342. header: {
  29343. "Authorization": token
  29344. },
  29345. success: (uploadRes) => {
  29346. formatAppLog("log", "at pages/my/page/user-info.vue:126", uploadRes, "uploadRes");
  29347. const data = JSON.parse(uploadRes.data);
  29348. if (data.code === 200) {
  29349. setAvatar(data.data);
  29350. } else {
  29351. uni.showToast({
  29352. title: "上传失败",
  29353. icon: "none"
  29354. });
  29355. }
  29356. },
  29357. fail: () => {
  29358. uni.showToast({
  29359. title: "上传失败",
  29360. icon: "none"
  29361. });
  29362. }
  29363. });
  29364. }
  29365. });
  29366. };
  29367. const __returned__ = { userInfo, getUserInfo, setAvatar, handleEditAvatar, ref: vue.ref, get baseUrl() {
  29368. return baseUrl;
  29369. } };
  29370. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29371. return __returned__;
  29372. }
  29373. };
  29374. function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  29375. const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$c);
  29376. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  29377. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$6);
  29378. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$5);
  29379. return vue.openBlock(), vue.createElementBlock("view", { class: "user-info-page" }, [
  29380. vue.createCommentVNode(" 头像区域 "),
  29381. vue.createElementVNode("view", { class: "avatar-section" }, [
  29382. vue.createElementVNode("view", { class: "avatar-wrap" }, [
  29383. vue.createElementVNode("text", null, "头像:"),
  29384. vue.createVNode(_component_u_avatar, {
  29385. size: 50,
  29386. src: $setup.userInfo.avatar
  29387. }, null, 8, ["src"]),
  29388. vue.createVNode(_component_u_button, {
  29389. type: "success",
  29390. style: { "width": "200rpx" },
  29391. size: "small",
  29392. onClick: $setup.handleEditAvatar
  29393. }, {
  29394. default: vue.withCtx(() => [
  29395. vue.createTextVNode("去修改")
  29396. ]),
  29397. _: 1
  29398. /* STABLE */
  29399. })
  29400. ])
  29401. ]),
  29402. vue.createCommentVNode(" 基本信息区域 "),
  29403. vue.createElementVNode("view", { class: "info-section" }, [
  29404. vue.createElementVNode("view", { class: "section-title" }, "基本信息"),
  29405. vue.createElementVNode("view", { class: "info-card" }, [
  29406. vue.createVNode(_component_u_cell_group, { border: false }, {
  29407. default: vue.withCtx(() => [
  29408. vue.createVNode(_component_u_cell, {
  29409. title: "姓名",
  29410. value: $setup.userInfo.nickName || "无"
  29411. }, null, 8, ["value"]),
  29412. vue.createVNode(_component_u_cell, {
  29413. title: "性别",
  29414. value: $setup.userInfo.sex == 0 ? "男" : $setup.userInfo.sex == 1 ? "女" : "未知"
  29415. }, null, 8, ["value"]),
  29416. vue.createVNode(_component_u_cell, {
  29417. title: "生日",
  29418. value: $setup.userInfo.birthday || "无"
  29419. }, null, 8, ["value"]),
  29420. vue.createVNode(_component_u_cell, {
  29421. title: "学历",
  29422. value: $setup.userInfo.education || "无"
  29423. }, null, 8, ["value"]),
  29424. vue.createVNode(_component_u_cell, {
  29425. title: "毕业学校",
  29426. value: $setup.userInfo.school || "无",
  29427. border: false
  29428. }, null, 8, ["value"])
  29429. ]),
  29430. _: 1
  29431. /* STABLE */
  29432. })
  29433. ])
  29434. ]),
  29435. vue.createCommentVNode(" 账号信息区域 "),
  29436. vue.createElementVNode("view", { class: "info-section" }, [
  29437. vue.createElementVNode("view", { class: "section-title" }, "用户账号"),
  29438. vue.createElementVNode("view", { class: "info-card" }, [
  29439. vue.createVNode(_component_u_cell_group, { border: false }, {
  29440. default: vue.withCtx(() => [
  29441. vue.createVNode(_component_u_cell, {
  29442. title: "账号",
  29443. value: $setup.userInfo.userName
  29444. }, null, 8, ["value"]),
  29445. vue.createVNode(_component_u_cell, {
  29446. title: "创建日期",
  29447. value: $setup.userInfo.createTime
  29448. }, null, 8, ["value"]),
  29449. vue.createVNode(_component_u_cell, {
  29450. title: "最近登录",
  29451. value: $setup.userInfo.loginDate || "--",
  29452. border: false
  29453. }, null, 8, ["value"])
  29454. ]),
  29455. _: 1
  29456. /* STABLE */
  29457. })
  29458. ])
  29459. ]),
  29460. vue.createCommentVNode(" 员工资料区域 "),
  29461. vue.createElementVNode("view", { class: "info-section" }, [
  29462. vue.createElementVNode("view", { class: "section-title" }, "员工资料"),
  29463. vue.createElementVNode("view", { class: "info-card" }, [
  29464. vue.createVNode(_component_u_cell_group, { border: false }, {
  29465. default: vue.withCtx(() => [
  29466. vue.createVNode(_component_u_cell, {
  29467. title: "公司",
  29468. value: $setup.userInfo.company || "无"
  29469. }, null, 8, ["value"]),
  29470. vue.createVNode(_component_u_cell, {
  29471. title: "员工编号",
  29472. value: $setup.userInfo.employeeId || "无"
  29473. }, null, 8, ["value"]),
  29474. vue.createVNode(_component_u_cell, {
  29475. title: "职位",
  29476. value: $setup.userInfo.position || "无",
  29477. border: false
  29478. }, null, 8, ["value"])
  29479. ]),
  29480. _: 1
  29481. /* STABLE */
  29482. })
  29483. ])
  29484. ]),
  29485. vue.createCommentVNode(" 联系方式区域 "),
  29486. vue.createElementVNode("view", { class: "info-section" }, [
  29487. vue.createElementVNode("view", { class: "section-title" }, "联系方式"),
  29488. vue.createElementVNode("view", { class: "info-card" }, [
  29489. vue.createVNode(_component_u_cell_group, { border: false }, {
  29490. default: vue.withCtx(() => [
  29491. vue.createVNode(_component_u_cell, {
  29492. title: "电话",
  29493. value: $setup.userInfo.phonenumber
  29494. }, null, 8, ["value"]),
  29495. vue.createVNode(_component_u_cell, {
  29496. title: "邮箱",
  29497. value: $setup.userInfo.email || "无"
  29498. }, null, 8, ["value"]),
  29499. vue.createVNode(_component_u_cell, {
  29500. title: "住址",
  29501. value: $setup.userInfo.address || "无",
  29502. border: false
  29503. }, null, 8, ["value"])
  29504. ]),
  29505. _: 1
  29506. /* STABLE */
  29507. })
  29508. ])
  29509. ])
  29510. ]);
  29511. }
  29512. 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"]]);
  29513. const _sfc_main$g = {
  29514. __name: "warehouse",
  29515. setup(__props, { expose: __expose }) {
  29516. __expose();
  29517. const showPicker = vue.ref(false);
  29518. const selectedWarehouse = vue.ref("");
  29519. const warehouseList = vue.ref([]);
  29520. const getWarehouseList = () => {
  29521. uni.$u.http.post("/app/appUser/searchGodown?name=").then((res2) => {
  29522. if (res2.code == 200) {
  29523. warehouseList.value = res2.data.filter((v) => v.useStatus == 1).map((v) => ({
  29524. text: v.godownName,
  29525. value: v.id
  29526. }));
  29527. }
  29528. });
  29529. };
  29530. getWarehouseList();
  29531. const getWarehouse = () => {
  29532. uni.$u.http.get("/app/appUser/getUserBindGodown").then((res2) => {
  29533. var _a;
  29534. if (res2.code == 200) {
  29535. selectedWarehouse.value = (_a = res2.data) == null ? void 0 : _a.godownName;
  29536. }
  29537. });
  29538. };
  29539. getWarehouse();
  29540. const saveWarehouse = (godownId) => {
  29541. uni.$u.http.post("/app/appUser/bingowGodown?godownId=" + godownId).then((res2) => {
  29542. if (res2.code == 200) {
  29543. uni.showToast({
  29544. title: "设置默认仓库成功",
  29545. icon: "success"
  29546. });
  29547. }
  29548. });
  29549. };
  29550. const onConfirm = (e) => {
  29551. const [{
  29552. value: value2,
  29553. text
  29554. }] = e.value;
  29555. selectedWarehouse.value = text;
  29556. showPicker.value = false;
  29557. formatAppLog("log", "at pages/my/page/warehouse.vue:75", e, "xxxxxx");
  29558. saveWarehouse(value2);
  29559. };
  29560. const __returned__ = { showPicker, selectedWarehouse, warehouseList, getWarehouseList, getWarehouse, saveWarehouse, onConfirm, ref: vue.ref };
  29561. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29562. return __returned__;
  29563. }
  29564. };
  29565. function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  29566. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  29567. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$1);
  29568. return vue.openBlock(), vue.createElementBlock("view", { class: "warehouse-select" }, [
  29569. vue.createElementVNode("view", {
  29570. class: "select-wrap",
  29571. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showPicker = true)
  29572. }, [
  29573. vue.createElementVNode("text", { class: "required-label" }, "*"),
  29574. vue.createElementVNode("text", { class: "label" }, "默认仓库"),
  29575. vue.createElementVNode("view", { class: "picker-value" }, [
  29576. vue.createElementVNode(
  29577. "text",
  29578. {
  29579. class: vue.normalizeClass(["value-text", !$setup.selectedWarehouse && "placeholder"])
  29580. },
  29581. vue.toDisplayString($setup.selectedWarehouse || "请选择仓库"),
  29582. 3
  29583. /* TEXT, CLASS */
  29584. ),
  29585. vue.createVNode(_component_u_icon, {
  29586. name: "arrow-right",
  29587. color: "#999",
  29588. size: "16"
  29589. })
  29590. ])
  29591. ]),
  29592. vue.createCommentVNode(" 仓库选择器 "),
  29593. vue.createVNode(_component_u_picker, {
  29594. show: $setup.showPicker,
  29595. columns: [$setup.warehouseList],
  29596. onConfirm: $setup.onConfirm,
  29597. onCancel: _cache[1] || (_cache[1] = ($event) => $setup.showPicker = false),
  29598. onClose: _cache[2] || (_cache[2] = ($event) => $setup.showPicker = false),
  29599. title: "选择仓库",
  29600. confirmText: "确定",
  29601. cancelText: "取消"
  29602. }, null, 8, ["show", "columns"])
  29603. ]);
  29604. }
  29605. 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"]]);
  29606. const _sfc_main$f = {
  29607. __name: "school",
  29608. setup(__props, { expose: __expose }) {
  29609. __expose();
  29610. const schoolName = vue.ref("");
  29611. const schoolList = vue.ref([]);
  29612. const getSchoolList = () => {
  29613. uni.$u.http.get("/app/appConf/getPadSchoolBroadcast").then((res2) => {
  29614. if (res2.code == 200) {
  29615. schoolList.value = res2.data;
  29616. }
  29617. });
  29618. };
  29619. getSchoolList();
  29620. const handleSubmit = () => {
  29621. if (schoolList.value.length === 0) {
  29622. uni.$u.toast("请至少添加一所学校");
  29623. return;
  29624. }
  29625. uni.$u.http.post("/app/appConf/setPadSchoolBroadcast", schoolList.value).then((res2) => {
  29626. if (res2.code == 200) {
  29627. uni.showToast({
  29628. title: "设置成功",
  29629. icon: "success"
  29630. });
  29631. }
  29632. });
  29633. };
  29634. const handleAddSchool = () => {
  29635. if (!schoolName.value.trim()) {
  29636. uni.$u.toast("请输入学校名称");
  29637. return;
  29638. }
  29639. schoolList.value.push({
  29640. schoolName: schoolName.value,
  29641. id: ""
  29642. });
  29643. schoolName.value = "";
  29644. };
  29645. const handleRemoveSchool = (index2) => {
  29646. schoolList.value.splice(index2, 1);
  29647. };
  29648. const __returned__ = { schoolName, schoolList, getSchoolList, handleSubmit, handleAddSchool, handleRemoveSchool, ref: vue.ref };
  29649. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29650. return __returned__;
  29651. }
  29652. };
  29653. function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  29654. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$g);
  29655. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  29656. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2$4);
  29657. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  29658. return vue.openBlock(), vue.createElementBlock("view", { class: "school-add" }, [
  29659. vue.createCommentVNode(" 输入区域 "),
  29660. vue.createElementVNode("view", { class: "input-section" }, [
  29661. vue.createElementVNode("view", { class: "input-header" }, [
  29662. vue.createElementVNode("text", { class: "required" }, "*"),
  29663. vue.createElementVNode("text", { class: "label" }, "学校名称:"),
  29664. vue.createVNode(_component_u_input, {
  29665. modelValue: $setup.schoolName,
  29666. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.schoolName = $event),
  29667. placeholder: "请输入一个学校名称",
  29668. border: "false",
  29669. class: "input"
  29670. }, {
  29671. suffix: vue.withCtx(() => [
  29672. vue.createVNode(_component_u_icon, {
  29673. name: "plus",
  29674. size: "24",
  29675. color: "#666",
  29676. onClick: $setup.handleAddSchool
  29677. })
  29678. ]),
  29679. _: 1
  29680. /* STABLE */
  29681. }, 8, ["modelValue"])
  29682. ])
  29683. ]),
  29684. vue.createCommentVNode(" 学校列表 "),
  29685. vue.createElementVNode("view", { class: "school-list" }, [
  29686. (vue.openBlock(true), vue.createElementBlock(
  29687. vue.Fragment,
  29688. null,
  29689. vue.renderList($setup.schoolList, (item, index2) => {
  29690. return vue.openBlock(), vue.createElementBlock("view", {
  29691. class: "school-item",
  29692. key: index2
  29693. }, [
  29694. vue.createVNode(_component_u_tag, {
  29695. text: item.schoolName,
  29696. closable: "",
  29697. size: "large"
  29698. }, null, 8, ["text"])
  29699. ]);
  29700. }),
  29701. 128
  29702. /* KEYED_FRAGMENT */
  29703. ))
  29704. ]),
  29705. vue.createCommentVNode(" 底部提交按钮 "),
  29706. vue.createElementVNode("view", { class: "fixed-bottom" }, [
  29707. vue.createVNode(_component_u_button, {
  29708. size: "large",
  29709. type: "success",
  29710. block: "",
  29711. onClick: $setup.handleSubmit
  29712. }, {
  29713. default: vue.withCtx(() => [
  29714. vue.createTextVNode("提交")
  29715. ]),
  29716. _: 1
  29717. /* STABLE */
  29718. })
  29719. ])
  29720. ]);
  29721. }
  29722. 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"]]);
  29723. const _sfc_main$e = {
  29724. __name: "audit-unfinished",
  29725. setup(__props, { expose: __expose }) {
  29726. __expose();
  29727. const __returned__ = { orderItem };
  29728. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29729. return __returned__;
  29730. }
  29731. };
  29732. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  29733. return vue.openBlock(), vue.createElementBlock("view", { class: "audit-list" }, [
  29734. vue.createVNode($setup["orderItem"]),
  29735. vue.createVNode($setup["orderItem"]),
  29736. vue.createVNode($setup["orderItem"])
  29737. ]);
  29738. }
  29739. const PagesMyPageAuditUnfinished = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/audit-unfinished.vue"]]);
  29740. const _sfc_main$d = {
  29741. __name: "version",
  29742. setup(__props, { expose: __expose }) {
  29743. __expose();
  29744. const userInfo = vue.reactive({
  29745. version: "v_2024050400_1",
  29746. // Example version number
  29747. updateStatus: "已经是新版本"
  29748. // Example update status
  29749. });
  29750. function checkForUpdates() {
  29751. setTimeout(() => {
  29752. {
  29753. userInfo.updateStatus = "发现新版本,正在下载...";
  29754. downloadNewVersion();
  29755. }
  29756. }, 1e3);
  29757. }
  29758. function downloadNewVersion() {
  29759. setTimeout(() => {
  29760. userInfo.updateStatus = "下载完成,准备安装";
  29761. }, 2e3);
  29762. }
  29763. const __returned__ = { userInfo, checkForUpdates, downloadNewVersion, reactive: vue.reactive };
  29764. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29765. return __returned__;
  29766. }
  29767. };
  29768. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  29769. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$6);
  29770. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$5);
  29771. return vue.openBlock(), vue.createElementBlock("view", { class: "version-info-page" }, [
  29772. vue.createVNode(_component_u_cell_group, {
  29773. border: false,
  29774. customStyle: "background:#ffffff"
  29775. }, {
  29776. default: vue.withCtx(() => [
  29777. vue.createVNode(_component_u_cell, {
  29778. title: "当前版本号(正式版)",
  29779. value: $setup.userInfo.version || "无"
  29780. }, null, 8, ["value"]),
  29781. vue.createVNode(_component_u_cell, {
  29782. title: "检测更新",
  29783. value: $setup.userInfo.updateStatus || "无",
  29784. border: false,
  29785. onClick: $setup.checkForUpdates
  29786. }, null, 8, ["value"])
  29787. ]),
  29788. _: 1
  29789. /* STABLE */
  29790. })
  29791. ]);
  29792. }
  29793. const PagesMyPageVersion = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/my/page/version.vue"]]);
  29794. const props$1 = {
  29795. props: {
  29796. // 是否为加载中状态
  29797. loading: {
  29798. type: Boolean,
  29799. default: props$E.switch.loading
  29800. },
  29801. // 是否为禁用装填
  29802. disabled: {
  29803. type: Boolean,
  29804. default: props$E.switch.disabled
  29805. },
  29806. // 开关尺寸,单位px
  29807. size: {
  29808. type: [String, Number],
  29809. default: props$E.switch.size
  29810. },
  29811. // 打开时的背景颜色
  29812. activeColor: {
  29813. type: String,
  29814. default: props$E.switch.activeColor
  29815. },
  29816. // 关闭时的背景颜色
  29817. inactiveColor: {
  29818. type: String,
  29819. default: props$E.switch.inactiveColor
  29820. },
  29821. // 通过v-model双向绑定的值
  29822. modelValue: {
  29823. type: [Boolean, String, Number],
  29824. default: props$E.switch.value
  29825. },
  29826. // switch打开时的值
  29827. activeValue: {
  29828. type: [String, Number, Boolean],
  29829. default: props$E.switch.activeValue
  29830. },
  29831. // switch关闭时的值
  29832. inactiveValue: {
  29833. type: [String, Number, Boolean],
  29834. default: props$E.switch.inactiveValue
  29835. },
  29836. // 是否开启异步变更,开启后需要手动控制输入值
  29837. asyncChange: {
  29838. type: Boolean,
  29839. default: props$E.switch.asyncChange
  29840. },
  29841. // 圆点与外边框的距离
  29842. space: {
  29843. type: [String, Number],
  29844. default: props$E.switch.space
  29845. }
  29846. }
  29847. };
  29848. const _sfc_main$c = {
  29849. name: "u-switch",
  29850. mixins: [mpMixin, mixin, props$1],
  29851. watch: {
  29852. modelValue: {
  29853. immediate: true,
  29854. handler(n) {
  29855. if (n !== this.inactiveValue && n !== this.activeValue) {
  29856. uni.$u.error("v-model绑定的值必须为inactiveValue、activeValue二者之一");
  29857. }
  29858. }
  29859. }
  29860. },
  29861. data() {
  29862. return {
  29863. bgColor: "#ffffff"
  29864. };
  29865. },
  29866. computed: {
  29867. isActive() {
  29868. return this.modelValue === this.activeValue;
  29869. },
  29870. switchStyle() {
  29871. let style = {};
  29872. style.width = uni.$u.addUnit(this.size * 2 + 2);
  29873. style.height = uni.$u.addUnit(Number(this.size) + 2);
  29874. if (this.customInactiveColor) {
  29875. style.borderColor = "rgba(0, 0, 0, 0)";
  29876. }
  29877. style.backgroundColor = this.isActive ? this.activeColor : this.inactiveColor;
  29878. return style;
  29879. },
  29880. nodeStyle() {
  29881. let style = {};
  29882. style.width = uni.$u.addUnit(this.size - this.space);
  29883. style.height = uni.$u.addUnit(this.size - this.space);
  29884. const translateX = this.isActive ? uni.$u.addUnit(this.space) : uni.$u.addUnit(this.size);
  29885. style.transform = `translateX(-${translateX})`;
  29886. return style;
  29887. },
  29888. bgStyle() {
  29889. let style = {};
  29890. style.width = uni.$u.addUnit(Number(this.size) * 2 - this.size / 2);
  29891. style.height = uni.$u.addUnit(this.size);
  29892. style.backgroundColor = this.inactiveColor;
  29893. style.transform = `scale(${this.isActive ? 0 : 1})`;
  29894. return style;
  29895. },
  29896. customInactiveColor() {
  29897. return this.inactiveColor !== "#fff" && this.inactiveColor !== "#ffffff";
  29898. }
  29899. },
  29900. emits: ["update:modelValue", "change"],
  29901. methods: {
  29902. clickHandler() {
  29903. if (!this.disabled && !this.loading) {
  29904. const oldValue = this.isActive ? this.inactiveValue : this.activeValue;
  29905. if (!this.asyncChange) {
  29906. this.$emit("update:modelValue", oldValue);
  29907. }
  29908. this.$nextTick(() => {
  29909. this.$emit("change", oldValue);
  29910. });
  29911. }
  29912. }
  29913. }
  29914. };
  29915. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  29916. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$d);
  29917. return vue.openBlock(), vue.createElementBlock(
  29918. "view",
  29919. {
  29920. class: vue.normalizeClass(["u-switch", [_ctx.disabled && "u-switch--disabled"]]),
  29921. style: vue.normalizeStyle([$options.switchStyle, _ctx.$u.addStyle(_ctx.customStyle)]),
  29922. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  29923. },
  29924. [
  29925. vue.createElementVNode(
  29926. "view",
  29927. {
  29928. class: "u-switch__bg",
  29929. style: vue.normalizeStyle([$options.bgStyle])
  29930. },
  29931. null,
  29932. 4
  29933. /* STYLE */
  29934. ),
  29935. vue.createElementVNode(
  29936. "view",
  29937. {
  29938. class: vue.normalizeClass(["u-switch__node", [_ctx.modelValue && "u-switch__node--on"]]),
  29939. style: vue.normalizeStyle([$options.nodeStyle]),
  29940. ref: "u-switch__node"
  29941. },
  29942. [
  29943. vue.createVNode(_component_u_loading_icon, {
  29944. show: _ctx.loading,
  29945. mode: "circle",
  29946. timingFunction: "linear",
  29947. color: _ctx.modelValue ? _ctx.activeColor : "#AAABAD",
  29948. size: _ctx.size * 0.6
  29949. }, null, 8, ["show", "color", "size"])
  29950. ],
  29951. 6
  29952. /* CLASS, STYLE */
  29953. )
  29954. ],
  29955. 6
  29956. /* CLASS, STYLE */
  29957. );
  29958. }
  29959. 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"]]);
  29960. const props = {
  29961. props: {
  29962. // 最小可选值
  29963. min: {
  29964. type: [Number, String],
  29965. default: props$E.slider.min
  29966. },
  29967. // 最大可选值
  29968. max: {
  29969. type: [Number, String],
  29970. default: props$E.slider.max
  29971. },
  29972. // 步长,取值必须大于 0,并且可被(max - min)整除
  29973. step: {
  29974. type: [Number, String],
  29975. default: props$E.slider.step
  29976. },
  29977. // 当前取值
  29978. value: {
  29979. type: [Number, String],
  29980. default: props$E.slider.value
  29981. },
  29982. // 滑块右侧已选择部分的背景色
  29983. activeColor: {
  29984. type: String,
  29985. default: props$E.slider.activeColor
  29986. },
  29987. // 滑块左侧未选择部分的背景色
  29988. inactiveColor: {
  29989. type: String,
  29990. default: props$E.slider.inactiveColor
  29991. },
  29992. // 滑块的大小,取值范围为 12 - 28
  29993. blockSize: {
  29994. type: [Number, String],
  29995. default: props$E.slider.blockSize
  29996. },
  29997. // 滑块的颜色
  29998. blockColor: {
  29999. type: String,
  30000. default: props$E.slider.blockColor
  30001. },
  30002. // 禁用状态
  30003. disabled: {
  30004. type: Boolean,
  30005. default: props$E.slider.disabled
  30006. },
  30007. // 是否显示当前的选择值
  30008. showValue: {
  30009. type: Boolean,
  30010. default: props$E.slider.showValue
  30011. }
  30012. }
  30013. };
  30014. const _sfc_main$b = {
  30015. name: "u--slider",
  30016. mixins: [mpMixin, mixin, props],
  30017. methods: {
  30018. // 拖动过程中触发
  30019. changingHandler(e) {
  30020. const {
  30021. value: value2
  30022. } = e.detail;
  30023. this.$emit("input", value2);
  30024. this.$emit("changing", value2);
  30025. },
  30026. // 滑动结束时触发
  30027. changeHandler(e) {
  30028. const {
  30029. value: value2
  30030. } = e.detail;
  30031. this.$emit("input", value2);
  30032. this.$emit("change", value2);
  30033. }
  30034. }
  30035. };
  30036. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  30037. return vue.openBlock(), vue.createElementBlock(
  30038. "view",
  30039. {
  30040. class: "u-slider",
  30041. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  30042. },
  30043. [
  30044. vue.createElementVNode("slider", {
  30045. min: _ctx.min,
  30046. max: _ctx.max,
  30047. step: _ctx.step,
  30048. value: _ctx.value,
  30049. activeColor: _ctx.activeColor,
  30050. inactiveColor: _ctx.inactiveColor,
  30051. blockSize: _ctx.$u.getPx(_ctx.blockSize),
  30052. blockColor: _ctx.blockColor,
  30053. showValue: _ctx.showValue,
  30054. disabled: _ctx.disabled,
  30055. onChanging: _cache[0] || (_cache[0] = (...args) => $options.changingHandler && $options.changingHandler(...args)),
  30056. onChange: _cache[1] || (_cache[1] = (...args) => $options.changeHandler && $options.changeHandler(...args))
  30057. }, null, 40, ["min", "max", "step", "value", "activeColor", "inactiveColor", "blockSize", "blockColor", "showValue", "disabled"])
  30058. ],
  30059. 4
  30060. /* STYLE */
  30061. );
  30062. }
  30063. 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"]]);
  30064. const _sfc_main$a = {
  30065. __name: "volume",
  30066. setup(__props, { expose: __expose }) {
  30067. __expose();
  30068. const settings = vue.ref({
  30069. audioStartSwitch: true,
  30070. audioStart: "书嗨,不辜负每一个爱书的人",
  30071. audioSpeed: 10,
  30072. audioVolume: 5,
  30073. "audioPlay": false,
  30074. "audioClick": false
  30075. });
  30076. function changeSpeed(value2) {
  30077. settings.value.audioSpeed = value2;
  30078. }
  30079. function changeVolume(value2) {
  30080. settings.value.audioVolume = value2;
  30081. }
  30082. const getVoiceBroadcast = () => {
  30083. uni.$u.http.get("/app/appConf/getAudioConfig").then((res2) => {
  30084. if (res2.code == 200) {
  30085. settings.value = res2.data;
  30086. }
  30087. });
  30088. };
  30089. getVoiceBroadcast();
  30090. const saveVoiceBroadcast = () => {
  30091. uni.$u.http.post("/app/appConf/setAudioConfig", settings.value).then((res2) => {
  30092. if (res2.code == 200) {
  30093. uni.showToast({
  30094. title: "设置成功",
  30095. icon: "success"
  30096. });
  30097. initTTS();
  30098. }
  30099. });
  30100. };
  30101. const tts = vue.ref(null);
  30102. const initTTS = () => {
  30103. let params = {
  30104. speed: settings.value.audioSpeed / 10,
  30105. // 将 0-10 转换为 0-1
  30106. pitch: settings.value.audioVolume,
  30107. // 将 0-10 转换为 0-1
  30108. volume: 1
  30109. };
  30110. tts.value = new VolumeTTS(params);
  30111. settings.value.audioStartSwitch && tts.value.speak(settings.value.audioStart);
  30112. };
  30113. function stopPlayback() {
  30114. tts.value && tts.value.stop();
  30115. uni.showToast({
  30116. title: "已停止播放",
  30117. icon: "none"
  30118. });
  30119. }
  30120. function restartApp() {
  30121. uni.showModal({
  30122. title: "提示",
  30123. content: "确定要重启应用吗?",
  30124. success: function(res2) {
  30125. if (res2.confirm) {
  30126. plus.runtime.restart();
  30127. }
  30128. }
  30129. });
  30130. }
  30131. function loadSettings() {
  30132. try {
  30133. const savedSettings = uni.getStorageSync("tts_settings");
  30134. if (savedSettings) {
  30135. Object.assign(settings, savedSettings);
  30136. }
  30137. } catch (error2) {
  30138. formatAppLog("error", "at pages/my/page/volume.vue:161", "加载设置失败:", error2);
  30139. }
  30140. }
  30141. function playClickSound() {
  30142. if (!settings.audioClick)
  30143. return;
  30144. const audio = uni.createInnerAudioContext();
  30145. audio.src = "/static/audio/click.mp3";
  30146. audio.play();
  30147. }
  30148. vue.onMounted(async () => {
  30149. loadSettings();
  30150. });
  30151. const __returned__ = { settings, changeSpeed, changeVolume, getVoiceBroadcast, saveVoiceBroadcast, tts, initTTS, stopPlayback, restartApp, loadSettings, playClickSound, ref: vue.ref, reactive: vue.reactive, onMounted: vue.onMounted, get VolumeTTS() {
  30152. return VolumeTTS;
  30153. } };
  30154. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30155. return __returned__;
  30156. }
  30157. };
  30158. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  30159. const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0);
  30160. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$6);
  30161. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$5);
  30162. const _component_u_textarea = resolveEasycom(vue.resolveDynamicComponent("u-textarea"), __easycom_3$2);
  30163. const _component_u_slider = resolveEasycom(vue.resolveDynamicComponent("u-slider"), __easycom_4);
  30164. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  30165. return vue.openBlock(), vue.createElementBlock("view", { class: "settings-container" }, [
  30166. vue.createCommentVNode(" 设置选项组 "),
  30167. vue.createElementVNode("view", { class: "settings-section" }, [
  30168. vue.createVNode(_component_u_cell_group, { border: false }, {
  30169. default: vue.withCtx(() => [
  30170. vue.createCommentVNode(" 语音播报设置 "),
  30171. vue.createVNode(_component_u_cell, {
  30172. title: "语音播报",
  30173. label: "控制除app启动提示外所有语音播报的开关",
  30174. "border-bottom": true
  30175. }, {
  30176. "right-icon": vue.withCtx(() => [
  30177. vue.createVNode(_component_u_switch, {
  30178. modelValue: $setup.settings.audioPlay,
  30179. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.settings.audioPlay = $event),
  30180. activeColor: "#4cd964"
  30181. }, null, 8, ["modelValue"])
  30182. ]),
  30183. _: 1
  30184. /* STABLE */
  30185. }),
  30186. vue.createCommentVNode(" 点击音效设置 "),
  30187. vue.createVNode(_component_u_cell, {
  30188. title: "点击音效",
  30189. "border-bottom": true
  30190. }, {
  30191. "right-icon": vue.withCtx(() => [
  30192. vue.createVNode(_component_u_switch, {
  30193. modelValue: $setup.settings.audioClick,
  30194. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.settings.audioClick = $event),
  30195. activeColor: "#4cd964"
  30196. }, null, 8, ["modelValue"])
  30197. ]),
  30198. _: 1
  30199. /* STABLE */
  30200. }),
  30201. vue.createCommentVNode(" 启动提示语设置 "),
  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.audioStartSwitch,
  30209. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.settings.audioStartSwitch = $event),
  30210. activeColor: "#4cd964"
  30211. }, null, 8, ["modelValue"])
  30212. ]),
  30213. _: 1
  30214. /* STABLE */
  30215. })
  30216. ]),
  30217. _: 1
  30218. /* STABLE */
  30219. }),
  30220. vue.createCommentVNode(" 启动提示语输入框 "),
  30221. vue.createElementVNode("view", { class: "input-section" }, [
  30222. vue.createVNode(_component_u_textarea, {
  30223. modelValue: $setup.settings.audioStart,
  30224. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.settings.audioStart = $event),
  30225. placeholder: "输入启动时要说的内容,比如:欢迎使用书嗨/很开心又见到你啦",
  30226. height: "100"
  30227. }, null, 8, ["modelValue"])
  30228. ]),
  30229. vue.createCommentVNode(" 语速设置 "),
  30230. vue.createElementVNode("view", { class: "slider-section" }, [
  30231. vue.createElementVNode("view", { class: "slider-title" }, [
  30232. vue.createElementVNode("text", null, "设置语速"),
  30233. vue.createElementVNode("text", { class: "subtitle" }, "(部分机型不支持)")
  30234. ]),
  30235. vue.createVNode(_component_u_slider, {
  30236. value: $setup.settings.audioSpeed,
  30237. max: 20,
  30238. min: 5,
  30239. step: 1,
  30240. showValue: "",
  30241. onChange: $setup.changeSpeed
  30242. }, null, 8, ["value"])
  30243. ]),
  30244. vue.createCommentVNode(" 音调设置 "),
  30245. vue.createElementVNode("view", { class: "slider-section" }, [
  30246. vue.createElementVNode("view", { class: "slider-title" }, [
  30247. vue.createElementVNode("text", null, "设置音调"),
  30248. vue.createElementVNode("text", { class: "subtitle" }, "(部分机型不支持)")
  30249. ]),
  30250. vue.createVNode(_component_u_slider, {
  30251. value: $setup.settings.audioVolume,
  30252. max: 10,
  30253. min: 1,
  30254. step: 1,
  30255. showValue: "",
  30256. onChange: $setup.changeVolume
  30257. }, null, 8, ["value"])
  30258. ]),
  30259. vue.createCommentVNode(" 操作按钮 "),
  30260. vue.createElementVNode("view", { class: "button-group" }, [
  30261. vue.createVNode(_component_u_button, {
  30262. type: "primary",
  30263. text: "保存设置并试听",
  30264. onClick: $setup.saveVoiceBroadcast
  30265. }),
  30266. vue.createVNode(_component_u_button, {
  30267. type: "warning",
  30268. text: "停止播放",
  30269. onClick: $setup.stopPlayback,
  30270. plain: true
  30271. }),
  30272. vue.createVNode(_component_u_button, {
  30273. type: "error",
  30274. text: "重启app",
  30275. onClick: $setup.restartApp,
  30276. plain: true
  30277. })
  30278. ])
  30279. ])
  30280. ]);
  30281. }
  30282. 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"]]);
  30283. const _sfc_main$9 = {
  30284. __name: "book-display",
  30285. setup(__props, { expose: __expose }) {
  30286. __expose();
  30287. const settings = vue.reactive({
  30288. showRecyclePrice: false,
  30289. showRecycleStatus: false,
  30290. showStock: false,
  30291. showDetail: false
  30292. });
  30293. function loadSettings() {
  30294. uni.$u.http.get("/app/appConf/getBookShowConfig").then((res2) => {
  30295. if (res2.code == 200) {
  30296. Object.assign(settings, res2.data);
  30297. }
  30298. });
  30299. }
  30300. function saveSettings() {
  30301. uni.$u.http.post("/app/appConf/setBookShowConfig", settings).then((res2) => {
  30302. if (res2.code == 200) {
  30303. uni.showToast({
  30304. title: "设置已保存",
  30305. icon: "success"
  30306. });
  30307. } else {
  30308. uni.showToast({
  30309. title: "保存设置失败",
  30310. icon: "error"
  30311. });
  30312. }
  30313. });
  30314. }
  30315. vue.onMounted(() => {
  30316. loadSettings();
  30317. });
  30318. const __returned__ = { settings, loadSettings, saveSettings, reactive: vue.reactive, onMounted: vue.onMounted };
  30319. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30320. return __returned__;
  30321. }
  30322. };
  30323. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  30324. const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0);
  30325. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_1$6);
  30326. const _component_u_cell_group = resolveEasycom(vue.resolveDynamicComponent("u-cell-group"), __easycom_2$5);
  30327. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  30328. return vue.openBlock(), vue.createElementBlock("view", { class: "settings-container" }, [
  30329. vue.createCommentVNode(" 设置列表 "),
  30330. vue.createVNode(_component_u_cell_group, {
  30331. border: false,
  30332. class: "settings-group"
  30333. }, {
  30334. default: vue.withCtx(() => [
  30335. vue.createVNode(_component_u_cell, {
  30336. title: "是否展示回收价",
  30337. "border-bottom": true
  30338. }, {
  30339. "right-icon": vue.withCtx(() => [
  30340. vue.createVNode(_component_u_switch, {
  30341. modelValue: $setup.settings.showRecyclePrice,
  30342. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.settings.showRecyclePrice = $event),
  30343. activeColor: "#4cd964"
  30344. }, null, 8, ["modelValue"])
  30345. ]),
  30346. _: 1
  30347. /* STABLE */
  30348. }),
  30349. vue.createVNode(_component_u_cell, {
  30350. title: "是否展示回收状态",
  30351. "border-bottom": true
  30352. }, {
  30353. "right-icon": vue.withCtx(() => [
  30354. vue.createVNode(_component_u_switch, {
  30355. modelValue: $setup.settings.showRecycleStatus,
  30356. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.settings.showRecycleStatus = $event),
  30357. activeColor: "#4cd964"
  30358. }, null, 8, ["modelValue"])
  30359. ]),
  30360. _: 1
  30361. /* STABLE */
  30362. }),
  30363. vue.createVNode(_component_u_cell, {
  30364. title: "是否展示库存信息",
  30365. "border-bottom": true
  30366. }, {
  30367. "right-icon": vue.withCtx(() => [
  30368. vue.createVNode(_component_u_switch, {
  30369. modelValue: $setup.settings.showStock,
  30370. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.settings.showStock = $event),
  30371. activeColor: "#4cd964"
  30372. }, null, 8, ["modelValue"])
  30373. ]),
  30374. _: 1
  30375. /* STABLE */
  30376. }),
  30377. vue.createVNode(_component_u_cell, {
  30378. title: "是否默认展开商品详情",
  30379. "border-bottom": false
  30380. }, {
  30381. "right-icon": vue.withCtx(() => [
  30382. vue.createVNode(_component_u_switch, {
  30383. modelValue: $setup.settings.showDetail,
  30384. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.settings.showDetail = $event),
  30385. activeColor: "#4cd964"
  30386. }, null, 8, ["modelValue"])
  30387. ]),
  30388. _: 1
  30389. /* STABLE */
  30390. })
  30391. ]),
  30392. _: 1
  30393. /* STABLE */
  30394. }),
  30395. vue.createVNode(_component_u_button, {
  30396. class: "mt-40",
  30397. type: "primary",
  30398. onClick: $setup.saveSettings
  30399. }, {
  30400. default: vue.withCtx(() => [
  30401. vue.createTextVNode("保存")
  30402. ]),
  30403. _: 1
  30404. /* STABLE */
  30405. })
  30406. ]);
  30407. }
  30408. 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"]]);
  30409. const _sfc_main$8 = {
  30410. __name: "password",
  30411. setup(__props, { expose: __expose }) {
  30412. __expose();
  30413. const formRef = vue.ref(null);
  30414. const loading = vue.ref(false);
  30415. const showPassword = vue.reactive({
  30416. old: false,
  30417. new: false,
  30418. confirm: false
  30419. });
  30420. const formData = vue.reactive({
  30421. oldPassword: "",
  30422. newPassword: "",
  30423. confirmPassword: ""
  30424. });
  30425. const rules2 = {
  30426. oldPassword: [{
  30427. required: true,
  30428. message: "请输入原密码",
  30429. trigger: ["blur", "change"]
  30430. }, {
  30431. min: 6,
  30432. message: "密码长度不能小于6位",
  30433. trigger: ["blur", "change"]
  30434. }],
  30435. newPassword: [{
  30436. required: true,
  30437. message: "请输入新密码",
  30438. trigger: ["blur", "change"]
  30439. }, {
  30440. min: 6,
  30441. message: "密码长度不能小于6位",
  30442. trigger: ["blur", "change"]
  30443. }, {
  30444. validator: (rule, value2, callback) => {
  30445. if (value2 === formData.oldPassword) {
  30446. callback(new Error("新密码不能与原密码相同"));
  30447. } else {
  30448. callback();
  30449. }
  30450. },
  30451. trigger: ["blur", "change"]
  30452. }],
  30453. confirmPassword: [{
  30454. required: true,
  30455. message: "请再次输入新密码",
  30456. trigger: ["blur", "change"]
  30457. }, {
  30458. validator: (rule, value2, callback) => {
  30459. if (value2 !== formData.newPassword) {
  30460. callback(new Error("两次输入的密码不一致"));
  30461. } else {
  30462. callback();
  30463. }
  30464. },
  30465. trigger: ["blur", "change"]
  30466. }]
  30467. };
  30468. function submitForm() {
  30469. if (!formRef.value)
  30470. return;
  30471. formRef.value.validate().then((valid) => {
  30472. if (valid) {
  30473. loading.value = true;
  30474. uni.$u.http.post("/app/appUser/updatePwd", formData).then((res2) => {
  30475. if (res2.code == 200) {
  30476. uni.showModal({
  30477. title: "提示",
  30478. content: "密码修改成功,是否确定要退出重新登录?",
  30479. success: (res3) => {
  30480. if (res3.confirm) {
  30481. uni.clearStorageSync();
  30482. uni.reLaunch({
  30483. url: "/pages/login/login"
  30484. });
  30485. } else {
  30486. uni.navigateBack({
  30487. delta: 1
  30488. });
  30489. }
  30490. }
  30491. });
  30492. }
  30493. }).finally(() => {
  30494. loading.value = false;
  30495. });
  30496. }
  30497. });
  30498. }
  30499. function resetForm() {
  30500. if (!formRef.value)
  30501. return;
  30502. formRef.value.resetFields();
  30503. }
  30504. const __returned__ = { formRef, loading, showPassword, formData, rules: rules2, submitForm, resetForm, ref: vue.ref, reactive: vue.reactive };
  30505. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30506. return __returned__;
  30507. }
  30508. };
  30509. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  30510. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
  30511. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1$a);
  30512. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_2$7);
  30513. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
  30514. return vue.openBlock(), vue.createElementBlock("view", { class: "password-container" }, [
  30515. vue.createVNode(_component_u_form, {
  30516. model: $setup.formData,
  30517. rules: $setup.rules,
  30518. ref: "formRef",
  30519. labelPosition: "top",
  30520. borderBottom: true,
  30521. labelWidth: "300px",
  30522. "error-type": "toast"
  30523. }, {
  30524. default: vue.withCtx(() => [
  30525. vue.createVNode(_component_u_form_item, {
  30526. label: "原密码",
  30527. prop: "oldPassword",
  30528. borderBottom: ""
  30529. }, {
  30530. default: vue.withCtx(() => [
  30531. vue.createVNode(_component_u_input, {
  30532. modelValue: $setup.formData.oldPassword,
  30533. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.formData.oldPassword = $event),
  30534. type: "password",
  30535. placeholder: "请输入原密码",
  30536. border: false
  30537. }, null, 8, ["modelValue"])
  30538. ]),
  30539. _: 1
  30540. /* STABLE */
  30541. }),
  30542. vue.createVNode(_component_u_form_item, {
  30543. label: "新密码",
  30544. prop: "newPassword",
  30545. borderBottom: ""
  30546. }, {
  30547. default: vue.withCtx(() => [
  30548. vue.createVNode(_component_u_input, {
  30549. modelValue: $setup.formData.newPassword,
  30550. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.formData.newPassword = $event),
  30551. type: "password",
  30552. placeholder: "请输入新密码",
  30553. border: false
  30554. }, null, 8, ["modelValue"])
  30555. ]),
  30556. _: 1
  30557. /* STABLE */
  30558. }),
  30559. vue.createVNode(_component_u_form_item, {
  30560. label: "确认新密码",
  30561. prop: "confirmPassword",
  30562. borderBottom: ""
  30563. }, {
  30564. default: vue.withCtx(() => [
  30565. vue.createVNode(_component_u_input, {
  30566. modelValue: $setup.formData.confirmPassword,
  30567. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.confirmPassword = $event),
  30568. type: "password",
  30569. placeholder: "请再次输入新密码",
  30570. border: false
  30571. }, null, 8, ["modelValue"])
  30572. ]),
  30573. _: 1
  30574. /* STABLE */
  30575. })
  30576. ]),
  30577. _: 1
  30578. /* STABLE */
  30579. }, 8, ["model"]),
  30580. vue.createElementVNode("view", { class: "submit-btn" }, [
  30581. vue.createVNode(_component_u_button, {
  30582. type: "primary",
  30583. text: "修改密码",
  30584. onClick: $setup.submitForm,
  30585. loading: $setup.loading
  30586. }, null, 8, ["loading"])
  30587. ])
  30588. ]);
  30589. }
  30590. 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"]]);
  30591. const _sfc_main$7 = {};
  30592. function _sfc_render$6(_ctx, _cache) {
  30593. return vue.openBlock(), vue.createElementBlock("view");
  30594. }
  30595. const PagesOrderStatPendingReview = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-review.vue"]]);
  30596. const _sfc_main$6 = {};
  30597. function _sfc_render$5(_ctx, _cache) {
  30598. return vue.openBlock(), vue.createElementBlock("view");
  30599. }
  30600. const PagesOrderStatPendingPick = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-pick.vue"]]);
  30601. const _sfc_main$5 = {};
  30602. function _sfc_render$4(_ctx, _cache) {
  30603. return vue.openBlock(), vue.createElementBlock("view");
  30604. }
  30605. const PagesOrderStatPendingSign = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-sign.vue"]]);
  30606. const _sfc_main$4 = {};
  30607. function _sfc_render$3(_ctx, _cache) {
  30608. return vue.openBlock(), vue.createElementBlock("view");
  30609. }
  30610. const PagesOrderStatPendingConfirm = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-confirm.vue"]]);
  30611. const _sfc_main$3 = {};
  30612. function _sfc_render$2(_ctx, _cache) {
  30613. return vue.openBlock(), vue.createElementBlock("view");
  30614. }
  30615. const PagesOrderStatPendingAudit = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-audit.vue"]]);
  30616. const _sfc_main$2 = {};
  30617. function _sfc_render$1(_ctx, _cache) {
  30618. return vue.openBlock(), vue.createElementBlock("view");
  30619. }
  30620. const PagesOrderStatPendingPayment = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/pending-payment.vue"]]);
  30621. const _sfc_main$1 = {};
  30622. function _sfc_render(_ctx, _cache) {
  30623. return vue.openBlock(), vue.createElementBlock("view");
  30624. }
  30625. const PagesOrderStatReceiveStat = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/书嗨项目/shuhi-app-fornt/pages/order/stat/receive-stat.vue"]]);
  30626. __definePage("pages/login/login", PagesLoginLogin);
  30627. __definePage("pages/index/index", PagesIndexIndex);
  30628. __definePage("pages/my/my", PagesMyMy);
  30629. __definePage("pages/order/index", PagesOrderIndex);
  30630. __definePage("pages/book/index", PagesBookIndex);
  30631. __definePage("pages/index/express/transfer-sign", PagesIndexExpressTransferSign);
  30632. __definePage("pages/index/express/scan", PagesIndexExpressScan);
  30633. __definePage("pages/index/express/quick-check", PagesIndexExpressQuickCheck);
  30634. __definePage("pages/index/express/quick-unpack", PagesIndexExpressQuickUnpack);
  30635. __definePage("pages/index/express/route-exception", PagesIndexExpressRouteException);
  30636. __definePage("pages/index/express/warehouse-sign", PagesIndexExpressWarehouseSign);
  30637. __definePage("pages/index/express/weight-modify", PagesIndexExpressWeightModify);
  30638. __definePage("pages/index/audit/confirm-receipt", PagesIndexAuditConfirmReceipt);
  30639. __definePage("pages/index/audit/scan-order", PagesIndexAuditScanOrder);
  30640. __definePage("pages/index/audit/isbn-order", PagesIndexAuditIsbnOrder);
  30641. __definePage("pages/index/audit/express-order", PagesIndexAuditExpressOrder);
  30642. __definePage("pages/index/detail/index", PagesIndexDetailIndex);
  30643. __definePage("pages/index/detail/book-audit", PagesIndexDetailBookAudit);
  30644. __definePage("pages/index/detail/batch-audit", PagesIndexDetailBatchAudit);
  30645. __definePage("pages/index/audit/sender", PagesIndexAuditSender);
  30646. __definePage("pages/index/statistic/audit", PagesIndexStatisticAudit);
  30647. __definePage("pages/index/statistic/after-sale", PagesIndexStatisticAfterSale);
  30648. __definePage("pages/index/statistic/package", PagesIndexStatisticPackage);
  30649. __definePage("pages/index/wms/medium-in", PagesIndexWmsMediumIn);
  30650. __definePage("pages/index/wms/good-in", PagesIndexWmsGoodIn);
  30651. __definePage("pages/index/wms/secondary-in", PagesIndexWmsSecondaryIn);
  30652. __definePage("pages/index/wms/bad-in", PagesIndexWmsBadIn);
  30653. __definePage("pages/index/wms/bad-out", PagesIndexWmsBadOut);
  30654. __definePage("pages/index/wms/bad-out-order", PagesIndexWmsBadOutOrder);
  30655. __definePage("pages/index/wms/bad-off", PagesIndexWmsBadOff);
  30656. __definePage("pages/index/wms/order-query", PagesIndexWmsOrderQuery);
  30657. __definePage("pages/index/wms/order-query-list", PagesIndexWmsOrderQueryList);
  30658. __definePage("pages/index/wms/location-order", PagesIndexWmsLocationOrder);
  30659. __definePage("pages/index/wms/location-order-list", PagesIndexWmsLocationOrderList);
  30660. __definePage("pages/index/wms/location-select", PagesIndexWmsLocationSelect);
  30661. __definePage("pages/index/wms/warehouse-select", PagesIndexWmsWarehouseSelect);
  30662. __definePage("pages/index/wms/speedy-check", PagesIndexWmsSpeedyCheck);
  30663. __definePage("pages/index/offline/check-order", PagesIndexOfflineCheckOrder);
  30664. __definePage("pages/index/offline/check-record", PagesIndexOfflineCheckRecord);
  30665. __definePage("pages/index/entry/scan-book", PagesIndexEntryScanBook);
  30666. __definePage("pages/index/entry/book-weight", PagesIndexEntryBookWeight);
  30667. __definePage("pages/index/express/logistics-detail", PagesIndexExpressLogisticsDetail);
  30668. __definePage("pages/index/wms/task-detail", PagesIndexWmsTaskDetail);
  30669. __definePage("pages/index/wms/speedy-check-add", PagesIndexWmsSpeedyCheckAdd);
  30670. __definePage("pages/my/page/user-info", PagesMyPageUserInfo);
  30671. __definePage("pages/my/page/warehouse", PagesMyPageWarehouse);
  30672. __definePage("pages/my/page/school", PagesMyPageSchool);
  30673. __definePage("pages/my/page/audit-unfinished", PagesMyPageAuditUnfinished);
  30674. __definePage("pages/my/page/version", PagesMyPageVersion);
  30675. __definePage("pages/my/page/volume", PagesMyPageVolume);
  30676. __definePage("pages/my/page/book-display", PagesMyPageBookDisplay);
  30677. __definePage("pages/my/page/password", PagesMyPagePassword);
  30678. __definePage("pages/order/stat/pending-review", PagesOrderStatPendingReview);
  30679. __definePage("pages/order/stat/pending-pick", PagesOrderStatPendingPick);
  30680. __definePage("pages/order/stat/pending-sign", PagesOrderStatPendingSign);
  30681. __definePage("pages/order/stat/pending-confirm", PagesOrderStatPendingConfirm);
  30682. __definePage("pages/order/stat/pending-audit", PagesOrderStatPendingAudit);
  30683. __definePage("pages/order/stat/pending-payment", PagesOrderStatPendingPayment);
  30684. __definePage("pages/order/stat/receive-stat", PagesOrderStatReceiveStat);
  30685. function useInit() {
  30686. var barcodeModel = requireNativePlugin("iData-BarcodePlugin-BarcodeModule");
  30687. barcodeModel.initScan((ret) => {
  30688. formatAppLog("log", "at utils/useBarcodeModule.js:9", "初始化扫描", ret);
  30689. });
  30690. }
  30691. function useGlobalEvent(onChange) {
  30692. var globalEvent = requireNativePlugin("globalEvent");
  30693. const handler = function(e) {
  30694. onChange && onChange(e);
  30695. };
  30696. globalEvent.removeEventListener("iDataBarcodeEvent", handler);
  30697. globalEvent.addEventListener("iDataBarcodeEvent", handler);
  30698. return () => {
  30699. globalEvent.removeEventListener("iDataBarcodeEvent", handler);
  30700. };
  30701. }
  30702. function useGlobalEventRemove() {
  30703. var globalEvent = requireNativePlugin("globalEvent");
  30704. globalEvent.removeEventListener("iDataBarcodeEvent");
  30705. }
  30706. function useRouteMonitor(onChange) {
  30707. uni.addInterceptor("navigateTo", {
  30708. invoke(e) {
  30709. var _a;
  30710. const pages2 = getCurrentPages();
  30711. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  30712. onChange && onChange(e.url, from);
  30713. formatAppLog("log", "at utils/useRouteMonitor.js:18", "navigateTo", e.url, from);
  30714. return e;
  30715. }
  30716. });
  30717. uni.addInterceptor("redirectTo", {
  30718. invoke(e) {
  30719. var _a;
  30720. const pages2 = getCurrentPages();
  30721. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  30722. onChange && onChange(e.url, from);
  30723. formatAppLog("log", "at utils/useRouteMonitor.js:28", "redirectTo", e.url, from);
  30724. return e;
  30725. }
  30726. });
  30727. uni.addInterceptor("reLaunch", {
  30728. invoke(e) {
  30729. var _a;
  30730. const pages2 = getCurrentPages();
  30731. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  30732. onChange && onChange(e.url, from);
  30733. formatAppLog("log", "at utils/useRouteMonitor.js:38", "reLaunch", e.url, from);
  30734. return e;
  30735. }
  30736. });
  30737. uni.addInterceptor("switchTab", {
  30738. invoke(e) {
  30739. var _a;
  30740. const pages2 = getCurrentPages();
  30741. const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
  30742. onChange && onChange(e.url, from);
  30743. formatAppLog("log", "at utils/useRouteMonitor.js:48", "switchTab", e.url, from);
  30744. return e;
  30745. }
  30746. });
  30747. }
  30748. const _sfc_main = {
  30749. __name: "App",
  30750. setup(__props, { expose: __expose }) {
  30751. __expose();
  30752. onLaunch(() => {
  30753. formatAppLog("log", "at App.vue:10", "App Launch");
  30754. if (!store.token) {
  30755. let token = uni.getStorageSync("token");
  30756. if (token) {
  30757. store.setToken(token);
  30758. let userInfo = uni.getStorageSync("userInfo");
  30759. if (userInfo) {
  30760. if (userInfo.userId) {
  30761. store.setUserInfo(userInfo);
  30762. }
  30763. }
  30764. }
  30765. }
  30766. useInit();
  30767. });
  30768. onShow(() => {
  30769. formatAppLog("log", "at App.vue:30", "App Show");
  30770. useRouteMonitor((url2, from) => {
  30771. formatAppLog("log", "at App.vue:34", "onShow", url2, from);
  30772. useGlobalEventRemove();
  30773. });
  30774. });
  30775. onHide(() => {
  30776. formatAppLog("log", "at App.vue:43", "App Hide");
  30777. });
  30778. const __returned__ = { get onLaunch() {
  30779. return onLaunch;
  30780. }, get onShow() {
  30781. return onShow;
  30782. }, get onHide() {
  30783. return onHide;
  30784. }, get store() {
  30785. return store;
  30786. }, get useGlobalEventRemove() {
  30787. return useGlobalEventRemove;
  30788. }, get useInit() {
  30789. return useInit;
  30790. }, get useRouteMonitor() {
  30791. return useRouteMonitor;
  30792. } };
  30793. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  30794. return __returned__;
  30795. }
  30796. };
  30797. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/书嗨项目/shuhi-app-fornt/App.vue"]]);
  30798. const { toString } = Object.prototype;
  30799. function isArray(val) {
  30800. return toString.call(val) === "[object Array]";
  30801. }
  30802. function isObject(val) {
  30803. return val !== null && typeof val === "object";
  30804. }
  30805. function isDate(val) {
  30806. return toString.call(val) === "[object Date]";
  30807. }
  30808. function isURLSearchParams(val) {
  30809. return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
  30810. }
  30811. function forEach(obj, fn) {
  30812. if (obj === null || typeof obj === "undefined") {
  30813. return;
  30814. }
  30815. if (typeof obj !== "object") {
  30816. obj = [obj];
  30817. }
  30818. if (isArray(obj)) {
  30819. for (let i = 0, l = obj.length; i < l; i++) {
  30820. fn.call(null, obj[i], i, obj);
  30821. }
  30822. } else {
  30823. for (const key in obj) {
  30824. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  30825. fn.call(null, obj[key], key, obj);
  30826. }
  30827. }
  30828. }
  30829. }
  30830. function isPlainObject(obj) {
  30831. return Object.prototype.toString.call(obj) === "[object Object]";
  30832. }
  30833. function deepMerge$1() {
  30834. const result = {};
  30835. function assignValue(val, key) {
  30836. if (typeof result[key] === "object" && typeof val === "object") {
  30837. result[key] = deepMerge$1(result[key], val);
  30838. } else if (typeof val === "object") {
  30839. result[key] = deepMerge$1({}, val);
  30840. } else {
  30841. result[key] = val;
  30842. }
  30843. }
  30844. for (let i = 0, l = arguments.length; i < l; i++) {
  30845. forEach(arguments[i], assignValue);
  30846. }
  30847. return result;
  30848. }
  30849. function isUndefined(val) {
  30850. return typeof val === "undefined";
  30851. }
  30852. function encode(val) {
  30853. return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
  30854. }
  30855. function buildURL(url2, params) {
  30856. if (!params) {
  30857. return url2;
  30858. }
  30859. let serializedParams;
  30860. if (isURLSearchParams(params)) {
  30861. serializedParams = params.toString();
  30862. } else {
  30863. const parts = [];
  30864. forEach(params, (val, key) => {
  30865. if (val === null || typeof val === "undefined") {
  30866. return;
  30867. }
  30868. if (isArray(val)) {
  30869. key = `${key}[]`;
  30870. } else {
  30871. val = [val];
  30872. }
  30873. forEach(val, (v) => {
  30874. if (isDate(v)) {
  30875. v = v.toISOString();
  30876. } else if (isObject(v)) {
  30877. v = JSON.stringify(v);
  30878. }
  30879. parts.push(`${encode(key)}=${encode(v)}`);
  30880. });
  30881. });
  30882. serializedParams = parts.join("&");
  30883. }
  30884. if (serializedParams) {
  30885. const hashmarkIndex = url2.indexOf("#");
  30886. if (hashmarkIndex !== -1) {
  30887. url2 = url2.slice(0, hashmarkIndex);
  30888. }
  30889. url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
  30890. }
  30891. return url2;
  30892. }
  30893. function isAbsoluteURL(url2) {
  30894. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
  30895. }
  30896. function combineURLs(baseURL, relativeURL) {
  30897. return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL;
  30898. }
  30899. function buildFullPath(baseURL, requestedURL) {
  30900. if (baseURL && !isAbsoluteURL(requestedURL)) {
  30901. return combineURLs(baseURL, requestedURL);
  30902. }
  30903. return requestedURL;
  30904. }
  30905. function settle(resolve, reject, response) {
  30906. const { validateStatus } = response.config;
  30907. const status = response.statusCode;
  30908. if (status && (!validateStatus || validateStatus(status))) {
  30909. resolve(response);
  30910. } else {
  30911. reject(response);
  30912. }
  30913. }
  30914. const mergeKeys$1 = (keys, config2) => {
  30915. const config3 = {};
  30916. keys.forEach((prop) => {
  30917. if (!isUndefined(config2[prop])) {
  30918. config3[prop] = config2[prop];
  30919. }
  30920. });
  30921. return config3;
  30922. };
  30923. const adapter = (config2) => new Promise((resolve, reject) => {
  30924. const fullPath = buildURL(buildFullPath(config2.baseURL, config2.url), config2.params);
  30925. const _config = {
  30926. url: fullPath,
  30927. header: config2.header,
  30928. complete: (response) => {
  30929. config2.fullPath = fullPath;
  30930. response.config = config2;
  30931. try {
  30932. if (typeof response.data === "string") {
  30933. response.data = JSON.parse(response.data);
  30934. }
  30935. } catch (e) {
  30936. }
  30937. settle(resolve, reject, response);
  30938. }
  30939. };
  30940. let requestTask;
  30941. if (config2.method === "UPLOAD") {
  30942. delete _config.header["content-type"];
  30943. delete _config.header["Content-Type"];
  30944. const otherConfig = {
  30945. filePath: config2.filePath,
  30946. name: config2.name
  30947. };
  30948. const optionalKeys = [
  30949. "files",
  30950. "timeout",
  30951. "formData"
  30952. ];
  30953. requestTask = uni.uploadFile({ ..._config, ...otherConfig, ...mergeKeys$1(optionalKeys, config2) });
  30954. } else if (config2.method === "DOWNLOAD") {
  30955. if (!isUndefined(config2.timeout)) {
  30956. _config.timeout = config2.timeout;
  30957. }
  30958. requestTask = uni.downloadFile(_config);
  30959. } else {
  30960. const optionalKeys = [
  30961. "data",
  30962. "method",
  30963. "timeout",
  30964. "dataType",
  30965. "responseType",
  30966. "sslVerify",
  30967. "firstIpv4"
  30968. ];
  30969. requestTask = uni.request({ ..._config, ...mergeKeys$1(optionalKeys, config2) });
  30970. }
  30971. if (config2.getTask) {
  30972. config2.getTask(requestTask, config2);
  30973. }
  30974. });
  30975. const dispatchRequest = (config2) => adapter(config2);
  30976. function InterceptorManager() {
  30977. this.handlers = [];
  30978. }
  30979. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  30980. this.handlers.push({
  30981. fulfilled,
  30982. rejected
  30983. });
  30984. return this.handlers.length - 1;
  30985. };
  30986. InterceptorManager.prototype.eject = function eject(id) {
  30987. if (this.handlers[id]) {
  30988. this.handlers[id] = null;
  30989. }
  30990. };
  30991. InterceptorManager.prototype.forEach = function forEach2(fn) {
  30992. this.handlers.forEach((h) => {
  30993. if (h !== null) {
  30994. fn(h);
  30995. }
  30996. });
  30997. };
  30998. const mergeKeys = (keys, globalsConfig, config2) => {
  30999. const config3 = {};
  31000. keys.forEach((prop) => {
  31001. if (!isUndefined(config2[prop])) {
  31002. config3[prop] = config2[prop];
  31003. } else if (!isUndefined(globalsConfig[prop])) {
  31004. config3[prop] = globalsConfig[prop];
  31005. }
  31006. });
  31007. return config3;
  31008. };
  31009. const mergeConfig = (globalsConfig, config2 = {}) => {
  31010. const method = config2.method || globalsConfig.method || "GET";
  31011. let config3 = {
  31012. baseURL: globalsConfig.baseURL || "",
  31013. method,
  31014. url: config2.url || "",
  31015. params: config2.params || {},
  31016. custom: { ...globalsConfig.custom || {}, ...config2.custom || {} },
  31017. header: deepMerge$1(globalsConfig.header || {}, config2.header || {})
  31018. };
  31019. const defaultToConfig2Keys = ["getTask", "validateStatus"];
  31020. config3 = { ...config3, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) };
  31021. if (method === "DOWNLOAD") {
  31022. if (!isUndefined(config2.timeout)) {
  31023. config3.timeout = config2.timeout;
  31024. } else if (!isUndefined(globalsConfig.timeout)) {
  31025. config3.timeout = globalsConfig.timeout;
  31026. }
  31027. } else if (method === "UPLOAD") {
  31028. delete config3.header["content-type"];
  31029. delete config3.header["Content-Type"];
  31030. const uploadKeys = [
  31031. "files",
  31032. "filePath",
  31033. "name",
  31034. "timeout",
  31035. "formData"
  31036. ];
  31037. uploadKeys.forEach((prop) => {
  31038. if (!isUndefined(config2[prop])) {
  31039. config3[prop] = config2[prop];
  31040. }
  31041. });
  31042. if (isUndefined(config3.timeout) && !isUndefined(globalsConfig.timeout)) {
  31043. config3.timeout = globalsConfig.timeout;
  31044. }
  31045. } else {
  31046. const defaultsKeys = [
  31047. "data",
  31048. "timeout",
  31049. "dataType",
  31050. "responseType",
  31051. "sslVerify",
  31052. "firstIpv4"
  31053. ];
  31054. config3 = { ...config3, ...mergeKeys(defaultsKeys, globalsConfig, config2) };
  31055. }
  31056. return config3;
  31057. };
  31058. const defaults = {
  31059. baseURL: "",
  31060. header: {},
  31061. method: "GET",
  31062. dataType: "json",
  31063. responseType: "text",
  31064. custom: {},
  31065. timeout: 6e4,
  31066. sslVerify: true,
  31067. firstIpv4: false,
  31068. validateStatus: function validateStatus(status) {
  31069. return status >= 200 && status < 300;
  31070. }
  31071. };
  31072. var clone = function() {
  31073. function _instanceof(obj, type2) {
  31074. return type2 != null && obj instanceof type2;
  31075. }
  31076. var nativeMap;
  31077. try {
  31078. nativeMap = Map;
  31079. } catch (_) {
  31080. nativeMap = function() {
  31081. };
  31082. }
  31083. var nativeSet;
  31084. try {
  31085. nativeSet = Set;
  31086. } catch (_) {
  31087. nativeSet = function() {
  31088. };
  31089. }
  31090. var nativePromise;
  31091. try {
  31092. nativePromise = Promise;
  31093. } catch (_) {
  31094. nativePromise = function() {
  31095. };
  31096. }
  31097. function clone2(parent, circular, depth, prototype, includeNonEnumerable) {
  31098. if (typeof circular === "object") {
  31099. depth = circular.depth;
  31100. prototype = circular.prototype;
  31101. includeNonEnumerable = circular.includeNonEnumerable;
  31102. circular = circular.circular;
  31103. }
  31104. var allParents = [];
  31105. var allChildren = [];
  31106. var useBuffer = typeof Buffer != "undefined";
  31107. if (typeof circular == "undefined")
  31108. circular = true;
  31109. if (typeof depth == "undefined")
  31110. depth = Infinity;
  31111. function _clone(parent2, depth2) {
  31112. if (parent2 === null)
  31113. return null;
  31114. if (depth2 === 0)
  31115. return parent2;
  31116. var child;
  31117. var proto;
  31118. if (typeof parent2 != "object") {
  31119. return parent2;
  31120. }
  31121. if (_instanceof(parent2, nativeMap)) {
  31122. child = new nativeMap();
  31123. } else if (_instanceof(parent2, nativeSet)) {
  31124. child = new nativeSet();
  31125. } else if (_instanceof(parent2, nativePromise)) {
  31126. child = new nativePromise(function(resolve, reject) {
  31127. parent2.then(function(value2) {
  31128. resolve(_clone(value2, depth2 - 1));
  31129. }, function(err) {
  31130. reject(_clone(err, depth2 - 1));
  31131. });
  31132. });
  31133. } else if (clone2.__isArray(parent2)) {
  31134. child = [];
  31135. } else if (clone2.__isRegExp(parent2)) {
  31136. child = new RegExp(parent2.source, __getRegExpFlags(parent2));
  31137. if (parent2.lastIndex)
  31138. child.lastIndex = parent2.lastIndex;
  31139. } else if (clone2.__isDate(parent2)) {
  31140. child = new Date(parent2.getTime());
  31141. } else if (useBuffer && Buffer.isBuffer(parent2)) {
  31142. if (Buffer.from) {
  31143. child = Buffer.from(parent2);
  31144. } else {
  31145. child = new Buffer(parent2.length);
  31146. parent2.copy(child);
  31147. }
  31148. return child;
  31149. } else if (_instanceof(parent2, Error)) {
  31150. child = Object.create(parent2);
  31151. } else {
  31152. if (typeof prototype == "undefined") {
  31153. proto = Object.getPrototypeOf(parent2);
  31154. child = Object.create(proto);
  31155. } else {
  31156. child = Object.create(prototype);
  31157. proto = prototype;
  31158. }
  31159. }
  31160. if (circular) {
  31161. var index2 = allParents.indexOf(parent2);
  31162. if (index2 != -1) {
  31163. return allChildren[index2];
  31164. }
  31165. allParents.push(parent2);
  31166. allChildren.push(child);
  31167. }
  31168. if (_instanceof(parent2, nativeMap)) {
  31169. parent2.forEach(function(value2, key) {
  31170. var keyChild = _clone(key, depth2 - 1);
  31171. var valueChild = _clone(value2, depth2 - 1);
  31172. child.set(keyChild, valueChild);
  31173. });
  31174. }
  31175. if (_instanceof(parent2, nativeSet)) {
  31176. parent2.forEach(function(value2) {
  31177. var entryChild = _clone(value2, depth2 - 1);
  31178. child.add(entryChild);
  31179. });
  31180. }
  31181. for (var i in parent2) {
  31182. var attrs = Object.getOwnPropertyDescriptor(parent2, i);
  31183. if (attrs) {
  31184. child[i] = _clone(parent2[i], depth2 - 1);
  31185. }
  31186. try {
  31187. var objProperty = Object.getOwnPropertyDescriptor(parent2, i);
  31188. if (objProperty.set === "undefined") {
  31189. continue;
  31190. }
  31191. child[i] = _clone(parent2[i], depth2 - 1);
  31192. } catch (e) {
  31193. if (e instanceof TypeError) {
  31194. continue;
  31195. } else if (e instanceof ReferenceError) {
  31196. continue;
  31197. }
  31198. }
  31199. }
  31200. if (Object.getOwnPropertySymbols) {
  31201. var symbols = Object.getOwnPropertySymbols(parent2);
  31202. for (var i = 0; i < symbols.length; i++) {
  31203. var symbol = symbols[i];
  31204. var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol);
  31205. if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
  31206. continue;
  31207. }
  31208. child[symbol] = _clone(parent2[symbol], depth2 - 1);
  31209. Object.defineProperty(child, symbol, descriptor);
  31210. }
  31211. }
  31212. if (includeNonEnumerable) {
  31213. var allPropertyNames = Object.getOwnPropertyNames(parent2);
  31214. for (var i = 0; i < allPropertyNames.length; i++) {
  31215. var propertyName = allPropertyNames[i];
  31216. var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName);
  31217. if (descriptor && descriptor.enumerable) {
  31218. continue;
  31219. }
  31220. child[propertyName] = _clone(parent2[propertyName], depth2 - 1);
  31221. Object.defineProperty(child, propertyName, descriptor);
  31222. }
  31223. }
  31224. return child;
  31225. }
  31226. return _clone(parent, depth);
  31227. }
  31228. clone2.clonePrototype = function clonePrototype(parent) {
  31229. if (parent === null)
  31230. return null;
  31231. var c = function() {
  31232. };
  31233. c.prototype = parent;
  31234. return new c();
  31235. };
  31236. function __objToStr(o) {
  31237. return Object.prototype.toString.call(o);
  31238. }
  31239. clone2.__objToStr = __objToStr;
  31240. function __isDate(o) {
  31241. return typeof o === "object" && __objToStr(o) === "[object Date]";
  31242. }
  31243. clone2.__isDate = __isDate;
  31244. function __isArray(o) {
  31245. return typeof o === "object" && __objToStr(o) === "[object Array]";
  31246. }
  31247. clone2.__isArray = __isArray;
  31248. function __isRegExp(o) {
  31249. return typeof o === "object" && __objToStr(o) === "[object RegExp]";
  31250. }
  31251. clone2.__isRegExp = __isRegExp;
  31252. function __getRegExpFlags(re) {
  31253. var flags = "";
  31254. if (re.global)
  31255. flags += "g";
  31256. if (re.ignoreCase)
  31257. flags += "i";
  31258. if (re.multiline)
  31259. flags += "m";
  31260. return flags;
  31261. }
  31262. clone2.__getRegExpFlags = __getRegExpFlags;
  31263. return clone2;
  31264. }();
  31265. class Request {
  31266. /**
  31267. * @param {Object} arg - 全局配置
  31268. * @param {String} arg.baseURL - 全局根路径
  31269. * @param {Object} arg.header - 全局header
  31270. * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
  31271. * @param {String} arg.dataType = [json] - 全局默认的dataType
  31272. * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持
  31273. * @param {Object} arg.custom - 全局默认的自定义参数
  31274. * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序
  31275. * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
  31276. * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
  31277. * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
  31278. * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
  31279. */
  31280. constructor(arg = {}) {
  31281. if (!isPlainObject(arg)) {
  31282. arg = {};
  31283. formatAppLog("warn", "at uni_modules/uview-plus/libs/luch-request/core/Request.js:39", "设置全局参数必须接收一个Object");
  31284. }
  31285. this.config = clone({ ...defaults, ...arg });
  31286. this.interceptors = {
  31287. request: new InterceptorManager(),
  31288. response: new InterceptorManager()
  31289. };
  31290. }
  31291. /**
  31292. * @Function
  31293. * @param {Request~setConfigCallback} f - 设置全局默认配置
  31294. */
  31295. setConfig(f) {
  31296. this.config = f(this.config);
  31297. }
  31298. middleware(config2) {
  31299. config2 = mergeConfig(this.config, config2);
  31300. const chain = [dispatchRequest, void 0];
  31301. let promise2 = Promise.resolve(config2);
  31302. this.interceptors.request.forEach((interceptor) => {
  31303. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  31304. });
  31305. this.interceptors.response.forEach((interceptor) => {
  31306. chain.push(interceptor.fulfilled, interceptor.rejected);
  31307. });
  31308. while (chain.length) {
  31309. promise2 = promise2.then(chain.shift(), chain.shift());
  31310. }
  31311. return promise2;
  31312. }
  31313. /**
  31314. * @Function
  31315. * @param {Object} config - 请求配置项
  31316. * @prop {String} options.url - 请求路径
  31317. * @prop {Object} options.data - 请求参数
  31318. * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
  31319. * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
  31320. * @prop {Object} [options.header = config.header] - 请求header
  31321. * @prop {Object} [options.method = config.method] - 请求方法
  31322. * @returns {Promise<unknown>}
  31323. */
  31324. request(config2 = {}) {
  31325. return this.middleware(config2);
  31326. }
  31327. get(url2, options = {}) {
  31328. return this.middleware({
  31329. url: url2,
  31330. method: "GET",
  31331. ...options
  31332. });
  31333. }
  31334. post(url2, data, options = {}) {
  31335. return this.middleware({
  31336. url: url2,
  31337. data,
  31338. method: "POST",
  31339. ...options
  31340. });
  31341. }
  31342. put(url2, data, options = {}) {
  31343. return this.middleware({
  31344. url: url2,
  31345. data,
  31346. method: "PUT",
  31347. ...options
  31348. });
  31349. }
  31350. delete(url2, data, options = {}) {
  31351. return this.middleware({
  31352. url: url2,
  31353. data,
  31354. method: "DELETE",
  31355. ...options
  31356. });
  31357. }
  31358. options(url2, data, options = {}) {
  31359. return this.middleware({
  31360. url: url2,
  31361. data,
  31362. method: "OPTIONS",
  31363. ...options
  31364. });
  31365. }
  31366. upload(url2, config2 = {}) {
  31367. config2.url = url2;
  31368. config2.method = "UPLOAD";
  31369. return this.middleware(config2);
  31370. }
  31371. download(url2, config2 = {}) {
  31372. config2.url = url2;
  31373. config2.method = "DOWNLOAD";
  31374. return this.middleware(config2);
  31375. }
  31376. }
  31377. class Router {
  31378. constructor() {
  31379. this.config = {
  31380. type: "navigateTo",
  31381. url: "",
  31382. delta: 1,
  31383. // navigateBack页面后退时,回退的层数
  31384. params: {},
  31385. // 传递的参数
  31386. animationType: "pop-in",
  31387. // 窗口动画,只在APP有效
  31388. animationDuration: 300,
  31389. // 窗口动画持续时间,单位毫秒,只在APP有效
  31390. intercept: false
  31391. // 是否需要拦截
  31392. };
  31393. this.route = this.route.bind(this);
  31394. }
  31395. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  31396. addRootPath(url2) {
  31397. return url2[0] === "/" ? url2 : `/${url2}`;
  31398. }
  31399. // 整合路由参数
  31400. mixinParam(url2, params) {
  31401. url2 = url2 && this.addRootPath(url2);
  31402. let query = "";
  31403. if (/.*\/.*\?.*=.*/.test(url2)) {
  31404. query = uni.$u.queryParams(params, false);
  31405. return url2 += `&${query}`;
  31406. }
  31407. query = uni.$u.queryParams(params);
  31408. return url2 += query;
  31409. }
  31410. // 对外的方法名称
  31411. async route(options = {}, params = {}) {
  31412. let mergeConfig2 = {};
  31413. if (typeof options === "string") {
  31414. mergeConfig2.url = this.mixinParam(options, params);
  31415. mergeConfig2.type = "navigateTo";
  31416. } else {
  31417. mergeConfig2 = uni.$u.deepMerge(this.config, options);
  31418. mergeConfig2.url = this.mixinParam(options.url, options.params);
  31419. }
  31420. if (mergeConfig2.url === uni.$u.page())
  31421. return;
  31422. if (params.intercept) {
  31423. this.config.intercept = params.intercept;
  31424. }
  31425. mergeConfig2.params = params;
  31426. mergeConfig2 = uni.$u.deepMerge(this.config, mergeConfig2);
  31427. if (typeof uni.$u.routeIntercept === "function") {
  31428. const isNext = await new Promise((resolve, reject) => {
  31429. uni.$u.routeIntercept(mergeConfig2, resolve);
  31430. });
  31431. isNext && this.openPage(mergeConfig2);
  31432. } else {
  31433. this.openPage(mergeConfig2);
  31434. }
  31435. }
  31436. // 执行路由跳转
  31437. openPage(config2) {
  31438. const {
  31439. url: url2,
  31440. type: type2,
  31441. delta,
  31442. animationType,
  31443. animationDuration
  31444. } = config2;
  31445. if (config2.type == "navigateTo" || config2.type == "to") {
  31446. uni.navigateTo({
  31447. url: url2,
  31448. animationType,
  31449. animationDuration
  31450. });
  31451. }
  31452. if (config2.type == "redirectTo" || config2.type == "redirect") {
  31453. uni.redirectTo({
  31454. url: url2
  31455. });
  31456. }
  31457. if (config2.type == "switchTab" || config2.type == "tab") {
  31458. uni.switchTab({
  31459. url: url2
  31460. });
  31461. }
  31462. if (config2.type == "reLaunch" || config2.type == "launch") {
  31463. uni.reLaunch({
  31464. url: url2
  31465. });
  31466. }
  31467. if (config2.type == "navigateBack" || config2.type == "back") {
  31468. uni.navigateBack({
  31469. delta
  31470. });
  31471. }
  31472. }
  31473. }
  31474. const route = new Router().route;
  31475. function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
  31476. const startRGB = hexToRgb(startColor, false);
  31477. const startR = startRGB[0];
  31478. const startG = startRGB[1];
  31479. const startB = startRGB[2];
  31480. const endRGB = hexToRgb(endColor, false);
  31481. const endR = endRGB[0];
  31482. const endG = endRGB[1];
  31483. const endB = endRGB[2];
  31484. const sR = (endR - startR) / step;
  31485. const sG = (endG - startG) / step;
  31486. const sB = (endB - startB) / step;
  31487. const colorArr = [];
  31488. for (let i = 0; i < step; i++) {
  31489. let hex = rgbToHex(`rgb(${Math.round(sR * i + startR)},${Math.round(sG * i + startG)},${Math.round(sB * i + startB)})`);
  31490. if (i === 0)
  31491. hex = rgbToHex(startColor);
  31492. if (i === step - 1)
  31493. hex = rgbToHex(endColor);
  31494. colorArr.push(hex);
  31495. }
  31496. return colorArr;
  31497. }
  31498. function hexToRgb(sColor, str = true) {
  31499. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  31500. sColor = String(sColor).toLowerCase();
  31501. if (sColor && reg.test(sColor)) {
  31502. if (sColor.length === 4) {
  31503. let sColorNew = "#";
  31504. for (let i = 1; i < 4; i += 1) {
  31505. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  31506. }
  31507. sColor = sColorNew;
  31508. }
  31509. const sColorChange = [];
  31510. for (let i = 1; i < 7; i += 2) {
  31511. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  31512. }
  31513. if (!str) {
  31514. return sColorChange;
  31515. }
  31516. return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`;
  31517. }
  31518. if (/^(rgb|RGB)/.test(sColor)) {
  31519. const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  31520. return arr.map((val) => Number(val));
  31521. }
  31522. return sColor;
  31523. }
  31524. function rgbToHex(rgb) {
  31525. const _this = rgb;
  31526. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  31527. if (/^(rgb|RGB)/.test(_this)) {
  31528. const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  31529. let strHex = "#";
  31530. for (let i = 0; i < aColor.length; i++) {
  31531. let hex = Number(aColor[i]).toString(16);
  31532. hex = String(hex).length == 1 ? `${0}${hex}` : hex;
  31533. if (hex === "0") {
  31534. hex += hex;
  31535. }
  31536. strHex += hex;
  31537. }
  31538. if (strHex.length !== 7) {
  31539. strHex = _this;
  31540. }
  31541. return strHex;
  31542. }
  31543. if (reg.test(_this)) {
  31544. const aNum = _this.replace(/#/, "").split("");
  31545. if (aNum.length === 6) {
  31546. return _this;
  31547. }
  31548. if (aNum.length === 3) {
  31549. let numHex = "#";
  31550. for (let i = 0; i < aNum.length; i += 1) {
  31551. numHex += aNum[i] + aNum[i];
  31552. }
  31553. return numHex;
  31554. }
  31555. } else {
  31556. return _this;
  31557. }
  31558. }
  31559. function colorToRgba(color2, alpha) {
  31560. color2 = rgbToHex(color2);
  31561. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  31562. let sColor = String(color2).toLowerCase();
  31563. if (sColor && reg.test(sColor)) {
  31564. if (sColor.length === 4) {
  31565. let sColorNew = "#";
  31566. for (let i = 1; i < 4; i += 1) {
  31567. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  31568. }
  31569. sColor = sColorNew;
  31570. }
  31571. const sColorChange = [];
  31572. for (let i = 1; i < 7; i += 2) {
  31573. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  31574. }
  31575. return `rgba(${sColorChange.join(",")},${alpha})`;
  31576. }
  31577. return sColor;
  31578. }
  31579. const colorGradient$1 = {
  31580. colorGradient,
  31581. hexToRgb,
  31582. rgbToHex,
  31583. colorToRgba
  31584. };
  31585. function email(value2) {
  31586. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value2);
  31587. }
  31588. function mobile(value2) {
  31589. return /^1[23456789]\d{9}$/.test(value2);
  31590. }
  31591. function url(value2) {
  31592. 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);
  31593. }
  31594. function date(value2) {
  31595. if (!value2)
  31596. return false;
  31597. if (number(value2))
  31598. value2 = +value2;
  31599. return !/Invalid|NaN/.test(new Date(value2).toString());
  31600. }
  31601. function dateISO(value2) {
  31602. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value2);
  31603. }
  31604. function number(value2) {
  31605. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value2);
  31606. }
  31607. function string(value2) {
  31608. return typeof value2 === "string";
  31609. }
  31610. function digits(value2) {
  31611. return /^\d+$/.test(value2);
  31612. }
  31613. function idCard(value2) {
  31614. 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(
  31615. value2
  31616. );
  31617. }
  31618. function carNo(value2) {
  31619. const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  31620. const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  31621. if (value2.length === 7) {
  31622. return creg.test(value2);
  31623. }
  31624. if (value2.length === 8) {
  31625. return xreg.test(value2);
  31626. }
  31627. return false;
  31628. }
  31629. function amount(value2) {
  31630. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value2);
  31631. }
  31632. function chinese(value2) {
  31633. const reg = /^[\u4e00-\u9fa5]+$/gi;
  31634. return reg.test(value2);
  31635. }
  31636. function letter(value2) {
  31637. return /^[a-zA-Z]*$/.test(value2);
  31638. }
  31639. function enOrNum(value2) {
  31640. const reg = /^[0-9a-zA-Z]*$/g;
  31641. return reg.test(value2);
  31642. }
  31643. function contains(value2, param) {
  31644. return value2.indexOf(param) >= 0;
  31645. }
  31646. function range$1(value2, param) {
  31647. return value2 >= param[0] && value2 <= param[1];
  31648. }
  31649. function rangeLength(value2, param) {
  31650. return value2.length >= param[0] && value2.length <= param[1];
  31651. }
  31652. function landline(value2) {
  31653. const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  31654. return reg.test(value2);
  31655. }
  31656. function empty(value2) {
  31657. switch (typeof value2) {
  31658. case "undefined":
  31659. return true;
  31660. case "string":
  31661. if (value2.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0)
  31662. return true;
  31663. break;
  31664. case "boolean":
  31665. if (!value2)
  31666. return true;
  31667. break;
  31668. case "number":
  31669. if (value2 === 0 || isNaN(value2))
  31670. return true;
  31671. break;
  31672. case "object":
  31673. if (value2 === null || value2.length === 0)
  31674. return true;
  31675. for (const i in value2) {
  31676. return false;
  31677. }
  31678. return true;
  31679. }
  31680. return false;
  31681. }
  31682. function jsonString(value2) {
  31683. if (typeof value2 === "string") {
  31684. try {
  31685. const obj = JSON.parse(value2);
  31686. if (typeof obj === "object" && obj) {
  31687. return true;
  31688. }
  31689. return false;
  31690. } catch (e) {
  31691. return false;
  31692. }
  31693. }
  31694. return false;
  31695. }
  31696. function array(value2) {
  31697. if (typeof Array.isArray === "function") {
  31698. return Array.isArray(value2);
  31699. }
  31700. return Object.prototype.toString.call(value2) === "[object Array]";
  31701. }
  31702. function object(value2) {
  31703. return Object.prototype.toString.call(value2) === "[object Object]";
  31704. }
  31705. function code$1(value2, len = 6) {
  31706. return new RegExp(`^\\d{${len}}$`).test(value2);
  31707. }
  31708. function func(value2) {
  31709. return typeof value2 === "function";
  31710. }
  31711. function promise(value2) {
  31712. return object(value2) && func(value2.then) && func(value2.catch);
  31713. }
  31714. function image(value2) {
  31715. const newValue = value2.split("?")[0];
  31716. const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
  31717. return IMAGE_REGEXP.test(newValue);
  31718. }
  31719. function video(value2) {
  31720. const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;
  31721. return VIDEO_REGEXP.test(value2);
  31722. }
  31723. function regExp(o) {
  31724. return o && Object.prototype.toString.call(o) === "[object RegExp]";
  31725. }
  31726. const test = {
  31727. email,
  31728. mobile,
  31729. url,
  31730. date,
  31731. dateISO,
  31732. number,
  31733. digits,
  31734. idCard,
  31735. carNo,
  31736. amount,
  31737. chinese,
  31738. letter,
  31739. enOrNum,
  31740. contains,
  31741. range: range$1,
  31742. rangeLength,
  31743. empty,
  31744. isEmpty: empty,
  31745. jsonString,
  31746. landline,
  31747. object,
  31748. array,
  31749. code: code$1,
  31750. func,
  31751. promise,
  31752. video,
  31753. image,
  31754. regExp,
  31755. string
  31756. };
  31757. let timeout = null;
  31758. function debounce(func2, wait = 500, immediate = false) {
  31759. if (timeout !== null)
  31760. clearTimeout(timeout);
  31761. if (immediate) {
  31762. const callNow = !timeout;
  31763. timeout = setTimeout(() => {
  31764. timeout = null;
  31765. }, wait);
  31766. if (callNow)
  31767. typeof func2 === "function" && func2();
  31768. } else {
  31769. timeout = setTimeout(() => {
  31770. typeof func2 === "function" && func2();
  31771. }, wait);
  31772. }
  31773. }
  31774. let flag;
  31775. function throttle(func2, wait = 500, immediate = true) {
  31776. if (immediate) {
  31777. if (!flag) {
  31778. flag = true;
  31779. typeof func2 === "function" && func2();
  31780. setTimeout(() => {
  31781. flag = false;
  31782. }, wait);
  31783. }
  31784. } else if (!flag) {
  31785. flag = true;
  31786. setTimeout(() => {
  31787. flag = false;
  31788. typeof func2 === "function" && func2();
  31789. }, wait);
  31790. }
  31791. }
  31792. function strip(num, precision = 15) {
  31793. return +parseFloat(Number(num).toPrecision(precision));
  31794. }
  31795. function digitLength(num) {
  31796. const eSplit = num.toString().split(/[eE]/);
  31797. const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0);
  31798. return len > 0 ? len : 0;
  31799. }
  31800. function float2Fixed(num) {
  31801. if (num.toString().indexOf("e") === -1) {
  31802. return Number(num.toString().replace(".", ""));
  31803. }
  31804. const dLen = digitLength(num);
  31805. return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
  31806. }
  31807. function checkBoundary(num) {
  31808. {
  31809. if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
  31810. formatAppLog("warn", "at uni_modules/uview-plus/libs/function/digit.js:45", `${num} 超出了精度限制,结果可能不正确`);
  31811. }
  31812. }
  31813. }
  31814. function iteratorOperation(arr, operation) {
  31815. const [num1, num2, ...others] = arr;
  31816. let res2 = operation(num1, num2);
  31817. others.forEach((num) => {
  31818. res2 = operation(res2, num);
  31819. });
  31820. return res2;
  31821. }
  31822. function times(...nums) {
  31823. if (nums.length > 2) {
  31824. return iteratorOperation(nums, times);
  31825. }
  31826. const [num1, num2] = nums;
  31827. const num1Changed = float2Fixed(num1);
  31828. const num2Changed = float2Fixed(num2);
  31829. const baseNum = digitLength(num1) + digitLength(num2);
  31830. const leftValue = num1Changed * num2Changed;
  31831. checkBoundary(leftValue);
  31832. return leftValue / Math.pow(10, baseNum);
  31833. }
  31834. function divide(...nums) {
  31835. if (nums.length > 2) {
  31836. return iteratorOperation(nums, divide);
  31837. }
  31838. const [num1, num2] = nums;
  31839. const num1Changed = float2Fixed(num1);
  31840. const num2Changed = float2Fixed(num2);
  31841. checkBoundary(num1Changed);
  31842. checkBoundary(num2Changed);
  31843. return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
  31844. }
  31845. function round(num, ratio) {
  31846. const base = Math.pow(10, ratio);
  31847. let result = divide(Math.round(Math.abs(times(num, base))), base);
  31848. if (num < 0 && result !== 0) {
  31849. result = times(result, -1);
  31850. }
  31851. return result;
  31852. }
  31853. function range(min = 0, max = 0, value2 = 0) {
  31854. return Math.max(min, Math.min(max, Number(value2)));
  31855. }
  31856. function getPx(value2, unit = false) {
  31857. if (test.number(value2)) {
  31858. return unit ? `${value2}px` : Number(value2);
  31859. }
  31860. if (/(rpx|upx)$/.test(value2)) {
  31861. return unit ? `${uni.upx2px(parseInt(value2))}px` : Number(uni.upx2px(parseInt(value2)));
  31862. }
  31863. return unit ? `${parseInt(value2)}px` : parseInt(value2);
  31864. }
  31865. function sleep(value2 = 30) {
  31866. return new Promise((resolve) => {
  31867. setTimeout(() => {
  31868. resolve();
  31869. }, value2);
  31870. });
  31871. }
  31872. function os() {
  31873. return uni.getSystemInfoSync().platform.toLowerCase();
  31874. }
  31875. function sys() {
  31876. return uni.getSystemInfoSync();
  31877. }
  31878. function random(min, max) {
  31879. if (min >= 0 && max > 0 && max >= min) {
  31880. const gab = max - min + 1;
  31881. return Math.floor(Math.random() * gab + min);
  31882. }
  31883. return 0;
  31884. }
  31885. function guid(len = 32, firstU = true, radix = null) {
  31886. const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
  31887. const uuid = [];
  31888. radix = radix || chars.length;
  31889. if (len) {
  31890. for (let i = 0; i < len; i++)
  31891. uuid[i] = chars[0 | Math.random() * radix];
  31892. } else {
  31893. let r;
  31894. uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
  31895. uuid[14] = "4";
  31896. for (let i = 0; i < 36; i++) {
  31897. if (!uuid[i]) {
  31898. r = 0 | Math.random() * 16;
  31899. uuid[i] = chars[i == 19 ? r & 3 | 8 : r];
  31900. }
  31901. }
  31902. }
  31903. if (firstU) {
  31904. uuid.shift();
  31905. return `u${uuid.join("")}`;
  31906. }
  31907. return uuid.join("");
  31908. }
  31909. function $parent(name = void 0) {
  31910. let parent = this.$parent;
  31911. while (parent) {
  31912. if (parent.$options && parent.$options.name !== name) {
  31913. parent = parent.$parent;
  31914. } else {
  31915. return parent;
  31916. }
  31917. }
  31918. return false;
  31919. }
  31920. function addStyle(customStyle, target = "object") {
  31921. if (test.empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") {
  31922. return customStyle;
  31923. }
  31924. if (target === "object") {
  31925. customStyle = trim(customStyle);
  31926. const styleArray = customStyle.split(";");
  31927. const style = {};
  31928. for (let i = 0; i < styleArray.length; i++) {
  31929. if (styleArray[i]) {
  31930. const item = styleArray[i].split(":");
  31931. style[trim(item[0])] = trim(item[1]);
  31932. }
  31933. }
  31934. return style;
  31935. }
  31936. let string2 = "";
  31937. for (const i in customStyle) {
  31938. const key = i.replace(/([A-Z])/g, "-$1").toLowerCase();
  31939. string2 += `${key}:${customStyle[i]};`;
  31940. }
  31941. return trim(string2);
  31942. }
  31943. function addUnit(value2 = "auto", unit = "") {
  31944. if (!unit) {
  31945. unit = uni.$u.config.unit || "px";
  31946. }
  31947. value2 = String(value2);
  31948. return test.number(value2) ? `${value2}${unit}` : value2;
  31949. }
  31950. function deepClone(obj) {
  31951. if ([null, void 0, NaN, false].includes(obj))
  31952. return obj;
  31953. if (typeof obj !== "object" && typeof obj !== "function") {
  31954. return obj;
  31955. }
  31956. const o = test.array(obj) ? [] : {};
  31957. for (const i in obj) {
  31958. if (obj.hasOwnProperty(i)) {
  31959. o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
  31960. }
  31961. }
  31962. return o;
  31963. }
  31964. function deepMerge(target = {}, source = {}) {
  31965. target = deepClone(target);
  31966. if (typeof target !== "object" || typeof source !== "object")
  31967. return false;
  31968. for (const prop in source) {
  31969. if (!source.hasOwnProperty(prop))
  31970. continue;
  31971. if (prop in target) {
  31972. if (typeof target[prop] !== "object") {
  31973. target[prop] = source[prop];
  31974. } else if (typeof source[prop] !== "object") {
  31975. target[prop] = source[prop];
  31976. } else if (target[prop].concat && source[prop].concat) {
  31977. target[prop] = target[prop].concat(source[prop]);
  31978. } else {
  31979. target[prop] = deepMerge(target[prop], source[prop]);
  31980. }
  31981. } else {
  31982. target[prop] = source[prop];
  31983. }
  31984. }
  31985. return target;
  31986. }
  31987. function error(err) {
  31988. {
  31989. formatAppLog("error", "at uni_modules/uview-plus/libs/function/index.js:238", `uView提示:${err}`);
  31990. }
  31991. }
  31992. function randomArray(array3 = []) {
  31993. return array3.sort(() => Math.random() - 0.5);
  31994. }
  31995. if (!String.prototype.padStart) {
  31996. String.prototype.padStart = function(maxLength, fillString = " ") {
  31997. if (Object.prototype.toString.call(fillString) !== "[object String]") {
  31998. throw new TypeError(
  31999. "fillString must be String"
  32000. );
  32001. }
  32002. const str = this;
  32003. if (str.length >= maxLength)
  32004. return String(str);
  32005. const fillLength = maxLength - str.length;
  32006. let times2 = Math.ceil(fillLength / fillString.length);
  32007. while (times2 >>= 1) {
  32008. fillString += fillString;
  32009. if (times2 === 1) {
  32010. fillString += fillString;
  32011. }
  32012. }
  32013. return fillString.slice(0, fillLength) + str;
  32014. };
  32015. }
  32016. function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") {
  32017. let date3;
  32018. if (!dateTime) {
  32019. date3 = /* @__PURE__ */ new Date();
  32020. } else if (/^\d{10}$/.test(dateTime.toString().trim())) {
  32021. date3 = new Date(dateTime * 1e3);
  32022. } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
  32023. date3 = new Date(Number(dateTime));
  32024. } else {
  32025. date3 = new Date(
  32026. typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime
  32027. );
  32028. }
  32029. const timeSource = {
  32030. "y": date3.getFullYear().toString(),
  32031. // 年
  32032. "m": (date3.getMonth() + 1).toString().padStart(2, "0"),
  32033. // 月
  32034. "d": date3.getDate().toString().padStart(2, "0"),
  32035. // 日
  32036. "h": date3.getHours().toString().padStart(2, "0"),
  32037. // 时
  32038. "M": date3.getMinutes().toString().padStart(2, "0"),
  32039. // 分
  32040. "s": date3.getSeconds().toString().padStart(2, "0")
  32041. // 秒
  32042. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  32043. };
  32044. for (const key in timeSource) {
  32045. const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
  32046. if (ret) {
  32047. const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
  32048. formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
  32049. }
  32050. }
  32051. return formatStr;
  32052. }
  32053. function timeFrom(timestamp = null, format2 = "yyyy-mm-dd") {
  32054. if (timestamp == null)
  32055. timestamp = Number(/* @__PURE__ */ new Date());
  32056. timestamp = parseInt(timestamp);
  32057. if (timestamp.toString().length == 10)
  32058. timestamp *= 1e3;
  32059. let timer = (/* @__PURE__ */ new Date()).getTime() - timestamp;
  32060. timer = parseInt(timer / 1e3);
  32061. let tips = "";
  32062. switch (true) {
  32063. case timer < 300:
  32064. tips = "刚刚";
  32065. break;
  32066. case (timer >= 300 && timer < 3600):
  32067. tips = `${parseInt(timer / 60)}分钟前`;
  32068. break;
  32069. case (timer >= 3600 && timer < 86400):
  32070. tips = `${parseInt(timer / 3600)}小时前`;
  32071. break;
  32072. case (timer >= 86400 && timer < 2592e3):
  32073. tips = `${parseInt(timer / 86400)}天前`;
  32074. break;
  32075. default:
  32076. if (format2 === false) {
  32077. if (timer >= 2592e3 && timer < 365 * 86400) {
  32078. tips = `${parseInt(timer / (86400 * 30))}个月前`;
  32079. } else {
  32080. tips = `${parseInt(timer / (86400 * 365))}年前`;
  32081. }
  32082. } else {
  32083. tips = timeFormat(timestamp, format2);
  32084. }
  32085. }
  32086. return tips;
  32087. }
  32088. function trim(str, pos = "both") {
  32089. str = String(str);
  32090. if (pos == "both") {
  32091. return str.replace(/^\s+|\s+$/g, "");
  32092. }
  32093. if (pos == "left") {
  32094. return str.replace(/^\s*/, "");
  32095. }
  32096. if (pos == "right") {
  32097. return str.replace(/(\s*$)/g, "");
  32098. }
  32099. if (pos == "all") {
  32100. return str.replace(/\s+/g, "");
  32101. }
  32102. return str;
  32103. }
  32104. function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
  32105. const prefix = isPrefix ? "?" : "";
  32106. const _result = [];
  32107. if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1)
  32108. arrayFormat = "brackets";
  32109. for (const key in data) {
  32110. const value2 = data[key];
  32111. if (["", void 0, null].indexOf(value2) >= 0) {
  32112. continue;
  32113. }
  32114. if (value2.constructor === Array) {
  32115. switch (arrayFormat) {
  32116. case "indices":
  32117. for (let i = 0; i < value2.length; i++) {
  32118. _result.push(`${key}[${i}]=${value2[i]}`);
  32119. }
  32120. break;
  32121. case "brackets":
  32122. value2.forEach((_value) => {
  32123. _result.push(`${key}[]=${_value}`);
  32124. });
  32125. break;
  32126. case "repeat":
  32127. value2.forEach((_value) => {
  32128. _result.push(`${key}=${_value}`);
  32129. });
  32130. break;
  32131. case "comma":
  32132. let commaStr = "";
  32133. value2.forEach((_value) => {
  32134. commaStr += (commaStr ? "," : "") + _value;
  32135. });
  32136. _result.push(`${key}=${commaStr}`);
  32137. break;
  32138. default:
  32139. value2.forEach((_value) => {
  32140. _result.push(`${key}[]=${_value}`);
  32141. });
  32142. }
  32143. } else {
  32144. _result.push(`${key}=${value2}`);
  32145. }
  32146. }
  32147. return _result.length ? prefix + _result.join("&") : "";
  32148. }
  32149. function toast(title, duration = 2e3) {
  32150. uni.showToast({
  32151. title: String(title),
  32152. icon: "none",
  32153. duration
  32154. });
  32155. }
  32156. function type2icon(type2 = "success", fill = false) {
  32157. if (["primary", "info", "error", "warning", "success"].indexOf(type2) == -1)
  32158. type2 = "success";
  32159. let iconName = "";
  32160. switch (type2) {
  32161. case "primary":
  32162. iconName = "info-circle";
  32163. break;
  32164. case "info":
  32165. iconName = "info-circle";
  32166. break;
  32167. case "error":
  32168. iconName = "close-circle";
  32169. break;
  32170. case "warning":
  32171. iconName = "error-circle";
  32172. break;
  32173. case "success":
  32174. iconName = "checkmark-circle";
  32175. break;
  32176. default:
  32177. iconName = "checkmark-circle";
  32178. }
  32179. if (fill)
  32180. iconName += "-fill";
  32181. return iconName;
  32182. }
  32183. function priceFormat(number3, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") {
  32184. number3 = `${number3}`.replace(/[^0-9+-Ee.]/g, "");
  32185. const n = !isFinite(+number3) ? 0 : +number3;
  32186. const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
  32187. const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator;
  32188. const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint;
  32189. let s = "";
  32190. s = (prec ? round(n, prec) + "" : `${Math.round(n)}`).split(".");
  32191. const re = /(-?\d+)(\d{3})/;
  32192. while (re.test(s[0])) {
  32193. s[0] = s[0].replace(re, `$1${sep}$2`);
  32194. }
  32195. if ((s[1] || "").length < prec) {
  32196. s[1] = s[1] || "";
  32197. s[1] += new Array(prec - s[1].length + 1).join("0");
  32198. }
  32199. return s.join(dec);
  32200. }
  32201. function getDuration(value2, unit = true) {
  32202. const valueNum = parseInt(value2);
  32203. if (unit) {
  32204. if (/s$/.test(value2))
  32205. return value2;
  32206. return value2 > 30 ? `${value2}ms` : `${value2}s`;
  32207. }
  32208. if (/ms$/.test(value2))
  32209. return valueNum;
  32210. if (/s$/.test(value2))
  32211. return valueNum > 30 ? valueNum : valueNum * 1e3;
  32212. return valueNum;
  32213. }
  32214. function padZero(value2) {
  32215. return `00${value2}`.slice(-2);
  32216. }
  32217. function formValidate(instance, event) {
  32218. const formItem = uni.$u.$parent.call(instance, "u-form-item");
  32219. const form = uni.$u.$parent.call(instance, "u-form");
  32220. if (formItem && form) {
  32221. form.validateField(formItem.prop, () => {
  32222. }, event);
  32223. }
  32224. }
  32225. function getProperty(obj, key) {
  32226. if (!obj) {
  32227. return;
  32228. }
  32229. if (typeof key !== "string" || key === "") {
  32230. return "";
  32231. }
  32232. if (key.indexOf(".") !== -1) {
  32233. const keys = key.split(".");
  32234. let firstObj = obj[keys[0]] || {};
  32235. for (let i = 1; i < keys.length; i++) {
  32236. if (firstObj) {
  32237. firstObj = firstObj[keys[i]];
  32238. }
  32239. }
  32240. return firstObj;
  32241. }
  32242. return obj[key];
  32243. }
  32244. function setProperty(obj, key, value2) {
  32245. if (!obj) {
  32246. return;
  32247. }
  32248. const inFn = function(_obj, keys, v) {
  32249. if (keys.length === 1) {
  32250. _obj[keys[0]] = v;
  32251. return;
  32252. }
  32253. while (keys.length > 1) {
  32254. const k = keys[0];
  32255. if (!_obj[k] || typeof _obj[k] !== "object") {
  32256. _obj[k] = {};
  32257. }
  32258. keys.shift();
  32259. inFn(_obj[k], keys, v);
  32260. }
  32261. };
  32262. if (typeof key !== "string" || key === "")
  32263. ;
  32264. else if (key.indexOf(".") !== -1) {
  32265. const keys = key.split(".");
  32266. inFn(obj, keys, value2);
  32267. } else {
  32268. obj[key] = value2;
  32269. }
  32270. }
  32271. function page() {
  32272. const pages2 = getCurrentPages();
  32273. return `/${pages2[pages2.length - 1].route || ""}`;
  32274. }
  32275. function pages() {
  32276. const pages2 = getCurrentPages();
  32277. return pages2;
  32278. }
  32279. function setConfig({
  32280. props: props2 = {},
  32281. config: config2 = {},
  32282. color: color2 = {},
  32283. zIndex: zIndex2 = {}
  32284. }) {
  32285. const {
  32286. deepMerge: deepMerge2
  32287. } = uni.$u;
  32288. uni.$u.config = deepMerge2(uni.$u.config, config2);
  32289. uni.$u.props = deepMerge2(uni.$u.props, props2);
  32290. uni.$u.color = deepMerge2(uni.$u.color, color2);
  32291. uni.$u.zIndex = deepMerge2(uni.$u.zIndex, zIndex2);
  32292. }
  32293. const index = {
  32294. range,
  32295. getPx,
  32296. sleep,
  32297. os,
  32298. sys,
  32299. random,
  32300. guid,
  32301. $parent,
  32302. addStyle,
  32303. addUnit,
  32304. deepClone,
  32305. deepMerge,
  32306. error,
  32307. randomArray,
  32308. timeFormat,
  32309. timeFrom,
  32310. trim,
  32311. queryParams,
  32312. toast,
  32313. type2icon,
  32314. priceFormat,
  32315. getDuration,
  32316. padZero,
  32317. formValidate,
  32318. getProperty,
  32319. setProperty,
  32320. page,
  32321. pages,
  32322. setConfig
  32323. };
  32324. const zIndex = {
  32325. toast: 10090,
  32326. noNetwork: 10080,
  32327. // popup包含popup,actionsheet,keyboard,picker的值
  32328. popup: 10075,
  32329. mask: 10070,
  32330. navbar: 980,
  32331. topTips: 975,
  32332. sticky: 970,
  32333. indexListSticky: 965
  32334. };
  32335. let platform = "none";
  32336. platform = "vue3";
  32337. platform = "plus";
  32338. const platform$1 = platform;
  32339. const $u = {
  32340. route,
  32341. date: index.timeFormat,
  32342. // 另名date
  32343. colorGradient: colorGradient$1.colorGradient,
  32344. hexToRgb: colorGradient$1.hexToRgb,
  32345. rgbToHex: colorGradient$1.rgbToHex,
  32346. colorToRgba: colorGradient$1.colorToRgba,
  32347. test,
  32348. type: ["primary", "success", "error", "warning", "info"],
  32349. http: new Request(),
  32350. config,
  32351. // uView配置信息相关,比如版本号
  32352. zIndex,
  32353. debounce,
  32354. throttle,
  32355. mixin,
  32356. mpMixin,
  32357. props: props$E,
  32358. ...index,
  32359. color,
  32360. platform: platform$1
  32361. };
  32362. uni.$u = $u;
  32363. const install = (Vue2) => {
  32364. Vue2.config.globalProperties.$u = $u;
  32365. Vue2.config.globalProperties.$nextTick = (cb) => {
  32366. cb();
  32367. };
  32368. Vue2.mixin(mixin);
  32369. };
  32370. const uviewPlus = {
  32371. install
  32372. };
  32373. const share = {
  32374. data() {
  32375. return {
  32376. // 默认的全局分享内容
  32377. share: {
  32378. title: "标题",
  32379. path: "/pages/home/home",
  32380. // 这里是分享的页面
  32381. imageUrl: ""
  32382. // 这里是分析的图片,如果不写则默认截取当前分享页为分享图片
  32383. }
  32384. };
  32385. },
  32386. // 定义全局分享
  32387. // 1.发送给朋友
  32388. onShareAppMessage(res2) {
  32389. return {
  32390. title: this.share.title,
  32391. path: this.share.path,
  32392. imageUrl: this.share.imageUrl
  32393. };
  32394. },
  32395. //2.分享到朋友圈
  32396. onShareTimeline(res2) {
  32397. return {
  32398. title: this.share.title,
  32399. path: this.share.path,
  32400. imageUrl: this.share.imageUrl
  32401. };
  32402. }
  32403. };
  32404. let ttsModule = new VolumeTTS();
  32405. useInit();
  32406. uni.$u.ttsModule = ttsModule;
  32407. uni.$u.useGlobalEvent = useGlobalEvent;
  32408. function createApp() {
  32409. const app = vue.createVueApp(App);
  32410. initRequest();
  32411. const pinia2 = createPinia();
  32412. app.use(pinia2).use(uviewPlus);
  32413. app.mixin(share);
  32414. return {
  32415. app,
  32416. pinia: pinia2
  32417. };
  32418. }
  32419. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  32420. uni.Vuex = __Vuex__;
  32421. uni.Pinia = __Pinia__;
  32422. __app__.provide("__globalStyles", __uniConfig.styles);
  32423. __app__._component.mpType = "app";
  32424. __app__._component.render = () => {
  32425. };
  32426. __app__.mount("#app");
  32427. })(Vue);